ramips: convert MT7613 and MT7615 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 MT7613 and MT7615 WiFi calibration data to NVMEM
format. The EEPROM size is 0x4da8.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
69 files changed:
target/linux/ramips/dts/mt7621_adslr_g7.dts
target/linux/ramips/dts/mt7621_ampedwireless_ally.dtsi
target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts
target/linux/ramips/dts/mt7621_arcadyan_wg4xx223.dtsi
target/linux/ramips/dts/mt7621_asus_rp-ac87.dts
target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi
target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts
target/linux/ramips/dts/mt7621_beeline_smartbox-turbo-plus.dts
target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts
target/linux/ramips/dts/mt7621_comfast_cf-ew72-v2.dts
target/linux/ramips/dts/mt7621_cudy_wr2100.dts
target/linux/ramips/dts/mt7621_dlink_dir-1935-a1.dts
target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts
target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts
target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts
target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts
target/linux/ramips/dts/mt7621_dlink_dir-867-a1.dts
target/linux/ramips/dts/mt7621_dlink_dir-878-a1.dts
target/linux/ramips/dts/mt7621_dlink_dir-878-r1.dts
target/linux/ramips/dts/mt7621_dlink_dir-882-a1.dts
target/linux/ramips/dts/mt7621_dlink_dir-882-r1.dts
target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi
target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi
target/linux/ramips/dts/mt7621_dlink_dxx-1xx0-x1.dtsi
target/linux/ramips/dts/mt7621_dlink_flash-16m-a1.dtsi
target/linux/ramips/dts/mt7621_dlink_flash-16m-r1.dtsi
target/linux/ramips/dts/mt7621_edimax_re23s.dts
target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi
target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts
target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk.dtsi
target/linux/ramips/dts/mt7621_elecom_wrc-gs-1pci.dtsi
target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi
target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi
target/linux/ramips/dts/mt7621_etisalat_s3.dts
target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
target/linux/ramips/dts/mt7621_humax_e10.dts
target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts
target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts
target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts
target/linux/ramips/dts/mt7621_iptime_a3004t.dts
target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi
target/linux/ramips/dts/mt7621_iptime_a8004t.dts
target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts
target/linux/ramips/dts/mt7621_jcg_y2.dts
target/linux/ramips/dts/mt7621_keenetic_kn-3010.dts
target/linux/ramips/dts/mt7621_linksys_e5600.dts
target/linux/ramips/dts/mt7621_linksys_re7000.dts
target/linux/ramips/dts/mt7621_oraybox_x3a.dts
target/linux/ramips/dts/mt7621_phicomm_k2p.dts
target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts
target/linux/ramips/dts/mt7621_renkforce_ws-wn530hp3-a.dts
target/linux/ramips/dts/mt7621_sercomm_dxx_nand_256m.dtsi
target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts
target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-sfp.dts
target/linux/ramips/dts/mt7621_totolink_a7000r.dts
target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts
target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi
target/linux/ramips/dts/mt7621_tplink_deco-m4r-v4.dts
target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts
target/linux/ramips/dts/mt7621_tplink_ec330-g5u-v1.dts
target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts
target/linux/ramips/dts/mt7621_tplink_re650-v2.dts
target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi
target/linux/ramips/dts/mt7621_tplink_tl-wpa8631p-v3.dts
target/linux/ramips/dts/mt7621_wavlink_ws-wn572hp3-4g.dts
target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts
target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts
target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi
target/linux/ramips/dts/mt7621_zyxel_lte3301-plus.dts

index 956733f7c3e8a6fa402614d627c451ab924bdf8f..fe04648f0e24b9f948c5f9df028940dfd725bba0 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 0x4da8>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
+
+                               macaddr_factory_e00c: macaddr@e00c {
+                                       reg = <0xe00c 0x6>;
+                               };
                        };
 
                        partition@50000 {
        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>;
        };
 };
        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>;
        };
 };
                function = "gpio";
        };
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_e00c: macaddr@e00c {
-               reg = <0xe00c 0x6>;
-       };
-};
index 7736b06e43875791870873b45044e149c6660495..4f06271239b0f4c13503fb7447ddcefd8954794a 100644 (file)
@@ -64,7 +64,8 @@
        wifi@0,0 {
                compatible = "pci14c3,7615";
                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>;
        };
 };
@@ -73,7 +74,8 @@
        wifi@0,0 {
                compatible = "pci14c3,7615";
                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>;
        };
 };
                };
 
                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 0x4da8>;
+                       };
+
+                       eeprom_factory_8000: eeprom@8000 {
+                               reg = <0x8000 0x4da8>;
+                       };
                };
 
                /*
index 3ae441f8e3be55d4ab6c5d2bcb43e7e44c55d713..1d55453c8d53071d8ed2cccd7938c71ce61f27da 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 0x4da8>;
+                               };
                        };
 
                        partition@50000 {
 &pcie1 {
        mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0000>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
        };
 };
index b924d71190fbda648003a4a9e73773d316ceeee8..8e05c3af50d732fda85556d2d24949ebf868e9cc 100644 (file)
                };
 
                factory: partition@200000 {
+                       compatible = "nvmem-cells";
                        label = "Factory";
                        reg = <0x200000 0x100000>;
-                       read-only;
-
-                       compatible = "nvmem-cells";
                        #address-cells = <1>;
                        #size-cells = <1>;
+                       read-only;
+
+                       eeprom_factory_0: eeprom@0 {
+                               reg = <0x0 0x4da8>;
+                       };
 
                        /* We keep the block below to prevent eth0 MAC
                         * from randomization. Unique WAN, LAN, WLAN MACs
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
        };
 };
 
index 98af87528140337a1f7a7210f23dcd5d8d2e8f5f..47df1dbe57da884e9da9249482ad877acff7b1f6 100644 (file)
                        };
 
                        factory: partition@40000 {
+                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x40000 0x10000>;
-                               read-only;
-
-                               compatible = "nvmem-cells";
                                #address-cells = <1>;
                                #size-cells = <1>;
+                               read-only;
+
+                               eeprom_factory_0: eeprom@0 {
+                                       reg = <0x0 0x4da8>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
 
                                macaddr_factory_8004: macaddr@8004 {
                                        reg = <0x8004 0x6>;
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <2400000 2500000>;
        };
 };
        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 59b93db5dec19da49826228210ddebd16d0b92db..bb9171bbac330d2665036bca5b3e6d62cb6989cc 100644 (file)
                };
 
                factory: partition@1e0000 {
+                       compatible = "nvmem-cells";
                        label = "factory";
                        reg = <0x1e0000 0x100000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
                        read-only;
+
+                       eeprom_factory_0: eeprom@0 {
+                               reg = <0x0 0x4da8>;
+                       };
+
+                       eeprom_factory_8000: eeprom@8000 {
+                               reg = <0x8000 0x4da8>;
+                       };
+
+                       macaddr_factory_e000: macaddr@e000 {
+                               reg = <0xe000 0x6>;
+                       };
                };
 
                factory2: partition@2e0000 {
        wifi0: wifi@0,0 {
                compatible = "pci14c3,7615";
                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>;
        };
 };
        wifi1: wifi@0,0 {
                compatible = "pci14c3,7615";
                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>;
        };
 };
                function = "gpio";
        };
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_e000: macaddr@e000 {
-               reg = <0xe000 0x6>;
-       };
-};
index 1b61d77c036ad7867eb02c924aa7eb390a4e6f39..eb64bd0bfde0cf8e8168a55c2a0fb95b3684d05d 100644 (file)
                                reg = <0x0 0x400>;
                        };
 
+                       eeprom_factory_8000: eeprom@8000 {
+                               reg = <0x8000 0x4da8>;
+                       };
+
                        macaddr_factory_21000: macaddr@21000 {
                                reg = <0x21000 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_21000>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_21000>;
+               nvmem-cell-names = "eeprom", "mac-address";
                mac-address-increment = <(5)>;
        };
 };
index 9dbc7be0e92f97cd9802e4b6a58b75f747f3ac3a..b07346bacb46ddd300dd6b082bda3c1550e0a822 100644 (file)
                                reg = <0x0 0x400>;
                        };
 
+                       eeprom_factory_8000: eeprom@8000 {
+                               reg = <0x8000 0x4da8>;
+                       };
+
                        macaddr_factory_21000: macaddr@21000 {
                                reg = <0x21000 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_21000>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_21000>;
+               nvmem-cell-names = "eeprom", "mac-address";
                mac-address-increment = <(5)>;
        };
 };
index be85e8ee6ecbbdb86204c39efd0672fdc71fad4e..4ceb4e54e0a2c839b508c5f1948c5c5aa73498eb 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 0x4da8>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
+
+                               macaddr_factory_4: macaddr@4 {
+                                       reg = <0x4 0x6>;
+                               };
                        };
 
                        partition@50000 {
        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>;
        };
 };
        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>;
        };
 };
 &xhci {
        status = "disabled";
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_4: macaddr@4 {
-               reg = <0x4 0x6>;
-       };
-};
index b3a823b1f0850d511014173379bf15e3d52924d4..f26e6626f5406ceff050b65dda5d0471123e13fb 100644 (file)
                                                reg = <0x0 0x400>;
                                        };
 
+                                       eeprom_factory_8000: eeprom@8000 {
+                                               reg = <0x8000 0x4da8>;
+                                       };
+
                                        macaddr_factory_e000: macaddr@e000 {
                                                compatible = "mac-base";
                                                reg = <0xe000 0x6>;
        wifi_5_0_ghz: 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";
                // Wi-Fi device reads it's MAC address from EEPROM, (&factory + 0x8000 + 4)
                // adding anything related to mac-address here will cause use random MAC.
        };
index 28151cdaeeb2f0850f2e55ecc336208a5b5500bb..afa13973d57169aea272a643659ad39168bc509e 100644 (file)
        wifi@1,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>;
        };
 };
                                eeprom_factory_0: eeprom@0 {
                                        reg = <0x0 0x400>;
                                };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
                        };
 
                        partition@50000 {
index a6a0eb8ba044f42b2219b560240f13ca5d821862..0ce07141a377e1db4eea0819230658427a8415fc 100644 (file)
        nvmem-cells = <&macaddr_factory_e006>;
        nvmem-cell-names = "mac-address";
 };
-
-&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 943143ad634de23ea2d17f6e389e938139faff19..5af9ea28ea496d36615d821636c077926df8f53a 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 0x4da8>;
+                       };
+
+                       eeprom_factory_8000: eeprom@8000 {
+                               reg = <0x8000 0x4da8>;
+                       };
+
+                       macaddr_factory_e000: macaddr@e000 {
+                               reg = <0xe000 0x6>;
+                       };
+
+                       macaddr_factory_e006: macaddr@e006 {
+                               reg = <0xe006 0x6>;
+                       };
                };
 
                partition@140000 {
        wifi0: wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
                ieee80211-freq-limit = <2400000 6000000>;
-               nvmem-cells = <&macaddr_factory_e000>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000>;
+               nvmem-cell-names = "eeprom", "mac-address";
                mac-address-increment = <1>;
        };
 };
        wifi1: 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_e000>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000>;
+               nvmem-cell-names = "eeprom", "mac-address";
                mac-address-increment = <3>;
        };
 };
                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 2b6b811abe65508dd4937ebdb3c63b4a57d827c6..7cd4a92aa7dfce169267ec1809b81e5c1c516ca3 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 0x4da8>;
+                               };
+
+                               macaddr_factory_e000: macaddr@e000 {
+                                       reg = <0xe000 0x6>;
+                               };
+
+                               macaddr_factory_e006: macaddr@e006 {
+                                       reg = <0xe006 0x6>;
+                               };
                        };
 
                        partition@50000 {
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
 
                /* The correct Mac addresses are set in 10_fix_wifi_mac. */
        };
                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 5408e5139997f20b5602ecd5614baaf3237ce2e8..36758567807a965fe7e6e7ddbd75ce0d1849144c 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 0x4da8>;
+                       };
+
+                       macaddr_factory_4: macaddr@4 {
+                               reg = <0x4 0x6>;
+                       };
+
+                       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 0x0>;
                /* 5 GHz (phy1) does not take the address from calibration data,
                   but setting it manually here works */
-               nvmem-cells = <&macaddr_factory_4>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4>;
+               nvmem-cell-names = "eeprom", "mac-address";
        };
 };
 
                function = "gpio";
        };
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_4: macaddr@4 {
-               reg = <0x4 0x6>;
-       };
-
-       macaddr_factory_e000: macaddr@e000 {
-               reg = <0xe000 0x6>;
-       };
-
-       macaddr_factory_e006: macaddr@e006 {
-               reg = <0xe006 0x6>;
-       };
-};
index 8ec6ef3a7d29b672302129c1284459ee9142b458..290638f7355f1f18db604e36b5cd4a95a17febf3 100644 (file)
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
 
-               mediatek,mtd-eeprom = <&factory 0x0>;
-
                /* 5 GHz (phy1) does not take the address from calibration data,
                   but setting it manually here works */
-               nvmem-cells = <&macaddr_factory_4>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4>;
+               nvmem-cell-names = "eeprom", "mac-address";
        };
 };
 
                function = "gpio";
        };
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_4: macaddr@4 {
-               reg = <0x4 0x6>;
-       };
-};
index ae0cc8fc8a923eb50b7b450a73af1091f12d1f72..ab5a110333507b14e21f7a42c9590a743aa74961 100644 (file)
        nvmem-cells = <&macaddr_factory_e006>;
        nvmem-cell-names = "mac-address";
 };
-
-&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 31b41f8384736f04b8937eae1de78496a1b4a120..f9ed0ddcefdfd6b9ddc092675e4a5002d8eee3a6 100644 (file)
        nvmem-cells = <&macaddr_factory_e006>;
        nvmem-cell-names = "mac-address";
 };
-
-&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 dbde89b2207b129800bed89a278b356ebf55d0f5..1a17dddc115bfebd56d3156aea5a146cb77e0415 100644 (file)
        nvmem-cells = <&macaddr_factory_e006>;
        nvmem-cell-names = "mac-address";
 };
-
-&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 d6206427bf0ee5c17e91be69509e7067d0e950e1..2f45eda02d282ad0caeae68c24dc230bf980ae23 100644 (file)
        nvmem-cells = <&macaddr_factory_e006>;
        nvmem-cell-names = "mac-address";
 };
-
-&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 6288d19c8a85213d6b5a562058278b79cefca6b6..019ad7edcf30a7aa9058d68d27eef2f991ce1d37 100644 (file)
        nvmem-cells = <&macaddr_factory_e006>;
        nvmem-cell-names = "mac-address";
 };
-
-&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 b570d074c6f7e8b30eefeee0ab0b29a740a7eea7..bd8fd6f8a15d64dc6e76d0c5f49aeccbcc3e53fc 100644 (file)
@@ -68,7 +68,8 @@
        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 {
@@ -81,7 +82,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 07f84592e4b02f09dfea62cd7e1b78130d56b932..fee88647775d26cec77465ccc4486b38a7e2f143 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 0x4da8>;
+                       };
+
+                       eeprom_factory_8000: eeprom@8000 {
+                               reg = <0x8000 0x4da8>;
+                       };
+
+                       macaddr_factory_e000: macaddr@e000 {
+                               reg = <0xe000 0x6>;
+                       };
+
+                       macaddr_factory_e006: macaddr@e006 {
+                               reg = <0xe006 0x6>;
+                       };
                };
 
                partition@140000 {
        wifi0: 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 {
        wifi1: 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 {
                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 8fb6de7c4802355117601b5425fad3353a36556d..cc979df26a6725ef6ad6288ad97028f495d28221 100644 (file)
                        };
 
                        factory: partition@40000 {
+                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x40000 0x10000>;
-                               read-only;
-
-                               compatible = "nvmem-cells";
                                #address-cells = <1>;
                                #size-cells = <1>;
+                               read-only;
+
+                               eeprom_factory_0: eeprom@0 {
+                                       reg = <0x0 0x4da8>;
+                               };
 
                                macaddr_factory_e000: macaddr@e000 {
                                        reg = <0xe000 0x6>;
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                /* The correct MAC addresses are set in 10_fix_wifi_mac. */
        };
 };
index 911de595d07772d589bbd5fc3db92c9c18c886e6..a8e518cae46a78094d6ae0510769875cf5020e1e 100644 (file)
                        };
 
                        factory: partition@40000 {
+                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x40000 0x20000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               eeprom_factory_0: eeprom@0 {
+                                       reg = <0x0 0x4da8>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
+
+                               macaddr_factory_e000: macaddr@e000 {
+                                       reg = <0xe000 0x6>;
+                               };
+
+                               macaddr_factory_e006: macaddr@e006 {
+                                       reg = <0xe006 0x6>;
+                               };
                        };
 
                        partition@60000 {
index 3f71ab971ca5d656a03adc6f79895691c658879a..dddd39ceaae415ec0d65d1f856a92fcd08f10418 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 0x4da8>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
+
+                               macaddr_factory_4: macaddr@4 {
+                                       reg = <0x4 0x6>;
+                               };
+
+                               macaddr_factory_e000: macaddr@e000 {
+                                       reg = <0xe000 0x6>;
+                               };
+
+                               macaddr_factory_e006: macaddr@e006 {
+                                       reg = <0xe006 0x6>;
+                               };
                        };
 
                        partition@50000 {
index 1a3181e4e39dd9a9cc9063930734579a34e68922..c96292be33f1b519d6015eb19d55164a60c29a0b 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 0x4da8>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
+
+                               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 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <2400000 2500000>;
        };
 };
        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>;
        };
 };
 &xhci {
        status = "disabled";
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_8004: macaddr@8004 {
-               reg = <0x8004 0x6>;
-       };
-};
index 1301f1375c8856f44b8984d7e2b5b534bfac923d..4aac3fb6d7ce0410fb64151e2e3533a63aa10e19 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 0x4da8>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
+
+                               macaddr_factory_4: macaddr@4 {
+                                       reg = <0x4 0x6>;
+                               };
                        };
 
                        partition@50000 {
        wifi0: 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>;
        };
 };
        wifi1: 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>;
        };
 };
 &xhci {
        status = "disabled";
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_4: macaddr@4 {
-               reg = <0x4 0x6>;
-       };
-};
index 2fdb62840a68adcc819957a3a49e030a8d0d5f98..6a9531eb33207ec917ddbcf7a0087a6fd4cf5ef5 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 0x4da8>;
+                               };
+
+                               macaddr_factory_e000: macaddr@e000 {
+                                       reg = <0xe000 0x6>;
+                               };
+
+                               macaddr_factory_e006: macaddr@e006 {
+                                       reg = <0xe006 0x6>;
+                               };
                        };
 
                        partition@50000 {
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
-               nvmem-cells = <&macaddr_factory_e000>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000>;
+               nvmem-cell-names = "eeprom", "mac-address";
                mac-address-increment = <1>;
        };
 };
 &xhci {
        status = "disabled";
 };
-
-&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 e9f968dbe021eda469e716c862c93e595dc0d376..7096b015ef872a176941df34080dc2642d5ef28b 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 0x4da8>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
                        };
                };
        };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <2400000 2500000>;
        };
 };
        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 7495453d458079d1a4bef1ebef6ca7c1ec30a458..8901680bf5b8993414e20b0ea280ce9974e0eb48 100644 (file)
@@ -25,6 +25,7 @@
        wifi: wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
        };
 };
index 98ce0b199409d3cbdf27d0bb7ef28f3dca35e26c..50fc0b6e94972879cdd4cb1d5ef3942636f4900e 100644 (file)
@@ -13,7 +13,8 @@
        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 {
@@ -27,7 +28,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 acd3004eb7b6aa58ae1edb0be90db5e060a31652..2c60f3d8b6b9b445f1e6a058d55ce51444cf2880 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 0x4da8>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
                        };
                };
        };
index 411dbdb36625b15d525c506d1ae42e149f272b6b..d63be92c7853679b4bbe631ef34c3d9f91f3d816 100644 (file)
                                reg = <0x0 0x400>;
                        };
 
+                       eeprom_factory_8000: eeprom@8000 {
+                               reg = <0x8000 0x4da8>;
+                       };
+
                        macaddr_factory_21000: macaddr@21000 {
                                reg = <0x21000 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_21000>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_21000>;
+               nvmem-cell-names = "eeprom", "mac-address";
                mac-address-increment = <(3)>;
        };
 };
index d5440b3a5108e0a2c95ace22790fc9525ab15750..1565666a5d82e53be4a041abc227f235442f908c 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 0x4da8>;
+                               };
+
+                               macaddr_factory_4000: macaddr@4000 {
+                                       reg = <0x4000 0x6>;
+                               };
                        };
 
                        partition@50000 {
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
        };
 };
 
                function = "gpio";
        };
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_4000: macaddr@4000 {
-               reg = <0x4000 0x6>;
-       };
-};
index 638d73c3effe1e87f189f23ca7cea576d2e5fbf4..ac13b4a9c593cec83da594e8fcf667ced722b6d0 100644 (file)
                        };
 
                        factory: partition@40000 {
+                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x40000 0x30000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               eeprom_factory_0: eeprom@0 {
+                                       reg = <0x0 0x4da8>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
+
+                               macaddr_factory_10007: macaddr@10007 {
+                                       reg = <0x10007 0x6>;
+                               };
+
+                               macaddr_factory_1000d: macaddr@1000d {
+                                       reg = <0x1000d 0x6>;
+                               };
                        };
 
                        partition@70000 {
        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>;
        };
 };
        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>;
        };
 };
                function = "gpio";
        };
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_10007: macaddr@10007 {
-               reg = <0x10007 0x6>;
-       };
-
-       macaddr_factory_1000d: macaddr@1000d {
-               reg = <0x1000d 0x6>;
-       };
-};
index e723bf5a6182272e65a23e1dbbb74de2ca3470c8..19868fa078b446b6cab05a51737ecb3eb5ac6cbe 100644 (file)
                                reg = <0x0 0x400>;
                        };
 
+                       eeprom_factory_8000: eeprom@8000 {
+                               reg = <0x8000 0x4da8>;
+                       };
+
                        macaddr_factory_1e000: macaddr@1e000 {
                                reg = <0x1e000 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 = <&eeprom_factory_8000>;
+               nvmem-cell-names = "eeprom";
        };
 };
 
index 871327f8a70cccea4d7cc0093a0b86ee3ff96759..6729e94cc5a12a0ecede16bf826e91baff41de69 100644 (file)
                        };
 
                        factory: partition@40000 {
+                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x040000 0x010000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               eeprom_factory_0: eeprom@0 {
+                                       reg = <0x0 0x4da8>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
+
+                               macaddr_factory_4: macaddr@4 {
+                                       reg = <0x4 0x6>;
+                               };
                        };
 
                        partition@50000 {
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <2400000 2500000>;
        };
 };
        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>;
        };
 };
 &xhci {
        status = "disabled";
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_4: macaddr@4 {
-               reg = <0x4 0x6>;
-       };
-};
index 678ce0680643b7a9c8f8db4247269be84f6eb31e..fc51b9ac4f048da8527f79a712b58e25adb79af3 100644 (file)
                        };
 
                        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 0x4da8>;
+                               };
                        };
 
                        partition@40000 {
        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";
        };
 };
 
index 97b6b1c3ee0f37207fab96051fe4a0d25b49bb2f..000657c8667e8156f7b756725a5d29f79f9e66b8 100644 (file)
                };
 
                factory: partition@a0000 {
+                       compatible = "nvmem-cells";
                        label = "factory";
                        reg = <0xa0000 0x20000>;
-                       read-only;
-
-                       compatible = "nvmem-cells";
                        #address-cells = <1>;
                        #size-cells = <1>;
+                       read-only;
+
+                       eeprom_factory_0: eeprom@0 {
+                               reg = <0x0 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 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
        };
 };
 
index b00fbeb47f913885583884db00ca7939b3e0793c..db7743f137baf7df0dc4caea77434b50b67c2f22 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 0x4da8>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
                        };
 
                        partition@40000 {
        wifi@0,0 {
                compatible = "mediatek,mt76";
                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>;
        };
 };
        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 = <2400000 2500000>;
        };
 };
-
-&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 0f5870140fb701f6a3b7ac77fd79476753abde12..dc9033c3940509843ec51241cb11cf732040a147 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 0x4da8>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
                        };
 
                        partition@40000 {
        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>;
        };
 };
        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>;
        };
 };
                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 5d346be1d274e6f0bc6e2633612883b197728904..5714a57c4e42bee5d9d27450be6e85068f81edfd 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 0x4da8>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
+
+                               macaddr_factory_4: macaddr@4 {
+                                       reg = <0x4 0x6>;
+                               };
+
+                               macaddr_factory_e000: macaddr@e000 {
+                                       reg = <0xe000 0x6>;
+                               };
                        };
 
                        partition@50000 {
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <2400000 2500000>;
 
                led {
        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 {
                function = "gpio";
        };
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_4: macaddr@4 {
-               reg = <0x4 0x6>;
-       };
-
-       macaddr_factory_e000: macaddr@e000 {
-               reg = <0xe000 0x6>;
-       };
-};
index f8ae9b41df80353bc0f91721d3f179828041d9d6..9e50d9b3ed77df28011b4bdfd389c6837bbb1bcd 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 0x4da8>;
+                               };
+
+                               macaddr_factory_e000: macaddr@e000 {
+                                       reg = <0xe000 0x6>;
+                               };
+
+                               macaddr_factory_e006: macaddr@e006 {
+                                       reg = <0xe006 0x6>;
+                               };
                        };
 
                        partition@50000 {
@@ -84,7 +99,8 @@
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
        };
 };
 
                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 8382aaba654805f9ab4fe4d7602672c288e43b7c..8f617484533eff689af060f4abf519a78e7f0426 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 32015b6a2afb0968e5602143f9f6d853f9ad49ad..c1b8048f0cf22adcafe415e9dab56a64289b57b5 100644 (file)
                        eeprom_factory_0: eeprom@0 {
                                reg = <0x0 0x400>;
                        };
+
+                       eeprom_factory_8000: eeprom@8000 {
+                               reg = <0x8000 0x4da8>;
+                       };
                };
 
                partition@100000 {
        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";
        };
 };
 
index d3505e774dcec024787c551bd08095470d872596..c5b6ecc233e1e4d284885af485dd9f15d05464a2 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
+
                                macaddr_factory_2e: macaddr@2e {
                                        reg = <0x2e 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>;
        };
 };
index fe26e5af6f9c910d53e9bceb2fe94df71b9c0f1b..56711332556c809884a6db525528b765e18bc9fd 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 0x4da8>;
+                               };
                        };
 
                        partition@50000 {
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
        };
 };
 
index b18d12608acc75d6cc56683d217fea006967b4ed..fd3b42f6edbd446d22b7a29dfeff7c432dd8529c 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 0x4da8>;
+                               };
+
+                               macaddr_factory_4: macaddr@4 {
+                                       reg = <0x4 0x6>;
+                               };
+
+                               macaddr_factory_e000: macaddr@e000 {
+                                       reg = <0xe000 0x6>;
+                               };
+
+                               macaddr_factory_e006: macaddr@e006 {
+                                       reg = <0xe006 0x6>;
+                               };
                        };
 
                        partition@50000 {
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
 
                /* 5 GHz (phy1) does not take the address from calibration data,
                   but setting it manually here works */
-               nvmem-cells = <&macaddr_factory_4>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4>;
+               nvmem-cell-names = "eeprom", "mac-address";
        };
 };
 
                function = "gpio";
        };
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_4: macaddr@4 {
-               reg = <0x4 0x6>;
-       };
-
-       macaddr_factory_e000: macaddr@e000 {
-               reg = <0xe000 0x6>;
-       };
-
-       macaddr_factory_e006: macaddr@e006 {
-               reg = <0xe006 0x6>;
-       };
-};
index 07297df08330b7731998a44994a5945f43362f33..6dd4b58139976e3fcba52b542d663d4c5c30c412 100644 (file)
                };
 
                factory: partition@100000 {
+                       compatible = "nvmem-cells";
                        label = "Factory";
                        reg = <0x100000 0x40000>;
-                       read-only;
-
-                       compatible = "nvmem-cells";
                        #address-cells = <1>;
                        #size-cells = <1>;
+                       read-only;
+
+                       eeprom_factory_0: eeprom@0 {
+                               reg = <0x0 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 0x0>;
                /* 5 GHz (phy1) does not take the address from calibration data,
                   but setting it manually here works */
-               nvmem-cells = <&macaddr_factory_4>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4>;
+               nvmem-cell-names = "eeprom", "mac-address";
        };
 };
 
index 7722d3d27829ae22e63f6c9e9c2adbeff04bd448..3cf29d1729520d90cd8fe07dd6124ca0890486b4 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        reg = <0x4 0x6>;
                                };
        wifi1: 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_4>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_4>;
+               nvmem-cell-names = "eeprom", "mac-address";
                mac-address-increment = <1>;
        };
 };
index d51ff8212af7f6e02ce234098ee2c4aeef8a7c8d..479ea067a7b136bf1db10e92683f02b680b2f335 100644 (file)
                                reg = <0x0 0x400>;
                        };
 
+                       eeprom_factory_8000: eeprom@8000 {
+                               reg = <0x8000 0x4da8>;
+                       };
+
                        macaddr_factory_21000: macaddr@21000 {
                                reg = <0x21000 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 a85eb55be2d6d90e3d5a8b3bffb80643de388c54..1cc9b45c403a0637a17790faf7f0097267dd52b8 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
+
                                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>;
        };
 };
index 2a5dfe379c64e0210817a5308d9c609cfa1a7dbc..9e498b78ed7bc78307e85455929d020754d0d191 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 0x4da8>;
+                               };
+
+                               macaddr_factory_e000: macaddr@e000 {
+                                       reg = <0xe000 0x6>;
+                               };
+
+                               macaddr_factory_e006: macaddr@e006 {
+                                       reg = <0xe006 0x6>;
+                               };
                        };
 
                        partition@50000 {
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0000>;
-       };
-};
-
-&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>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
        };
 };
index bba0d4a5d37090eb4d78c1c468ba42af9b261d93..16d8edb341111e1b529694168317f7efd38de140 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 0x4da8>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
+
+                               macaddr_factory_e000: macaddr@e000 {
+                                       reg = <0xe000 0x6>;
+                               };
                        };
 
                        partition@50000 {
        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>;
        };
 };
        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>;
        };
 };
                function = "gpio";
        };
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_e000: macaddr@e000 {
-               reg = <0xe000 0x6>;
-       };
-};
index f45cbf28ad05d3f0375f2bc5ab5b6840e03ec649..330f6a0f34048b0230bc196773fd79b91ea8949e 100644 (file)
                                eeprom_radio_0: eeprom@0 {
                                        reg = <0x0 0x400>;
                                };
+
+                               eeprom_radio_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
                        };
                };
        };
        mt76@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&radio 0x8000>;
-               nvmem-cells = <&macaddr_config_8>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_radio_8000>, <&macaddr_config_8>;
+               nvmem-cell-names = "eeprom", "mac-address";
                mac-address-increment = <(-1)>;
                ieee80211-freq-limit = <5000000 6000000>;
        };
index 621cb6c2d73fdeaf8fa52f15454b0f8258ae385d..e713b2cfd2a30b54be558aad10e099fb5d9c1628 100644 (file)
                                eeprom_radio_0: eeprom@0 {
                                        reg = <0x0 0x400>;
                                };
+
+                               eeprom_radio_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
                        };
                };
        };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&radio 0x8000>;
-               nvmem-cells = <&macaddr_config_8>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_radio_8000>, <&macaddr_config_8>;
+               nvmem-cell-names = "eeprom", "mac-address";
                mac-address-increment = <2>;
                ieee80211-freq-limit = <5000000 6000000>;
        };
index 63631355bfd0d84ee1515a862bedea50cda7cdd9..4603263e8ddf2950f0d87aaa6ae136f161a4c774 100644 (file)
                                eeprom_radio_0: eeprom@0 {
                                        reg = <0x0 0x400>;
                                };
+
+                               eeprom_radio_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
                        };
                };
        };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                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 691f805160a94220c79355cf7a0fb9f87a9295ba..f2aea644fa2b064482909adf91dc54138abe9b42 100644 (file)
                                eeprom_radio_0: eeprom@0 {
                                        reg = <0x0 0x400>;
                                };
+
+                               eeprom_radio_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
                        };
                };
        };
 &pcie1 {
        wifi@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&radio 0x8000>;
                ieee80211-freq-limit = <5000000 6000000>;
-               nvmem-cells = <&macaddr_info_8>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_radio_8000>, <&macaddr_info_8>;
+               nvmem-cell-names = "eeprom", "mac-address";
                mac-address-increment = <1>;
        };
 };
index 537b6f70a73d27d6b4b3fbdbe0896a9fd6f00b57..c44ede906575e97f39932a45c53e2c562a504475 100644 (file)
                };
 
                factory: partition@7800000 {
+                       compatible = "nvmem-cells";
                        label = "factory";
                        reg = <0x7800000 0x400000>;
                        read-only;
 
-                       compatible = "nvmem-cells";
-
                        nvmem-layout {
                                compatible = "fixed-layout";
                                #address-cells = <1>;
                                #size-cells = <1>;
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
+
+                               eeprom_factory_14000: eeprom@14000 {
+                                       reg = <0x14000 0x4da8>;
+                               };
+
                                macaddr_factory_165: macaddr@165 {
                                        compatible = "mac-base";
                                        reg = <0x165 0x11>;
                                        #nvmem-cell-cells = <1>;
                                };
                        };
-
-
                };
 
                partition@0_wholeflash {
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
                ieee80211-freq-limit = <2400000 2500000>;
-
-               nvmem-cells = <&macaddr_factory_165 0>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_165 0>;
+               nvmem-cell-names = "eeprom", "mac-address";
        };
 };
 
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x14000>;
                ieee80211-freq-limit = <5000000 6000000>;
-
-               nvmem-cells = <&macaddr_factory_165 2>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_factory_14000>, <&macaddr_factory_165 2>;
+               nvmem-cell-names = "eeprom", "mac-address";
        };
 };
 
index 4ceb107129ad373f586e82754940ebbc7da93a84..b9d5995ed5b3b58ddaefa9fcc40db37046071256 100644 (file)
                                eeprom_radio_0: eeprom@0 {
                                        reg = <0x0 0x400>;
                                };
+
+                               eeprom_radio_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
                        };
                };
        };
        mt76@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&radio 0x8000>;
                ieee80211-freq-limit = <5000000 6000000>;
-               nvmem-cells = <&macaddr_romfile_f100>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_radio_8000>, <&macaddr_romfile_f100>;
+               nvmem-cell-names = "eeprom", "mac-address";
                mac-address-increment = <(-1)>;
        };
 };
index aa65b68f0635d97e3944ebbf0687566b00f86a32..42b9c3cc3e324a71349efda57bf8126fbcaaa1f2 100644 (file)
                        };
 
                        config: partition@7c0000 {
+                               compatible = "nvmem-cells";
                                label = "config";
                                reg = <0x7c0000 0x2d440>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               macaddr_config_10008: macaddr@10008 {
+                                       reg = <0x10008 0x6>;
+                               };
                        };
 
                        radio: partition@7f0000 {
+                               compatible = "nvmem-cells";
                                label = "radio";
                                reg = <0x7f0000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               eeprom_radio_0: eeprom@0 {
+                                       reg = <0x0 0x4da8>;
+                               };
+
+                               eeprom_radio_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
                        };
                };
        };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&radio 0x0>;
-               nvmem-cells = <&macaddr_config_10008>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_10008>;
+               nvmem-cell-names = "eeprom", "mac-address";
                mac-address-increment = <1>;
                ieee80211-freq-limit = <2400000 2500000>;
        };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               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>;
                ieee80211-freq-limit = <5000000 6000000>;
        };
                };
        };
 };
-
-&config {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_config_10008: macaddr@10008 {
-               reg = <0x10008 0x6>;
-       };
-};
index f67c0e3c6d9011f8bdccf9d161093116c41916c0..4207100f34326f408147562787950e4111710ef8 100644 (file)
                        };
 
                        config: partition@e00000 {
+                               compatible = "nvmem-cells";
                                label = "config";
                                reg = <0xe00000 0x50000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               macaddr_config_10008: macaddr@10008 {
+                                       reg = <0x10008 0x6>;
+                               };
                        };
 
                        /* range 0xe50000 to 0xff0000 is empty in vendor
                         */
 
                        radio: partition@ff0000 {
+                               compatible = "nvmem-cells";
                                label = "radio";
                                reg = <0xff0000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               eeprom_radio_0: eeprom@0 {
+                                       reg = <0x0 0x4da8>;
+                               };
+
+                               eeprom_radio_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
                        };
                };
        };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&radio 0x0>;
-               nvmem-cells = <&macaddr_config_10008>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_10008>;
+               nvmem-cell-names = "eeprom", "mac-address";
                mac-address-increment = <1>;
                ieee80211-freq-limit = <2400000 2500000>;
        };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               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>;
                ieee80211-freq-limit = <5000000 6000000>;
        };
                };
        };
 };
-
-&config {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_config_10008: macaddr@10008 {
-               reg = <0x10008 0x6>;
-       };
-};
index c38068f08f1fcff6e6504546060637e3eac62ab5..7d8948bb371412b9ccdb873070f7c56e9a422f19 100644 (file)
                                eeprom_radio_0: eeprom@0 {
                                        reg = <0x0 0x400>;
                                };
+
+                               eeprom_radio_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
                        };
                };
        };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               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 = <1>;
                ieee80211-freq-limit = <5000000 6000000>;
        };
index 733814167691d772e4e8c52fd476004435382129..76fbbb99b14921cd55abded64680b8d84e3dd15d 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
+
                                macaddr_factory_e000: macaddr@e000 {
                                        reg = <0xe000 0x6>;
                                };
        wifi1: mt76@0,0 {
                compatible = "mediatek,mt76";
                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";
        };
 };
 
                function = "gpio";
        };
 };
-
-&wifi1{
-       ieee80211-freq-limit = <5000000 6000000>;
-};
-
index fde07a638632b0b367de4bd01e17210fc342a1d7..f699b4c47a14df1c3095aec173b2a5a9139ec89a 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
+
                                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";
        };
 };
 
index 34d0e4a03188c274fa8af03a49cfcfbe31d0a466..62111520c011fdcc3804bfcd2239938b0a25221f 100644 (file)
                };
 
                factory: partition@c0000 {
+                       compatible = "nvmem-cells";
                        label = "factory";
                        reg = <0x0c0000 0x40000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
                        read-only;
+
+                       eeprom_factory_0: eeprom@0 {
+                               reg = <0x0 0x4da8>;
+                       };
+
+                       eeprom_factory_8000: eeprom@8000 {
+                               reg = <0x8000 0x4da8>;
+                       };
+
+                       macaddr_factory_e000: macaddr@e000 {
+                               reg = <0xe000 0x6>;
+                       };
+
+                       macaddr_factory_e006: macaddr@e006 {
+                               reg = <0xe006 0x6>;
+                       };
                };
 
                partition@100000 {
        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>;
        };
 };
        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>;
        };
 };
                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 8b5a0e7adca1da3a5545e622d85e58c6936378b0..ff748b781c00ab2b33af0a312cd112557fb58796 100644 (file)
                                        reg = <0x0 0x400>;
                                };
 
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
+
                                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>;
        };
 };
index ed8260534e68aa621fe0e7ebfcb5b744a21bee95..d449fccd284b24be1123f77f73147f2573d4df07 100644 (file)
                        reg = <0x80000 0x80000>; /* 64 KB */
                };
                factory: partition@100000 {
+                       compatible = "nvmem-cells";
                        label = "factory";
                        reg = <0x100000 0x40000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       eeprom_factory_0: eeprom@0 {
+                               reg = <0x0 0x4da8>;
+                       };
+
+                       macaddr_factory_fe6e: macaddr@fe6e {
+                               reg = <0xfe6e 0x6>;
+                       };
                };
                partition@140000 {
                        label = "Kernel";
                compatible = "pci14c3,7615";
                reg = <0x0000 0 0 0 0>;
                mediatek,firmware-eeprom = "mt7615e_eeprom.bin";
-               mediatek,mtd-eeprom = <&factory 0x0000>;
-               nvmem-cells = <&macaddr_factory_fe6e>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_fe6e>;
+               nvmem-cell-names = "eeprom", "mac-address";
                mac-address-increment = <(1)>;
        };
 
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-       mtd-mac-address = <&factory 0xfe6e>;
-
-       macaddr_factory_fe6e: macaddr@fe6e {
-               reg = <0xfe6e 0x6>;
-       };
-};