Revert "ramips: convert MT7915 EEPROM to NVMEM format"
authorShiji Yang <yangshiji66@qq.com>
Tue, 17 Oct 2023 12:57:07 +0000 (20:57 +0800)
committerShiji Yang <yangshiji66@qq.com>
Tue, 17 Oct 2023 12:57:07 +0000 (20:57 +0800)
Some MT7915 devices need to load the second part of the eeprom to
work properly. The mt76 driver is not yet ready to read the pre-cal
data via the NVMEM cell. Therefore, partially revert commit to fix
the device probe issue on some devices.

P.S.
Except for D-Link and Ubnt devices, It is still uncertain whether
pre-cal data is required for other devices in the patch.

This partially reverts commit 9ac891f8c44124e931c15f1257347cd8ba311a19.

Fixes: https://github.com/openwrt/openwrt/issues/13700
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
19 files changed:
target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts
target/linux/ramips/dts/mt7621_asus_rt-ax54.dts
target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts
target/linux/ramips/dts/mt7621_cudy_m1800.dts
target/linux/ramips/dts/mt7621_cudy_x6.dtsi
target/linux/ramips/dts/mt7621_dlink_dap-x1860-a1.dts
target/linux/ramips/dts/mt7621_iptime_ax2004m.dts
target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts
target/linux/ramips/dts/mt7621_netgear_eax12.dts
target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts
target/linux/ramips/dts/mt7621_tplink_eap613-v1.dts
target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts
target/linux/ramips/dts/mt7621_wavlink_wl-wn573hx1.dts
target/linux/ramips/dts/mt7621_yuncore_ax820.dts
target/linux/ramips/dts/mt7621_yuncore_fap640.dts
target/linux/ramips/dts/mt7621_yuncore_fap690.dts
target/linux/ramips/dts/mt7621_zyxel_nwa-ax.dtsi
target/linux/ramips/dts/mt7621_zyxel_wsm20.dts

index 8aa141b108011e64e633f2b3afb8d4ab5bfb446e..d740d00c6dffd72677e5f7913c367758bf08be1c 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 0xe00>;
-                       };
+                       compatible = "nvmem-cells";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
 
                        macaddr_factory_4: macaddr@4 {
                                reg = <0x4 0x6>;
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_factory_0>;
-               nvmem-cell-names = "eeprom";
+               mediatek,mtd-eeprom = <&factory 0x0000>;
                mediatek,disable-radar-background;
        };
 };
index 571d8375a4b8c55860d6a15223ebf32d067dc418..3191692e4ef30a9d460c70ba53444588bde672d5 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 0xe00>;
-                       };
+                       compatible = "nvmem-cells";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
 
                        macaddr_factory_4: macaddr@4 {
                                reg = <0x4 0x6>;
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_factory_0>;
-               nvmem-cell-names = "eeprom";
+               mediatek,mtd-eeprom = <&factory 0x0000>;
                mediatek,disable-radar-background;
        };
 };
index 8c0dd1ac2e0cdcf732c5197dc470fb30e16d3d29..80600470e77ec28dead172aa188df4842b9dfc58 100644 (file)
@@ -59,8 +59,7 @@
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_factory_0>;
-               nvmem-cell-names = "eeprom";
+               mediatek,mtd-eeprom = <&factory 0x0>;
        };
 };
 
                        };
 
                        factory: partition@50000 {
-                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x50000 0x10000>;
-                               #address-cells = <1>;
-                               #size-cells = <1>;
                                read-only;
-
-                               eeprom_factory_0: eeprom@0 {
-                                       reg = <0x0 0xe00>;
-                               };
-
-                               macaddr_factory_e000: macaddr@e000 {
-                                       reg = <0xe000 0x6>;
-                               };
                        };
 
                        partition@90000 {
        };
 };
 
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_e000: macaddr@e000 {
+               reg = <0xe000 0x6>;
+       };
+};
+
 &gmac0 {
        nvmem-cells = <&macaddr_factory_e000>;
        nvmem-cell-names = "mac-address";
index 90110da4fb316e8a46eef83d67289922413ede5d..314fdb206ca112b73fada2db4dd420bf1f768e87 100644 (file)
@@ -81,8 +81,7 @@
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_factory_0>;
-               nvmem-cell-names = "eeprom";
+               mediatek,mtd-eeprom = <&factory 0x0000>;
                mediatek,disable-radar-background;
        };
 };
                        };
 
                        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 0xe00>;
-                               };
                        };
 
                        partition@50000 {
index 84e053cb42af01b734f1f91041fe58d9d649135e..4c34f58a4b2a99a198da59f9571b13ce0d66fba6 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 0xe00>;
-                               };
                        };
 
                        /* additional partitions in DTS */
        wifi:wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_factory_0>;
-               nvmem-cell-names = "eeprom";
+               mediatek,mtd-eeprom = <&factory 0x0000>;
                mediatek,disable-radar-background;
        };
 };
index 3be48e11af6e2f14789bf3fce0af0ab2f9f6229d..818d2d8c41319133851572fc5890e55bb441ecf2 100644 (file)
                };
 
                factory: partition@100000 {
-                       compatible = "nvmem-cells";
                        label = "factory";
                        reg = <0x100000 0x80000>;
-                       #address-cells = <1>;
-                       #size-cells = <1>;
                        read-only;
 
-                       eeprom_factory_0: eeprom@0 {
-                               reg = <0x0 0xe00>;
-                       };
+                       compatible = "nvmem-cells";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
 
                        macaddr_factory_4: macaddr@4 {
                                reg = <0x4 0x6>;
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_factory_0>;
-               nvmem-cell-names = "eeprom";
+               mediatek,mtd-eeprom = <&factory 0x0>;
                mediatek,disable-radar-background;
        };
 };
index 10fa667f04a3acc2f20c169cffd51767888719ce..554d73ce3d4cd34459b81a4d5aed8771ef2f6277 100644 (file)
                };
 
                factory: partition@100000 {
-                       compatible = "nvmem-cells";
                        label = "factory";
                        reg = <0x100000 0x80000>;
-                       #address-cells = <1>;
-                       #size-cells = <1>;
                        read-only;
 
-                       eeprom_factory_0: eeprom@0 {
-                               reg = <0x0 0xe00>;
-                       };
+                       compatible = "nvmem-cells";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
 
                        macaddr_factory_4: macaddr@4 {
                                reg = <0x4 0x6>;
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_factory_0>;
-               nvmem-cell-names = "eeprom";
+               mediatek,mtd-eeprom = <&factory 0x0>;
        };
 };
index ce365450abae65ac5480a9efe6f752f752a5eef5..245d130a1fcdab4fbc1f8109e074a4cbb2a6e188 100644 (file)
                        };
 
                        config: partition@fa0000 {
-                               compatible = "nvmem-cells";
                                label = "config";
                                reg = <0xfa0000 0x010000>;
-                               #address-cells = <1>;
-                               #size-cells = <1>;
                                read-only;
-
-                               macaddr_config_8: macaddr@8 {
-                                       reg = <0x8 0x6>;
-                               };
                        };
 
                        partition@fb0000 {
                        };
 
                        radio: partition@ff0000 {
-                               compatible = "nvmem-cells";
                                label = "radio";
                                reg = <0xff0000 0x010000>;
-                               #address-cells = <1>;
-                               #size-cells = <1>;
                                read-only;
-
-                               eeprom_radio_0: eeprom@0 {
-                                       reg = <0x0 0xe00>;
-                               };
                        };
                };
        };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_8>;
-               nvmem-cell-names = "eeprom", "mac-address";
+               mediatek,mtd-eeprom = <&radio 0x0>;
+               nvmem-cells = <&macaddr_config_8>;
+               nvmem-cell-names = "mac-address";
                mediatek,disable-radar-background;
        };
 };
                function = "gpio";
        };
 };
+
+&config {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_config_8: macaddr@8 {
+               reg = <0x8 0x6>;
+       };
+};
index e65d881e826c9b54bd602f448e73ad6a3ed13c25..d5ad404be0b8554620471a019ebd502a3c261a0e 100644 (file)
                };
 
                factory: partition@100000 {
-                       compatible = "nvmem-cells";
                        label = "Factory";
                        reg = <0x100000 0x80000>;
-                       #address-cells = <1>;
-                       #size-cells = <1>;
                        read-only;
-
-                       eeprom_factory_0: eeprom@0 {
-                               reg = <0x0 0xe00>;
-                       };
                };
 
                partition@180000 {
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_factory_0>;
-               nvmem-cell-names = "eeprom";
+               mediatek,mtd-eeprom = <&factory 0x0>;
        };
 };
 
index 69652772acf604e9e18da87300f34411b4589a5c..50834c586643ec62a2069b8054854b415a07dbc5 100644 (file)
                        };
 
                        config: partition@fa0000 {
-                               compatible = "nvmem-cells";
                                label = "config";
                                reg = <0xfa0000 0x010000>;
-                               #address-cells = <1>;
-                               #size-cells = <1>;
                                read-only;
-
-                               macaddr_config_8: macaddr@8 {
-                                       reg = <0x8 0x6>;
-                               };
                        };
 
                        partition@fb0000 {
                        };
 
                        radio: partition@ff0000 {
-                               compatible = "nvmem-cells";
                                label = "radio";
                                reg = <0xff0000 0x010000>;
-                               #address-cells = <1>;
-                               #size-cells = <1>;
                                read-only;
-
-                               eeprom_radio_0: eeprom@0 {
-                                       reg = <0x0 0xe00>;
-                               };
                        };
                };
        };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_8>;
-               nvmem-cell-names = "eeprom", "mac-address";
+               mediatek,mtd-eeprom = <&radio 0x0>;
+               nvmem-cells = <&macaddr_config_8>;
+               nvmem-cell-names = "mac-address";
                mediatek,disable-radar-background;
        };
 };
                function = "gpio";
        };
 };
+
+&config {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_config_8: macaddr@8 {
+               reg = <0x8 0x6>;
+       };
+};
index 277b2bbcf48f3eab4dd6db3a344c6cdab5ae93de..d25bf5756022e5cd83a1e801f6293cc3dbef04f9 100644 (file)
                        };
 
                        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 0xe00>;
-                               };
                        };
                };
        };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_radio_0>;
-               nvmem-cell-names = "eeprom";
+               mediatek,mtd-eeprom = <&radio 0x0>;
                mediatek,disable-radar-background;
        };
 };
index d23ab9c4db4cdcab548c255299bba2d92506aad6..58e4bbf75741f0ff99bde6951e104fb62556144d 100644 (file)
                        };
 
                        info: partition@90000 {
-                               compatible = "nvmem-cells";
                                label = "product-info";
                                reg = <0x90000 0x10000>;
-                               #address-cells = <1>;
-                               #size-cells = <1>;
                                read-only;
-
-                               macaddr_info_8: macaddr@8 {
-                                       reg = <0x8 0x6>;
-                               };
                        };
 
                        partition@a0000 {
                        };
 
                        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 0xe00>;
-                               };
                        };
                };
        };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_radio_0>;
-               nvmem-cell-names = "eeprom";
+               mediatek,mtd-eeprom = <&radio 0x0>;
                mediatek,disable-radar-background;
        };
 };
                };
        };
 };
+
+&info {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_info_8: macaddr@8 {
+               reg = <0x8 0x6>;
+       };
+};
index c0b6b7758595213d8df4725cf1ceeab557df2f7c..8f78a60557c9090e6ba52ae04ccd1ea3e3c3ee36 100644 (file)
                                eeprom_factory_0: eeprom@0 {
                                        reg = <0x0 0x400>;
                                };
-
-                               eeprom_factory_20000: eeprom@20000 {
-                                       reg = <0x20000 0xe00>;
-                               };
                        };
 
                        eeprom: partition@b0000 {
 &wlan_5g {
        compatible = "mediatek,mt76";
 
-       nvmem-cells = <&eeprom_factory_20000>, <&macaddr_eeprom_6>;
-       nvmem-cell-names = "eeprom", "mac-address";
+       mediatek,mtd-eeprom = <&factory 0x20000>;
+
+       nvmem-cells = <&macaddr_eeprom_6>;
+       nvmem-cell-names = "mac-address";
 
        /* This is a workaround.
         *
index 1bdbebfad7737b1f8cf27b5a26df9032b99aa468..d8a94c85b9fa6980a9c093d1ff11cb53eaf28bc9 100755 (executable)
@@ -61,8 +61,7 @@
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_factory_0>;
-               nvmem-cell-names = "eeprom";
+               mediatek,mtd-eeprom = <&factory 0x0>;
        };
 };
 
                        };
 
                        factory:partition@50000 {
-                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x50000 0x40000>;
-                               #address-cells = <1>;
-                               #size-cells = <1>;
-
-                               eeprom_factory_0: eeprom@0 {
-                                       reg = <0x0 0xe00>;
-                               };
-
-                               macaddr_factory_3fff4: macaddr@3fff4 {
-                                       reg = <0x3fff4 0x6>;
-                               };
                        };
 
                        partition@90000 {
                };
        };
 };
+
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_3fff4: macaddr@3fff4 {
+               reg = <0x3fff4 0x6>;
+       };
+
+};
index 277c584509a8250d55a63ee90d98dd97c6eed21c..1aba94a9125591832b384d396c54cd5598ac41ae 100644 (file)
                         */
 
                        factory: partition@50000 {
-                               compatible = "nvmem-cells";
                                label = "Factory";
                                reg = <0x50000 0x40000>;
-                               #address-cells = <1>;
-                               #size-cells = <1>;
                                read-only;
-
-                               eeprom_factory_0: eeprom@0 {
-                                       reg = <0x0 0xe00>;
-                               };
-
-                               macaddr_factory_e000: macaddr@e000 {
-                                       reg = <0xe000 0x6>;
-                               };
                        };
 
                        partition@90000 {
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_factory_0>;
-               nvmem-cell-names = "eeprom";
+               mediatek,mtd-eeprom = <&factory 0x0>;
                mediatek,disable-radar-background;
        };
 };
                function = "gpio";
        };
 };
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_e000: macaddr@e000 {
+               reg = <0xe000 0x6>;
+       };
+};
index 8fd6ad347ed09575a4eb4b2f833851d8ef23926b..d525dde385b4d921655a374cfc44534c0010b899 100644 (file)
                         */
 
                        factory: partition@50000 {
-                               compatible = "nvmem-cells";
                                label = "Factory";
                                reg = <0x50000 0x40000>;
-                               #address-cells = <1>;
-                               #size-cells = <1>;
                                read-only;
-
-                               eeprom_factory_0: eeprom@0 {
-                                       reg = <0x0 0xe00>;
-                               };
-
-                               macaddr_factory_0004: macaddr@0004 {
-                                       reg = <0x0004 0x6>;
-                               };
-
-                               macaddr_factory_e006: macaddr@e006 {
-                                       reg = <0xe006 0x6>;
-                               };
                        };
 
                        partition@90000 {
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_factory_0>;
-               nvmem-cell-names = "eeprom";
+               mediatek,mtd-eeprom = <&factory 0x0>;
                mediatek,disable-radar-background;
        };
 };
                function = "gpio";
        };
 };
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_0004: macaddr@0004 {
+               reg = <0x0004 0x6>;
+       };
+
+       macaddr_factory_e006: macaddr@e006 {
+               reg = <0xe006 0x6>;
+       };
+};
+
index 35e320b97451d977c970ae4ecf204cb3ffbe811f..a998b95d4c51eee523643b140868e2ba77d61ed7 100644 (file)
                         */
 
                        factory: partition@50000 {
-                               compatible = "nvmem-cells";
                                label = "Factory";
                                reg = <0x50000 0x40000>;
-                               #address-cells = <1>;
-                               #size-cells = <1>;
                                read-only;
-
-                               eeprom_factory_0: eeprom@0 {
-                                       reg = <0x0 0xe00>;
-                               };
-
-                               macaddr_factory_0004: macaddr@0004 {
-                                       reg = <0x0004 0x6>;
-                               };
                        };
 
                        partition@90000 {
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_factory_0>;
-               nvmem-cell-names = "eeprom";
+               mediatek,mtd-eeprom = <&factory 0x0>;
                mediatek,disable-radar-background;
        };
 };
                function = "gpio";
        };
 };
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_0004: macaddr@0004 {
+               reg = <0x0004 0x6>;
+       };
+};
index 8dfb2ceaa78281cc43c098d4171146e39765de4d..fa7e23dd47133cf64dfe2234551c37b236975fb5 100644 (file)
                };
 
                factory: partition@100000 {
-                       compatible = "nvmem-cells";
                        label = "factory";
                        reg = <0x100000 0x80000>;
-                       #address-cells = <1>;
-                       #size-cells = <1>;
                        read-only;
-
-                       eeprom_factory_0: eeprom@0 {
-                               reg = <0x0 0xe00>;
-                       };
                };
 
                partition@180000 {
                };
 
                mrd: partition@7780000 {
-                       compatible = "nvmem-cells";
                        label = "mrd";
                        reg = <0x7780000 0x80000>;
-                       #address-cells = <1>;
-                       #size-cells = <1>;
                        read-only;
-
-                       macaddr_mrd_1fff8: macaddr@1fff8 {
-                               reg = <0x1fff8 0x6>;
-                       };
                };
        };
 };
                reg = <0x0 0 0 0 0>;
                compatible = "mediatek,mt76";
 
-               nvmem-cells = <&eeprom_factory_0>;
-               nvmem-cell-names = "eeprom";
+               mediatek,mtd-eeprom = <&factory 0x0>;
 
                /* MAC-Address set in userspace */
        };
        };
 };
 
+&mrd {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_mrd_1fff8: macaddr@1fff8 {
+               reg = <0x1fff8 0x6>;
+       };
+};
+
 &state_default {
        gpio {
                groups = "uart3";
index 5615e5686497785228df8fc61fc3522ce8952fbd..299d982dc1179550407521a98f489a5c0d757e56 100644 (file)
                };
 
                factory: partition@200000 {
-                       compatible = "nvmem-cells";
                        reg = <0x200000 0x1c0000>;
-                       #address-cells = <1>;
-                       #size-cells = <1>;
                        label = "Factory";
                        read-only;
-
-                       eeprom_factory_0: eeprom@0 {
-                               reg = <0x0 0xe00>;
-                       };
-
-                       macaddr_factory_1fdfa: macaddr@1fdfa {
-                               reg = <0x1fdfa 0x6>;
-                       };
-
-                       macaddr_factory_1fdf4: macaddr@1fdf4 {
-                               reg = <0x1fdf4 0x6>;
-                       };
                };
 
                partition@3c0000 {
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_factory_0>;
-               nvmem-cell-names = "eeprom";
+               mediatek,mtd-eeprom = <&factory 0x0>;
                mediatek,disable-radar-background;
        };
 };
                function = "gpio";
        };
 };
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_1fdfa: macaddr@1fdfa {
+               reg = <0x1fdfa 0x6>;
+       };
+
+       macaddr_factory_1fdf4: macaddr@1fdf4 {
+               reg = <0x1fdf4 0x6>;
+       };
+};