ramips: convert mt76 PCIe NIC EEPROM to NVMEM format for legacy SoCs
authorShiji Yang <yangshiji66@qq.com>
Mon, 2 Oct 2023 02:12:02 +0000 (10:12 +0800)
committerChristian Marangi <ansuelsmth@gmail.com>
Tue, 17 Oct 2023 10:07:27 +0000 (12:07 +0200)
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 <yangshiji66@qq.com>
93 files changed:
target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts
target/linux/ramips/dts/mt7620a_asus_rt-ac51u.dts
target/linux/ramips/dts/mt7620a_asus_rt-ac54u.dts
target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi
target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts
target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts
target/linux/ramips/dts/mt7620a_cameo_810.dtsi
target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts
target/linux/ramips/dts/mt7620a_dlink_dir-806a-b1.dts
target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts
target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts
target/linux/ramips/dts/mt7620a_dlink_dwr-961-a1.dts
target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi
target/linux/ramips/dts/mt7620a_domywifi.dtsi
target/linux/ramips/dts/mt7620a_dovado_tiny-ac.dts
target/linux/ramips/dts/mt7620a_edimax_br-6208ac-v2.dts
target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts
target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts
target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi
target/linux/ramips/dts/mt7620a_fon_fon2601.dts
target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts
target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts
target/linux/ramips/dts/mt7620a_hiwifi_hc5761.dts
target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts
target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi
target/linux/ramips/dts/mt7620a_humax_e2.dts
target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts
target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts
target/linux/ramips/dts/mt7620a_iptime.dtsi
target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts
target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts
target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dtsi
target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi
target/linux/ramips/dts/mt7620a_netis_wf2770.dts
target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi
target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts
target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts
target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts
target/linux/ramips/dts/mt7620a_ralink_mt7620a-mt7610e-evb.dts
target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts
target/linux/ramips/dts/mt7620a_tplink_archer.dtsi
target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi
target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts
target/linux/ramips/dts/mt7620a_wavlink_wl-wn535k1.dts
target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts
target/linux/ramips/dts/mt7620a_wevo_air-duo.dts
target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts
target/linux/ramips/dts/mt7620a_youku_x2.dts
target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi
target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts
target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi
target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026.dtsi
target/linux/ramips/dts/mt7628an_asus_rt-ac1200-v2.dts
target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dtsi
target/linux/ramips/dts/mt7628an_buffalo_wcr-1166ds.dts
target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts
target/linux/ramips/dts/mt7628an_comfast_cf-wr758ac-v2.dts
target/linux/ramips/dts/mt7628an_comfast_cf-wr758ac.dtsi
target/linux/ramips/dts/mt7628an_cudy_wr1000.dts
target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts
target/linux/ramips/dts/mt7628an_hiwifi_hc5761a.dts
target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts
target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi
target/linux/ramips/dts/mt7628an_iptime.dtsi
target/linux/ramips/dts/mt7628an_keenetic_kn-1613.dts
target/linux/ramips/dts/mt7628an_linksys_e5400.dts
target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts
target/linux/ramips/dts/mt7628an_motorola_mwr03.dts
target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi
target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts
target/linux/ramips/dts/mt7628an_totolink_lr1200.dts
target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi
target/linux/ramips/dts/mt7628an_tplink_8m.dtsi
target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts
target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts
target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts
target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts
target/linux/ramips/dts/mt7628an_tplink_re200.dtsi
target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts
target/linux/ramips/dts/mt7628an_tplink_re305-v3.dts
target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts
target/linux/ramips/dts/mt7628an_wavlink_wl-wn531a3.dts
target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts
target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts
target/linux/ramips/dts/mt7628an_wavlink_wl-wn576a2.dts
target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts
target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts
target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts
target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi
target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m-intl.dts
target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts
target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts

index 2b9434b2448a81bc27ca28cbe3b9aba0693d4c0a..3bc0e69bfe20e92945db88501fbc715f0d2dc39d 100644 (file)
@@ -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 {
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_28: macaddr@28 {
                                        reg = <0x28 0x6>;
                                };
index 0710b2557101862bbd97610cb49b33c8b22b77b6..b482b6dfc91371c99cb8c0bed00eb6511ab438e4 100644 (file)
@@ -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";
        };
 };
index acc60807b6870588eda45629cb89d0d613e2c788..2a94f5d29d0fd365413d6f9662a2934744f857e5 100644 (file)
@@ -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 {
index 20dab4f09fdfb10ff1a3b2c6d2cfe6c6755be9b2..3d4e6a1aad4d3981daa0297610234efecbbd8384 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_28: macaddr@28 {
                                        reg = <0x28 0x6>;
                                };
index 8788d9d93b61a117ae2ae94ceb136fa2799ff5a6..e4772a45748f3cc2528a11aa722a87dbaf2c6023 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
 &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>;
        };
 };
index 892bd73502bb3c07c35dbc4f65e910978e4eef44..11f4d8c6c6682d125618eee49718907ef30081b1 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
        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>;
        };
 };
index c25db1d9d8313d698b1f37a80babd21e392e65cf..e1ff1ecd427693c940760bc811026988bf1fee25 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_28: macaddr@28 {
                                        reg = <0x28 0x6>;
                                };
 &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>;
        };
 };
index 1d29bed6f0650cb4eb7de10b0db1479891aa5a18..f73feb58c967695a481873521e3d13cacbca1e0a 100644 (file)
                        };
 
                        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>;
+                               };
                        };
                };
        };
 &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>;
        };
 };
 
                function = "gpio";
        };
 };
-
-&config {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_config_e490: macaddr@e490 {
-               reg = <0xe490 0x6>;
-       };
-};
index 995255ee8adc070d5ed18174eb262c306e2805ed..ae0b7c12101879d4d33358fab404c45ea3924210 100755 (executable)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
 &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 {
index 8ae566d448b999e6f37ec23e85f8c57c3d99f45a..8c9ab02f447029f86e1cae2fba5d830d93649340 100644 (file)
                        };
 
                        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>;
+                               };
                        };
                };
        };
 &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>;
        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>;
-       };
-};
index 3de9533edc7bff90107245744816277829e7c216..a3e65c6468972af90161680aaf1937c7db19db9d 100644 (file)
@@ -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>;
 };
index 7eae66666881b4a5f9cd16de0ce65d64a1bb8e49..f80aa716819024d62a8894d2e95335859fbe963b 100644 (file)
@@ -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>;
 };
index a5fd705eba9e94771ecab2516b6a880c2281deb9..4a6bab21a15f7d63fd3f581a55629865a32544bc 100644 (file)
                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)>;
        };
 };
 
 
                        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>;
                                };
index 3336f9c6c519efa5f8e2ef98eed509fd227c6839..d627d7b4fe6d6711959bbd7d743db4ecb3ffed0d 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_28: macaddr@28 {
                                        reg = <0x28 0x6>;
                                };
 &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 {
index ba1a2becdab6b997e1ce83e023d0d505ff51182f..0c61dcb24d7c8e5c8d21f95a6bad50d4aa4b1763 100644 (file)
                        };
 
                        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 {
 &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>;
        };
 };
index 5a311ba895edfe5970a778163d710279a8dd8cfa..edacffb1b14932856d95808228aa2efc3690e978 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
 &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>;
        };
 };
index 8e2030a5072bbe34bcdf6ad30861d502f05ffd00..c0893cd62326293aa77dffb3783855e051ae5965 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
 &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>;
        };
 };
index ea8b8c9121cd447897107a06d542374dc97f420e..3a3bc9aec6eb2926a55482a4fbe080918a08024b 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
 &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>;
        };
 };
index d5db3958d80e9f37499bfbf6cbdaee625b2a2e5b..f7745b85e96397f4b1fda85f59c295c1732494ec 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
 &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>;
        };
 };
index ff6844060e996a6a540f853bdc1694c418e4e803..f374c75f8647104213eaca35b8c1546cc00c9be6 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
        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>;
        };
 };
index 869453fe750ec5e90a4f7aa534249bfd33e96e58..84f1153ecca7a1c7e0a107bada0fbea55a035c25 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4000: macaddr@4000 {
                                        reg = <0x4000 0x6>;
                                };
 &pcie0 {
        mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
+               nvmem-cells = <&eeprom_factory_8000>;
+               nvmem-cell-names = "eeprom";
        };
 };
 
index d2ff424bcfd773fa58e4b567f1085c7888efe8be..f435ceb9f602b07f96ad7657f5fa2800b22b9f38 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
        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>;
        };
 };
index d1a7f69e176549b3dc9619f09e1afcb3c3f0217a..741a466769632d79fd83c7e1336ad17ac160c0b9 100644 (file)
@@ -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>;
        };
 };
index 87eacb13d7802ff69ead8e48882dcb2cbd930b24..ef22a6639d4d4ca9ca058cc42c62903ac8f4678a 100644 (file)
        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>;
        };
 };
index 508d60f6b686729f15d6cf0fdf226ba708206578..733cdeaf39f001853372194847770dfdd8f6c42a 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
index 92e4d58be7dca27408fb36475425cc0a01b9761b..de7b6ddf57b8da9a4db07eba54cf0392cb6901e3 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_10007: macaddr@10007 {
                                        reg = <0x10007 0x6>;
                                };
        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>;
        };
 };
index eacfcc152f3db93e07c282964b602c9669551c4a..f27274d6e17296b46d166aa013ef27b2ab21ec93 100644 (file)
                        };
 
                        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 {
 &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>;
        };
 };
index d7ef17abbc203d3dd72a51a223ffe6cb496de797..71a66a799d7d7944e3d25957baec354f666c7923 100644 (file)
                        };
 
                        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 {
        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>;
        };
 };
index f5e33850ca1e5eb17585cc0713f5986a07e0b4cd..be43f9bc99b7905ef5f90beb696bfc8a81abdba3 100644 (file)
                                        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 {
index 07355a05a5ad3f7acd472f2ad1676bee9eecd65c..f7a5aed064c445dad006d5160fb253975faf490b 100644 (file)
                        };
 
                        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>;
+                               };
                        };
                };
        };
 &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>;
        };
 };
 
                function = "gpio";
        };
 };
-
-&config {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_config_e07e: macaddr@e07e {
-               reg = <0xe07e 0x6>;
-       };
-};
index 4c0ce75281ed11b0e77a72b431d0bbdd055fab85..f7b296d2501bb897e2e66eedf087806cbc796541 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_28: macaddr@28 {
                                        reg = <0x28 0x6>;
                                };
                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>;
index 0360cff26fc42b14e99fbeadc5fe72f78e1393c7..f30b1265fed2943bd69a7c3aa8f1f93c348af60c 100644 (file)
                                        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>;
        };
 };
index c6f95b4c77028fddecf2da499e07f68a76bc6bd4..5be2a2f04491227962cf72a49927d313d0a97f02 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_28: macaddr@28 {
                                        reg = <0x28 0x6>;
                                };
 &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>;
        };
 };
index f768ac21141c41ec3f5bc6b1c7fc39ca97ec8d19..93f0924bd4f9eed3228ead87fa601af874573a54 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
        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>;
        };
 };
index e8aed7e2851626589efceb9abbf459369a9307b3..36cbf20f32845e731dec2f1e2f446535fb4220b3 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_28: macaddr@28 {
                                        reg = <0x28 0x6>;
                                };
 &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>;
        };
 };
index 13230a9c43bd7c220374edddab8e1cc570f62e7e..e3c15871bce05203e9b298663891ffd9572107b5 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
 &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>;
        };
 };
index 2f14d39ac1d2167e2fb4d0c007e8782d998d0a1f..5a6dee77ec50c8972ebe554ee073470dbaa014c2 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
 &pcie0 {
        mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
+               nvmem-cells = <&eeprom_factory_8000>;
+               nvmem-cell-names = "eeprom";
        };
 };
index 41ea54ba2d5a99ad392e4ffa4e795945e294861f..a6b46d821a39aae02d6bb611cdbea0ba1bdaaf86 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
 &pcie0 {
        mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
+               nvmem-cells = <&eeprom_factory_8000>;
+               nvmem-cell-names = "eeprom";
        };
 };
index b7a71c3e25ad101d5bbcb53fa7a97d3c770e4ed9..46f3cfd3abcfd894e7227f437a79aacfbc1c76b9 100644 (file)
                        };
 
                        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>;
        };
 };
index 4bce556de855c887b1e32f1274049c859645e730..a75cbf43fcb4e4e94445c98298acb5949007fd29 100644 (file)
                                eeprom_radio_0: eeprom@0 {
                                        reg = <0x0 0x200>;
                                };
+
+                               eeprom_radio_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
                        };
                };
        };
 &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)>;
        };
 };
index 47cbf9b243c9ab0c5f5969e2f0e8e479848df794..dab106b9bfd2550cb6e31d0e5f179b4aa1438ca1 100644 (file)
                                eeprom_radio_0: eeprom@0 {
                                        reg = <0x0 0x200>;
                                };
+
+                               eeprom_radio_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
                        };
                };
        };
 &pcie0 {
        mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&radio 0x8000>;
+               nvmem-cells = <&eeprom_radio_8000>;
+               nvmem-cell-names = "eeprom";
        };
 };
index 32a14a2b7502be660a3a4b3039db8f3f29087699..6edb7012c8e255620e74b310ecc053092fc86fa3 100644 (file)
                                eeprom_radio_0: eeprom@0 {
                                        reg = <0x0 0x200>;
                                };
+
+                               eeprom_radio_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
                        };
                };
        };
 &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>;
        };
 };
index 9e4e646020969eb060f9401f09f51cd162136bca..e0cb10aac69b6af87f2f346c096b2f621fab04b4 100644 (file)
                                eeprom_radio_0: eeprom@0 {
                                        reg = <0x0 0x200>;
                                };
+
+                               eeprom_radio_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
                        };
                };
        };
 &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>;
        };
 };
index f1a05dac7839618390dc7433d13624751f7d2c6e..9ab3a70d14b3a6f24297ca80962317ea17ec5a3c 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_28: macaddr@28 {
                                        reg = <0x28 0x6>;
                                };
 &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>;
        };
 };
index 5d07db9708a15bc5153ddca72af04f46b9677a3d..9938c00531cf0ba892c4a0be8a90896e4769c0af 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_28: macaddr@28 {
                                        reg = <0x28 0x6>;
                                };
 &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>;
        };
 };
index 886de51dae015b16bdfdc464ac0cbf14e721013a..0c22e9199bec73a166b299c91f95031874cb6204 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_28: macaddr@28 {
                                        reg = <0x28 0x6>;
                                };
 &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>;
        };
 };
index 54fcb32c0baf3bdfd6d85423ca0c0aa536b3b1ab..2ecb78f9b5c41f68123949e44bb5c3fa0d934327 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
        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 {
index b70a95d7769a4c21a7c55fadc7030c0686171d00..a8a7db80828f8d840fada784745e0e7584251926 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_28: macaddr@28 {
                                        reg = <0x28 0x6>;
                                };
 &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>;
        };
 };
index ad9e252f65f5d4eedf8a33e93b15e1bd7322166d..da1e61e4fe57a2e4e269f7698b883501f8ec757e 100644 (file)
@@ -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 {
index 9e5227d848c7eae4aa2260d957e910ccd05713dd..29ae863df031cad39a9cb3a71b2703907015077c 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_28: macaddr@28 {
                                        reg = <0x28 0x6>;
                                };
index 80c4f3640d85c885815881c7059188dd7c26a33b..d85e35b69449d6721e31d51af442f28259ce0e8b 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
 &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>;
        };
 };
index f86ac1a88aeec5c1548e29106e1509485e9ecb7c..39c50c7366df566b575206d5f4b5b80492ea34b8 100644 (file)
@@ -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>;
        };
 };
index e2f5c28c707db30c6eb10e2adb932af04d62d3ae..1c7e1782cba79bcaac9d8c42ca09ec16c44ff85a 100644 (file)
                                        reg = <0x0 0x200>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_28: macaddr@28 {
                                        reg = <0x28 0x6>;
                                };
index 2dd38fba4b1031c3e3d05470c78c7fe0f55193c4..3edb6dad550bbb1dea4093125cef65265529d919 100644 (file)
@@ -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";
index 746436570fc8be8a4be79136b6e4904cd0e04101..7a13921aa552c6a1832ee931605573b9e1155edc 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
        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 {
index 4f37fb89404a7cb8b18b23adbad9f22ca9c14ecf..7f7741633773fbfb6fae6e0a635dc12e28109e0f 100644 (file)
 &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>;
        };
 };
                                eeprom_factory_0: eeprom@0 {
                                        reg = <0x0 0x400>;
                                };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
                        };
 
                        partition@50000 {
index 6a7bdfab079a174f40b4a56e96692896a6689c91..4270c48ad9fd28ad7e7d3748280a1297e05c6f05 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_8004: macaddr@8004 {
                                        reg = <0x8004 0x6>;
                                };
        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>;
        };
 };
index bc476f2617e479f046d140f22c2d0fa2758d00e4..b5a789f8a684e78221ae40a56e7e47978db87cbf 100644 (file)
@@ -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>;
+};
index 4993e15f24e6c2cb7535094ae63cf63bef6a19ae..e8cabd7fd86d12a42511b146f194bdce2ebc83fc 100644 (file)
@@ -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>;
        };
 };
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_e000: macaddr@e000 {
                                        reg = <0xe000 0x6>;
                                };
index bbdd6fe35f36a69dee2ed8aa22b79fa52741bb9e..57405632dddc1d022942946ac82446c253f3a72c 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_28: macaddr@28 {
                                        reg = <0x28 0x6>;
                                };
        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 {
index f795838f8f22562ae5e5338ebaef2a97d8c53b6f..4e68137f3b2a3b3f61575a2d78e9cc325ac4f6e1 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_28: macaddr@28 {
                                        reg = <0x28 0x6>;
                                };
        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>;
        };
 };
index 828e5b8b2d09cd870136382ed136f8fb0a136984..5ec041c8048e9800c4b9fa86c873ab5f3a73bc3d 100644 (file)
@@ -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>;
        };
 };
index a3ca7b9c84387779dffb8baf59b10dc03c1d8667..44ebef2ad5c0a7fbefadb5c346c5568b55878b7f 100644 (file)
 &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>;
index ad8d6cbfe1727e35d255f4198021ec10a736da0e..cfd4bb1dc53c57cd595e51fb7592391979d25589 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
index 3f81fb56a7151eb5baa64f77c192be2cd333b45f..22cc368b0b9ba40c4b73a160bb53a9312fb21c46 100644 (file)
                                eeprom_factory_0: eeprom@0 {
                                        reg = <0x0 0x400>;
                                };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
                        };
 
                        partition@40000 {
        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>;
        };
 };
index 510bada246dc6c9e1a4bbbcad69712e2217800da..117f278f129f010b15c24eda8a04a1ac0215d7e2 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_400: eeprom@400 {
+                                       reg = <0x400 0x4da8>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
        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>;
        };
 };
index ed1479dcd8f3dbd5272c3c67871d914ca117f637..24fd31a7e203d62f72ae64dd88ebd3f99892328e 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_28: macaddr@28 {
                                        reg = <0x28 0x6>;
                                };
        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>;
        };
 };
index 4a7915b9f0026c1a29c0b1e698fa63358ed8faf0..fee64bc53fc0612d41074f0baf19b04f50aee16c 100644 (file)
                        };
 
                        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 {
 &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>;
        };
 };
index b852c11e06f3210173f4857001d530a7cee1c8d0..f2895481ed6470470df0589e9b55e2de21fc7e84 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
 &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>;
        };
 };
index a6fa581b7d65c47c0b77ee32994df29a916c4203..ba38839129ea5a7393b8211a4a43838139c974d9 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
 &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>;
        };
 };
index e8cb360cca02449d4a5176a2505d7d84ba2206d9..b2e0a5eacaf71bf38efc5782a2a45bbdfea602ad 100644 (file)
 &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>;
        };
 };
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
index 4de621196c125f6b6d111cea58a48194dc617740..ea07ebe492fd198e6d4a2af1d3dabca4e36e7361 100644 (file)
 &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>;
        };
 };
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_28: macaddr@28 {
                                        reg = <0x28 0x6>;
                                };
index edf5d89054a42e37c1899be5e955b5fa8dd843d8..7464d1c85dc86ffa3b35b3c387404b6a7d350c31 100644 (file)
                                eeprom_radio_0: eeprom@0 {
                                        reg = <0x0 0x400>;
                                };
+
+                               eeprom_radio_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
                        };
                };
        };
index 4e4e3c735a1ce261f989c78745b71af9a637707a..b3c62eb488377714ae2804c916e3d575b9776249 100644 (file)
                                eeprom_factory_20000: eeprom@20000 {
                                        reg = <0x20000 0x400>;
                                };
+
+                               eeprom_factory_28000: eeprom@28000 {
+                                       reg = <0x28000 0x200>;
+                               };
                        };
                };
        };
index 02d0144f4aec6c23f005574b272da2915fc8315a..2225b6333386dd4022c8c365345bbfa058278883 100644 (file)
 &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)>;
        };
 };
index 7f5b3d557a5d2f0fcd783b9d6eb870bc0b073747..04eba88d1981a025549c41d0869b73becebcea64 100644 (file)
 &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)>;
        };
 };
index ab81b094934e5cc5bd947627b448184f279d3578..f628908b9806fbdf0adb122c1eed674ee8586cc5 100644 (file)
 &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)>;
        };
 };
index 164cf7a170f7e3c554a47651ae8df0a8920ef2ae..87927da62a471cfb868a22cf39308854af570a8a 100644 (file)
 &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)>;
        };
 };
index d129acec0cc3409a85e90478e28fc10f881b49b2..24236e5c7fe4f00475c0050e112b3bfcbbd8a749 100644 (file)
                                eeprom_radio_0: eeprom@0 {
                                        reg = <0x0 0x400>;
                                };
+
+                               eeprom_radio_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
                        };
                };
        };
 &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>;
        };
 };
index 6b52583273420bb7fd94d6f99a44579d2b4f03be..88d96bfa02027a39f92a0852f3734c48b3ead7b2 100644 (file)
                                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>;
 };
 
index 9f80bd57fb10af3010a04b0f800aa04b4c362726..c6ae357e19c4433e2bb91756f172888045b014a4 100644 (file)
                                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)>;
 };
 
index 9be8529bbf884b4dcef954906d926084271e07cc..b49dc61a4cf0492eea6afb93af79354a16a884ff 100644 (file)
 &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)>;
        };
 };
index 7a60906a566b1576dd5a45e882a2017c8afdfa46..25a1c1ac8ffdcb73303d5dd0eaa2960f1d79fee8 100644 (file)
@@ -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>;
        };
 };
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_28: macaddr@28 {
                                        reg = <0x28 0x6>;
                                };
index 23f81619ee184527fbde3d4e1a9dcabdeb4c5ade..ddf2723633c6e2b851607ca3203b6157b8ce1657 100644 (file)
@@ -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>;
        };
 };
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_2e: macaddr@2e {
                                        reg = <0x2e 0x6>;
                                };
index 65f6f47b96ffc0662915660ce4ae961c3db77038..8bdf764fdd22f45ebbaff85cbd43d219baa1951f 100644 (file)
@@ -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>;
        };
 };
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_28: macaddr@28 {
                                        reg = <0x28 0x6>;
                                };
index 9ea2a3a65ff81530d1b5480bebd9469b73be7553..58d5bf9168eaf7109b35b772d51bf1ff1ff1eded 100644 (file)
 &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>;
        };
 };
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_28: macaddr@28 {
                                        reg = <0x28 0x6>;
                                };
index 456b3ad1511be511e521bf0b3180589189640cc2..bc9bef13287af85a7f990eb3a3f4744792fdf657 100644 (file)
@@ -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>;
        };
 };
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_28: macaddr@28 {
                                        reg = <0x28 0x6>;
                                };
index 267001d950aee6959c9955320d3cca1f2dc26376..7abab0044d1112011da2c1611b410bd5b2128e4c 100644 (file)
@@ -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>;
        };
 };
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_28: macaddr@28 {
                                        reg = <0x28 0x6>;
                                };
index 51b99300b31e471caff2103a06b05229137215f0..8859038c30e333bec061f9534b0af21ffc790023 100644 (file)
@@ -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>;
        };
 };
index c5465386580f56b6e7edcc81503a5a40e7e250b0..51737a965d17022381a96fe9a19ffc5e24615308 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
index 0d647c6153ceeb7bc313e1f898cb49c587ae9ae8..809a0af30aff050e3b08004f9b11e60b0f4dbbb4 100644 (file)
@@ -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>;
        };
 };
index 7ae6b18f727f5768dbc02d8760240716268d9f45..7b40cdb6af3d9b46d7d56f626221c16d0cbabd27 100644 (file)
@@ -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>;
        };
 };
index cbe390a4de3a2466c7b96ea56ce90b70e90e5327..d173f5369727dc6cae9b1a03e9c43ddb75873b23 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
        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>;
        };
 };