ramips: convert MT7610 and MT7612 EEPROM to NVMEM format for MT7621
authorShiji Yang <yangshiji66@qq.com>
Mon, 2 Oct 2023 02:12:02 +0000 (10:12 +0800)
committerChristian Marangi <ansuelsmth@gmail.com>
Mon, 9 Oct 2023 09:15:52 +0000 (11:15 +0200)
This patch converts MT7610 and MT7612 WiFi calibration data to NVMEM
format. The EEPROM size is 0x200.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
47 files changed:
target/linux/ramips/dts/mt7621_afoundry_ew1200.dts
target/linux/ramips/dts/mt7621_asus_rp-ac56.dts
target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts
target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts
target/linux/ramips/dts/mt7621_bolt_arion.dts
target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts
target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts
target/linux/ramips/dts/mt7621_cudy_wr1300-v2.dts
target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts
target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts
target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts
target/linux/ramips/dts/mt7621_firefly_firewrt.dts
target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts
target/linux/ramips/dts/mt7621_hanyang_hyc-g920.dts
target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts
target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts
target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts
target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts
target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts
target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts
target/linux/ramips/dts/mt7621_linksys_re6500.dts
target/linux/ramips/dts/mt7621_mqmaker_witi.dts
target/linux/ramips/dts/mt7621_mtc_wr1201.dts
target/linux/ramips/dts/mt7621_netgear_ex6150.dts
target/linux/ramips/dts/mt7621_netgear_wac104.dts
target/linux/ramips/dts/mt7621_netis_wf2881.dts
target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts
target/linux/ramips/dts/mt7621_sercomm_na502.dts
target/linux/ramips/dts/mt7621_sercomm_na502s.dts
target/linux/ramips/dts/mt7621_sercomm_s1500.dtsi
target/linux/ramips/dts/mt7621_snr_snr-cpe-me1.dts
target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts
target/linux/ramips/dts/mt7621_telco-electronics_x1.dts
target/linux/ramips/dts/mt7621_tozed_zlt-s12-pro.dts
target/linux/ramips/dts/mt7621_tplink_re350-v1.dts
target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts
target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi
target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi
target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts
target/linux/ramips/dts/mt7621_youhua_wr1200js.dts
target/linux/ramips/dts/mt7621_youku_yk-l2.dts
target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts
target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts
target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602-v04.dtsi
target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi
target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts
target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi

index 0161fcfb41037b699a6f5017547b0619585720c3..30a03824627e3a12e48d1cfcbd18a28c35376c8f 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_e000: macaddr@e000 {
                                        reg = <0xe000 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 c8e6bc9f28a8852e86997dc58a2adc2f331068d8..bc623067a8a5e14ef3310e67a242df4aaacfd65b 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               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 347f6edb95f60a81bdf576368946a76016fec3eb..322a96b700aea7a70f51c2fb659107f2074bd458 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_e000: macaddr@e000 {
                                        reg = <0xe000 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";
 
                led {
                        led-sources = <2>;
index bce6bd435aa9695af35a265f9ac0fee836619d81..77e3fffcc18a616d28fe1046ebbdb931e145adf2 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               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";
        };
 };
 
index bf29d079bcd0f1847673ac55be421090033343f4..826d3f928aafcc8321caac5d2cdc62607da6f1a2 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 = "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 85aca456cb6a7655db4fa230be0980250c9b52fd..795fe256b3c3c8ec49c89a23cf655814cca30496 100644 (file)
                                eeprom_factory_0: eeprom@0 {
                                        reg = <0x0 0x400>;
                                };
+
+                               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 108dbc17a5f3e4577ac0ba72170d536f49cedbf4..fcc16c31b518da3256a78a2fd098fa7429337d7e 100644 (file)
                                eeprom_factory_0: eeprom@0 {
                                        reg = <0x0 0x400>;
                                };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
                        };
 
                        partition@50000 {
        wifi@0,0 {
                compatible = "pci14c3,7662";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
-               nvmem-cells = <&macaddr_bdinfo_de00>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_bdinfo_de00>;
+               nvmem-cell-names = "eeprom", "mac-address";
                mac-address-increment = <2>;
                ieee80211-freq-limit = <5000000 6000000>;
 
index 0aafde6c085fbabb28abbeb97a99557431ca5995..264a0fa5c16b3fcc514eb031923d6cb07cecea7e 100644 (file)
                                eeprom_factory_0: eeprom@0 {
                                        reg = <0x0 0x400>;
                                };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
                        };
 
                        partition@50000 {
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
-               nvmem-cells = <&macaddr_bdinfo_de00>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_bdinfo_de00>;
+               nvmem-cell-names = "eeprom", "mac-address";
                mac-address-increment = <2>;
        };
 };
index f539c13767144857a431f460e4eec1be7e9ad2b1..a25787b71b873fc2f74484f81480e39fc72345f8 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_e000: macaddr@e000 {
                                        reg = <0xe000 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 bd57bc153bfaac769085b45522347b07139c445c..3d27b0a942bd16d8204b5a3af9493d7a69e0bc29 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_e000: macaddr@e000 {
                                        reg = <0xe000 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 fac41f206bb9f96616de7ac20bc2aa2ff01e559f..36d22046a95a34b8e3fb1377ab25c64e1db24508 100644 (file)
                        };
 
                        radio: partition@34000 {
+                               compatible = "nvmem-cells";
                                label = "radio";
                                reg = <0x34000 0x4000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               macaddr_radio_4: macaddr@4 {
+                                       reg = <0x4 0x6>;
+                               };
+
+                               eeprom_radio_0: eeprom@0 {
+                                       reg = <0x0 0x200>;
+                               };
+
+                               eeprom_radio_2000: eeprom@2000 {
+                                       reg = <0x2000 0x200>;
+                               };
                        };
 
                        factory: partition@38000 {
 &pcie0 {
        wifi0: mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&radio 0x2000>;
+               nvmem-cells = <&eeprom_radio_2000>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };
 &pcie1 {
        wifi1: mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&radio 0x0>;
+               nvmem-cells = <&eeprom_radio_0>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <2400000 2500000>;
        };
 };
                function = "gpio";
        };
 };
-
-&radio {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_radio_4: macaddr@4 {
-               reg = <0x4 0x6>;
-       };
-};
index 46954b616f01f89e9d80a43ce21b0cf4d193bc1c..acc9e9865f9c41a1edeab7662e26c587a87fbeb0 100644 (file)
                        };
 
                        factory: partition@40000 {
+                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x40000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               eeprom_factory_0: eeprom@0 {
+                                       reg = <0x0 0x200>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
+                               macaddr_factory_e000: macaddr@e000 {
+                                       reg = <0xe000 0x6>;
+                               };
                        };
 
                        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>;
        };
 };
 &pcie1 {
        mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0000>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <2400000 2500000>;
        };
 };
                function = "gpio";
        };
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_e000: macaddr@e000 {
-               reg = <0xe000 0x6>;
-       };
-};
index 824e578f954e9df76288a3c31a2678bb4627dfd2..a87f82b6811a00e452197852c9a534fd36a21eb2 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_e000: macaddr@e000 {
                                        reg = <0xe000 0x6>;
                                };
 &pcie1 {
        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 c4e28b96df5da631fbfc922f3a2a901a592a44b1..94b211ab7a7126454b9f3c3439a4aa739b5e3160 100644 (file)
                        };
 
                        factory: partition@40000 {
+                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x40000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               eeprom_factory_0: eeprom@0 {
+                                       reg = <0x0 0x200>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
+                               macaddr_factory_4: macaddr@4 {
+                                       reg = <0x4 0x6>;
+                               };
+
+                               macaddr_factory_8004: macaddr@8004 {
+                                       reg = <0x8004 0x6>;
+                               };
                        };
 
                        partition@50000 {
        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 {
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0000>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <2400000 2500000>;
 
                led {
                function = "gpio";
        };
 };
-       
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_4: macaddr@4 {
-               reg = <0x4 0x6>;
-       };
-
-       macaddr_factory_8004: macaddr@8004 {
-               reg = <0x8004 0x6>;
-       };
-};
index 3fb267d78216d6cca0e1bc9be0d9c05e73d8c0e9..99bd01c6d938c415d3d0468cad159dab0de7f27e 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 {
        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";
        };
 };
 
index eab4c0faef65f2f9422fc82612a4cd7a62fee55a..63c4f5f6b24bd250d0d2f8579f998ebfc0073fdc 100644 (file)
                        eeprom_factory_0: eeprom@0 {
                                reg = <0x0 0x400>;
                        };
+
+                       eeprom_factory_8000: eeprom@8000 {
+                               reg = <0x8000 0x200>;
+                       };
                };
 
                partition@140000 {
 &pcie1 {
        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 f8d25102c51bd20eb3f7e2139b5d378b3a49e6d9..fc548352d54c81877bf64c2057f849abf63b95d5 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_e000: macaddr@e000 {
                                        reg = <0xe000 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>;
 
                led {
index b6bafe8c89abbb0aa477686ac3462e92927266d9..b08939a451d012ed8ec39ceade8b110b0ea0328b 100644 (file)
                                #size-cells = <1>;
                                read-only;
 
+                               eeprom_factory_0: eeprom@0 {
+                                       reg = <0x0 0x200>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
 &pcie1 {
        mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };
index c08b6427e7697b479ba0a77d5b0253c13a770214..0faf24e7b05d1d5dcb5a036c6f4250d30083b7c2 100644 (file)
                        #size-cells = <1>;
 
                        uboot: partition@0 {
+                               compatible = "nvmem-cells";
                                label = "u-boot";
                                reg = <0x0 0x20000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               macaddr_uboot_1fc20: macaddr@1fc20 {
+                                       reg = <0x1fc20 0x6>;
+                               };
+
+                               macaddr_uboot_1fc40: macaddr@1fc40 {
+                                       reg = <0x1fc40 0x6>;
+                               };
                        };
 
                        partition@20000 {
                        };
 
                        factory: partition@30000 {
+                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x30000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               eeprom_factory_0: eeprom@0 {
+                                       reg = <0x0 0x200>;
+                               };
+
+                               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>;
 
                led {
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0000>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <2400000 2500000>;
 
                led {
                function = "gpio";
        };
 };
-
-&uboot {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_uboot_1fc20: macaddr@1fc20 {
-               reg = <0x1fc20 0x6>;
-       };
-
-       macaddr_uboot_1fc40: macaddr@1fc40 {
-               reg = <0x1fc40 0x6>;
-       };
-};
index b5d606f17eedc8e8b37b096e9a33b421f2681456..a6a7fc9f427cd74e2df57e5fd80e6933862c8c3d 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_e000: macaddr@e000 {
                                        reg = <0xe000 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 0d0c5c3be5c726e51338e52b597eac76fcbf7e11..5b295a06a7352774ed17afde269a7b887f6bb8d7 100644 (file)
                        };
 
                        factory: partition@40000 {
+                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x40000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               eeprom_factory_0: eeprom@0 {
+                                       reg = <0x0 0x200>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
+                               macaddr_factory_2e: macaddr@2e {
+                                       reg = <0x2e 0x6>;
+                               };
                        };
 
                        partition@50000 {
 &pcie0 {
        mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0000>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };
 &pcie1 {
        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 = <2400000 2500000>;
        };
 };
 &xhci {
        status = "disabled";
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_2e: macaddr@2e {
-               reg = <0x2e 0x6>;
-       };
-};
index d785d741b1c4712d962125f7996a4e41328c6807..dc70414da9c2b245886b05c5bf1b5bc354106e08 100644 (file)
                        };
 
                        factory: partition@40000 {
+                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x40000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               eeprom_factory_0: eeprom@0 {
+                                       reg = <0x0 0x200>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
+                               macaddr_factory_e000: macaddr@e000 {
+                                       reg = <0xe000 0x6>;
+                               };
                        };
 
                        partition@50000 {
 &pcie0 {
        mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
                ieee80211-freq-limit = <5000000 6000000>;
-               nvmem-cells = <&macaddr_factory_e000>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000>;
+               nvmem-cell-names = "eeprom", "mac-address";
        };
 };
 
 &pcie1 {
        mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0000>;
                ieee80211-freq-limit = <2400000 2500000>;
-               nvmem-cells = <&macaddr_factory_e000>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000>;
+               nvmem-cell-names = "eeprom", "mac-address";
        };
 };
 
                function = "gpio";
        };
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_e000: macaddr@e000 {
-               reg = <0xe000 0x6>;
-       };
-};
index 0f45743d6f4f8fbc685ecddab8d46cedca4a4c94..5872a710b886d4e04c0d58e65b1c483aa5ad8684 100644 (file)
                        };
 
                        factory: partition@40000 {
+                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x40000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               eeprom_factory_0: eeprom@0 {
+                                       reg = <0x0 0x200>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
+                               macaddr_factory_4: macaddr@4 {
+                                       reg = <0x4 0x6>;
+                               };
                        };
 
                        partition@50000 {
 &pcie0 {
        wifi@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
                ieee80211-freq-limit = <5000000 6000000>;
+               nvmem-cells = <&eeprom_factory_8000>;
+               nvmem-cell-names = "eeprom";
 
                led {
                        led-sources = <2>;
 &pcie1 {
        wifi@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0000>;
                ieee80211-freq-limit = <2400000 2500000>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
 
                led {
                        led-sources = <2>;
                function = "gpio";
        };
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_4: macaddr@4 {
-               reg = <0x4 0x6>;
-       };
-};
index 1695e9c845cc366b979a7f04d561afce2a6e5251..0ddcd6c35ed15d75b27b75667251184771a247f7 100644 (file)
                        };
 
                        factory: partition@40000 {
+                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x40000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               eeprom_factory_0: eeprom@0 {
+                                       reg = <0x0 0x200>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
+                               macaddr_factory_4: macaddr@4 {
+                                       reg = <0x4 0x6>;
+                               };
                        };
 
                        partition@50000 {
 &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>;
        };
 };
 &pcie1 {
        wifi@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0000>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <2400000 2500000>;
        };
 };
                function = "gpio";
        };
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_4: macaddr@4 {
-               reg = <0x4 0x6>;
-       };
-};
index 5736525282460c4d125762d7b5a416b3747095ec..53a4449b8bfebd715167cd60b4ae0c3844fca254 100644 (file)
                                reg = <0x0 0x400>;
                        };
 
+                       eeprom_factory_8000: eeprom@8000 {
+                               reg = <0x8000 0x200>;
+                       };
+
                        macaddr_factory_4: macaddr@4 {
                                reg = <0x4 0x6>;
                        };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
+               nvmem-cells = <&eeprom_factory_8000>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };
index af09073e3d3624704e00a5d3bd5767d66714d3f2..29f111b572d9a6e3f364975e15ba7c623bfd8ba8 100644 (file)
                };
 
                factory: partition@100000 {
+                       compatible = "nvmem-cells";
                        label = "factory";
                        reg = <0x100000 0x40000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
                        read-only;
+
+                       eeprom_factory_0: eeprom@0 {
+                               reg = <0x0 0x200>;
+                       };
+
+                       eeprom_factory_8000: eeprom@8000 {
+                               reg = <0x8000 0x200>;
+                       };
+
+                       macaddr_factory_e000: macaddr@e000 {
+                               reg = <0xe000 0x6>;
+                       };
+
+                       macaddr_factory_e006: macaddr@e006 {
+                               reg = <0xe006 0x6>;
+                       };
                };
 
                partition@140000 {
        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 {
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0000>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <2400000 2500000>;
 
                led {
                function = "gpio";
        };
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_e000: macaddr@e000 {
-               reg = <0xe000 0x6>;
-       };
-
-       macaddr_factory_e006: macaddr@e006 {
-               reg = <0xe006 0x6>;
-       };
-};
index 76c0f19781f83d0d343620d6a52dc3d6ff409c08..e5946af9094f57e273582496fd7143bd6b6866e8 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_e000: macaddr@e000 {
                                        reg = <0xe000 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 f3e9e2bfd4643eebb6d02303453320e71e9aebc2..7fe0258223b8cd0b7ab77bdea21a4a5bd5a59370 100644 (file)
                                reg = <0x0 0x400>;
                        };
 
+                       eeprom_factory_8000: eeprom@8000 {
+                               reg = <0x8000 0x200>;
+                       };
+
                        macaddr_factory_e000: macaddr@e000 {
                                reg = <0xe000 0x6>;
                        };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
-               nvmem-cells = <&macaddr_factory_e000>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000>;
+               nvmem-cell-names = "eeprom", "mac-address";
                mac-address-increment = <1>;
                ieee80211-freq-limit = <5000000 6000000>;
        };
index 705ee0dd9bd69817d80b1d7aa00753a27fb6669a..50d4df81f607357414c07816412296192642bcaa 100644 (file)
                                reg = <0x0 0x400>;
                        };
 
+                       eeprom_factory_8000: eeprom@8000 {
+                               reg = <0x8000 0x200>;
+                       };
+
                        macaddr_factory_e000: macaddr@e000 {
                                reg = <0xe000 0x6>;
                        };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
-               nvmem-cells = <&macaddr_factory_e000>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000>;
+               nvmem-cell-names = "eeprom", "mac-address";
                mac-address-increment = <1>;
                ieee80211-freq-limit = <5000000 6000000>;
        };
index 91053f15bc146890204a30e2fb08458e3eb545b9..11cf7752aba580dd1cec8555c886da2644a1cb3d 100644 (file)
                };
 
                factory: partition@100000 {
+                       compatible = "nvmem-cells";
                        label = "Factory";
                        reg = <0x100000 0x100000>;
-                       read-only;
-
-                       compatible = "nvmem-cells";
                        #address-cells = <1>;
                        #size-cells = <1>;
+                       read-only;
+
+                       eeprom_factory_0: eeprom@0 {
+                               reg = <0x0 0x200>;
+                       };
+
+                       eeprom_factory_8000: eeprom@8000 {
+                               reg = <0x8000 0x200>;
+                       };
 
                        macaddr_factory_1000: macaddr@1000 {
                                reg = <0x1000 0x6>;
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
                ieee80211-freq-limit = <5000000 6000000>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
 
-               nvmem-cells = <&macaddr_factory_1000>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_1000>;
+               nvmem-cell-names = "eeprom", "mac-address";
                mac-address-increment = <2>;
        };
 };
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
                ieee80211-freq-limit = <2400000 2500000>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
 
-               nvmem-cells = <&macaddr_factory_1000>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_1000>;
+               nvmem-cell-names = "eeprom", "mac-address";
        };
 };
 
index 625edc16fe049d14bfef106909ffc769790e5f60..9dbcbaa3c0c0857c0a794c717c2e8d6ae5552c6a 100644 (file)
        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 833e1b07d0c9462ea1db61d88e2a2b3f62d0dc7e..d9f7281a77aec4d60d3cfb5a6a665a719d055b34 100644 (file)
                        };
 
                        factory: partition@40000 {
+                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x40000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               eeprom_factory_0: eeprom@0 {
+                                       reg = <0x0 0x200>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
+                               macaddr_factory_e006: macaddr@e006 {
+                                       reg = <0xe006 0x6>;
+                               };
                        };
 
                        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>;
        };
 };
 &pcie1 {
        mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0000>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <2400000 2500000>;
        };
 };
                function = "gpio";
        };
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_e006: macaddr@e006 {
-               reg = <0xe006 0x6>;
-       };
-};
index 2241a977884267cc4d93cabf3ab32cc5c4d12b71..8eb406541b366e8ac5c0bdbbc7ab7693194ec1da 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_e006: macaddr@e006 {
                                        reg = <0xe006 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>;
 
                led {
index dca8f3d18a50e3a227af3be8748891010257bd7a..d90c0b4b59c832e62530c762aca603f06e218593 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_e000: macaddr@e000 {
                                        reg = <0xe000 0x6>;
                                };
        wifi0: 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>;
        };
 };
index e6653089311d3db64cf4bba460a5e779ef0fb979..890365c199b231163ca4b3429c723e56fe0fd4b0 100644 (file)
                                eeprom_radio_0: eeprom@0 {
                                        reg = <0x0 0x400>;
                                };
+
+                               eeprom_radio_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
                        };
                };
        };
 &pcie1 {
        mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&radio 0x8000>;
                ieee80211-freq-limit = <5000000 6000000>;
-               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 b932f901f73dfbe9623dc224abf0e3b260fb79e3..42cf121f3b0c106f8fbfe408cca9d540e3df1004 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_e000: macaddr@e000 {
                                        reg = <0xe000 0x6>;
                                };
index d2bad654c911ad160d7f90942f283687b46e190b..32527835248b4308d273171dab521c0a73a3e488 100644 (file)
@@ -64,7 +64,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 01dd9afddb07a9512ef5d4befd5bfaa486df4155..6c5a638e0f006e3cec922284bf8a0adc6a2d2972 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_2e: macaddr@2e {
                                        reg = <0x2e 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 ac69a42f0128eff0d0bb00303755e7f2e9484997..48f52eed2f7dc515465866ba0832db1d2de4e86a 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_e000: macaddr@e000 {
                                        reg = <0xe000 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 638923e7ce2b3ee28ffb0b766fb613ac0f25dd02..2389112c3e6bff20f5d37a30eb34da0200d8fdae 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_e000: macaddr@e000 {
                                        reg = <0xe000 0x6>;
                                };
 &pcie1 {
        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 {
index eda5ce964af5808bb86837fb10c668d814e75f30..99da11a614792cced7f7eaa8357b3ef2bd2b9759 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_e000: macaddr@e000 {
                                        reg = <0xe000 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>;
                led {
                        led-sources = <2>;
index 1244acb0dab501e616228bf695483a034d916bdc..e76ce933c1cf27ecacd02d7b9ccc78adc7623536 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_e000: macaddr@e000 {
                                        reg = <0xe000 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 decf80fa5ef2c118e2c6da17b6030cd990c85bfa..73f3ea91731d7b095e411ec0876ad4767e635b60 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_e000: macaddr@e000 {
                                        reg = <0xe000 0x6>;
                                };
@@ -93,7 +97,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>;
 
                led {
index 4dcdce72056c8aacca70734c1b93ac0daec03675..ec9d2398cdd6cedaf963ac1e2df9e9ea3ae6f98f 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_e000: macaddr@e000 {
                                        reg = <0xe000 0x6>;
                                };
        wifi1: 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>;
 
                led {
index 45bd4a753f29ada8b1397785b170153cff40eb4d..c578018e755720afdb3e1dd843e52119d493af42 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_e000: macaddr@e000 {
                                        reg = <0xe000 0x6>;
                                };
        wifi1: 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>;
 
                led {
index e764cb636b01d93fd356bbc605b1c919d8aa0d00..c1d5b03964f2d02cf153e5cc047f3e9a850a68fb 100644 (file)
                        };
 
                        factory: partition@40000 {
+                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x40000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               eeprom_factory_0: eeprom@0 {
+                                       reg = <0x0 0x200>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
+                               macaddr_factory_e000: macaddr@e000 {
+                                       reg = <0xe000 0x6>;
+                               };
                        };
 
                        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>;
        };
 };
 &pcie1 {
        mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0000>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <2400000 2500000>;
        };
 };
                function = "gpio";
        };
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_e000: macaddr@e000 {
-               reg = <0xe000 0x6>;
-       };
-};
index 6391a51e52929eb2d712c0cc5f7992b03e33e7ab..296c5a205f9bbbbbdbf6f711a79d3819a0e5058c 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
+
                                macaddr_factory_e000: macaddr@e000 {
                                        reg = <0xe000 0x6>;
                                };
        wifi1: 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>;
 
                led {