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 2b9434b2448a..3bc0e69bfe20 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 0710b2557101..b482b6dfc913 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 acc60807b687..2a94f5d29d0f 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 20dab4f09fdf..3d4e6a1aad4d 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 8788d9d93b61..e4772a45748f 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 892bd73502bb..11f4d8c6c668 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 c25db1d9d831..e1ff1ecd4276 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 1d29bed6f065..f73feb58c967 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 995255ee8adc..ae0b7c121018 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 8ae566d448b9..8c9ab02f4470 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 3de9533edc7b..a3e65c646897 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 7eae66666881..f80aa7168190 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 a5fd705eba9e..4a6bab21a15f 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 3336f9c6c519..d627d7b4fe6d 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 ba1a2becdab6..0c61dcb24d7c 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 5a311ba895ed..edacffb1b149 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 8e2030a5072b..c0893cd62326 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 ea8b8c9121cd..3a3bc9aec6eb 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 d5db3958d80e..f7745b85e963 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 ff6844060e99..f374c75f8647 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 869453fe750e..84f1153ecca7 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 d2ff424bcfd7..f435ceb9f602 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 d1a7f69e1765..741a46676963 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 87eacb13d780..ef22a6639d4d 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 508d60f6b686..733cdeaf39f0 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 92e4d58be7dc..de7b6ddf57b8 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 eacfcc152f3d..f27274d6e172 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 d7ef17abbc20..71a66a799d7d 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 f5e33850ca1e..be43f9bc99b7 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 07355a05a5ad..f7a5aed064c4 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 4c0ce75281ed..f7b296d2501b 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 0360cff26fc4..f30b1265fed2 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 c6f95b4c7702..5be2a2f04491 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 f768ac21141c..93f0924bd4f9 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 e8aed7e28516..36cbf20f3284 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 13230a9c43bd..e3c15871bce0 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 2f14d39ac1d2..5a6dee77ec50 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 41ea54ba2d5a..a6b46d821a39 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 b7a71c3e25ad..46f3cfd3abcf 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 4bce556de855..a75cbf43fcb4 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 47cbf9b243c9..dab106b9bfd2 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 32a14a2b7502..6edb7012c8e2 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 9e4e64602096..e0cb10aac69b 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 f1a05dac7839..9ab3a70d14b3 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 5d07db9708a1..9938c00531cf 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 886de51dae01..0c22e9199bec 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 54fcb32c0baf..2ecb78f9b5c4 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 b70a95d7769a..a8a7db80828f 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 ad9e252f65f5..da1e61e4fe57 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 9e5227d848c7..29ae863df031 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 80c4f3640d85..d85e35b69449 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 f86ac1a88aee..39c50c7366df 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 e2f5c28c707d..1c7e1782cba7 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 2dd38fba4b10..3edb6dad550b 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 746436570fc8..7a13921aa552 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 4f37fb89404a..7f7741633773 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 6a7bdfab079a..4270c48ad9fd 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 bc476f2617e4..b5a789f8a684 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 4993e15f24e6..e8cabd7fd86d 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 bbdd6fe35f36..57405632dddc 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 f795838f8f22..4e68137f3b2a 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 828e5b8b2d09..5ec041c8048e 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 a3ca7b9c8438..44ebef2ad5c0 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 ad8d6cbfe172..cfd4bb1dc53c 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 3f81fb56a715..22cc368b0b9b 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 510bada246dc..117f278f129f 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 ed1479dcd8f3..24fd31a7e203 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 4a7915b9f002..fee64bc53fc0 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 b852c11e06f3..f2895481ed64 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 a6fa581b7d65..ba38839129ea 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 e8cb360cca02..b2e0a5eacaf7 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 4de621196c12..ea07ebe492fd 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 edf5d89054a4..7464d1c85dc8 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 4e4e3c735a1c..b3c62eb48837 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 02d0144f4aec..2225b6333386 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 7f5b3d557a5d..04eba88d1981 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 ab81b094934e..f628908b9806 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 164cf7a170f7..87927da62a47 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 d129acec0cc3..24236e5c7fe4 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 6b5258327342..88d96bfa0202 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 9f80bd57fb10..c6ae357e19c4 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 9be8529bbf88..b49dc61a4cf0 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 7a60906a566b..25a1c1ac8ffd 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 23f81619ee18..ddf2723633c6 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 65f6f47b96ff..8bdf764fdd22 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 9ea2a3a65ff8..58d5bf9168ea 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 456b3ad1511b..bc9bef13287a 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 267001d950ae..7abab0044d11 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 51b99300b31e..8859038c30e3 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 c5465386580f..51737a965d17 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 0d647c6153ce..809a0af30aff 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 7ae6b18f727f..7b40cdb6af3d 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 cbe390a4de3a..d173f5369727 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