From: Rosen Penev Date: Sat, 25 Nov 2023 22:03:10 +0000 (-0800) Subject: mediatek: convert to nvmem-layout X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=405bc5be130af76bb8570a689cf58e7ea679b0e1;p=openwrt%2Fstaging%2Fthess.git mediatek: convert to nvmem-layout Will allow removing mac-address-increment. Signed-off-by: Rosen Penev --- diff --git a/target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts b/target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts index a9f2959191..b8fac373a0 100644 --- a/target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts +++ b/target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts @@ -87,7 +87,6 @@ }; factory: partition@1c0000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x1c0000 0x40000>; read-only; diff --git a/target/linux/mediatek/dts/mt7622-dlink-eagle-pro-ai-m32-a1.dts b/target/linux/mediatek/dts/mt7622-dlink-eagle-pro-ai-m32-a1.dts index ca680e4c29..9c90cee516 100644 --- a/target/linux/mediatek/dts/mt7622-dlink-eagle-pro-ai-m32-a1.dts +++ b/target/linux/mediatek/dts/mt7622-dlink-eagle-pro-ai-m32-a1.dts @@ -300,22 +300,24 @@ }; odm: partition@180000 { - compatible = "nvmem-cells"; label = "Odm"; reg = <0x00180000 0x00040000>; read-only; - macaddr_odm_83: macaddr@83 { - reg = <0x83 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_odm_83: macaddr@83 { + reg = <0x83 0x6>; + }; }; }; config1: partition@1C0000 { - compatible = "nvmem-cells"; label = "Config1"; reg = <0x001C0000 0x00080000>; - #address-cells = <1>; - #size-cells = <1>; read-only; }; diff --git a/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts b/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts index c7e11c80b0..503e12c91b 100644 --- a/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts +++ b/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts @@ -326,20 +326,22 @@ reg = <0x1c0000 0x100000>; read-only; - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; - macaddr_factory_7fff4: macaddr@7fff4 { - reg = <0x7fff4 0x6>; - }; + macaddr_factory_7fff4: macaddr@7fff4 { + reg = <0x7fff4 0x6>; + }; - macaddr_factory_7fffa: macaddr@7fffa { - reg = <0x7fffa 0x6>; + macaddr_factory_7fffa: macaddr@7fffa { + reg = <0x7fffa 0x6>; + }; }; }; diff --git a/target/linux/mediatek/dts/mt7622-linksys-e8450-ubi.dts b/target/linux/mediatek/dts/mt7622-linksys-e8450-ubi.dts index 9df736eb01..e78db1de6c 100644 --- a/target/linux/mediatek/dts/mt7622-linksys-e8450-ubi.dts +++ b/target/linux/mediatek/dts/mt7622-linksys-e8450-ubi.dts @@ -34,6 +34,20 @@ label = "factory"; reg = <0x1c0000 0x100000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_7fff4: macaddr@7fff4 { + reg = <0x7fff4 0x6>; + }; + + macaddr_factory_7fffa: macaddr@7fffa { + reg = <0x7fffa 0x6>; + }; + }; }; partition@300000 { @@ -61,17 +75,3 @@ nvmem-cells = <&macaddr_factory_7fffa>; nvmem-cell-names = "mac-address"; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_7fff4: macaddr@7fff4 { - reg = <0x7fff4 0x6>; - }; - - macaddr_factory_7fffa: macaddr@7fffa { - reg = <0x7fffa 0x6>; - }; -}; diff --git a/target/linux/mediatek/dts/mt7622-linksys-e8450.dts b/target/linux/mediatek/dts/mt7622-linksys-e8450.dts index 8552dbf1a9..dedcc057f4 100644 --- a/target/linux/mediatek/dts/mt7622-linksys-e8450.dts +++ b/target/linux/mediatek/dts/mt7622-linksys-e8450.dts @@ -45,6 +45,20 @@ factory: partition@1c0000 { label = "factory"; reg = <0x1c0000 0x0100000>; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_7fff4: macaddr@7fff4 { + reg = <0x7fff4 0x6>; + }; + + macaddr_factory_7fffa: macaddr@7fffa { + reg = <0x7fffa 0x6>; + }; + }; }; partition@300000 { @@ -106,17 +120,3 @@ nvmem-cells = <&macaddr_factory_7fffa>; nvmem-cell-names = "mac-address"; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_7fff4: macaddr@7fff4 { - reg = <0x7fff4 0x6>; - }; - - macaddr_factory_7fffa: macaddr@7fffa { - reg = <0x7fffa 0x6>; - }; -}; diff --git a/target/linux/mediatek/dts/mt7622-netgear-wax206.dts b/target/linux/mediatek/dts/mt7622-netgear-wax206.dts index 9e877b85f1..737ac35f3d 100644 --- a/target/linux/mediatek/dts/mt7622-netgear-wax206.dts +++ b/target/linux/mediatek/dts/mt7622-netgear-wax206.dts @@ -405,19 +405,22 @@ }; factory: partition@1c0000 { - compatible = "nvmem-cells"; label = "Factory"; reg = <0x1c0000 0x0100000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - macaddr_factory_7fff4: macaddr@7fff4 { - reg = <0x7fff4 0x6>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_7fffa: macaddr@7fffa { - reg = <0x7fffa 0x6>; + macaddr_factory_7fff4: macaddr@7fff4 { + reg = <0x7fff4 0x6>; + }; + + macaddr_factory_7fffa: macaddr@7fffa { + reg = <0x7fffa 0x6>; + }; }; }; diff --git a/target/linux/mediatek/dts/mt7622-totolink-a8000ru.dts b/target/linux/mediatek/dts/mt7622-totolink-a8000ru.dts index b634e28783..776d38d1e3 100644 --- a/target/linux/mediatek/dts/mt7622-totolink-a8000ru.dts +++ b/target/linux/mediatek/dts/mt7622-totolink-a8000ru.dts @@ -284,6 +284,20 @@ label = "factory"; reg = <0x1c0000 0x40000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_24: macaddr@24 { + reg = <0x24 0x6>; + }; + + macaddr_factory_2a: macaddr@2a { + reg = <0x2a 0x6>; + }; + }; }; partition@200000 { @@ -305,20 +319,6 @@ }; }; -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_24: macaddr@24 { - reg = <0x24 0x6>; - }; - - macaddr_factory_2a: macaddr@2a { - reg = <0x2a 0x6>; - }; -}; - &ssusb { vusb33-supply = <®_3p3v>; vbus-supply = <®_5v>; diff --git a/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v1-ubootmod.dts b/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v1-ubootmod.dts index 5b1fd1d9ba..7a7a8a8159 100644 --- a/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v1-ubootmod.dts +++ b/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v1-ubootmod.dts @@ -33,6 +33,20 @@ label = "eeprom"; reg = <0x110000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_eeprom_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_eeprom_6: macaddr@6 { + reg = <0x6 0x6>; + }; + }; }; partition@120000 { @@ -68,17 +82,3 @@ nvmem-cells = <&macaddr_eeprom_0>; nvmem-cell-names = "mac-address"; }; - -&eeprom { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_eeprom_0: macaddr@0 { - reg = <0x0 0x6>; - }; - - macaddr_eeprom_6: macaddr@6 { - reg = <0x6 0x6>; - }; -}; diff --git a/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v1.dts b/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v1.dts index 95f19af4cd..7e07e1ba6b 100644 --- a/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v1.dts +++ b/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v1.dts @@ -38,6 +38,20 @@ label = "eeprom"; reg = <0x110000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_eeprom_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_eeprom_6: macaddr@6 { + reg = <0x6 0x6>; + }; + }; }; partition@120000 { @@ -84,17 +98,3 @@ nvmem-cells = <&macaddr_eeprom_0>; nvmem-cell-names = "mac-address"; }; - -&eeprom { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_eeprom_0: macaddr@0 { - reg = <0x0 0x6>; - }; - - macaddr_eeprom_6: macaddr@6 { - reg = <0x6 0x6>; - }; -}; diff --git a/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v2-ubootmod.dts b/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v2-ubootmod.dts index 6a7b6868ce..3a37d1d500 100644 --- a/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v2-ubootmod.dts +++ b/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v2-ubootmod.dts @@ -33,6 +33,20 @@ label = "eeprom"; reg = <0x110000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_eeprom_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_eeprom_6: macaddr@6 { + reg = <0x6 0x6>; + }; + }; }; partition@120000 { @@ -68,17 +82,3 @@ nvmem-cells = <&macaddr_eeprom_0>; nvmem-cell-names = "mac-address"; }; - -&eeprom { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_eeprom_0: macaddr@0 { - reg = <0x0 0x6>; - }; - - macaddr_eeprom_6: macaddr@6 { - reg = <0x6 0x6>; - }; -}; diff --git a/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v2.dts b/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v2.dts index f40e8e632b..9fef3d6721 100644 --- a/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v2.dts +++ b/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v2.dts @@ -38,6 +38,20 @@ label = "eeprom"; reg = <0x110000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_eeprom_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_eeprom_6: macaddr@6 { + reg = <0x6 0x6>; + }; + }; }; partition@120000 { @@ -84,17 +98,3 @@ nvmem-cells = <&macaddr_eeprom_0>; nvmem-cell-names = "mac-address"; }; - -&eeprom { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_eeprom_0: macaddr@0 { - reg = <0x0 0x6>; - }; - - macaddr_eeprom_6: macaddr@6 { - reg = <0x6 0x6>; - }; -}; diff --git a/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v3-ubootmod.dts b/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v3-ubootmod.dts index 46faf8da30..e91aaa63f5 100644 --- a/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v3-ubootmod.dts +++ b/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v3-ubootmod.dts @@ -33,6 +33,20 @@ label = "eeprom"; reg = <0x110000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_eeprom_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_eeprom_6: macaddr@6 { + reg = <0x6 0x6>; + }; + }; }; partition@120000 { @@ -68,17 +82,3 @@ nvmem-cells = <&macaddr_eeprom_0>; nvmem-cell-names = "mac-address"; }; - -&eeprom { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_eeprom_0: macaddr@0 { - reg = <0x0 0x6>; - }; - - macaddr_eeprom_6: macaddr@6 { - reg = <0x6 0x6>; - }; -}; diff --git a/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v3.dts b/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v3.dts index 34bdaa6254..71ee9f0cec 100644 --- a/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v3.dts +++ b/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v3.dts @@ -38,6 +38,20 @@ label = "eeprom"; reg = <0x110000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_eeprom_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_eeprom_6: macaddr@6 { + reg = <0x6 0x6>; + }; + }; }; partition@120000 { @@ -84,17 +98,3 @@ nvmem-cells = <&macaddr_eeprom_0>; nvmem-cell-names = "mac-address"; }; - -&eeprom { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_eeprom_0: macaddr@0 { - reg = <0x0 0x6>; - }; - - macaddr_eeprom_6: macaddr@6 { - reg = <0x6 0x6>; - }; -}; diff --git a/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts b/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts index ecc25fd328..df571a5375 100644 --- a/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts +++ b/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts @@ -268,12 +268,14 @@ reg = <0x1c0000 0x80000>; read-only; - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; }; diff --git a/target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts b/target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts index dc1868a066..20aeac6e14 100644 --- a/target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts +++ b/target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts @@ -212,12 +212,14 @@ reg = <0x140000 0x80000>; read-only; - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; }; diff --git a/target/linux/mediatek/dts/mt7629-tplink_eap225-v5.dts b/target/linux/mediatek/dts/mt7629-tplink_eap225-v5.dts index 52e22541fa..5eab714fda 100644 --- a/target/linux/mediatek/dts/mt7629-tplink_eap225-v5.dts +++ b/target/linux/mediatek/dts/mt7629-tplink_eap225-v5.dts @@ -102,11 +102,16 @@ partition@90000 { label = "Factory"; reg = <0x00090000 0x00010000>; - compatible = "nvmem-cells"; read-only; - macaddr_factory_8: macaddr@8 { - reg = <0x8 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_8: macaddr@8 { + reg = <0x8 0x6>; + }; }; }; diff --git a/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts b/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts index ece78ee50e..48fe2f2fc0 100644 --- a/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts +++ b/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts @@ -115,16 +115,18 @@ reg = <0x00000 0x10000>; read-only; - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_eeprom_0: macaddr@0 { - reg = <0x0 0x6>; - }; - - macaddr_eeprom_6: macaddr@6 { - reg = <0x6 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_eeprom_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_eeprom_6: macaddr@6 { + reg = <0x6 0x6>; + }; }; }; diff --git a/target/linux/mediatek/dts/mt7981b-cetron-ct3003.dts b/target/linux/mediatek/dts/mt7981b-cetron-ct3003.dts index aea6f02da2..4949cdb3d7 100644 --- a/target/linux/mediatek/dts/mt7981b-cetron-ct3003.dts +++ b/target/linux/mediatek/dts/mt7981b-cetron-ct3003.dts @@ -128,12 +128,14 @@ reg = <0x0180000 0x0100000>; read-only; - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_art_0: macaddr@0 { - reg = <0x0 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; }; }; diff --git a/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m-nand.dtso b/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m-nand.dtso index ff94a550fd..4d2b01cb63 100644 --- a/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m-nand.dtso +++ b/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m-nand.dtso @@ -84,7 +84,6 @@ reg = <0x180000 0x200000>; read-only; - compatible = "nvmem-cells"; nvmem-layout { compatible = "fixed-layout"; #address-cells = <1>; diff --git a/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts b/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts index 56e90b1722..366d35ecf8 100644 --- a/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts +++ b/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts @@ -168,6 +168,16 @@ label = "bdinfo"; reg = <0x60000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_bdinfo_de00: macaddr@de00 { + reg = <0xde00 0x6>; + }; + }; }; partition@70000 { @@ -270,13 +280,3 @@ status = "okay"; mediatek,mtd-eeprom = <&factory 0x0>; }; - -&bdinfo { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_bdinfo_de00: macaddr@de00 { - reg = <0xde00 0x6>; - }; -}; diff --git a/target/linux/mediatek/dts/mt7981b-glinet-gl-mt3000.dts b/target/linux/mediatek/dts/mt7981b-glinet-gl-mt3000.dts index f9b8c16652..135eb0410d 100644 --- a/target/linux/mediatek/dts/mt7981b-glinet-gl-mt3000.dts +++ b/target/linux/mediatek/dts/mt7981b-glinet-gl-mt3000.dts @@ -179,12 +179,14 @@ reg = <0x180000 0x0200000>; read-only; - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr: macaddr@a { - reg = <0xa 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr: macaddr@a { + reg = <0xa 0x6>; + }; }; }; diff --git a/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts b/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts index d85c6e4651..bb6b474080 100644 --- a/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts +++ b/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts @@ -118,6 +118,20 @@ label = "Factory"; reg = <0x0180000 0x0200000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_wan: macaddr@a0024 { + reg = <0xa0024 0x6>; + }; + + macaddr_lan: macaddr@a002a { + reg = <0xa002a 0x6>; + }; + }; }; partition@380000 { @@ -209,17 +223,3 @@ mediatek,mtd-eeprom = <&factory 0x0>; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_wan: macaddr@a0024 { - reg = <0xa0024 0x6>; - }; - - macaddr_lan: macaddr@a002a { - reg = <0xa002a 0x6>; - }; -}; diff --git a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi index d09ae2a3e7..82f3d35014 100644 --- a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi +++ b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi @@ -177,12 +177,14 @@ reg = <0x180000 0x200000>; read-only; - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; }; diff --git a/target/linux/mediatek/dts/mt7981b-zyxel-nwa50ax-pro.dts b/target/linux/mediatek/dts/mt7981b-zyxel-nwa50ax-pro.dts index d222cebb4f..54df8c054a 100644 --- a/target/linux/mediatek/dts/mt7981b-zyxel-nwa50ax-pro.dts +++ b/target/linux/mediatek/dts/mt7981b-zyxel-nwa50ax-pro.dts @@ -136,12 +136,14 @@ reg = <0x180000 0x0200000>; read-only; - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr: macaddr@a { - reg = <0xa 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr: macaddr@a { + reg = <0xa 0x6>; + }; }; }; @@ -190,12 +192,14 @@ reg = <0xef80000 0x80000>; read-only; - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_mrd_1fff8: macaddr@1fff8 { - reg = <0x1fff8 0x6>; + macaddr_mrd_1fff8: macaddr@1fff8 { + reg = <0x1fff8 0x6>; + }; }; }; }; diff --git a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi index ddf332a0dc..c339d0e6f3 100644 --- a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi +++ b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi @@ -182,6 +182,16 @@ label = "config"; reg = <0x100000 0x0060000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_1c: macaddr@1c { + reg = <0x1c 0x6>; + }; + }; }; factory: partition@160000 { @@ -258,13 +268,3 @@ mac-address-increment = <2>; status = "okay"; }; - -&config { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_config_1c: macaddr@1c { - reg = <0x1c 0x6>; - }; -}; diff --git a/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi b/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi index b2711eb7d7..5974802df0 100644 --- a/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi +++ b/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi @@ -167,12 +167,14 @@ reg = <0x180000 0x200000>; read-only; - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; }; diff --git a/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-stock.dts b/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-stock.dts index 987510d486..4dbbd13677 100644 --- a/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-stock.dts +++ b/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-stock.dts @@ -43,6 +43,35 @@ label = "Factory"; reg = <0x180000 0x0200000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory: eeprom@0 { + #size-cells = <1>; + reg = <0x0 0x1000>; + }; + + macaddr_factory_0004: macaddr@0004 { + compatible = "mac-base"; + reg = <0x0004 0x6>; + #nvmem-cell-cells = <1>; + }; + + macaddr_factory_0024: macaddr@0024 { + compatible = "mac-base"; + reg = <0x0024 0x6>; + #nvmem-cell-cells = <1>; + }; + + macaddr_factory_002a: macaddr@002a { + compatible = "mac-base"; + reg = <0x002a 0x6>; + #nvmem-cell-cells = <1>; + }; + }; }; partition@380000 { @@ -74,40 +103,6 @@ }; }; -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - nvmem-layout { - compatible = "fixed-layout"; - #address-cells = <1>; - - eeprom_factory: eeprom@0 { - #size-cells = <1>; - reg = <0x0 0x1000>; - }; - - macaddr_factory_0004: macaddr@0004 { - compatible = "mac-base"; - reg = <0x0004 0x6>; - #nvmem-cell-cells = <1>; - }; - - macaddr_factory_0024: macaddr@0024 { - compatible = "mac-base"; - reg = <0x0024 0x6>; - #nvmem-cell-cells = <1>; - }; - - macaddr_factory_002a: macaddr@002a { - compatible = "mac-base"; - reg = <0x002a 0x6>; - #nvmem-cell-cells = <1>; - }; - }; -}; - &gmac0 { nvmem-cells = <&macaddr_factory_002a 0>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-ubootmod.dts b/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-ubootmod.dts index a300e2052d..62ce50ed23 100644 --- a/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-ubootmod.dts +++ b/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-ubootmod.dts @@ -36,6 +36,35 @@ label = "Factory"; reg = <0x180000 0x0200000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory: eeprom@0 { + #size-cells = <1>; + reg = <0x0 0x1000>; + }; + + macaddr_factory_0004: macaddr@0004 { + compatible = "mac-base"; + reg = <0x0004 0x6>; + #nvmem-cell-cells = <1>; + }; + + macaddr_factory_0024: macaddr@0024 { + compatible = "mac-base"; + reg = <0x0024 0x6>; + #nvmem-cell-cells = <1>; + }; + + macaddr_factory_002a: macaddr@002a { + compatible = "mac-base"; + reg = <0x002a 0x6>; + #nvmem-cell-cells = <1>; + }; + }; }; partition@380000 { @@ -56,40 +85,6 @@ }; }; -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - nvmem-layout { - compatible = "fixed-layout"; - #address-cells = <1>; - - eeprom_factory: eeprom@0 { - #size-cells = <1>; - reg = <0x0 0x1000>; - }; - - macaddr_factory_0004: macaddr@0004 { - compatible = "mac-base"; - reg = <0x0004 0x6>; - #nvmem-cell-cells = <1>; - }; - - macaddr_factory_0024: macaddr@0024 { - compatible = "mac-base"; - reg = <0x0024 0x6>; - #nvmem-cell-cells = <1>; - }; - - macaddr_factory_002a: macaddr@002a { - compatible = "mac-base"; - reg = <0x002a 0x6>; - #nvmem-cell-cells = <1>; - }; - }; -}; - &gmac0 { nvmem-cells = <&macaddr_factory_002a 0>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts b/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts index a486f29fec..f5bb73c97d 100644 --- a/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts +++ b/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts @@ -337,10 +337,6 @@ label = "Factory"; reg = <0x180000 0x200000>; read-only; - - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; }; partition@380000 { label = "FIP";