From f53fa2a0cb9c3c802ac79409330bcba3b971c8ca Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Mon, 2 Oct 2023 10:12:02 +0800 Subject: [PATCH] ramips: convert mt76 PCIe NIC EEPROM to NVMEM format for legacy SoCs This patch converts MT761{0,2,3} PCIe WiFi calibration data to NVMEM format for legacy Ralink SoCs (MT7620 and Mt7628). The EEPROM size of the MT7610 and MT7612 is 0x200. there are only three devices uses MT7613 NIC, ASUS RT-AC1200 V2, COMFAST CF-WR758AC V2 and Keenetic KN-1613. The EEPROM size of them is 0x4da8. Signed-off-by: Shiji Yang --- .../dts/mt7620a_alfa-network_ac1200rm.dts | 7 ++++- .../ramips/dts/mt7620a_asus_rt-ac51u.dts | 3 +- .../ramips/dts/mt7620a_asus_rt-ac54u.dts | 3 +- .../ramips/dts/mt7620a_asus_rt-ac5x.dtsi | 4 +++ .../ramips/dts/mt7620a_bdcom_wap2100-sk.dts | 7 ++++- .../ramips/dts/mt7620a_buffalo_whr-1166d.dts | 7 ++++- .../linux/ramips/dts/mt7620a_cameo_810.dtsi | 9 ++++-- .../ramips/dts/mt7620a_dlink_dir-510l.dts | 26 ++++++++--------- .../ramips/dts/mt7620a_dlink_dir-806a-b1.dts | 10 ++++--- .../ramips/dts/mt7620a_dlink_dwr-118-a1.dts | 26 ++++++++--------- .../ramips/dts/mt7620a_dlink_dwr-960.dts | 4 ++- .../ramips/dts/mt7620a_dlink_dwr-961-a1.dts | 4 ++- .../ramips/dts/mt7620a_dlink_dwr-96x.dtsi | 16 +++++++---- target/linux/ramips/dts/mt7620a_domywifi.dtsi | 7 ++++- .../ramips/dts/mt7620a_dovado_tiny-ac.dts | 10 ++++++- .../dts/mt7620a_edimax_br-6208ac-v2.dts | 7 ++++- .../dts/mt7620a_edimax_br-6478ac-v2.dts | 7 ++++- .../ramips/dts/mt7620a_edimax_ew-7478apc.dts | 7 ++++- .../ramips/dts/mt7620a_edimax_ew-747x.dtsi | 9 ++++-- .../linux/ramips/dts/mt7620a_fon_fon2601.dts | 7 ++++- .../ramips/dts/mt7620a_glinet_gl-mt750.dts | 7 ++++- .../dts/mt7620a_head-weblink_hdrm200.dts | 7 ++++- .../ramips/dts/mt7620a_hiwifi_hc5761.dts | 3 +- .../ramips/dts/mt7620a_hiwifi_hc5861.dts | 3 +- .../ramips/dts/mt7620a_hiwifi_hc5x61.dtsi | 4 +++ target/linux/ramips/dts/mt7620a_humax_e2.dts | 7 ++++- .../ramips/dts/mt7620a_iodata_wn-ac1167gr.dts | 10 ++++++- .../ramips/dts/mt7620a_iodata_wn-ac733gr3.dts | 10 ++++++- target/linux/ramips/dts/mt7620a_iptime.dtsi | 7 ++++- .../ramips/dts/mt7620a_lava_lr-25g001.dts | 28 +++++++++---------- .../ramips/dts/mt7620a_lb-link_bl-w1200.dts | 7 ++++- .../ramips/dts/mt7620a_lenovo_newifi-y1.dtsi | 7 ++++- .../dts/mt7620a_netgear_ex3x00_ex61xx.dtsi | 7 ++++- .../linux/ramips/dts/mt7620a_netis_wf2770.dts | 7 ++++- .../linux/ramips/dts/mt7620a_phicomm_k2x.dtsi | 7 ++++- .../ramips/dts/mt7620a_phicomm_psg1208.dts | 7 ++++- .../ramips/dts/mt7620a_planex_mzk-750dhp.dts | 7 ++++- .../ramips/dts/mt7620a_planex_mzk-ex750np.dts | 7 ++++- .../mt7620a_ralink_mt7620a-mt7610e-evb.dts | 10 ++++++- .../dts/mt7620a_tplink_archer-c2-v1.dts | 9 ++++-- .../dts/mt7620a_tplink_archer-mr200.dts | 7 ++++- .../ramips/dts/mt7620a_tplink_archer.dtsi | 7 ++++- .../ramips/dts/mt7620a_tplink_re2x0-v1.dtsi | 11 +++++--- .../dts/mt7620a_wavlink_wl-wn530hg4.dts | 7 ++++- .../ramips/dts/mt7620a_wavlink_wl-wn535k1.dts | 7 ++++- .../ramips/dts/mt7620a_wavlink_wl-wn579x3.dts | 7 ++++- .../linux/ramips/dts/mt7620a_wevo_air-duo.dts | 7 ++++- .../ramips/dts/mt7620a_xiaomi_miwifi-mini.dts | 7 ++++- target/linux/ramips/dts/mt7620a_youku_x2.dts | 3 +- .../linux/ramips/dts/mt7620a_youku_yk-l1.dtsi | 4 +++ .../dts/mt7620a_zbtlink_zbt-ape522ii.dts | 7 ++++- .../dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi | 3 +- .../dts/mt7620a_zbtlink_zbt-we1026.dtsi | 4 +++ .../ramips/dts/mt7628an_asus_rt-ac1200-v2.dts | 5 ++++ .../ramips/dts/mt7628an_asus_rt-ac1200.dtsi | 7 ++++- .../dts/mt7628an_buffalo_wcr-1166ds.dts | 7 ++++- .../dts/mt7628an_comfast_cf-wr617ac.dts | 9 ++++-- .../dts/mt7628an_comfast_cf-wr758ac-v2.dts | 5 ++++ .../dts/mt7628an_comfast_cf-wr758ac.dtsi | 7 ++++- .../linux/ramips/dts/mt7628an_cudy_wr1000.dts | 7 ++++- .../ramips/dts/mt7628an_elecom_wrc-1167fs.dts | 7 ++++- .../ramips/dts/mt7628an_hiwifi_hc5761a.dts | 3 +- .../ramips/dts/mt7628an_hiwifi_hc5861b.dts | 5 ++-- .../ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi | 4 +++ target/linux/ramips/dts/mt7628an_iptime.dtsi | 7 ++++- .../ramips/dts/mt7628an_keenetic_kn-1613.dts | 7 ++++- .../ramips/dts/mt7628an_linksys_e5400.dts | 9 ++++-- .../dts/mt7628an_mercury_mac1200r-v2.dts | 10 ++++++- .../ramips/dts/mt7628an_motorola_mwr03.dts | 7 ++++- .../ramips/dts/mt7628an_netgear_r6xxx.dtsi | 7 ++++- .../ramips/dts/mt7628an_ravpower_rp-wd009.dts | 7 ++++- .../ramips/dts/mt7628an_totolink_lr1200.dts | 7 ++++- .../dts/mt7628an_tplink_8m-split-uboot.dtsi | 4 +++ .../linux/ramips/dts/mt7628an_tplink_8m.dtsi | 4 +++ .../dts/mt7628an_tplink_archer-c20-v4.dts | 5 ++-- .../dts/mt7628an_tplink_archer-c20-v5.dts | 5 ++-- .../dts/mt7628an_tplink_archer-c50-v3.dts | 5 ++-- .../dts/mt7628an_tplink_archer-c50-v4.dts | 5 ++-- .../ramips/dts/mt7628an_tplink_re200.dtsi | 9 ++++-- .../ramips/dts/mt7628an_tplink_re305-v1.dts | 10 ++++--- .../ramips/dts/mt7628an_tplink_re305-v3.dts | 10 ++++--- .../dts/mt7628an_tplink_tl-wr902ac-v3.dts | 5 ++-- .../dts/mt7628an_wavlink_wl-wn531a3.dts | 7 ++++- .../dts/mt7628an_wavlink_wl-wn570ha1.dts | 7 ++++- .../dts/mt7628an_wavlink_wl-wn575a3.dts | 7 ++++- .../dts/mt7628an_wavlink_wl-wn576a2.dts | 7 ++++- .../dts/mt7628an_wavlink_wl-wn577a2.dts | 7 ++++- .../dts/mt7628an_wavlink_wl-wn578a2.dts | 7 ++++- .../ramips/dts/mt7628an_xiaomi_mi-ra75.dts | 3 +- .../dts/mt7628an_xiaomi_mi-router-4.dtsi | 4 +++ ...mt7628an_xiaomi_mi-router-4a-100m-intl.dts | 3 +- .../dts/mt7628an_xiaomi_mi-router-4a-100m.dts | 3 +- .../dts/mt7628an_zyxel_keenetic-extra-ii.dts | 7 ++++- 93 files changed, 512 insertions(+), 161 deletions(-) diff --git a/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts b/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts index 2b9434b244..3bc0e69bfe 100644 --- a/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts +++ b/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts @@ -84,7 +84,8 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; led { @@ -143,6 +144,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_28: macaddr@28 { reg = <0x28 0x6>; }; diff --git a/target/linux/ramips/dts/mt7620a_asus_rt-ac51u.dts b/target/linux/ramips/dts/mt7620a_asus_rt-ac51u.dts index 0710b25571..b482b6dfc9 100644 --- a/target/linux/ramips/dts/mt7620a_asus_rt-ac51u.dts +++ b/target/linux/ramips/dts/mt7620a_asus_rt-ac51u.dts @@ -8,6 +8,7 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; }; }; diff --git a/target/linux/ramips/dts/mt7620a_asus_rt-ac54u.dts b/target/linux/ramips/dts/mt7620a_asus_rt-ac54u.dts index acc60807b6..2a94f5d29d 100644 --- a/target/linux/ramips/dts/mt7620a_asus_rt-ac54u.dts +++ b/target/linux/ramips/dts/mt7620a_asus_rt-ac54u.dts @@ -10,7 +10,8 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; led { diff --git a/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi b/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi index 20dab4f09f..3d4e6a1aad 100644 --- a/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi +++ b/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi @@ -90,6 +90,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_28: macaddr@28 { reg = <0x28 0x6>; }; diff --git a/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts b/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts index 8788d9d93b..e4772a4574 100644 --- a/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts +++ b/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts @@ -93,6 +93,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; @@ -146,7 +150,8 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts b/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts index 892bd73502..11f4d8c6c6 100644 --- a/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts +++ b/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts @@ -125,6 +125,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; @@ -182,7 +186,8 @@ wifi@0,0 { compatible = "pci0,0"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_cameo_810.dtsi b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi index c25db1d9d8..e1ff1ecd42 100644 --- a/target/linux/ramips/dts/mt7620a_cameo_810.dtsi +++ b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi @@ -92,6 +92,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_28: macaddr@28 { reg = <0x28 0x6>; }; @@ -163,10 +167,9 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - nvmem-cells = <&macaddr_factory_28>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_28>; + nvmem-cell-names = "eeprom", "mac-address"; mac-address-increment = <2>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts b/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts index 1d29bed6f0..f73feb58c9 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts @@ -94,9 +94,20 @@ }; config: partition@ff0000 { + compatible = "nvmem-cells"; label = "config"; reg = <0xff0000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_config_e05d: eeprom@e05d { + reg = <0xe05d 0x200>; + }; + + macaddr_config_e490: macaddr@e490 { + reg = <0xe490 0x6>; + }; }; }; }; @@ -117,10 +128,9 @@ &pcie0 { mt76x0e@0,0 { reg = <0x0000 0 0 0 0>; - nvmem-cells = <&macaddr_config_e490>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_config_e05d>, <&macaddr_config_e490>; + nvmem-cell-names = "eeprom", "mac-address"; mac-address-increment = <(2)>; - mediatek,mtd-eeprom = <&config 0xe05d>; }; }; @@ -130,13 +140,3 @@ function = "gpio"; }; }; - -&config { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_config_e490: macaddr@e490 { - reg = <0xe490 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dir-806a-b1.dts b/target/linux/ramips/dts/mt7620a_dlink_dir-806a-b1.dts index 995255ee8a..ae0b7c1210 100755 --- a/target/linux/ramips/dts/mt7620a_dlink_dir-806a-b1.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dir-806a-b1.dts @@ -102,6 +102,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; @@ -151,11 +155,9 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - - nvmem-cells = <&macaddr_factory_8004>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_8004>; + nvmem-cell-names = "eeprom", "mac-address"; mac-address-increment = <(-3)>; led { diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts index 8ae566d448..8c9ab02f44 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts @@ -115,9 +115,20 @@ }; config: partition@ff0000 { + compatible = "nvmem-cells"; label = "config"; reg = <0xff0000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_config_e083: eeprom@e083 { + reg = <0xe083 0x200>; + }; + + macaddr_config_e496: macaddr@e496 { + reg = <0xe496 0x6>; + }; }; }; }; @@ -145,10 +156,9 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - nvmem-cells = <&macaddr_config_e496>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_config_e083>, <&macaddr_config_e496>; + nvmem-cell-names = "eeprom", "mac-address"; mac-address-increment = <(2)>; - mediatek,mtd-eeprom = <&config 0xe083>; led { led-sources = <0>; @@ -192,13 +202,3 @@ mediatek,port4-gmac; mediatek,ephy-base = /bits/ 8 <8>; }; - -&config { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_config_e496: macaddr@e496 { - reg = <0xe496 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts index 3de9533edc..a3e65c6468 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts @@ -30,5 +30,7 @@ }; &wifi { - mediatek,mtd-eeprom = <&config 0xe08e>; + nvmem-cells = <&eeprom_config_e08e>, <&macaddr_config_e50e>; + nvmem-cell-names = "eeprom", "mac-address"; + mac-address-increment = <2>; }; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-961-a1.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-961-a1.dts index 7eae666668..f80aa71681 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-961-a1.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-961-a1.dts @@ -58,5 +58,7 @@ }; &wifi { - mediatek,mtd-eeprom = <&config 0xe29e>; + nvmem-cells = <&eeprom_config_e29e>, <&macaddr_config_e50e>; + nvmem-cell-names = "eeprom", "mac-address"; + mac-address-increment = <2>; }; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi b/target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi index a5fd705eba..4a6bab21a1 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi @@ -120,9 +120,6 @@ compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; ieee80211-freq-limit = <5000000 6000000>; - nvmem-cells = <&macaddr_config_e50e>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <(2)>; }; }; @@ -155,13 +152,20 @@ config: partition@ff0000 { compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - label = "config"; reg = <0xff0000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + eeprom_config_e08e: eeprom@e08e { + reg = <0xe08e 0x200>; + }; + + eeprom_config_e29e: eeprom@e29e { + reg = <0xe29e 0x200>; + }; + macaddr_config_e50e: macaddr@e50e { reg = <0xe50e 0x6>; }; diff --git a/target/linux/ramips/dts/mt7620a_domywifi.dtsi b/target/linux/ramips/dts/mt7620a_domywifi.dtsi index 3336f9c6c5..d627d7b4fe 100644 --- a/target/linux/ramips/dts/mt7620a_domywifi.dtsi +++ b/target/linux/ramips/dts/mt7620a_domywifi.dtsi @@ -125,6 +125,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_28: macaddr@28 { reg = <0x28 0x6>; }; @@ -175,7 +179,8 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; led { diff --git a/target/linux/ramips/dts/mt7620a_dovado_tiny-ac.dts b/target/linux/ramips/dts/mt7620a_dovado_tiny-ac.dts index ba1a2becda..0c61dcb24d 100644 --- a/target/linux/ramips/dts/mt7620a_dovado_tiny-ac.dts +++ b/target/linux/ramips/dts/mt7620a_dovado_tiny-ac.dts @@ -79,9 +79,16 @@ }; factory: partition@40000 { + compatible = "nvmem-cells"; label = "factory"; reg = <0x40000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; }; partition@50000 { @@ -153,7 +160,8 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_edimax_br-6208ac-v2.dts b/target/linux/ramips/dts/mt7620a_edimax_br-6208ac-v2.dts index 5a311ba895..edacffb1b1 100644 --- a/target/linux/ramips/dts/mt7620a_edimax_br-6208ac-v2.dts +++ b/target/linux/ramips/dts/mt7620a_edimax_br-6208ac-v2.dts @@ -152,6 +152,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; @@ -213,7 +217,8 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts b/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts index 8e2030a507..c0893cd623 100644 --- a/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts +++ b/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts @@ -110,6 +110,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; @@ -205,7 +209,8 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; mediatek,2ghz = <0>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts b/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts index ea8b8c9121..3a3bc9aec6 100644 --- a/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts +++ b/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts @@ -102,6 +102,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; @@ -197,7 +201,8 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; mediatek,2ghz = <0>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi b/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi index d5db3958d8..f7745b85e9 100644 --- a/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi +++ b/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi @@ -91,6 +91,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; @@ -196,10 +200,9 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - nvmem-cells = <&macaddr_factory_4>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_4>; + nvmem-cell-names = "eeprom", "mac-address"; mac-address-increment = <2>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_fon_fon2601.dts b/target/linux/ramips/dts/mt7620a_fon_fon2601.dts index ff6844060e..f374c75f86 100644 --- a/target/linux/ramips/dts/mt7620a_fon_fon2601.dts +++ b/target/linux/ramips/dts/mt7620a_fon_fon2601.dts @@ -88,6 +88,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; @@ -168,7 +172,8 @@ wifi@0,0 { compatible = "pci14c3,7662"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts b/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts index 869453fe75..84f1153ecc 100644 --- a/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts +++ b/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts @@ -101,6 +101,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4000: macaddr@4000 { reg = <0x4000 0x6>; }; @@ -151,7 +155,8 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; }; }; diff --git a/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts b/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts index d2ff424bcf..f435ceb9f6 100644 --- a/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts +++ b/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts @@ -93,6 +93,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; @@ -187,7 +191,8 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5761.dts b/target/linux/ramips/dts/mt7620a_hiwifi_hc5761.dts index d1a7f69e17..741a466769 100644 --- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5761.dts +++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5761.dts @@ -64,7 +64,8 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts b/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts index 87eacb13d7..ef22a6639d 100644 --- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts +++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts @@ -101,7 +101,8 @@ wifi@0,0 { compatible = "pci14c3,7662"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi b/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi index 508d60f6b6..733cdeaf39 100644 --- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi +++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi @@ -63,6 +63,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; diff --git a/target/linux/ramips/dts/mt7620a_humax_e2.dts b/target/linux/ramips/dts/mt7620a_humax_e2.dts index 92e4d58be7..de7b6ddf57 100644 --- a/target/linux/ramips/dts/mt7620a_humax_e2.dts +++ b/target/linux/ramips/dts/mt7620a_humax_e2.dts @@ -99,6 +99,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_10007: macaddr@10007 { reg = <0x10007 0x6>; }; @@ -128,7 +132,8 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts b/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts index eacfcc152f..f27274d6e1 100644 --- a/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts +++ b/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts @@ -108,9 +108,16 @@ }; iNIC_rf: partition@48000 { + compatible = "nvmem-cells"; label = "iNIC_rf"; reg = <0x48000 0x8000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_iNIC_rf_0: eeprom@0 { + reg = <0x0 0x200>; + }; }; partition@50000 { @@ -214,7 +221,8 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&iNIC_rf 0x0>; + nvmem-cells = <&eeprom_iNIC_rf_0>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts b/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts index d7ef17abbc..71a66a799d 100644 --- a/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts +++ b/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts @@ -122,9 +122,16 @@ }; iNIC_rf: partition@48000 { + compatible = "nvmem-cells"; label = "iNIC_rf"; reg = <0x48000 0x8000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_iNIC_rf_0: eeprom@0 { + reg = <0x0 0x200>; + }; }; partition@50000 { @@ -192,7 +199,8 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&iNIC_rf 0x0>; + nvmem-cells = <&eeprom_iNIC_rf_0>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_iptime.dtsi b/target/linux/ramips/dts/mt7620a_iptime.dtsi index f5e33850ca..be43f9bc99 100644 --- a/target/linux/ramips/dts/mt7620a_iptime.dtsi +++ b/target/linux/ramips/dts/mt7620a_iptime.dtsi @@ -40,6 +40,10 @@ reg = <0x1f400 0x200>; }; + eeprom_uboot_1f800: eeprom@1f800 { + reg = <0x1f800 0x200>; + }; + macaddr_uboot_1fc20: macaddr@1fc20 { reg = <0x1fc20 0x6>; }; @@ -80,7 +84,8 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&uboot 0x1f800>; + nvmem-cells = <&eeprom_uboot_1f800>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; led { diff --git a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts index 07355a05a5..f7a5aed064 100644 --- a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts +++ b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts @@ -92,9 +92,20 @@ }; config: partition@ff0000 { + compatible = "nvmem-cells"; label = "config"; reg = <0xff0000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_config_e08a: eeprom@e08a { + reg = <0xe08a 0x200>; + }; + + macaddr_config_e07e: macaddr@e07e { + reg = <0xe07e 0x6>; + }; }; }; }; @@ -150,10 +161,9 @@ &pcie0 { mt76x0e@0,0 { reg = <0x0000 0 0 0 0>; - nvmem-cells = <&macaddr_config_e07e>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <(2)>; - mediatek,mtd-eeprom = <&config 0xe08a>; + nvmem-cells = <&eeprom_config_e08a>, <&macaddr_config_e07e>; + nvmem-cell-names = "eeprom", "mac-address"; + mac-address-increment = <2>; }; }; @@ -163,13 +173,3 @@ function = "gpio"; }; }; - -&config { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_config_e07e: macaddr@e07e { - reg = <0xe07e 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts b/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts index 4c0ce75281..f7b296d250 100644 --- a/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts +++ b/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts @@ -76,6 +76,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_28: macaddr@28 { reg = <0x28 0x6>; }; @@ -165,7 +169,8 @@ compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; ieee80211-freq-limit = <5000000 6000000>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; led { led-sources = <2>; diff --git a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dtsi b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dtsi index 0360cff26f..f30b1265fe 100644 --- a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dtsi +++ b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dtsi @@ -66,6 +66,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_28: macaddr@28 { reg = <0x28 0x6>; }; @@ -95,7 +99,8 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi b/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi index c6f95b4c77..5be2a2f044 100644 --- a/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi +++ b/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi @@ -109,6 +109,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_28: macaddr@28 { reg = <0x28 0x6>; }; @@ -142,7 +146,8 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_netis_wf2770.dts b/target/linux/ramips/dts/mt7620a_netis_wf2770.dts index f768ac2114..93f0924bd4 100644 --- a/target/linux/ramips/dts/mt7620a_netis_wf2770.dts +++ b/target/linux/ramips/dts/mt7620a_netis_wf2770.dts @@ -85,6 +85,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; @@ -166,7 +170,8 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi b/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi index e8aed7e285..36cbf20f32 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi +++ b/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi @@ -80,6 +80,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_28: macaddr@28 { reg = <0x28 0x6>; }; @@ -102,7 +106,8 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts b/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts index 13230a9c43..e3c15871bc 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts +++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts @@ -85,6 +85,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; @@ -123,7 +127,8 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts b/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts index 2f14d39ac1..5a6dee77ec 100644 --- a/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts +++ b/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts @@ -95,6 +95,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; @@ -138,6 +142,7 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; }; }; diff --git a/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts b/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts index 41ea54ba2d..a6b46d821a 100644 --- a/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts +++ b/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts @@ -115,6 +115,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; @@ -163,6 +167,7 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; }; }; diff --git a/target/linux/ramips/dts/mt7620a_ralink_mt7620a-mt7610e-evb.dts b/target/linux/ramips/dts/mt7620a_ralink_mt7620a-mt7610e-evb.dts index b7a71c3e25..46f3cfd3ab 100644 --- a/target/linux/ramips/dts/mt7620a_ralink_mt7620a-mt7610e-evb.dts +++ b/target/linux/ramips/dts/mt7620a_ralink_mt7620a-mt7610e-evb.dts @@ -50,9 +50,16 @@ }; factory: partition@40000 { + compatible = "nvmem-cells"; label = "factory"; reg = <0x40000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; }; partition@50000 { @@ -82,7 +89,8 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts index 4bce556de8..a75cbf43fc 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts @@ -135,6 +135,10 @@ eeprom_radio_0: eeprom@0 { reg = <0x0 0x200>; }; + + eeprom_radio_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; }; }; }; @@ -197,9 +201,8 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&radio 0x8000>; - nvmem-cells = <&macaddr_rom_f100>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_radio_8000>, <&macaddr_rom_f100>; + nvmem-cell-names = "eeprom", "mac-address"; mac-address-increment = <(-1)>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts index 47cbf9b243..dab106b9bf 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts @@ -168,6 +168,10 @@ eeprom_radio_0: eeprom@0 { reg = <0x0 0x200>; }; + + eeprom_radio_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; }; }; }; @@ -205,6 +209,7 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&radio 0x8000>; + nvmem-cells = <&eeprom_radio_8000>; + nvmem-cell-names = "eeprom"; }; }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi b/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi index 32a14a2b75..6edb7012c8 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi +++ b/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi @@ -98,6 +98,10 @@ eeprom_radio_0: eeprom@0 { reg = <0x0 0x200>; }; + + eeprom_radio_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; }; }; }; @@ -132,7 +136,8 @@ &pcie0 { wifi: mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&radio 0x8000>; + nvmem-cells = <&eeprom_radio_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi b/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi index 9e4e646020..e0cb10aac6 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi +++ b/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi @@ -80,6 +80,10 @@ eeprom_radio_0: eeprom@0 { reg = <0x0 0x200>; }; + + eeprom_radio_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; }; }; }; @@ -102,10 +106,9 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&radio 0x8000>; - nvmem-cells = <&macaddr_uboot_1fc00>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <2>; ieee80211-freq-limit = <5000000 6000000>; + nvmem-cells = <&eeprom_radio_8000>, <&macaddr_uboot_1fc00>; + nvmem-cell-names = "eeprom", "mac-address"; + mac-address-increment = <2>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts index f1a05dac78..9ab3a70d14 100644 --- a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts +++ b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts @@ -83,6 +83,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_28: macaddr@28 { reg = <0x28 0x6>; }; @@ -136,7 +140,8 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn535k1.dts b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn535k1.dts index 5d07db9708..9938c00531 100644 --- a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn535k1.dts +++ b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn535k1.dts @@ -104,6 +104,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_28: macaddr@28 { reg = <0x28 0x6>; }; @@ -131,7 +135,8 @@ &pcie0 { wifi0: wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts index 886de51dae..0c22e9199b 100644 --- a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts +++ b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts @@ -132,6 +132,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_28: macaddr@28 { reg = <0x28 0x6>; }; @@ -165,7 +169,8 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_wevo_air-duo.dts b/target/linux/ramips/dts/mt7620a_wevo_air-duo.dts index 54fcb32c0b..2ecb78f9b5 100644 --- a/target/linux/ramips/dts/mt7620a_wevo_air-duo.dts +++ b/target/linux/ramips/dts/mt7620a_wevo_air-duo.dts @@ -93,6 +93,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; @@ -187,7 +191,8 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; led { diff --git a/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts index b70a95d776..a8a7db8082 100644 --- a/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts +++ b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts @@ -109,6 +109,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_28: macaddr@28 { reg = <0x28 0x6>; }; @@ -169,7 +173,8 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_youku_x2.dts b/target/linux/ramips/dts/mt7620a_youku_x2.dts index ad9e252f65..da1e61e4fe 100644 --- a/target/linux/ramips/dts/mt7620a_youku_x2.dts +++ b/target/linux/ramips/dts/mt7620a_youku_x2.dts @@ -27,7 +27,8 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; led { diff --git a/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi index 9e5227d848..29ae863df0 100644 --- a/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi +++ b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi @@ -91,6 +91,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_28: macaddr@28 { reg = <0x28 0x6>; }; diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts index 80c4f3640d..d85e35b694 100644 --- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts +++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts @@ -91,6 +91,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; @@ -130,7 +134,8 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi index f86ac1a88a..39c50c7366 100644 --- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi +++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi @@ -44,7 +44,8 @@ wifi@0,0 { compatible = "pci14c3,7662"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026.dtsi index e2f5c28c70..1c7e1782cb 100644 --- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026.dtsi +++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026.dtsi @@ -64,6 +64,10 @@ reg = <0x0 0x200>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_28: macaddr@28 { reg = <0x28 0x6>; }; diff --git a/target/linux/ramips/dts/mt7628an_asus_rt-ac1200-v2.dts b/target/linux/ramips/dts/mt7628an_asus_rt-ac1200-v2.dts index 2dd38fba4b..3edb6dad55 100644 --- a/target/linux/ramips/dts/mt7628an_asus_rt-ac1200-v2.dts +++ b/target/linux/ramips/dts/mt7628an_asus_rt-ac1200-v2.dts @@ -7,6 +7,11 @@ model = "ASUS RT-AC1200 V2"; }; +&eeprom_factory_8000 { + /* V2 has different eeprom size '0x4da8' for MT7613 */ + reg = <0x8000 0x4da8>; +}; + &state_default { spis { groups = "spis"; diff --git a/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dtsi b/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dtsi index 746436570f..7a13921aa5 100644 --- a/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dtsi +++ b/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dtsi @@ -84,6 +84,10 @@ reg = <0x0 0x400>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; @@ -132,7 +136,8 @@ mt76@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; led { diff --git a/target/linux/ramips/dts/mt7628an_buffalo_wcr-1166ds.dts b/target/linux/ramips/dts/mt7628an_buffalo_wcr-1166ds.dts index 4f37fb8940..7f77416337 100644 --- a/target/linux/ramips/dts/mt7628an_buffalo_wcr-1166ds.dts +++ b/target/linux/ramips/dts/mt7628an_buffalo_wcr-1166ds.dts @@ -102,7 +102,8 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; @@ -150,6 +151,10 @@ eeprom_factory_0: eeprom@0 { reg = <0x0 0x400>; }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; }; partition@50000 { diff --git a/target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts b/target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts index 6a7bdfab07..4270c48ad9 100644 --- a/target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts +++ b/target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts @@ -81,6 +81,10 @@ reg = <0x0 0x400>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_8004: macaddr@8004 { reg = <0x8004 0x6>; }; @@ -107,10 +111,9 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - nvmem-cells = <&macaddr_factory_8004>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_8004>; + nvmem-cell-names = "eeprom", "mac-address"; mac-address-increment = <2>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_comfast_cf-wr758ac-v2.dts b/target/linux/ramips/dts/mt7628an_comfast_cf-wr758ac-v2.dts index bc476f2617..b5a789f8a6 100644 --- a/target/linux/ramips/dts/mt7628an_comfast_cf-wr758ac-v2.dts +++ b/target/linux/ramips/dts/mt7628an_comfast_cf-wr758ac-v2.dts @@ -6,3 +6,8 @@ compatible = "comfast,cf-wr758ac-v2", "mediatek,mt7628an-soc"; model = "COMFAST CF-WR758AC V2"; }; + +&eeprom_factory_8000 { + /* V2 has different eeprom size '0x4da8' for MT7613 */ + reg = <0x8000 0x4da8>; +}; diff --git a/target/linux/ramips/dts/mt7628an_comfast_cf-wr758ac.dtsi b/target/linux/ramips/dts/mt7628an_comfast_cf-wr758ac.dtsi index 4993e15f24..e8cabd7fd8 100644 --- a/target/linux/ramips/dts/mt7628an_comfast_cf-wr758ac.dtsi +++ b/target/linux/ramips/dts/mt7628an_comfast_cf-wr758ac.dtsi @@ -53,7 +53,8 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; @@ -95,6 +96,10 @@ reg = <0x0 0x400>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + 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 bbdd6fe35f..57405632dd 100644 --- a/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts +++ b/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts @@ -100,6 +100,10 @@ reg = <0x0 0x400>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_28: macaddr@28 { reg = <0x28 0x6>; }; @@ -130,7 +134,8 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; led { diff --git a/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts b/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts index f795838f8f..4e68137f3b 100644 --- a/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts +++ b/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts @@ -113,6 +113,10 @@ reg = <0x0 0x400>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_28: macaddr@28 { reg = <0x28 0x6>; }; @@ -159,7 +163,8 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_hiwifi_hc5761a.dts b/target/linux/ramips/dts/mt7628an_hiwifi_hc5761a.dts index 828e5b8b2d..5ec041c804 100644 --- a/target/linux/ramips/dts/mt7628an_hiwifi_hc5761a.dts +++ b/target/linux/ramips/dts/mt7628an_hiwifi_hc5761a.dts @@ -58,7 +58,8 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts b/target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts index a3ca7b9c84..44ebef2ad5 100644 --- a/target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts +++ b/target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts @@ -42,10 +42,9 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; - nvmem-cells = <&macaddr_factory_2e>; - nvmem-cell-names = "mac-address"; ieee80211-freq-limit = <5000000 6000000>; + nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_2e>; + nvmem-cell-names = "eeprom", "mac-address"; led { led-sources = <2>; diff --git a/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi b/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi index ad8d6cbfe1..cfd4bb1dc5 100644 --- a/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi +++ b/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi @@ -68,6 +68,10 @@ reg = <0x0 0x400>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; diff --git a/target/linux/ramips/dts/mt7628an_iptime.dtsi b/target/linux/ramips/dts/mt7628an_iptime.dtsi index 3f81fb56a7..22cc368b0b 100644 --- a/target/linux/ramips/dts/mt7628an_iptime.dtsi +++ b/target/linux/ramips/dts/mt7628an_iptime.dtsi @@ -72,6 +72,10 @@ eeprom_factory_0: eeprom@0 { reg = <0x0 0x400>; }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; }; partition@40000 { @@ -111,7 +115,8 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_keenetic_kn-1613.dts b/target/linux/ramips/dts/mt7628an_keenetic_kn-1613.dts index 510bada246..117f278f12 100644 --- a/target/linux/ramips/dts/mt7628an_keenetic_kn-1613.dts +++ b/target/linux/ramips/dts/mt7628an_keenetic_kn-1613.dts @@ -141,6 +141,10 @@ reg = <0x0 0x400>; }; + eeprom_factory_400: eeprom@400 { + reg = <0x400 0x4da8>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; @@ -219,7 +223,8 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x0400>; + nvmem-cells = <&eeprom_factory_400>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_linksys_e5400.dts b/target/linux/ramips/dts/mt7628an_linksys_e5400.dts index ed1479dcd8..24fd31a7e2 100644 --- a/target/linux/ramips/dts/mt7628an_linksys_e5400.dts +++ b/target/linux/ramips/dts/mt7628an_linksys_e5400.dts @@ -89,6 +89,10 @@ reg = <0x0 0x400>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_28: macaddr@28 { reg = <0x28 0x6>; }; @@ -135,11 +139,10 @@ wifi5: wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - nvmem-cells = <&macaddr_factory_28>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_28>; + nvmem-cell-names = "eeprom", "mac-address"; mac-address-increment = <3>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts b/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts index 4a7915b9f0..fee64bc53f 100644 --- a/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts +++ b/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts @@ -60,9 +60,16 @@ }; art: partition@1e000 { + compatible = "nvmem-cells"; label = "art"; reg = <0x1e000 0x2000>; + #address-cells = <1>; + #size-cells = <1>; read-only; + + eeprom_art_1000: eeprom@1000 { + reg = <0x1000 0x200>; + }; }; partition@20000 { @@ -108,7 +115,8 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&art 0x1000>; + nvmem-cells = <&eeprom_art_1000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts b/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts index b852c11e06..f2895481ed 100644 --- a/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts +++ b/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts @@ -79,6 +79,10 @@ reg = <0x0 0x400>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; @@ -130,7 +134,8 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi b/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi index a6fa581b7d..ba38839129 100644 --- a/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi +++ b/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi @@ -91,6 +91,10 @@ reg = <0x0 0x400>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; @@ -124,7 +128,8 @@ &pcie0 { wifi5: wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts b/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts index e8cb360cca..b2e0a5eaca 100644 --- a/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts +++ b/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts @@ -106,7 +106,8 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5470000 6000000>; }; }; @@ -148,6 +149,10 @@ reg = <0x0 0x400>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; diff --git a/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts b/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts index 4de621196c..ea07ebe492 100644 --- a/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts +++ b/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts @@ -100,7 +100,8 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; @@ -154,6 +155,10 @@ reg = <0x0 0x400>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + 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 edf5d89054..7464d1c85d 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi +++ b/target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi @@ -81,6 +81,10 @@ eeprom_radio_0: eeprom@0 { reg = <0x0 0x400>; }; + + eeprom_radio_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; }; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_8m.dtsi b/target/linux/ramips/dts/mt7628an_tplink_8m.dtsi index 4e4e3c735a..b3c62eb488 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_8m.dtsi +++ b/target/linux/ramips/dts/mt7628an_tplink_8m.dtsi @@ -59,6 +59,10 @@ eeprom_factory_20000: eeprom@20000 { reg = <0x20000 0x400>; }; + + eeprom_factory_28000: eeprom@28000 { + reg = <0x28000 0x200>; + }; }; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts index 02d0144f4a..2225b63333 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts @@ -99,10 +99,9 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x28000>; ieee80211-freq-limit = <5000000 6000000>; - nvmem-cells = <&macaddr_factory_f100>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_factory_28000>, <&macaddr_factory_f100>; + nvmem-cell-names = "eeprom", "mac-address"; mac-address-increment = <(-1)>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts index 7f5b3d557a..04eba88d19 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts @@ -94,10 +94,9 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&radio 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - nvmem-cells = <&macaddr_rom_f100>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_radio_8000>, <&macaddr_rom_f100>; + nvmem-cell-names = "eeprom", "mac-address"; mac-address-increment = <(-1)>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts index ab81b09493..f628908b98 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts @@ -94,10 +94,9 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x28000>; ieee80211-freq-limit = <5000000 6000000>; - nvmem-cells = <&macaddr_factory_f100>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_factory_28000>, <&macaddr_factory_f100>; + nvmem-cell-names = "eeprom", "mac-address"; mac-address-increment = <(-1)>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts index 164cf7a170..87927da62a 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts @@ -92,10 +92,9 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&radio 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - nvmem-cells = <&macaddr_rom_f100>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_radio_8000>, <&macaddr_rom_f100>; + nvmem-cell-names = "eeprom", "mac-address"; mac-address-increment = <(-1)>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi b/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi index d129acec0c..24236e5c7f 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi +++ b/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi @@ -119,6 +119,10 @@ eeprom_radio_0: eeprom@0 { reg = <0x0 0x400>; }; + + eeprom_radio_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; }; }; }; @@ -152,10 +156,9 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&radio 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - nvmem-cells = <&macaddr_config_2008>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_radio_8000>, <&macaddr_config_2008>; + nvmem-cell-names = "eeprom", "mac-address"; mac-address-increment = <2>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts b/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts index 6b52583273..88d96bfa02 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts @@ -61,16 +61,18 @@ eeprom_radio_0: eeprom@0 { reg = <0x0 0x400>; }; + + eeprom_radio_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; }; }; }; }; &wlan5g { - mediatek,mtd-eeprom = <&radio 0x8000>; - - nvmem-cells = <&macaddr_config_10008>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_radio_8000>, <&macaddr_config_10008>; + nvmem-cell-names = "eeprom", "mac-address"; mac-address-increment = <2>; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_re305-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_re305-v3.dts index 9f80bd57fb..c6ae357e19 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_re305-v3.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_re305-v3.dts @@ -56,16 +56,18 @@ eeprom_radio_0: eeprom@0 { reg = <0x0 0x400>; }; + + eeprom_radio_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; }; }; }; }; &wlan5g { - mediatek,mtd-eeprom = <&radio 0x8000>; - - nvmem-cells = <&macaddr_config_2008>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_radio_8000>, <&macaddr_config_2008>; + nvmem-cell-names = "eeprom", "mac-address"; mac-address-increment = <(-2)>; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts index 9be8529bbf..b49dc61a4c 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts @@ -90,10 +90,9 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x28000>; ieee80211-freq-limit = <5000000 6000000>; - nvmem-cells = <&macaddr_factory_f100>; - nvmem-cell-names = "mac-address"; + nvmem-cells = <&eeprom_factory_28000>, <&macaddr_factory_f100>; + nvmem-cell-names = "eeprom", "mac-address"; mac-address-increment = <(-1)>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn531a3.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn531a3.dts index 7a60906a56..25a1c1ac8f 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn531a3.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn531a3.dts @@ -77,7 +77,8 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; @@ -119,6 +120,10 @@ reg = <0x0 0x400>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + 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 23f81619ee..ddf2723633 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts @@ -67,7 +67,8 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; @@ -109,6 +110,10 @@ reg = <0x0 0x400>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + 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 65f6f47b96..8bdf764fdd 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts @@ -62,7 +62,8 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; @@ -104,6 +105,10 @@ reg = <0x0 0x400>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + 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 9ea2a3a65f..58d5bf9168 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn576a2.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn576a2.dts @@ -101,7 +101,8 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; @@ -143,6 +144,10 @@ reg = <0x0 0x400>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + 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 456b3ad151..bc9bef1328 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts @@ -66,7 +66,8 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; @@ -108,6 +109,10 @@ reg = <0x0 0x400>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + 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 267001d950..7abab0044d 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts @@ -96,7 +96,8 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; @@ -138,6 +139,10 @@ reg = <0x0 0x400>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_28: macaddr@28 { reg = <0x28 0x6>; }; diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts b/target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts index 51b99300b3..8859038c30 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts +++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts @@ -84,7 +84,8 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; 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 c546538658..51737a965d 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi +++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi @@ -58,6 +58,10 @@ reg = <0x0 0x400>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; 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 0d647c6153..809a0af30a 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 @@ -57,7 +57,8 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; 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 7ae6b18f72..7b40cdb6af 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 @@ -57,7 +57,8 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; 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 cbe390a4de..d173f53697 100644 --- a/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts +++ b/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts @@ -132,6 +132,10 @@ reg = <0x0 0x400>; }; + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + macaddr_factory_4: macaddr@4 { reg = <0x4 0x6>; }; @@ -216,7 +220,8 @@ mt76@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; ieee80211-freq-limit = <5000000 6000000>; }; }; -- 2.30.2