From e93f41adee3e5fa4046811890b92c9b86875911b Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Mon, 2 Oct 2023 10:12:02 +0800 Subject: [PATCH] ramips: convert MT7628 EEPROM to NVMEM format This patch converts MT7628 WiFi calibration data to NVMEM format. The EEPROM size is 0x400. Signed-off-by: Shiji Yang --- .../dts/mt7628an_alfa-network_awusfree1.dts | 24 ++++++++------- .../ramips/dts/mt7628an_asus_rt-ac1200.dtsi | 12 +++++--- .../ramips/dts/mt7628an_asus_rt-n1x.dtsi | 24 ++++++++------- .../dts/mt7628an_buffalo_wcr-1166ds.dts | 10 ++++++- .../dts/mt7628an_comfast_cf-wr617ac.dts | 7 ++++- .../dts/mt7628an_comfast_cf-wr758ac.dtsi | 24 ++++++++------- .../linux/ramips/dts/mt7628an_cudy_wr1000.dts | 24 ++++++++------- .../ramips/dts/mt7628an_dlink_dap-1325-a1.dts | 24 ++++++++------- .../ramips/dts/mt7628an_elecom_wrc-1167fs.dts | 24 ++++++++------- .../dts/mt7628an_glinet_gl-mt300n-v2.dts | 24 ++++++++------- .../mt7628an_glinet_vixmini_microuter.dtsi | 24 ++++++++------- .../dts/mt7628an_hak5_wifi-pineapple-mk7.dts | 24 ++++++++------- .../ramips/dts/mt7628an_hilink_hlk-7628n.dts | 24 ++++++++------- .../ramips/dts/mt7628an_hilink_hlk-7688a.dts | 24 ++++++++------- .../ramips/dts/mt7628an_hiwifi_hc5861b.dts | 10 ------- .../ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi | 28 ++++++++++------- target/linux/ramips/dts/mt7628an_iptime.dtsi | 27 ++++++++++------- .../ramips/dts/mt7628an_jotale_js76x8.dtsi | 24 ++++++++------- .../ramips/dts/mt7628an_keenetic_kn-1613.dts | 24 ++++++++------- target/linux/ramips/dts/mt7628an_kroks.dtsi | 24 ++++++++------- .../ramips/dts/mt7628an_linksys_e5400.dts | 14 +++++---- .../mt7628an_mediatek_linkit-smart-7688.dts | 24 ++++++++------- .../mt7628an_mediatek_mt7628an-eval-board.dts | 10 ++++++- .../dts/mt7628an_mercury_mac1200r-v2.dts | 24 ++++++++------- .../linux/ramips/dts/mt7628an_minew_g1-c.dts | 24 ++++++++------- .../ramips/dts/mt7628an_motorola_mwr03.dts | 24 ++++++++------- .../ramips/dts/mt7628an_netgear_r6xxx.dtsi | 24 ++++++++------- .../ramips/dts/mt7628an_onion_omega2.dtsi | 24 ++++++++------- .../dts/mt7628an_rakwireless_rak633.dts | 24 ++++++++------- .../ramips/dts/mt7628an_ravpower_rp-wd009.dts | 24 ++++++++------- .../ramips/dts/mt7628an_skylab_skw92a.dts | 24 ++++++++------- target/linux/ramips/dts/mt7628an_tama_w06.dts | 24 ++++++++------- .../ramips/dts/mt7628an_totolink_lr1200.dts | 24 ++++++++------- .../dts/mt7628an_tplink_8m-split-uboot.dtsi | 30 ++++++++++--------- .../linux/ramips/dts/mt7628an_tplink_8m.dtsi | 27 ++++++++--------- .../ramips/dts/mt7628an_tplink_re200.dtsi | 30 ++++++++++--------- .../ramips/dts/mt7628an_tplink_re305-v1.dts | 30 ++++++++++--------- .../ramips/dts/mt7628an_tplink_re305-v3.dts | 30 ++++++++++--------- .../dts/mt7628an_tplink_tl-mr3020-v3.dts | 27 ++++++++--------- .../dts/mt7628an_tplink_tl-wr840n-v5.dts | 27 ++++++++--------- .../dts/mt7628an_tplink_tl-wr841n-v14.dts | 27 ++++++++--------- .../dts/mt7628an_unielec_u7628-01-16m.dts | 21 ++++++------- .../ramips/dts/mt7628an_unielec_u7628-01.dtsi | 3 +- .../ramips/dts/mt7628an_vocore_vocore2.dtsi | 24 ++++++++------- .../dts/mt7628an_wavlink_wl-wn531a3.dts | 24 ++++++++------- .../dts/mt7628an_wavlink_wl-wn570ha1.dts | 24 ++++++++------- .../dts/mt7628an_wavlink_wl-wn575a3.dts | 24 ++++++++------- .../dts/mt7628an_wavlink_wl-wn576a2.dts | 24 ++++++++------- .../dts/mt7628an_wavlink_wl-wn577a2.dts | 24 ++++++++------- .../dts/mt7628an_wavlink_wl-wn578a2.dts | 24 ++++++++------- .../linux/ramips/dts/mt7628an_widora_neo.dtsi | 24 ++++++++------- .../ramips/dts/mt7628an_wiznet_wizfi630s.dts | 24 ++++++++------- .../ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi | 24 ++++++++------- .../ramips/dts/mt7628an_xiaomi_mi-ra75.dts | 23 ++------------ .../dts/mt7628an_xiaomi_mi-router-4.dtsi | 22 +++++++++++++- ...mt7628an_xiaomi_mi-router-4a-100m-intl.dts | 10 ------- .../dts/mt7628an_xiaomi_mi-router-4a-100m.dts | 10 ------- .../dts/mt7628an_xiaomi_mi-router-4c.dts | 10 ------- .../ramips/dts/mt7628an_xiaomi_miwifi-3c.dts | 24 ++++++++------- .../dts/mt7628an_xiaomi_miwifi-nano.dts | 24 ++++++++------- .../dts/mt7628an_zbtlink_zbt-we1226.dts | 24 ++++++++------- .../dts/mt7628an_zyxel_keenetic-extra-ii.dts | 24 ++++++++------- 62 files changed, 732 insertions(+), 649 deletions(-) diff --git a/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts b/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts index f5cff3bb60..67f4d07f3a 100644 --- a/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts +++ b/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts @@ -114,9 +114,20 @@ }; 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 0x400>; + }; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; }; partition@50000 { @@ -131,15 +142,6 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; -}; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_2e: macaddr@2e { - reg = <0x2e 0x6>; - }; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dtsi b/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dtsi index dbba801425..746436570f 100644 --- a/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dtsi +++ b/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dtsi @@ -73,13 +73,16 @@ }; factory: partition@40000 { + compatible = "nvmem-cells"; label = "factory"; reg = <0x40000 0x10000>; - read-only; - - compatible = "nvmem-cells"; #address-cells = <1>; #size-cells = <1>; + read-only; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; @@ -117,7 +120,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; &pcie { diff --git a/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi b/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi index 8fd86dcb16..7404853f8c 100644 --- a/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi +++ b/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi @@ -75,9 +75,20 @@ }; 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 0x400>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; partition@50000 { @@ -101,7 +112,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; &state_default { @@ -122,13 +134,3 @@ &ohci { status = "disabled"; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_buffalo_wcr-1166ds.dts b/target/linux/ramips/dts/mt7628an_buffalo_wcr-1166ds.dts index c3ea41bbf6..4f37fb8940 100644 --- a/target/linux/ramips/dts/mt7628an_buffalo_wcr-1166ds.dts +++ b/target/linux/ramips/dts/mt7628an_buffalo_wcr-1166ds.dts @@ -140,9 +140,16 @@ }; 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 0x400>; + }; }; partition@50000 { @@ -175,5 +182,6 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts b/target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts index bec9e95182..6a7bdfab07 100644 --- a/target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts +++ b/target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts @@ -77,6 +77,10 @@ #size-cells = <1>; read-only; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + macaddr_factory_8004: macaddr@8004 { reg = <0x8004 0x6>; }; @@ -122,5 +126,6 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/ramips/dts/mt7628an_comfast_cf-wr758ac.dtsi b/target/linux/ramips/dts/mt7628an_comfast_cf-wr758ac.dtsi index 6ac53adf52..4993e15f24 100644 --- a/target/linux/ramips/dts/mt7628an_comfast_cf-wr758ac.dtsi +++ b/target/linux/ramips/dts/mt7628an_comfast_cf-wr758ac.dtsi @@ -84,9 +84,20 @@ }; 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 0x400>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; }; partition@50000 { @@ -101,7 +112,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; ðernet { @@ -112,13 +124,3 @@ &esw { mediatek,portdisable = <0x2f>; }; - -&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/mt7628an_cudy_wr1000.dts b/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts index 82f0e7c690..bbdd6fe35f 100644 --- a/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts +++ b/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts @@ -89,9 +89,20 @@ }; 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 0x400>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; partition@50000 { @@ -132,7 +143,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; ðernet { @@ -143,13 +155,3 @@ &esw { mediatek,portmap = <0x2f>; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_dlink_dap-1325-a1.dts b/target/linux/ramips/dts/mt7628an_dlink_dap-1325-a1.dts index 5b50674f0b..0bc81291d7 100644 --- a/target/linux/ramips/dts/mt7628an_dlink_dap-1325-a1.dts +++ b/target/linux/ramips/dts/mt7628an_dlink_dap-1325-a1.dts @@ -82,7 +82,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; nvmem-cells = <&macaddr_factory_28>; nvmem-cell-names = "mac-address"; @@ -114,9 +115,20 @@ }; 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 0x400>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; partition@50000 { @@ -127,13 +139,3 @@ }; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts b/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts index f716ad9f23..f795838f8f 100644 --- a/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts +++ b/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts @@ -102,9 +102,20 @@ }; 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 0x400>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; partition@50000 { @@ -163,15 +174,6 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; -}; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts b/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts index a3ce8cc592..2142eaa096 100644 --- a/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts +++ b/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts @@ -88,7 +88,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; &spi0 { @@ -117,9 +118,20 @@ }; 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 0x400>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; partition@50000 { @@ -134,13 +146,3 @@ &uart1 { status = "okay"; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi b/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi index 089a3f3c42..eea070a03a 100644 --- a/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi +++ b/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi @@ -60,7 +60,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; &spi0 { @@ -89,9 +90,20 @@ }; 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 0x400>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; /* @@ -105,13 +117,3 @@ }; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_hak5_wifi-pineapple-mk7.dts b/target/linux/ramips/dts/mt7628an_hak5_wifi-pineapple-mk7.dts index 2901a2af51..18ff6c75af 100644 --- a/target/linux/ramips/dts/mt7628an_hak5_wifi-pineapple-mk7.dts +++ b/target/linux/ramips/dts/mt7628an_hak5_wifi-pineapple-mk7.dts @@ -101,9 +101,20 @@ }; 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 0x400>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; partition@50000 { @@ -125,15 +136,6 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; -}; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts b/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts index b7c3af796d..d7d4965328 100644 --- a/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts +++ b/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts @@ -67,9 +67,20 @@ }; 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 0x400>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; partition@50000 { @@ -89,15 +100,6 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; -}; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts b/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts index 2c7299af72..5357996e92 100644 --- a/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts +++ b/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts @@ -81,9 +81,20 @@ }; 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 0x400>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; partition@50000 { @@ -115,15 +126,6 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; -}; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts b/target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts index 08bdcd73ad..a3ca7b9c84 100644 --- a/target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts +++ b/target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts @@ -53,13 +53,3 @@ }; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_2e: macaddr@2e { - reg = <0x2e 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi b/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi index bfc510e06f..ad8d6cbfe1 100644 --- a/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi +++ b/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi @@ -57,9 +57,24 @@ }; 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 0x400>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; }; partition@50000 { @@ -97,15 +112,6 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; -}; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/ramips/dts/mt7628an_iptime.dtsi b/target/linux/ramips/dts/mt7628an_iptime.dtsi index ccc6debfc9..3f81fb56a7 100644 --- a/target/linux/ramips/dts/mt7628an_iptime.dtsi +++ b/target/linux/ramips/dts/mt7628an_iptime.dtsi @@ -43,9 +43,16 @@ #size-cells = <1>; uboot: partition@0 { + compatible = "nvmem-cells"; label = "u-boot"; reg = <0x0 0x20000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + macaddr_uboot_1fc20: macaddr@1fc20 { + reg = <0x1fc20 0x6>; + }; }; partition@20000 { @@ -55,9 +62,16 @@ }; factory: partition@30000 { + compatible = "nvmem-cells"; label = "factory"; reg = <0x30000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; }; partition@40000 { @@ -105,15 +119,6 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; -}; - -&uboot { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_uboot_1fc20: macaddr@1fc20 { - reg = <0x1fc20 0x6>; - }; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi b/target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi index 2d2f8a58b8..a9ce7680d6 100644 --- a/target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi +++ b/target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi @@ -81,9 +81,20 @@ }; 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 0x400>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; firmware: partition@50000 { @@ -124,15 +135,6 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; -}; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/ramips/dts/mt7628an_keenetic_kn-1613.dts b/target/linux/ramips/dts/mt7628an_keenetic_kn-1613.dts index 4281682503..510bada246 100644 --- a/target/linux/ramips/dts/mt7628an_keenetic_kn-1613.dts +++ b/target/linux/ramips/dts/mt7628an_keenetic_kn-1613.dts @@ -130,9 +130,20 @@ }; factory: partition@40000 { + compatible = "nvmem-cells"; label = "rf-eeprom"; reg = <0x40000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; firmware1: partition@50000 { @@ -196,7 +207,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; &pcie { @@ -211,13 +223,3 @@ ieee80211-freq-limit = <5000000 6000000>; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_kroks.dtsi b/target/linux/ramips/dts/mt7628an_kroks.dtsi index dc1eee9cca..186f8e16ed 100644 --- a/target/linux/ramips/dts/mt7628an_kroks.dtsi +++ b/target/linux/ramips/dts/mt7628an_kroks.dtsi @@ -65,8 +65,19 @@ }; factory: partition@40000 { + compatible = "nvmem-cells"; label = "factory"; reg = <0x40000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; partition@50000 { @@ -90,16 +101,6 @@ }; }; -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; -}; - ðernet { nvmem-cells = <&macaddr_factory_4>; nvmem-cell-names = "mac-address"; @@ -108,7 +109,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0000>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; &uart1 { diff --git a/target/linux/ramips/dts/mt7628an_linksys_e5400.dts b/target/linux/ramips/dts/mt7628an_linksys_e5400.dts index 3a6403fe7f..ed1479dcd8 100644 --- a/target/linux/ramips/dts/mt7628an_linksys_e5400.dts +++ b/target/linux/ramips/dts/mt7628an_linksys_e5400.dts @@ -78,13 +78,16 @@ }; factory: partition@40000 { + compatible = "nvmem-cells"; label = "factory"; reg = <0x40000 0x10000>; - read-only; - - compatible = "nvmem-cells"; #address-cells = <1>; #size-cells = <1>; + read-only; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; macaddr_factory_28: macaddr@28 { reg = <0x28 0x6>; @@ -155,9 +158,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; - nvmem-cells = <&macaddr_factory_28>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_28>; + nvmem-cell-names = "eeprom", "mac-address"; mac-address-increment = <2>; }; diff --git a/target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts b/target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts index 57624c302e..c693e69f2c 100644 --- a/target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts +++ b/target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts @@ -108,9 +108,20 @@ }; 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 0x400>; + }; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; }; partition@50000 { @@ -159,15 +170,6 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; -}; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_2e: macaddr@2e { - reg = <0x2e 0x6>; - }; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/ramips/dts/mt7628an_mediatek_mt7628an-eval-board.dts b/target/linux/ramips/dts/mt7628an_mediatek_mt7628an-eval-board.dts index 4dede4287f..9210451c16 100644 --- a/target/linux/ramips/dts/mt7628an_mediatek_mt7628an-eval-board.dts +++ b/target/linux/ramips/dts/mt7628an_mediatek_mt7628an-eval-board.dts @@ -38,9 +38,16 @@ }; 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 0x400>; + }; }; partition@50000 { @@ -55,5 +62,6 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts b/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts index f712a280c5..4a7915b9f0 100644 --- a/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts +++ b/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts @@ -43,9 +43,20 @@ }; factory: partition@1d800 { + compatible = "nvmem-cells"; label = "factory_info"; reg = <0x1d800 0x800>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + macaddr_factory_d: macaddr@d { + reg = <0xd 0x6>; + }; }; art: partition@1e000 { @@ -86,7 +97,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; &pcie { @@ -100,13 +112,3 @@ ieee80211-freq-limit = <5000000 6000000>; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_d: macaddr@d { - reg = <0xd 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_minew_g1-c.dts b/target/linux/ramips/dts/mt7628an_minew_g1-c.dts index 92fbf7c6ae..e7a67b72c1 100644 --- a/target/linux/ramips/dts/mt7628an_minew_g1-c.dts +++ b/target/linux/ramips/dts/mt7628an_minew_g1-c.dts @@ -105,9 +105,20 @@ }; 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 0x400>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; partition@50000 { @@ -131,20 +142,11 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; &sdhci { status = "okay"; mediatek,cd-high; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts b/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts index 2179c48b22..b852c11e06 100644 --- a/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts +++ b/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts @@ -68,9 +68,20 @@ }; 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 0x400>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; partition@50000 { @@ -127,15 +138,6 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; -}; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi b/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi index e6374e7bac..a6fa581b7d 100644 --- a/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi +++ b/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi @@ -80,9 +80,20 @@ }; factory: partition@40000 { + compatible = "nvmem-cells"; label = "factory"; reg = <0x40000 0x20000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; partition@60000 { @@ -97,7 +108,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; ðernet { @@ -116,13 +128,3 @@ ieee80211-freq-limit = <5000000 6000000>; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi b/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi index b10d448a30..79d1fbc335 100644 --- a/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi +++ b/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi @@ -118,9 +118,20 @@ }; 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 0x400>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; firmware: partition@50000 { @@ -164,15 +175,6 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; -}; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts b/target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts index 61f78c162c..ecdfa13e69 100644 --- a/target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts +++ b/target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts @@ -52,9 +52,20 @@ }; 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 0x400>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; partition@50000 { @@ -94,15 +105,6 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; -}; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts b/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts index 5c3b14f87f..e8cb360cca 100644 --- a/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts +++ b/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts @@ -137,9 +137,20 @@ }; 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 0x400>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; partition@50000 { @@ -183,20 +194,11 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; ðernet { nvmem-cells = <&macaddr_factory_4>; nvmem-cell-names = "mac-address"; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts b/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts index 174272f95f..bfb1bd808a 100644 --- a/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts +++ b/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts @@ -54,7 +54,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; &spi0 { @@ -83,9 +84,20 @@ }; 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 0x400>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; partition@50000 { @@ -100,13 +112,3 @@ &uart1 { status = "okay"; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_tama_w06.dts b/target/linux/ramips/dts/mt7628an_tama_w06.dts index 7a202eb6ef..7f00db9986 100644 --- a/target/linux/ramips/dts/mt7628an_tama_w06.dts +++ b/target/linux/ramips/dts/mt7628an_tama_w06.dts @@ -75,9 +75,20 @@ }; 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 0x400>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; partition@50000 { @@ -98,15 +109,6 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; -}; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts b/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts index 9d1c930d76..4de621196c 100644 --- a/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts +++ b/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts @@ -108,7 +108,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; ðernet { @@ -142,9 +143,20 @@ }; 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 0x400>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; partition@50000 { @@ -155,13 +167,3 @@ }; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi b/target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi index d7c65d4703..edf5d89054 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi +++ b/target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi @@ -53,9 +53,16 @@ }; rom: partition@7d0000 { + compatible = "nvmem-cells"; label = "rom"; reg = <0x7d0000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + macaddr_rom_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; }; partition@7e0000 { @@ -64,9 +71,16 @@ }; radio: partition@7f0000 { + compatible = "nvmem-cells"; label = "radio"; reg = <0x7f0000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_radio_0: eeprom@0 { + reg = <0x0 0x400>; + }; }; }; }; @@ -75,10 +89,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&radio 0x0>; - - nvmem-cells = <&macaddr_rom_f100>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_radio_0>, <&macaddr_rom_f100>; + nvmem-cell-names = "eeprom", "mac-address"; }; ðernet { @@ -89,13 +101,3 @@ &esw { mediatek,portmap = <0x3e>; }; - -&rom { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_rom_f100: macaddr@f100 { - reg = <0xf100 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_tplink_8m.dtsi b/target/linux/ramips/dts/mt7628an_tplink_8m.dtsi index ecb6ce1e4e..4e4e3c735a 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_8m.dtsi +++ b/target/linux/ramips/dts/mt7628an_tplink_8m.dtsi @@ -45,9 +45,20 @@ }; factory: partition@7d0000 { + compatible = "nvmem-cells"; label = "factory"; reg = <0x7d0000 0x30000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + macaddr_factory_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; + + eeprom_factory_20000: eeprom@20000 { + reg = <0x20000 0x400>; + }; }; }; }; @@ -56,23 +67,11 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x20000>; - - nvmem-cells = <&macaddr_factory_f100>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_factory_20000>, <&macaddr_factory_f100>; + nvmem-cell-names = "eeprom", "mac-address"; }; ðernet { nvmem-cells = <&macaddr_factory_f100>; nvmem-cell-names = "mac-address"; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_f100: macaddr@f100 { - reg = <0xf100 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi b/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi index 1a8b26b1cc..d129acec0c 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi +++ b/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi @@ -96,15 +96,29 @@ }; config: partition@7c0000 { + compatible = "nvmem-cells"; label = "config"; reg = <0x7c0000 0x30000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + macaddr_config_2008: macaddr@2008 { + reg = <0x2008 0x6>; + }; }; radio: partition@7f0000 { + compatible = "nvmem-cells"; label = "radio"; reg = <0x7f0000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_radio_0: eeprom@0 { + reg = <0x0 0x400>; + }; }; }; }; @@ -126,10 +140,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&radio 0x0>; - - nvmem-cells = <&macaddr_config_2008>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_2008>; + nvmem-cell-names = "eeprom", "mac-address"; mac-address-increment = <1>; }; @@ -147,13 +159,3 @@ mac-address-increment = <2>; }; }; - -&config { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_config_2008: macaddr@2008 { - reg = <0x2008 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts b/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts index 7948668b84..6b52583273 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts @@ -33,9 +33,16 @@ }; config: partition@600000 { + compatible = "nvmem-cells"; label = "config"; reg = <0x600000 0x50000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + macaddr_config_10008: macaddr@10008 { + reg = <0x10008 0x6>; + }; }; /* @@ -44,9 +51,16 @@ */ radio: partition@7f0000 { + compatible = "nvmem-cells"; label = "radio"; reg = <0x7f0000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_radio_0: eeprom@0 { + reg = <0x0 0x400>; + }; }; }; }; @@ -61,10 +75,8 @@ }; &wmac { - mediatek,mtd-eeprom = <&radio 0x0>; - - nvmem-cells = <&macaddr_config_10008>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_10008>; + nvmem-cell-names = "eeprom", "mac-address"; mac-address-increment = <1>; }; @@ -72,13 +84,3 @@ nvmem-cells = <&macaddr_config_10008>; nvmem-cell-names = "mac-address"; }; - -&config { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_config_10008: macaddr@10008 { - reg = <0x10008 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_tplink_re305-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_re305-v3.dts index 21df0fb3e6..9f80bd57fb 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_re305-v3.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_re305-v3.dts @@ -33,15 +33,29 @@ }; config: partition@7c0000 { + compatible = "nvmem-cells"; label = "config"; reg = <0x7c0000 0x30000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + macaddr_config_2008: macaddr@2008 { + reg = <0x2008 0x6>; + }; }; radio: partition@7f0000 { + compatible = "nvmem-cells"; label = "radio"; reg = <0x7f0000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_radio_0: eeprom@0 { + reg = <0x0 0x400>; + }; }; }; }; @@ -56,10 +70,8 @@ }; &wmac { - mediatek,mtd-eeprom = <&radio 0x0>; - - nvmem-cells = <&macaddr_config_2008>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_2008>; + nvmem-cell-names = "eeprom", "mac-address"; mac-address-increment = <(-1)>; }; @@ -67,13 +79,3 @@ nvmem-cells = <&macaddr_config_2008>; nvmem-cell-names = "mac-address"; }; - -&config { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_config_2008: macaddr@2008 { - reg = <0x2008 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts index 3ffa732541..3828d859ca 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts @@ -121,9 +121,20 @@ }; factory: partition@7d0000 { + compatible = "nvmem-cells"; label = "factory"; reg = <0x7d0000 0x30000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_factory_20000: eeprom@20000 { + reg = <0x20000 0x400>; + }; + + macaddr_factory_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; }; }; }; @@ -139,23 +150,11 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x20000>; - - nvmem-cells = <&macaddr_factory_f100>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_factory_20000>, <&macaddr_factory_f100>; + nvmem-cell-names = "eeprom", "mac-address"; }; ðernet { nvmem-cells = <&macaddr_factory_f100>; nvmem-cell-names = "mac-address"; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_f100: macaddr@f100 { - reg = <0xf100 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts index 01a1a7f09e..e5bb9f233b 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts @@ -70,9 +70,20 @@ }; factory: partition@3f0000 { + compatible = "nvmem-cells"; label = "factory"; reg = <0x3f0000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + macaddr_factory_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; }; }; }; @@ -89,10 +100,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; - - nvmem-cells = <&macaddr_factory_f100>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_f100>; + nvmem-cell-names = "eeprom", "mac-address"; }; ðernet { @@ -110,13 +119,3 @@ function = "gpio"; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_f100: macaddr@f100 { - reg = <0xf100 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts index ff2c8d48d1..67df5c0127 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts @@ -81,9 +81,20 @@ }; factory: partition@3f0000 { + compatible = "nvmem-cells"; label = "factory"; reg = <0x3f0000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + macaddr_factory_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; }; }; }; @@ -100,10 +111,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; - - nvmem-cells = <&macaddr_factory_f100>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_f100>; + nvmem-cell-names = "eeprom", "mac-address"; }; ðernet { @@ -129,13 +138,3 @@ output-high; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_f100: macaddr@f100 { - reg = <0xf100 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_unielec_u7628-01-16m.dts b/target/linux/ramips/dts/mt7628an_unielec_u7628-01-16m.dts index 8037b3a304..2bc6a5f8c3 100644 --- a/target/linux/ramips/dts/mt7628an_unielec_u7628-01-16m.dts +++ b/target/linux/ramips/dts/mt7628an_unielec_u7628-01-16m.dts @@ -38,9 +38,20 @@ }; 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 0x400>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; partition@50000 { @@ -56,13 +67,3 @@ nvmem-cells = <&macaddr_factory_28>; nvmem-cell-names = "mac-address"; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_unielec_u7628-01.dtsi b/target/linux/ramips/dts/mt7628an_unielec_u7628-01.dtsi index f25e28abd8..b31ffba809 100644 --- a/target/linux/ramips/dts/mt7628an_unielec_u7628-01.dtsi +++ b/target/linux/ramips/dts/mt7628an_unielec_u7628-01.dtsi @@ -88,7 +88,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; &state_default { diff --git a/target/linux/ramips/dts/mt7628an_vocore_vocore2.dtsi b/target/linux/ramips/dts/mt7628an_vocore_vocore2.dtsi index 9100e0225e..27d6d67ed4 100644 --- a/target/linux/ramips/dts/mt7628an_vocore_vocore2.dtsi +++ b/target/linux/ramips/dts/mt7628an_vocore_vocore2.dtsi @@ -40,9 +40,20 @@ }; 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 0x400>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; firmware: partition@50000 { @@ -64,7 +75,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; ðernet { @@ -96,13 +108,3 @@ &uart2 { status = "okay"; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn531a3.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn531a3.dts index 2a09ce6f38..7a60906a56 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn531a3.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn531a3.dts @@ -108,9 +108,20 @@ }; 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 0x400>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; partition@50000 { @@ -125,7 +136,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; ðernet { @@ -136,13 +148,3 @@ &esw { mediatek,portmap = <0x2f>; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts index dcba4b64e2..23f81619ee 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts @@ -98,9 +98,20 @@ }; 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 0x400>; + }; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; }; partition@50000 { @@ -115,7 +126,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; ðernet { @@ -126,13 +138,3 @@ &esw { mediatek,portmap = <0x2f>; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_2e: macaddr@2e { - reg = <0x2e 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts index 83e269b366..65f6f47b96 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts @@ -93,9 +93,20 @@ }; 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 0x400>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; partition@50000 { @@ -110,7 +121,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; ðernet { @@ -121,13 +133,3 @@ &esw { mediatek,portmap = <0x2f>; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn576a2.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn576a2.dts index bb1ddd0040..9ea2a3a65f 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn576a2.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn576a2.dts @@ -132,9 +132,20 @@ }; 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 0x400>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; partition@50000 { @@ -149,7 +160,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; ðernet { @@ -172,13 +184,3 @@ &ohci { status = "disabled"; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts index b4e6905624..456b3ad151 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts @@ -97,9 +97,20 @@ }; 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 0x400>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; partition@50000 { @@ -114,7 +125,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; ðernet { @@ -137,13 +149,3 @@ &ohci { status = "disabled"; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts index 1d5c99da31..267001d950 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts @@ -127,9 +127,20 @@ }; 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 0x400>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; partition@50000 { @@ -144,7 +155,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; ðernet { @@ -167,13 +179,3 @@ &ohci { status = "disabled"; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_widora_neo.dtsi b/target/linux/ramips/dts/mt7628an_widora_neo.dtsi index fd146e9264..5d37b12448 100644 --- a/target/linux/ramips/dts/mt7628an_widora_neo.dtsi +++ b/target/linux/ramips/dts/mt7628an_widora_neo.dtsi @@ -74,9 +74,20 @@ }; 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 0x400>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; firmware: partition@50000 { @@ -167,15 +178,6 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; -}; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts b/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts index 9ce585021e..04b6c56bef 100644 --- a/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts +++ b/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts @@ -117,9 +117,20 @@ }; 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 0x400>; + }; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; }; partition@50000 { @@ -161,15 +172,6 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; -}; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_2e: macaddr@2e { - reg = <0x2e 0x6>; - }; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi b/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi index bb35357808..c3fcaabe2f 100644 --- a/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi +++ b/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi @@ -48,9 +48,20 @@ }; 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 0x400>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; partition@50000 { @@ -90,15 +101,6 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; -}; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts b/target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts index 2dd855bf8f..51b99300b3 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts +++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts @@ -95,10 +95,10 @@ }; &wmac { - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; - &esw { mediatek,portmap = <0x3e>; mediatek,portdisable = <0x2a>; @@ -111,22 +111,3 @@ &ohci { status = "disabled"; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; - macaddr_factory_8004: macaddr@8004 { - reg = <0x8004 0x6>; - }; -}; - - diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi index 59d269bf03..c546538658 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi +++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi @@ -47,9 +47,28 @@ }; factory: partition@30000 { + compatible = "nvmem-cells"; label = "factory"; reg = <0x30000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; + + macaddr_factory_8004: macaddr@8004 { + reg = <0x8004 0x6>; + }; }; partition@40000 { @@ -79,5 +98,6 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m-intl.dts b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m-intl.dts index 863191bc4b..0d647c6153 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m-intl.dts +++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m-intl.dts @@ -72,13 +72,3 @@ mediatek,portmap = <0x3e>; mediatek,portdisable = <0x2a>; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts index 5ddc7af462..7ae6b18f72 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts +++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts @@ -72,13 +72,3 @@ mediatek,portmap = <0x3e>; mediatek,portdisable = <0x2a>; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts index e9bbf76e4b..27348b3ad7 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts +++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts @@ -71,13 +71,3 @@ mediatek,portmap = <0x3d>; mediatek,portdisable = <0x29>; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-3c.dts b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-3c.dts index c45f94b2f1..bc7083fb1f 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-3c.dts +++ b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-3c.dts @@ -74,7 +74,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; ðernet { @@ -113,9 +114,20 @@ }; 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 0x400>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; partition@60000 { @@ -144,13 +156,3 @@ }; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts index f9adca9d71..c957388228 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts +++ b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts @@ -72,7 +72,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; ðernet { @@ -105,9 +106,20 @@ }; 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 0x400>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; partition@50000 { @@ -118,13 +130,3 @@ }; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_28: macaddr@28 { - reg = <0x28 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts b/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts index aca4555a40..fd233cd30b 100644 --- a/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts +++ b/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts @@ -86,9 +86,20 @@ }; 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 0x400>; + }; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; }; partition@50000 { @@ -103,7 +114,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; ðernet { @@ -114,13 +126,3 @@ &esw { mediatek,portmap = <0x2f>; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_2e: macaddr@2e { - reg = <0x2e 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts b/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts index c53289debf..cbe390a4de 100644 --- a/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts +++ b/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts @@ -121,9 +121,20 @@ }; factory: partition@40000 { + compatible = "nvmem-cells"; label = "rf-eeprom"; reg = <0x40000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; firmware1: partition@50000 { @@ -193,7 +204,8 @@ &wmac { status = "okay"; - mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; &pcie { @@ -215,13 +227,3 @@ function = "gpio"; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_4: macaddr@4 { - reg = <0x4 0x6>; - }; -}; -- 2.30.2