From: Rosen Penev Date: Mon, 27 Apr 2026 23:26:55 +0000 (-0700) Subject: mediatek: filogic: replace mtd-eeprom with nvmem X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53fa04d2619f5ac8d3043c08e1beddf5afa0651e;p=thirdparty%2Fopenwrt.git mediatek: filogic: replace mtd-eeprom with nvmem These use fairly standard sizes. 0x1000 for mt7916 and 0x1e00 for mt7992. Added a mediatek,mt76 compatible line where missing as required by mt76 upstream Documentation. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/23113 Signed-off-by: Jonas Jelonek --- diff --git a/target/linux/mediatek/dts/mt7981a-comfast-cf-e393ax.dts b/target/linux/mediatek/dts/mt7981a-comfast-cf-e393ax.dts index 9da39711439..548e60c0dda 100644 --- a/target/linux/mediatek/dts/mt7981a-comfast-cf-e393ax.dts +++ b/target/linux/mediatek/dts/mt7981a-comfast-cf-e393ax.dts @@ -167,7 +167,7 @@ read-only; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x180000 0x0200000>; read-only; diff --git a/target/linux/mediatek/dts/mt7981a-teltonika-rutc50.dts b/target/linux/mediatek/dts/mt7981a-teltonika-rutc50.dts index 8297fdc69c6..9172ac37f5b 100644 --- a/target/linux/mediatek/dts/mt7981a-teltonika-rutc50.dts +++ b/target/linux/mediatek/dts/mt7981a-teltonika-rutc50.dts @@ -382,7 +382,7 @@ reg = <0x40000 0x0010000>; }; - factory: partition@50000 { + partition@50000 { label = "factory"; reg = <0x50000 0x00A0000>; read-only; @@ -398,11 +398,7 @@ }; }; - config: partition@f0000 { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - + partition@f0000 { label = "config"; reg = <0xF0000 0x0010000>; read-only; 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 2f21f8939fb..e4c7c3cc95c 100644 --- a/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts +++ b/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts @@ -111,7 +111,7 @@ #address-cells = <1>; #size-cells = <1>; - eeprom: partition@0 { + partition@0 { label = "EEPROM"; reg = <0x00000 0x10000>; read-only; diff --git a/target/linux/mediatek/dts/mt7981b-bazis-ax3000wm.dts b/target/linux/mediatek/dts/mt7981b-bazis-ax3000wm.dts index 5d9978a3ebf..7c08e754049 100644 --- a/target/linux/mediatek/dts/mt7981b-bazis-ax3000wm.dts +++ b/target/linux/mediatek/dts/mt7981b-bazis-ax3000wm.dts @@ -190,7 +190,7 @@ reg = <0x0100000 0x0080000>; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x180000 0x0200000>; read-only; diff --git a/target/linux/mediatek/dts/mt7981b-cetron-ct3003.dts b/target/linux/mediatek/dts/mt7981b-cetron-ct3003.dts index 7e115bec932..73eeacf223a 100644 --- a/target/linux/mediatek/dts/mt7981b-cetron-ct3003.dts +++ b/target/linux/mediatek/dts/mt7981b-cetron-ct3003.dts @@ -144,10 +144,20 @@ }; }; - factory: partition@280000 { + partition@280000 { label = "Factory"; reg = <0x0280000 0x0100000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + }; }; partition@380000 { @@ -247,5 +257,6 @@ &wifi { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/mediatek/dts/mt7981b-comfast-cf-wr632ax-common.dtsi b/target/linux/mediatek/dts/mt7981b-comfast-cf-wr632ax-common.dtsi index 43fb5c5a4ce..b418c15e7eb 100644 --- a/target/linux/mediatek/dts/mt7981b-comfast-cf-wr632ax-common.dtsi +++ b/target/linux/mediatek/dts/mt7981b-comfast-cf-wr632ax-common.dtsi @@ -166,7 +166,7 @@ read-only; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x180000 0x0200000>; read-only; diff --git a/target/linux/mediatek/dts/mt7981b-confiabits-mt7981.dts b/target/linux/mediatek/dts/mt7981b-confiabits-mt7981.dts index 167b49117ba..fec183da6c3 100644 --- a/target/linux/mediatek/dts/mt7981b-confiabits-mt7981.dts +++ b/target/linux/mediatek/dts/mt7981b-confiabits-mt7981.dts @@ -231,7 +231,7 @@ read-only; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x180000 0x0200000>; read-only; diff --git a/target/linux/mediatek/dts/mt7981b-cudy-ap3000outdoor-v1.dts b/target/linux/mediatek/dts/mt7981b-cudy-ap3000outdoor-v1.dts index 0dd195a0eae..6dfb8aea5ea 100644 --- a/target/linux/mediatek/dts/mt7981b-cudy-ap3000outdoor-v1.dts +++ b/target/linux/mediatek/dts/mt7981b-cudy-ap3000outdoor-v1.dts @@ -141,7 +141,7 @@ read-only; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x180000 0x0200000>; read-only; @@ -201,6 +201,7 @@ &wifi { status = "okay"; + nvmem-cells = <&eeprom_factory_0>; nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/mediatek/dts/mt7981b-cudy-ap3000wall-v1.dts b/target/linux/mediatek/dts/mt7981b-cudy-ap3000wall-v1.dts index adcbfdd9c56..23fa59e0e7f 100644 --- a/target/linux/mediatek/dts/mt7981b-cudy-ap3000wall-v1.dts +++ b/target/linux/mediatek/dts/mt7981b-cudy-ap3000wall-v1.dts @@ -156,7 +156,7 @@ read-only; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x180000 0x0200000>; read-only; @@ -271,6 +271,7 @@ &wifi { status = "okay"; + nvmem-cells = <&eeprom_factory_0>; nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/mediatek/dts/mt7981b-cudy-m3000.dtsi b/target/linux/mediatek/dts/mt7981b-cudy-m3000.dtsi index c6fa571e864..1d293c4ff76 100644 --- a/target/linux/mediatek/dts/mt7981b-cudy-m3000.dtsi +++ b/target/linux/mediatek/dts/mt7981b-cudy-m3000.dtsi @@ -130,10 +130,20 @@ reg = <0x0100000 0x0080000>; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x0180000 0x0200000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + }; }; bdinfo: partition@380000 { @@ -191,5 +201,7 @@ &wifi { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/mediatek/dts/mt7981b-cudy-re3000-v1.dts b/target/linux/mediatek/dts/mt7981b-cudy-re3000-v1.dts index d3e1e86b62c..826e86618aa 100644 --- a/target/linux/mediatek/dts/mt7981b-cudy-re3000-v1.dts +++ b/target/linux/mediatek/dts/mt7981b-cudy-re3000-v1.dts @@ -142,7 +142,7 @@ read-only; }; - factory: partition@50000 { + partition@50000 { label = "Factory"; reg = <0x50000 0x10000>; read-only; @@ -214,6 +214,7 @@ &wifi { status = "okay"; + nvmem-cells = <&eeprom_factory_0>; nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/mediatek/dts/mt7981b-cudy-tr3000-v1.dtsi b/target/linux/mediatek/dts/mt7981b-cudy-tr3000-v1.dtsi index 4f75b3359bc..c43f3328a3b 100644 --- a/target/linux/mediatek/dts/mt7981b-cudy-tr3000-v1.dtsi +++ b/target/linux/mediatek/dts/mt7981b-cudy-tr3000-v1.dtsi @@ -137,7 +137,7 @@ read-only; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x180000 0x0200000>; read-only; @@ -205,6 +205,7 @@ &wifi { status = "okay"; + nvmem-cells = <&eeprom_factory_0>; nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts b/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts index 72491d0d2ea..188615a5618 100644 --- a/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts +++ b/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts @@ -160,10 +160,20 @@ read-only; }; - factory: partition@50000 { + partition@50000 { label = "Factory"; reg = <0x50000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + }; }; bdinfo: partition@60000 { @@ -272,5 +282,7 @@ &wifi { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp.dts b/target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp.dts index d43718774b2..3689aacdc27 100644 --- a/target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp.dts +++ b/target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp.dts @@ -258,10 +258,13 @@ }; &wifi { + status = "okay"; + + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; + #address-cells = <1>; #size-cells = <0>; - mediatek,mtd-eeprom = <&factory 0x0>; - status = "okay"; wifi_band_0: band@0 { reg = <0>; @@ -302,7 +305,7 @@ reg = <0x40000 0x0010000>; }; - factory: partition@50000 { + partition@50000 { label = "Factory"; reg = <0x50000 0x00B0000>; read-only; @@ -312,6 +315,10 @@ #address-cells = <1>; #size-cells = <1>; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + macaddr_wifi: macaddr@4 { reg = <0x4 0x6>; compatible = "mac-base"; diff --git a/target/linux/mediatek/dts/mt7981b-glinet-gl-mt3000.dts b/target/linux/mediatek/dts/mt7981b-glinet-gl-mt3000.dts index 05daa7f475a..2a280bbff9c 100644 --- a/target/linux/mediatek/dts/mt7981b-glinet-gl-mt3000.dts +++ b/target/linux/mediatek/dts/mt7981b-glinet-gl-mt3000.dts @@ -171,7 +171,7 @@ reg = <0x0100000 0x0080000>; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x180000 0x0200000>; read-only; @@ -181,6 +181,10 @@ #address-cells = <1>; #size-cells = <1>; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + macaddr: macaddr@a { compatible = "mac-base"; reg = <0xa 0x6>; @@ -236,7 +240,8 @@ }; &wifi { - mediatek,mtd-eeprom = <&factory 0x0>; - status = "okay"; + + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts b/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts index 7b6e6dbce45..52de8b16966 100644 --- a/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts +++ b/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts @@ -128,10 +128,20 @@ reg = <0x0100000 0x0080000>; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x0180000 0x0200000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + }; }; partition@380000 { @@ -247,5 +257,6 @@ &wifi { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/mediatek/dts/mt7981b-iptime-ax3000m.dts b/target/linux/mediatek/dts/mt7981b-iptime-ax3000m.dts index 119d1487a59..f622187b506 100644 --- a/target/linux/mediatek/dts/mt7981b-iptime-ax3000m.dts +++ b/target/linux/mediatek/dts/mt7981b-iptime-ax3000m.dts @@ -205,7 +205,7 @@ reg = <0x100000 0x80000>; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x180000 0x200000>; read-only; diff --git a/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts b/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts index 9128d3496eb..d043f45cfa6 100644 --- a/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts +++ b/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts @@ -119,7 +119,7 @@ reg = <0x0100000 0x0080000>; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x0180000 0x0200000>; read-only; @@ -129,6 +129,10 @@ #address-cells = <1>; #size-cells = <1>; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + macaddr_wan: macaddr@a0024 { reg = <0xa0024 0x6>; }; @@ -233,5 +237,6 @@ &wifi { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/mediatek/dts/mt7981b-netgear-eax17.dts b/target/linux/mediatek/dts/mt7981b-netgear-eax17.dts index 55dce825517..8b40a6ec805 100644 --- a/target/linux/mediatek/dts/mt7981b-netgear-eax17.dts +++ b/target/linux/mediatek/dts/mt7981b-netgear-eax17.dts @@ -173,15 +173,18 @@ reg = <0x0100000 0x0080000>; }; - factory: partition@180000 { + partition@180000 { label = "factory"; reg = <0x180000 0x200000>; - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x1000>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; }; }; diff --git a/target/linux/mediatek/dts/mt7981b-openfi-6c.dts b/target/linux/mediatek/dts/mt7981b-openfi-6c.dts index 06f3cec532f..169281041d5 100644 --- a/target/linux/mediatek/dts/mt7981b-openfi-6c.dts +++ b/target/linux/mediatek/dts/mt7981b-openfi-6c.dts @@ -162,7 +162,7 @@ reg = <0x0100000 0x0080000>; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x180000 0x0200000>; read-only; diff --git a/target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts b/target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts index 5ef9aa7ab07..19b70578a41 100644 --- a/target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts +++ b/target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts @@ -48,6 +48,16 @@ label = "factory"; reg = <0x7280000 0x80000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + }; }; partition@7300000 { @@ -60,5 +70,6 @@ &wifi { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/mediatek/dts/mt7981b-tenbay-wr3000k.dts b/target/linux/mediatek/dts/mt7981b-tenbay-wr3000k.dts index a7bef173440..1d6ac14e2bf 100644 --- a/target/linux/mediatek/dts/mt7981b-tenbay-wr3000k.dts +++ b/target/linux/mediatek/dts/mt7981b-tenbay-wr3000k.dts @@ -179,7 +179,7 @@ reg = <0x0100000 0x0080000>; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x180000 0x0200000>; read-only; diff --git a/target/linux/mediatek/dts/mt7981b-unielec-u7981-01-nand.dts b/target/linux/mediatek/dts/mt7981b-unielec-u7981-01-nand.dts index cd0d926c353..1f406717dcb 100644 --- a/target/linux/mediatek/dts/mt7981b-unielec-u7981-01-nand.dts +++ b/target/linux/mediatek/dts/mt7981b-unielec-u7981-01-nand.dts @@ -43,7 +43,7 @@ reg = <0x0100000 0x0080000>; }; - factory: partition@180000 { + partition@180000 { label = "factory"; reg = <0x180000 0x200000>; read-only; diff --git a/target/linux/mediatek/dts/mt7981b-wavlink-wl-3port-128nand-common.dtsi b/target/linux/mediatek/dts/mt7981b-wavlink-wl-3port-128nand-common.dtsi index 238fb2b7900..11167aba0aa 100644 --- a/target/linux/mediatek/dts/mt7981b-wavlink-wl-3port-128nand-common.dtsi +++ b/target/linux/mediatek/dts/mt7981b-wavlink-wl-3port-128nand-common.dtsi @@ -81,7 +81,7 @@ read-only; }; - factory: partition@180000 { + partition@180000 { label = "factory"; reg = <0x180000 0x200000>; read-only; diff --git a/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn573hx3.dts b/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn573hx3.dts index a732092c14e..8033aee7024 100644 --- a/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn573hx3.dts +++ b/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn573hx3.dts @@ -110,7 +110,7 @@ read-only; }; - factory: partition@50000 { + partition@50000 { label = "factory"; reg = <0x50000 0xb0000>; read-only; diff --git a/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn586x3.dts b/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn586x3.dts index ed47a17fe77..f6b77cf3b7e 100644 --- a/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn586x3.dts +++ b/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn586x3.dts @@ -155,7 +155,7 @@ read-only; }; - factory: partition@50000 { + partition@50000 { label = "factory"; reg = <0x50000 0xb0000>; read-only; @@ -165,6 +165,10 @@ #address-cells = <1>; #size-cells = <1>; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + macaddr_factory_4: macaddr@4 { compatible = "mac-base"; reg = <0x4 0x6>; @@ -263,7 +267,7 @@ &wifi { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; - nvmem-cells = <&macaddr_factory_4 0>; - nvmem-cell-names = "mac-address"; + + nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4 0>; + nvmem-cell-names = "eeprom", "mac-address"; }; diff --git a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-common.dtsi b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-common.dtsi index be600a1a796..fdab9fe84f2 100644 --- a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-common.dtsi +++ b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-common.dtsi @@ -346,7 +346,7 @@ reg = <0x140000 0x40000>; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x180000 0x200000>; read-only; diff --git a/target/linux/mediatek/dts/mt7981b-yuncore-ax835.dts b/target/linux/mediatek/dts/mt7981b-yuncore-ax835.dts index 6b95a173c9e..2c02d860ced 100644 --- a/target/linux/mediatek/dts/mt7981b-yuncore-ax835.dts +++ b/target/linux/mediatek/dts/mt7981b-yuncore-ax835.dts @@ -169,7 +169,7 @@ read-only; }; - factory: partition@50000 { + partition@50000 { label = "Factory"; reg = <0x50000 0x10000>; read-only; diff --git a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts index 14a585e63ea..ed0433e95b8 100644 --- a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts +++ b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts @@ -195,10 +195,28 @@ reg = <0x0100000 0x0080000>; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x0180000 0x0200000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory: eeprom@0 { + reg = <0x0 0x1000>; + }; + + macaddr_factory_24: macaddr@24 { + reg = <0x24 0x6>; + }; + + macaddr_factory_2a: macaddr@2a { + reg = <0x2a 0x6>; + }; + }; }; partition@380000 { @@ -313,19 +331,3 @@ nvmem-cells = <&eeprom_factory>; nvmem-cell-names = "eeprom"; }; - -&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>; - }; - eeprom_factory: eeprom@0 { - reg = <0x0 0x1000>; - }; -}; diff --git a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8103ax.dtsi b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8103ax.dtsi index 6e8cff0bb54..ae05d3d646d 100644 --- a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8103ax.dtsi +++ b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8103ax.dtsi @@ -208,10 +208,38 @@ reg = <0x100000 0x80000>; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x180000 0x200000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory: eeprom@0 { + reg = <0x0 0x1000>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + compatible = "mac-base"; + #nvmem-cell-cells = <1>; + }; + + macaddr_factory_a: macaddr@a { + reg = <0xa 0x6>; + compatible = "mac-base"; + #nvmem-cell-cells = <1>; + }; + + macaddr_factory_2a: macaddr@2a { + reg = <0x2a 0x6>; + compatible = "mac-base"; + #nvmem-cell-cells = <1>; + }; + }; }; partition@380000 { @@ -276,31 +304,3 @@ nvmem-cell-names = "mac-address"; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - eeprom_factory: eeprom@0 { - reg = <0x0 0x1000>; - }; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - compatible = "mac-base"; - #nvmem-cell-cells = <1>; - }; - - macaddr_factory_a: macaddr@a { - reg = <0xa 0x6>; - compatible = "mac-base"; - #nvmem-cell-cells = <1>; - }; - - macaddr_factory_2a: macaddr@2a { - reg = <0x2a 0x6>; - compatible = "mac-base"; - #nvmem-cell-cells = <1>; - }; -}; diff --git a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8106ax.dtsi b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8106ax.dtsi index 8a4d06d53b4..63e74f38533 100644 --- a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8106ax.dtsi +++ b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8106ax.dtsi @@ -242,10 +242,38 @@ reg = <0x100000 0x80000>; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x180000 0x200000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory: eeprom@0 { + reg = <0x0 0x1000>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + compatible = "mac-base"; + #nvmem-cell-cells = <1>; + }; + + macaddr_factory_a: macaddr@a { + reg = <0xa 0x6>; + compatible = "mac-base"; + #nvmem-cell-cells = <1>; + }; + + macaddr_factory_2a: macaddr@2a { + reg = <0x2a 0x6>; + compatible = "mac-base"; + #nvmem-cell-cells = <1>; + }; + }; }; partition@380000 { @@ -320,31 +348,3 @@ vusb33-supply = <®_3p3v>; vbus-supply = <®_5v>; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - compatible = "mac-base"; - #nvmem-cell-cells = <1>; - }; - - macaddr_factory_a: macaddr@a { - reg = <0xa 0x6>; - compatible = "mac-base"; - #nvmem-cell-cells = <1>; - }; - - macaddr_factory_2a: macaddr@2a { - reg = <0x2a 0x6>; - compatible = "mac-base"; - #nvmem-cell-cells = <1>; - }; - - eeprom_factory: eeprom@0 { - reg = <0x0 0x1000>; - }; -}; diff --git a/target/linux/mediatek/dts/mt7981b-zyxel-nwa50ax-pro.dts b/target/linux/mediatek/dts/mt7981b-zyxel-nwa50ax-pro.dts index 6d964ad2aa5..ef30f71b984 100644 --- a/target/linux/mediatek/dts/mt7981b-zyxel-nwa50ax-pro.dts +++ b/target/linux/mediatek/dts/mt7981b-zyxel-nwa50ax-pro.dts @@ -143,7 +143,7 @@ reg = <0x0100000 0x0080000>; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x180000 0x0200000>; read-only; diff --git a/target/linux/mediatek/dts/mt7986a-acer-predator-w6.dts b/target/linux/mediatek/dts/mt7986a-acer-predator-w6.dts index 9396556cd7f..aa0697fe89a 100644 --- a/target/linux/mediatek/dts/mt7986a-acer-predator-w6.dts +++ b/target/linux/mediatek/dts/mt7986a-acer-predator-w6.dts @@ -163,7 +163,8 @@ }; &slot0 { - radio0: mt7915@0,0 { + radio0: wifi@0,0 { + compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; nvmem-cells = <&eeprom_factory_a0000>, <&precal_factory_a1010>; nvmem-cell-names = "eeprom", "precal"; diff --git a/target/linux/mediatek/dts/mt7986a-acer-vero-w6m.dts b/target/linux/mediatek/dts/mt7986a-acer-vero-w6m.dts index 683be1cf508..562b1209ba2 100644 --- a/target/linux/mediatek/dts/mt7986a-acer-vero-w6m.dts +++ b/target/linux/mediatek/dts/mt7986a-acer-vero-w6m.dts @@ -58,7 +58,8 @@ }; &slot0 { - radio0: mt7915@0,0 { + radio0: wifi@0,0 { + compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; nvmem-cells = <&eeprom_factory_a0000>, <&precal_factory_a1010>; nvmem-cell-names = "eeprom", "precal"; diff --git a/target/linux/mediatek/dts/mt7986a-netcore-n60.dts b/target/linux/mediatek/dts/mt7986a-netcore-n60.dts index 7e71e8a4b9c..eefffd2f1f2 100644 --- a/target/linux/mediatek/dts/mt7986a-netcore-n60.dts +++ b/target/linux/mediatek/dts/mt7986a-netcore-n60.dts @@ -203,10 +203,28 @@ reg = <0x0100000 0x0080000>; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x0180000 0x0200000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + + macaddr_lan: macaddr@1fef20 { + reg = <0x1fef20 0x6>; + }; + + macaddr_wan: macaddr@1fef26 { + reg = <0x1fef26 0x6>; + }; + }; }; partition@380000 { @@ -283,21 +301,6 @@ pinctrl-names = "default"; pinctrl-0 = <&wf_2g_5g_pins>; - mediatek,mtd-eeprom = <&factory 0x0>; -}; - -&factory { - nvmem-layout { - compatible = "fixed-layout"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_lan: macaddr@1fef20 { - reg = <0x1fef20 0x6>; - }; - - macaddr_wan: macaddr@1fef26 { - reg = <0x1fef26 0x6>; - }; - }; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/mediatek/dts/mt7986a-smartrg-bonanza-peak.dtsi b/target/linux/mediatek/dts/mt7986a-smartrg-bonanza-peak.dtsi index f71ef207f7a..046fa09315c 100644 --- a/target/linux/mediatek/dts/mt7986a-smartrg-bonanza-peak.dtsi +++ b/target/linux/mediatek/dts/mt7986a-smartrg-bonanza-peak.dtsi @@ -360,7 +360,8 @@ #address-cells = <3>; #size-cells = <2>; - radio0: mt7915@0,0 { + radio0: wifi@0,0 { + compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; nvmem-cells = <&eeprom_factory_a0000>, <&macaddr 4>; 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 62cce7fc089..c0412ba0c37 100644 --- a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi +++ b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi @@ -200,10 +200,20 @@ }; }; - factory: partition@160000 { + partition@160000 { label = "factory"; reg = <0x160000 0x0060000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + }; }; partition@1c0000 { @@ -275,8 +285,8 @@ }; &wifi { - mediatek,mtd-eeprom = <&factory 0x0>; - nvmem-cells = <&macaddr_config_1c 2>; - nvmem-cell-names = "mac-address"; status = "okay"; + + nvmem-cells = <&eeprom_factory_0>, <&macaddr_config_1c 2>; + nvmem-cell-names = "eeprom", "mac-address"; }; 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 09910347036..3071e42b6db 100644 --- a/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi +++ b/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi @@ -161,7 +161,7 @@ reg = <0x140000 0x40000>; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x180000 0x200000>; read-only; @@ -171,6 +171,10 @@ #address-cells = <1>; #size-cells = <1>; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + macaddr_factory_4: macaddr@4 { compatible = "mac-base"; reg = <0x4 0x6>; @@ -275,7 +279,8 @@ pinctrl-names = "default"; pinctrl-0 = <&wf_2g_5g_pins>; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; &uart0 { 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 fa64c1f4870..00f7a0a19c1 100644 --- a/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-stock.dts +++ b/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-stock.dts @@ -31,7 +31,7 @@ reg = <0x100000 0x80000>; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x180000 0x200000>; read-only; 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 5fb6c66ea14..10e93014597 100644 --- a/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-ubootmod.dts +++ b/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-ubootmod.dts @@ -30,7 +30,7 @@ read-only; }; - factory: partition@180000 { + partition@180000 { label = "factory"; reg = <0x180000 0x200000>; read-only; diff --git a/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts b/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts index 97f498ba8c4..ab54bdb0ec6 100644 --- a/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts +++ b/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts @@ -270,7 +270,9 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0xa0000>; + + nvmem-cells = <&eeprom_factory_a0000>; + nvmem-cell-names = "eeprom"; }; }; }; @@ -288,7 +290,8 @@ pinctrl-names = "default"; pinctrl-0 = <&wf_5g_pins>; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; &pio { @@ -369,10 +372,24 @@ label = "u-boot-env"; reg = <0x100000 0x80000>; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x180000 0x200000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + + eeprom_factory_a0000: eeprom@a0000 { + reg = <0xa0000 0xe00>; + }; + }; }; partition@380000 { label = "FIP"; diff --git a/target/linux/mediatek/dts/mt7986b-buffalo-wsr-6000ax8.dts b/target/linux/mediatek/dts/mt7986b-buffalo-wsr-6000ax8.dts index 02b68574b82..8e7a6915254 100644 --- a/target/linux/mediatek/dts/mt7986b-buffalo-wsr-6000ax8.dts +++ b/target/linux/mediatek/dts/mt7986b-buffalo-wsr-6000ax8.dts @@ -296,7 +296,7 @@ reg = <0x100000 0x80000>; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x180000 0x200000>; read-only; diff --git a/target/linux/mediatek/dts/mt7986b-netgear-wax220.dts b/target/linux/mediatek/dts/mt7986b-netgear-wax220.dts index b8dd2f52901..9a9f47be987 100644 --- a/target/linux/mediatek/dts/mt7986b-netgear-wax220.dts +++ b/target/linux/mediatek/dts/mt7986b-netgear-wax220.dts @@ -208,9 +208,19 @@ reg = <0x100000 0x80000>; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x180000 0x200000>; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + }; }; partition@380000 { @@ -290,5 +300,6 @@ pinctrl-0 = <&wf_2g_5g_pins>; pinctrl-1 = <&wf_dbdc_pins>; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/mediatek/dts/mt7987a-glinet-gl-mt3600be.dts b/target/linux/mediatek/dts/mt7987a-glinet-gl-mt3600be.dts index 784e134fff4..aeb5051d62c 100644 --- a/target/linux/mediatek/dts/mt7987a-glinet-gl-mt3600be.dts +++ b/target/linux/mediatek/dts/mt7987a-glinet-gl-mt3600be.dts @@ -137,7 +137,7 @@ pcie@0,0 { reg = <0x0000 0 0 0 0>; - mt7990@0,0 { + wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; #address-cells = <1>; diff --git a/target/linux/mediatek/dts/mt7987a-rfb-emmc.dtso b/target/linux/mediatek/dts/mt7987a-rfb-emmc.dtso index 2a6f96a2a0a..a09bd0b8338 100644 --- a/target/linux/mediatek/dts/mt7987a-rfb-emmc.dtso +++ b/target/linux/mediatek/dts/mt7987a-rfb-emmc.dtso @@ -89,7 +89,8 @@ __overlay__ { slot0: pcie@0,0 { reg = <0x0000 0 0 0 0>; - mt7996@0,0 { + wifi@0,0 { + compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; nvmem-cells = <&eeprom_factory_0>; nvmem-cell-names = "eeprom"; diff --git a/target/linux/mediatek/dts/mt7987a-rfb-spim-nand.dtso b/target/linux/mediatek/dts/mt7987a-rfb-spim-nand.dtso index cd19574d317..daeaa88029d 100644 --- a/target/linux/mediatek/dts/mt7987a-rfb-spim-nand.dtso +++ b/target/linux/mediatek/dts/mt7987a-rfb-spim-nand.dtso @@ -37,7 +37,7 @@ reg = <0x0100000 0x0080000>; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x180000 0x0400000>; @@ -46,6 +46,10 @@ #address-cells = <1>; #size-cells = <1>; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1e00>; + }; + gmac2_mac: eeprom@fffee { reg = <0xfffee 0x6>; }; @@ -94,11 +98,12 @@ slot0: pcie@0,0 { reg = <0x0000 0 0 0 0>; - mt7996@0,0 { + wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; }; }; diff --git a/target/linux/mediatek/dts/mt7987a-routerich-be7200.dts b/target/linux/mediatek/dts/mt7987a-routerich-be7200.dts index 6906b91d67f..a259dd8ad99 100644 --- a/target/linux/mediatek/dts/mt7987a-routerich-be7200.dts +++ b/target/linux/mediatek/dts/mt7987a-routerich-be7200.dts @@ -329,7 +329,7 @@ #address-cells = <3>; #size-cells = <2>; - mt7992@0,0 { + wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; diff --git a/target/linux/mediatek/dts/mt7987a-tenda-be12-pro.dts b/target/linux/mediatek/dts/mt7987a-tenda-be12-pro.dts index 7bb6b27c8b5..368b7366218 100644 --- a/target/linux/mediatek/dts/mt7987a-tenda-be12-pro.dts +++ b/target/linux/mediatek/dts/mt7987a-tenda-be12-pro.dts @@ -355,7 +355,7 @@ #address-cells = <3>; #size-cells = <2>; - mt7992@0,0 { + wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; diff --git a/target/linux/mediatek/dts/mt7988a-arcadyan-mozart.dts b/target/linux/mediatek/dts/mt7988a-arcadyan-mozart.dts index 41bb4415f7f..c6cc0000966 100644 --- a/target/linux/mediatek/dts/mt7988a-arcadyan-mozart.dts +++ b/target/linux/mediatek/dts/mt7988a-arcadyan-mozart.dts @@ -311,7 +311,8 @@ #address-cells = <3>; #size-cells = <2>; - mt7996@0,0 { + wifi@0,0 { + compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; nvmem-cells = <&eeprom_factory_0>; nvmem-cell-names = "eeprom"; diff --git a/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi b/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi index 2de677f9b02..51e5d3c172a 100644 --- a/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi +++ b/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi @@ -560,7 +560,8 @@ #address-cells = <3>; #size-cells = <2>; - mt7996@0,0 { + wifi@0,0 { + compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; #address-cells = <1>; #size-cells = <0>; diff --git a/target/linux/mediatek/dts/mt7988d-asus-zenwifi-bt8.dtsi b/target/linux/mediatek/dts/mt7988d-asus-zenwifi-bt8.dtsi index e5c33fb5d08..dd12c33a162 100644 --- a/target/linux/mediatek/dts/mt7988d-asus-zenwifi-bt8.dtsi +++ b/target/linux/mediatek/dts/mt7988d-asus-zenwifi-bt8.dtsi @@ -285,7 +285,8 @@ #address-cells = <3>; #size-cells = <2>; - mt7996_wifi: mt7996@0,0 { + mt7996_wifi: wifi@0,0 { + compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; }; }; diff --git a/target/linux/mediatek/dts/mt7988d-keenetic-kn-1812.dtsi b/target/linux/mediatek/dts/mt7988d-keenetic-kn-1812.dtsi index e2ae6d474c6..8cf21ffd9c5 100644 --- a/target/linux/mediatek/dts/mt7988d-keenetic-kn-1812.dtsi +++ b/target/linux/mediatek/dts/mt7988d-keenetic-kn-1812.dtsi @@ -504,7 +504,8 @@ #address-cells = <3>; #size-cells = <2>; - mt7992@0,0 { + wifi@0,0 { + compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; #address-cells = <1>; #size-cells = <0>; diff --git a/target/linux/mediatek/dts/mt7988d-tplink-be450.dts b/target/linux/mediatek/dts/mt7988d-tplink-be450.dts index d40f70e941e..6961d348511 100644 --- a/target/linux/mediatek/dts/mt7988d-tplink-be450.dts +++ b/target/linux/mediatek/dts/mt7988d-tplink-be450.dts @@ -320,7 +320,8 @@ #address-cells = <3>; #size-cells = <2>; - mt7996@0,0 { + wifi@0,0 { + compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; }; }; diff --git a/target/linux/mediatek/files-6.18/arch/arm64/boot/dts/mediatek/mt7981-rfb-spim-nand.dtso b/target/linux/mediatek/files-6.18/arch/arm64/boot/dts/mediatek/mt7981-rfb-spim-nand.dtso index 7e731cd4339..2251352d820 100644 --- a/target/linux/mediatek/files-6.18/arch/arm64/boot/dts/mediatek/mt7981-rfb-spim-nand.dtso +++ b/target/linux/mediatek/files-6.18/arch/arm64/boot/dts/mediatek/mt7981-rfb-spim-nand.dtso @@ -40,9 +40,19 @@ reg = <0x0100000 0x0080000>; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x180000 0x0200000>; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + }; }; partition@380000 { @@ -69,8 +79,10 @@ fragment@2 { target = <&wifi>; __overlay__ { - mediatek,mtd-eeprom = <&factory 0x0>; status = "okay"; + + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; }; }; diff --git a/target/linux/mediatek/files-6.18/arch/arm64/boot/dts/mediatek/mt7986a-rfb-spim-nand.dts b/target/linux/mediatek/files-6.18/arch/arm64/boot/dts/mediatek/mt7986a-rfb-spim-nand.dts index 79a6df7d6b3..aefae829ce3 100644 --- a/target/linux/mediatek/files-6.18/arch/arm64/boot/dts/mediatek/mt7986a-rfb-spim-nand.dts +++ b/target/linux/mediatek/files-6.18/arch/arm64/boot/dts/mediatek/mt7986a-rfb-spim-nand.dts @@ -29,9 +29,19 @@ label = "u-boot-env"; reg = <0x0100000 0x0080000>; }; - factory: partition@180000 { + partition@180000 { label = "Factory"; reg = <0x180000 0x0200000>; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + }; }; partition@380000 { label = "FIP"; @@ -46,5 +56,6 @@ }; &wifi { - mediatek,mtd-eeprom = <&factory 0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/mediatek/files-6.18/arch/arm64/boot/dts/mediatek/mt7986a-rfb-spim-nor.dts b/target/linux/mediatek/files-6.18/arch/arm64/boot/dts/mediatek/mt7986a-rfb-spim-nor.dts index 009d2e1adff..bdb32de04da 100644 --- a/target/linux/mediatek/files-6.18/arch/arm64/boot/dts/mediatek/mt7986a-rfb-spim-nor.dts +++ b/target/linux/mediatek/files-6.18/arch/arm64/boot/dts/mediatek/mt7986a-rfb-spim-nor.dts @@ -28,9 +28,19 @@ label = "u-boot-env"; reg = <0x40000 0x0010000>; }; - factory: partition@50000 { + partition@50000 { label = "Factory"; reg = <0x50000 0x00B0000>; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1000>; + }; + }; }; partition@100000 { label = "FIP"; @@ -45,5 +55,6 @@ }; &wifi { - mediatek,mtd-eeprom = <&factory 0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/mediatek/patches-6.18/863-arm64-dts-mt7986-add-sound-wm8960.patch b/target/linux/mediatek/patches-6.18/863-arm64-dts-mt7986-add-sound-wm8960.patch index db51bf17791..860c9222c98 100644 --- a/target/linux/mediatek/patches-6.18/863-arm64-dts-mt7986-add-sound-wm8960.patch +++ b/target/linux/mediatek/patches-6.18/863-arm64-dts-mt7986-add-sound-wm8960.patch @@ -46,9 +46,9 @@ Subject: [PATCH] arm64: dts: mt7986: add sound wm8960 }; &spi0 { -@@ -48,3 +78,13 @@ - &wifi { - mediatek,mtd-eeprom = <&factory 0>; +@@ -59,3 +89,13 @@ + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; + +&pio {