From: Shiji Yang Date: Tue, 17 Oct 2023 12:57:07 +0000 (+0800) Subject: Revert "ramips: convert MT7915 EEPROM to NVMEM format" X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=6f31941d384dbea290cee6f216b260902e04b92c;p=openwrt%2Fstaging%2Fnbd.git Revert "ramips: convert MT7915 EEPROM to NVMEM format" Some MT7915 devices need to load the second part of the eeprom to work properly. The mt76 driver is not yet ready to read the pre-cal data via the NVMEM cell. Therefore, partially revert commit to fix the device probe issue on some devices. P.S. Except for D-Link and Ubnt devices, It is still uncertain whether pre-cal data is required for other devices in the patch. This partially reverts commit 9ac891f8c44124e931c15f1257347cd8ba311a19. Fixes: https://github.com/openwrt/openwrt/issues/13700 Signed-off-by: Shiji Yang --- diff --git a/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts b/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts index 8aa141b108..d740d00c6d 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts @@ -95,16 +95,13 @@ }; factory: partition@1e0000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x1e0000 0x100000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; - }; + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; @@ -158,8 +155,7 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_factory_0>; - nvmem-cell-names = "eeprom"; + mediatek,mtd-eeprom = <&factory 0x0000>; mediatek,disable-radar-background; }; }; diff --git a/target/linux/ramips/dts/mt7621_asus_rt-ax54.dts b/target/linux/ramips/dts/mt7621_asus_rt-ax54.dts index 571d8375a4..3191692e4e 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-ax54.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-ax54.dts @@ -87,16 +87,13 @@ }; factory: partition@1e0000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x1e0000 0x100000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; - }; + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; @@ -131,8 +128,7 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_factory_0>; - nvmem-cell-names = "eeprom"; + mediatek,mtd-eeprom = <&factory 0x0000>; mediatek,disable-radar-background; }; }; diff --git a/target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts b/target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts index 8c0dd1ac2e..80600470e7 100644 --- a/target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts +++ b/target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts @@ -59,8 +59,7 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_factory_0>; - nvmem-cell-names = "eeprom"; + mediatek,mtd-eeprom = <&factory 0x0>; }; }; @@ -88,20 +87,9 @@ }; factory: partition@50000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x50000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; - }; - - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; }; partition@90000 { @@ -113,6 +101,16 @@ }; }; +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_cudy_m1800.dts b/target/linux/ramips/dts/mt7621_cudy_m1800.dts index 90110da4fb..314fdb206c 100644 --- a/target/linux/ramips/dts/mt7621_cudy_m1800.dts +++ b/target/linux/ramips/dts/mt7621_cudy_m1800.dts @@ -81,8 +81,7 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_factory_0>; - nvmem-cell-names = "eeprom"; + mediatek,mtd-eeprom = <&factory 0x0000>; mediatek,disable-radar-background; }; }; @@ -115,16 +114,9 @@ }; factory: partition@40000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x40000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; - }; }; partition@50000 { diff --git a/target/linux/ramips/dts/mt7621_cudy_x6.dtsi b/target/linux/ramips/dts/mt7621_cudy_x6.dtsi index 84e053cb42..4c34f58a4b 100644 --- a/target/linux/ramips/dts/mt7621_cudy_x6.dtsi +++ b/target/linux/ramips/dts/mt7621_cudy_x6.dtsi @@ -76,16 +76,9 @@ }; factory: partition@40000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x40000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; - }; }; /* additional partitions in DTS */ @@ -101,8 +94,7 @@ wifi:wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_factory_0>; - nvmem-cell-names = "eeprom"; + mediatek,mtd-eeprom = <&factory 0x0000>; mediatek,disable-radar-background; }; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dap-x1860-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dap-x1860-a1.dts index 3be48e11af..818d2d8c41 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dap-x1860-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dap-x1860-a1.dts @@ -125,16 +125,13 @@ }; factory: partition@100000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x100000 0x80000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; - }; + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; @@ -178,8 +175,7 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_factory_0>; - nvmem-cell-names = "eeprom"; + mediatek,mtd-eeprom = <&factory 0x0>; mediatek,disable-radar-background; }; }; diff --git a/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts b/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts index 10fa667f04..554d73ce3d 100644 --- a/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts +++ b/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts @@ -73,16 +73,13 @@ }; factory: partition@100000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x100000 0x80000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; - }; + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; @@ -171,7 +168,6 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_factory_0>; - nvmem-cell-names = "eeprom"; + mediatek,mtd-eeprom = <&factory 0x0>; }; }; diff --git a/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts b/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts index ce365450ab..245d130a1f 100644 --- a/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts +++ b/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts @@ -72,16 +72,9 @@ }; config: partition@fa0000 { - compatible = "nvmem-cells"; label = "config"; reg = <0xfa0000 0x010000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - - macaddr_config_8: macaddr@8 { - reg = <0x8 0x6>; - }; }; partition@fb0000 { @@ -91,16 +84,9 @@ }; radio: partition@ff0000 { - compatible = "nvmem-cells"; label = "radio"; reg = <0xff0000 0x010000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - - eeprom_radio_0: eeprom@0 { - reg = <0x0 0xe00>; - }; }; }; }; @@ -114,8 +100,9 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_8>; - nvmem-cell-names = "eeprom", "mac-address"; + mediatek,mtd-eeprom = <&radio 0x0>; + nvmem-cells = <&macaddr_config_8>; + nvmem-cell-names = "mac-address"; mediatek,disable-radar-background; }; }; @@ -166,3 +153,13 @@ function = "gpio"; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_8: macaddr@8 { + reg = <0x8 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_netgear_eax12.dts b/target/linux/ramips/dts/mt7621_netgear_eax12.dts index e65d881e82..d5ad404be0 100644 --- a/target/linux/ramips/dts/mt7621_netgear_eax12.dts +++ b/target/linux/ramips/dts/mt7621_netgear_eax12.dts @@ -107,16 +107,9 @@ }; factory: partition@100000 { - compatible = "nvmem-cells"; label = "Factory"; reg = <0x100000 0x80000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; - }; }; partition@180000 { @@ -178,8 +171,7 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_factory_0>; - nvmem-cell-names = "eeprom"; + mediatek,mtd-eeprom = <&factory 0x0>; }; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts b/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts index 69652772ac..50834c5866 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts @@ -105,16 +105,9 @@ }; config: partition@fa0000 { - compatible = "nvmem-cells"; label = "config"; reg = <0xfa0000 0x010000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - - macaddr_config_8: macaddr@8 { - reg = <0x8 0x6>; - }; }; partition@fb0000 { @@ -124,16 +117,9 @@ }; radio: partition@ff0000 { - compatible = "nvmem-cells"; label = "radio"; reg = <0xff0000 0x010000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - - eeprom_radio_0: eeprom@0 { - reg = <0x0 0xe00>; - }; }; }; }; @@ -147,8 +133,9 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_8>; - nvmem-cell-names = "eeprom", "mac-address"; + mediatek,mtd-eeprom = <&radio 0x0>; + nvmem-cells = <&macaddr_config_8>; + nvmem-cell-names = "mac-address"; mediatek,disable-radar-background; }; }; @@ -204,3 +191,13 @@ function = "gpio"; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_8: macaddr@8 { + reg = <0x8 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_tplink_eap613-v1.dts b/target/linux/ramips/dts/mt7621_tplink_eap613-v1.dts index 277b2bbcf4..d25bf57560 100644 --- a/target/linux/ramips/dts/mt7621_tplink_eap613-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_eap613-v1.dts @@ -108,16 +108,9 @@ }; radio: partition@ff0000 { - compatible = "nvmem-cells"; label = "radio"; reg = <0xff0000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - - eeprom_radio_0: eeprom@0 { - reg = <0x0 0xe00>; - }; }; }; }; @@ -138,8 +131,7 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_radio_0>; - nvmem-cell-names = "eeprom"; + mediatek,mtd-eeprom = <&radio 0x0>; mediatek,disable-radar-background; }; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts index d23ab9c4db..58e4bbf757 100644 --- a/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts @@ -90,16 +90,9 @@ }; info: partition@90000 { - compatible = "nvmem-cells"; label = "product-info"; reg = <0x90000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - - macaddr_info_8: macaddr@8 { - reg = <0x8 0x6>; - }; }; partition@a0000 { @@ -127,16 +120,9 @@ }; radio: partition@ff0000 { - compatible = "nvmem-cells"; label = "radio"; reg = <0xff0000 0x10000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - - eeprom_radio_0: eeprom@0 { - reg = <0x0 0xe00>; - }; }; }; }; @@ -157,8 +143,7 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_radio_0>; - nvmem-cell-names = "eeprom"; + mediatek,mtd-eeprom = <&radio 0x0>; mediatek,disable-radar-background; }; }; @@ -201,3 +186,13 @@ }; }; }; + +&info { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_8: macaddr@8 { + reg = <0x8 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts b/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts index c0b6b77585..8f78a60557 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts @@ -47,10 +47,6 @@ eeprom_factory_0: eeprom@0 { reg = <0x0 0x400>; }; - - eeprom_factory_20000: eeprom@20000 { - reg = <0x20000 0xe00>; - }; }; eeprom: partition@b0000 { @@ -108,8 +104,10 @@ &wlan_5g { compatible = "mediatek,mt76"; - nvmem-cells = <&eeprom_factory_20000>, <&macaddr_eeprom_6>; - nvmem-cell-names = "eeprom", "mac-address"; + mediatek,mtd-eeprom = <&factory 0x20000>; + + nvmem-cells = <&macaddr_eeprom_6>; + nvmem-cell-names = "mac-address"; /* This is a workaround. * diff --git a/target/linux/ramips/dts/mt7621_wavlink_wl-wn573hx1.dts b/target/linux/ramips/dts/mt7621_wavlink_wl-wn573hx1.dts index 1bdbebfad7..d8a94c85b9 100755 --- a/target/linux/ramips/dts/mt7621_wavlink_wl-wn573hx1.dts +++ b/target/linux/ramips/dts/mt7621_wavlink_wl-wn573hx1.dts @@ -61,8 +61,7 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_factory_0>; - nvmem-cell-names = "eeprom"; + mediatek,mtd-eeprom = <&factory 0x0>; }; }; @@ -88,19 +87,8 @@ }; factory:partition@50000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x50000 0x40000>; - #address-cells = <1>; - #size-cells = <1>; - - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; - }; - - macaddr_factory_3fff4: macaddr@3fff4 { - reg = <0x3fff4 0x6>; - }; }; partition@90000 { @@ -131,3 +119,15 @@ }; }; }; + + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_3fff4: macaddr@3fff4 { + reg = <0x3fff4 0x6>; + }; + +}; diff --git a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts index 277c584509..1aba94a912 100644 --- a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts +++ b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts @@ -112,20 +112,9 @@ */ factory: partition@50000 { - compatible = "nvmem-cells"; label = "Factory"; reg = <0x50000 0x40000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; - }; - - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; }; partition@90000 { @@ -145,8 +134,7 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_factory_0>; - nvmem-cell-names = "eeprom"; + mediatek,mtd-eeprom = <&factory 0x0>; mediatek,disable-radar-background; }; }; @@ -190,3 +178,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_yuncore_fap640.dts b/target/linux/ramips/dts/mt7621_yuncore_fap640.dts index 8fd6ad347e..d525dde385 100644 --- a/target/linux/ramips/dts/mt7621_yuncore_fap640.dts +++ b/target/linux/ramips/dts/mt7621_yuncore_fap640.dts @@ -120,24 +120,9 @@ */ factory: partition@50000 { - compatible = "nvmem-cells"; label = "Factory"; reg = <0x50000 0x40000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; - }; - - macaddr_factory_0004: macaddr@0004 { - reg = <0x0004 0x6>; - }; - - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; - }; }; partition@90000 { @@ -157,8 +142,7 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_factory_0>; - nvmem-cell-names = "eeprom"; + mediatek,mtd-eeprom = <&factory 0x0>; mediatek,disable-radar-background; }; }; @@ -217,3 +201,18 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_0004: macaddr@0004 { + reg = <0x0004 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; + diff --git a/target/linux/ramips/dts/mt7621_yuncore_fap690.dts b/target/linux/ramips/dts/mt7621_yuncore_fap690.dts index 35e320b974..a998b95d4c 100644 --- a/target/linux/ramips/dts/mt7621_yuncore_fap690.dts +++ b/target/linux/ramips/dts/mt7621_yuncore_fap690.dts @@ -90,20 +90,9 @@ */ factory: partition@50000 { - compatible = "nvmem-cells"; label = "Factory"; reg = <0x50000 0x40000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; - }; - - macaddr_factory_0004: macaddr@0004 { - reg = <0x0004 0x6>; - }; }; partition@90000 { @@ -123,8 +112,7 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_factory_0>; - nvmem-cell-names = "eeprom"; + mediatek,mtd-eeprom = <&factory 0x0>; mediatek,disable-radar-background; }; }; @@ -149,3 +137,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_0004: macaddr@0004 { + reg = <0x0004 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_zyxel_nwa-ax.dtsi b/target/linux/ramips/dts/mt7621_zyxel_nwa-ax.dtsi index 8dfb2ceaa7..fa7e23dd47 100644 --- a/target/linux/ramips/dts/mt7621_zyxel_nwa-ax.dtsi +++ b/target/linux/ramips/dts/mt7621_zyxel_nwa-ax.dtsi @@ -37,16 +37,9 @@ }; factory: partition@100000 { - compatible = "nvmem-cells"; label = "factory"; reg = <0x100000 0x80000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; - }; }; partition@180000 { @@ -100,16 +93,9 @@ }; mrd: partition@7780000 { - compatible = "nvmem-cells"; label = "mrd"; reg = <0x7780000 0x80000>; - #address-cells = <1>; - #size-cells = <1>; read-only; - - macaddr_mrd_1fff8: macaddr@1fff8 { - reg = <0x1fff8 0x6>; - }; }; }; }; @@ -123,8 +109,7 @@ reg = <0x0 0 0 0 0>; compatible = "mediatek,mt76"; - nvmem-cells = <&eeprom_factory_0>; - nvmem-cell-names = "eeprom"; + mediatek,mtd-eeprom = <&factory 0x0>; /* MAC-Address set in userspace */ }; @@ -144,6 +129,16 @@ }; }; +&mrd { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_mrd_1fff8: macaddr@1fff8 { + reg = <0x1fff8 0x6>; + }; +}; + &state_default { gpio { groups = "uart3"; diff --git a/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts b/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts index 5615e56864..299d982dc1 100644 --- a/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts +++ b/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts @@ -103,24 +103,9 @@ }; factory: partition@200000 { - compatible = "nvmem-cells"; reg = <0x200000 0x1c0000>; - #address-cells = <1>; - #size-cells = <1>; label = "Factory"; read-only; - - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; - }; - - macaddr_factory_1fdfa: macaddr@1fdfa { - reg = <0x1fdfa 0x6>; - }; - - macaddr_factory_1fdf4: macaddr@1fdf4 { - reg = <0x1fdf4 0x6>; - }; }; partition@3c0000 { @@ -200,8 +185,7 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_factory_0>; - nvmem-cell-names = "eeprom"; + mediatek,mtd-eeprom = <&factory 0x0>; mediatek,disable-radar-background; }; }; @@ -233,3 +217,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_1fdfa: macaddr@1fdfa { + reg = <0x1fdfa 0x6>; + }; + + macaddr_factory_1fdf4: macaddr@1fdf4 { + reg = <0x1fdf4 0x6>; + }; +};