ramips: convert MT7915 EEPROM to NVMEM format
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 MT7915 WiFi calibration data to NVMEM format. The
EEPROM size is 0xe00.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
28 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_belkin_rt1800.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_h3c_tx180x.dtsi
target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi
target/linux/ramips/dts/mt7621_iptime_ax2004m.dts
target/linux/ramips/dts/mt7621_jcg_q20.dts
target/linux/ramips/dts/mt7621_linksys_e7350.dts
target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts
target/linux/ramips/dts/mt7621_netgear_eax12.dts
target/linux/ramips/dts/mt7621_netgear_wax202.dts
target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts
target/linux/ramips/dts/mt7621_totolink_x5000r.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_xiaomi_mi-router-cr660x.dtsi
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 d740d00c6dffd72677e5f7913c367758bf08be1c..8aa141b108011e64e633f2b3afb8d4ab5bfb446e 100644 (file)
                };
 
                factory: partition@1e0000 {
+                       compatible = "nvmem-cells";
                        label = "factory";
                        reg = <0x1e0000 0x100000>;
-                       read-only;
-
-                       compatible = "nvmem-cells";
                        #address-cells = <1>;
                        #size-cells = <1>;
+                       read-only;
+
+                       eeprom_factory_0: eeprom@0 {
+                               reg = <0x0 0xe00>;
+                       };
 
                        macaddr_factory_4: macaddr@4 {
                                reg = <0x4 0x6>;
        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";
                mediatek,disable-radar-background;
        };
 };
index 3191692e4ef30a9d460c70ba53444588bde672d5..571d8375a4b8c55860d6a15223ebf32d067dc418 100644 (file)
                };
 
                factory: partition@1e0000 {
+                       compatible = "nvmem-cells";
                        label = "factory";
                        reg = <0x1e0000 0x100000>;
-                       read-only;
-
-                       compatible = "nvmem-cells";
                        #address-cells = <1>;
                        #size-cells = <1>;
+                       read-only;
+
+                       eeprom_factory_0: eeprom@0 {
+                               reg = <0x0 0xe00>;
+                       };
 
                        macaddr_factory_4: macaddr@4 {
                                reg = <0x4 0x6>;
        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";
                mediatek,disable-radar-background;
        };
 };
index 16ae7324290355692fc13759e3782a31dd0cd9e0..2e5fcc8bca7e3fa9c5116d30a799020c97a62dfb 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>;
-               mediatek,mtd-eeprom = <&factory 0x0000>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
        };
 };
 
index 80600470e77ec28dead172aa188df4842b9dfc58..8c0dd1ac2e0cdcf732c5197dc470fb30e16d3d29 100644 (file)
@@ -59,7 +59,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";
        };
 };
 
                        };
 
                        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 314fdb206ca112b73fada2db4dd420bf1f768e87..90110da4fb316e8a46eef83d67289922413ede5d 100644 (file)
@@ -81,7 +81,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";
                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 4c34f58a4b2a99a198da59f9571b13ce0d66fba6..84e053cb42af01b734f1f91041fe58d9d649135e 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>;
-               mediatek,mtd-eeprom = <&factory 0x0000>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                mediatek,disable-radar-background;
        };
 };
index 818d2d8c41319133851572fc5890e55bb441ecf2..3be48e11af6e2f14789bf3fce0af0ab2f9f6229d 100644 (file)
                };
 
                factory: partition@100000 {
+                       compatible = "nvmem-cells";
                        label = "factory";
                        reg = <0x100000 0x80000>;
-                       read-only;
-
-                       compatible = "nvmem-cells";
                        #address-cells = <1>;
                        #size-cells = <1>;
+                       read-only;
+
+                       eeprom_factory_0: eeprom@0 {
+                               reg = <0x0 0xe00>;
+                       };
 
                        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";
                mediatek,disable-radar-background;
        };
 };
index fe374bfa6b01f0a388fe7d6363856dd56cd31885..afb188dff4556c9d362b4f33f4b36667bcd27a16 100644 (file)
                };
 
                factory: partition@180000 {
+                       compatible = "nvmem-cells";
                        label = "factory";
                        reg = <0x0180000 0x0080000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
                        read-only;
+
+                       eeprom_factory_0: eeprom@0 {
+                               reg = <0x0 0xe00>;
+                       };
                };
 
                partition@200000 {
        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";
                mediatek,disable-radar-background;
        };
 };
index 4dd6f3b0ae5533ce3a98a12140fe6bf9dbc3535c..afda347ee73658a6b3a31421a62b27854feb7584 100644 (file)
                };
 
                factory: partition@100000 {
+                       compatible = "nvmem-cells";
                        label = "factory";
                        reg = <0x0100000 0x0080000>;
-                       read-only;
-
-                       compatible = "nvmem-cells";
                        #address-cells = <1>;
                        #size-cells = <1>;
+                       read-only;
+
+                       eeprom_factory_0: eeprom@0 {
+                               reg = <0x0 0xe00>;
+                       };
 
                        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";
                mediatek,disable-radar-background;
        };
 };
index 554d73ce3d4cd34459b81a4d5aed8771ef2f6277..10fa667f04a3acc2f20c169cffd51767888719ce 100644 (file)
                };
 
                factory: partition@100000 {
+                       compatible = "nvmem-cells";
                        label = "factory";
                        reg = <0x100000 0x80000>;
-                       read-only;
-
-                       compatible = "nvmem-cells";
                        #address-cells = <1>;
                        #size-cells = <1>;
+                       read-only;
+
+                       eeprom_factory_0: eeprom@0 {
+                               reg = <0x0 0xe00>;
+                       };
 
                        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 34236954d0b6d4caef37518b433b16cff98fbab6..4f480ab2c8fd4b1c1bad1d65616f90c80a75d37d 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>;
+                       };
+
+                       macaddr_factory_3fff4: macaddr@3fff4 {
+                               reg = <0x3fff4 0x6>;
+                       };
+
+                       macaddr_factory_3fffa: macaddr@3fffa {
+                               reg = <0x3fffa 0x6>;
+                       };
                };
 
                partition@180000 {
        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";
                mediatek,disable-radar-background;
        };
 };
                function = "gpio";
        };
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_3fff4: macaddr@3fff4 {
-               reg = <0x3fff4 0x6>;
-       };
-
-       macaddr_factory_3fffa: macaddr@3fffa {
-               reg = <0x3fffa 0x6>;
-       };
-};
index ea8a6841488a8f7eddbc98402915553dbd19d20d..4451e5e3f3eac93d2b8b7f596cdd96cb73f4abeb 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>;
-               mediatek,mtd-eeprom = <&factory 0x0000>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
        };
 };
 
index 245d130a1fcdab4fbc1f8109e074a4cbb2a6e188..ce365450abae65ac5480a9efe6f752f752a5eef5 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>;
-               mediatek,mtd-eeprom = <&radio 0x0>;
-               nvmem-cells = <&macaddr_config_8>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_8>;
+               nvmem-cell-names = "eeprom", "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 d5ad404be0b8554620471a019ebd502a3c261a0e..e65d881e826c9b54bd602f448e73ad6a3ed13c25 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>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
        };
 };
 
index fbe17ef0d38cbbb05029e3838f1ee2cc48a965a0..eb7d1bb7e5fede46f48e4c2d3b2af0b2f39eadc9 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>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
        };
 };
 
index 2d91d1c481a171eeedd1776c52814a526ae7d15d..a7e048f9ae6c5186e89b4174d423e097e1a17f55 100644 (file)
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                mediatek,disable-radar-background;
        };
 };
                        };
 
                        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_4: macaddr@4 {
+                                       reg = <0x4 0x6>;
+                               };
                        };
 
                        partition@90000 {
                };
        };
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_4: macaddr@4 {
-               reg = <0x4 0x6>;
-       };
-};
index 79667caf73d49f5766ee3d756c1cd4f6ede8537d..23d47d6ea35b14e88df0ce16cf98493d2f0fabb2 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>;
+                               };
+
+                               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>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                mediatek,disable-radar-background;
        };
 };
                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 50834c586643ec62a2069b8054854b415a07dbc5..69652772acf604e9e18da87300f34411b4589a5c 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>;
-               mediatek,mtd-eeprom = <&radio 0x0>;
-               nvmem-cells = <&macaddr_config_8>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_8>;
+               nvmem-cell-names = "eeprom", "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 d25bf5756022e5cd83a1e801f6293cc3dbef04f9..277b2bbcf48f3eab4dd6db3a344c6cdab5ae93de 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>;
-               mediatek,mtd-eeprom = <&radio 0x0>;
+               nvmem-cells = <&eeprom_radio_0>;
+               nvmem-cell-names = "eeprom";
                mediatek,disable-radar-background;
        };
 };
index 58e4bbf75741f0ff99bde6951e104fb62556144d..d23ab9c4db4cdcab548c255299bba2d92506aad6 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>;
-               mediatek,mtd-eeprom = <&radio 0x0>;
+               nvmem-cells = <&eeprom_radio_0>;
+               nvmem-cell-names = "eeprom";
                mediatek,disable-radar-background;
        };
 };
                };
        };
 };
-
-&info {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_info_8: macaddr@8 {
-               reg = <0x8 0x6>;
-       };
-};
index 8f78a60557c9090e6ba52ae04ccd1ea3e3c3ee36..c0b6b7758595213d8df4725cf1ceeab557df2f7c 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";
 
-       mediatek,mtd-eeprom = <&factory 0x20000>;
-
-       nvmem-cells = <&macaddr_eeprom_6>;
-       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&eeprom_factory_20000>, <&macaddr_eeprom_6>;
+       nvmem-cell-names = "eeprom", "mac-address";
 
        /* This is a workaround.
         *
index d8a94c85b9fa6980a9c093d1ff11cb53eaf28bc9..1bdbebfad7737b1f8cf27b5a26df9032b99aa468 100755 (executable)
@@ -61,7 +61,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";
        };
 };
 
                        };
 
                        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 14ad0f26ba1c3411006db936a576cc6e815ca883..f0e0ae8e7e7102050b2899246f5cd2d83bdef012 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>;
+                       };
+
+                       macaddr_factory_3fff4: macaddr@3fff4 {
+                               reg = <0x3fff4 0x6>;
+                       };
+
+                       macaddr_factory_3fffa: macaddr@3fffa {
+                               reg = <0x3fffa 0x6>;
+                       };
                };
 
                partition@180000 {
        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";
                mediatek,disable-radar-background;
        };
 };
                function = "gpio";
        };
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_3fff4: macaddr@3fff4 {
-               reg = <0x3fff4 0x6>;
-       };
-
-       macaddr_factory_3fffa: macaddr@3fffa {
-               reg = <0x3fffa 0x6>;
-       };
-};
index 1aba94a9125591832b384d396c54cd5598ac41ae..277c584509a8250d55a63ee90d98dd97c6eed21c 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>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                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 d525dde385b4d921655a374cfc44534c0010b899..8fd6ad347ed09575a4eb4b2f833851d8ef23926b 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>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                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 a998b95d4c51eee523643b140868e2ba77d61ed7..35e320b97451d977c970ae4ecf204cb3ffbe811f 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>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                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 fa7e23dd47133cf64dfe2234551c37b236975fb5..8dfb2ceaa78281cc43c098d4171146e39765de4d 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";
 
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
 
                /* 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 299d982dc1179550407521a98f489a5c0d757e56..5615e5686497785228df8fc61fc3522ce8952fbd 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>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                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>;
-       };
-};