ramips: mt7621: nix mac-address-increment
authorRosen Penev <rosenp@gmail.com>
Wed, 8 Nov 2023 03:39:00 +0000 (19:39 -0800)
committerChristian Marangi <ansuelsmth@gmail.com>
Sun, 26 Nov 2023 00:30:32 +0000 (01:30 +0100)
nvmem-layout allows removal

Signed-off-by: Rosen Penev <rosenp@gmail.com>
72 files changed:
target/linux/ramips/dts/mt7621_adslr_g7.dts
target/linux/ramips/dts/mt7621_afoundry_ew1200.dts
target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts
target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts
target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi
target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts
target/linux/ramips/dts/mt7621_beeline_smartbox-pro.dts
target/linux/ramips/dts/mt7621_beeline_smartbox-turbo-plus.dts
target/linux/ramips/dts/mt7621_beeline_smartbox-turbo.dts
target/linux/ramips/dts/mt7621_bolt_arion.dts
target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts
target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts
target/linux/ramips/dts/mt7621_cudy_m1800.dts
target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts
target/linux/ramips/dts/mt7621_cudy_wr2100.dts
target/linux/ramips/dts/mt7621_cudy_x6-v1.dts
target/linux/ramips/dts/mt7621_cudy_x6-v2.dts
target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts
target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts
target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts
target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts
target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts
target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi
target/linux/ramips/dts/mt7621_dlink_flash-16m-r1.dtsi
target/linux/ramips/dts/mt7621_dual-q_h721.dts
target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts
target/linux/ramips/dts/mt7621_etisalat_s3.dts
target/linux/ramips/dts/mt7621_firefly_firewrt.dts
target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts
target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi
target/linux/ramips/dts/mt7621_hanyang_hyc-g920.dts
target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts
target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts
target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts
target/linux/ramips/dts/mt7621_iptime_a3004t.dts
target/linux/ramips/dts/mt7621_iptime_ax2004m.dts
target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts
target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts
target/linux/ramips/dts/mt7621_mqmaker_witi.dts
target/linux/ramips/dts/mt7621_mtc_wr1201.dts
target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi
target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
target/linux/ramips/dts/mt7621_oraybox_x3a.dts
target/linux/ramips/dts/mt7621_renkforce_ws-wn530hp3-a.dts
target/linux/ramips/dts/mt7621_rostelecom_rt-sf-1.dts
target/linux/ramips/dts/mt7621_sercomm_dxx_nand_256m.dtsi
target/linux/ramips/dts/mt7621_sercomm_na502.dts
target/linux/ramips/dts/mt7621_sercomm_na502s.dts
target/linux/ramips/dts/mt7621_sercomm_s1500.dtsi
target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts
target/linux/ramips/dts/mt7621_telco-electronics_x1.dts
target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts
target/linux/ramips/dts/mt7621_totolink_a7000r.dts
target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.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_eap235-wall-v1.dts
target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts
target/linux/ramips/dts/mt7621_tplink_re350-v1.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_ubnt_unifi-6-lite.dts
target/linux/ramips/dts/mt7621_ubnt_unifi-flexhd.dts
target/linux/ramips/dts/mt7621_wifire_s1500-nbn.dts
target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts
target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts
target/linux/ramips/dts/mt7621_yuncore_ax820.dts
target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts
target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi
target/linux/ramips/dts/mt7621_zyxel_lte3301-plus.dts

index f797393f04381428cb536026cf173068116399ba..ef3a64e031a23bc2446327b237f8d8b3e30d633f 100644 (file)
@@ -82,7 +82,9 @@
                                        };
 
                                        macaddr_factory_e00c: macaddr@e00c {
+                                               compatible = "mac-base";
                                                reg = <0xe00c 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_e00c>;
+       nvmem-cells = <&macaddr_factory_e00c 0>;
        nvmem-cell-names = "mac-address";
 };
 
        label = "wan";
        phy-handle = <&ethphy4>;
 
-       nvmem-cells = <&macaddr_factory_e00c>;
+       nvmem-cells = <&macaddr_factory_e00c 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &mdio {
index a846e5d8d5ddffd0f2708b1315115582ac14577f..d63ae33311fb96f23d4c1d3fd7b5b72e649ae9c2 100644 (file)
@@ -89,7 +89,9 @@
                                        };
 
                                        macaddr_factory_e000: macaddr@e000 {
+                                               compatible = "mac-base";
                                                reg = <0xe000 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cells = <&macaddr_factory_e000 0>;
        nvmem-cell-names = "mac-address";
 };
 
        label = "wan";
        phy-handle = <&ethphy4>;
 
-       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cells = <&macaddr_factory_e000 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &mdio {
index 5e57842d6812dbd11a9b322f90b5eba9d2317b98..2d4bc016c1dd954395061fe399d5a1de2730513a 100644 (file)
@@ -7,22 +7,6 @@
        model = "AsiaRF AP7621-001";
 };
 
-&gmac1 {
-       status = "okay";
-       label = "wan";
-       phy-handle = <&ethphy4>;
-
-       nvmem-cells = <&macaddr_factory_e000>;
-       nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
-};
-
-&mdio {
-       ethphy4: ethernet-phy@4 {
-               reg = <4>;
-       };
-};
-
 &switch0 {
        ports {
                port@0 {
index dabc1a3bd340184fc54704e329ba7c50d8b9e7ff..f6914e43599c28dafc51d0db29f1c3eb27a91ff9 100644 (file)
@@ -7,22 +7,6 @@
        model = "AsiaRF AP7621-NV1";
 };
 
-&gmac1 {
-       status = "okay";
-       label = "wan";
-       phy-handle = <&ethphy0>;
-
-       nvmem-cells = <&macaddr_factory_e000>;
-       nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
-};
-
-&mdio {
-       ethphy0: ethernet-phy@0 {
-               reg = <0>;
-       };
-};
-
 &switch0 {
        ports {
                port@2 {
index 658164fe08becede30924149fce8554a6d685694..acb2c81a0d8858e005d07023b602bbf603453755 100644 (file)
@@ -85,7 +85,9 @@
                                        #size-cells = <1>;
 
                                        macaddr_factory_e000: macaddr@e000 {
+                                               compatible = "mac-base";
                                                reg = <0xe000 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
        status = "okay";
 };
 
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cells = <&macaddr_factory_e000 0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e000 1>;
        nvmem-cell-names = "mac-address";
 };
 
index 24fb75778154488fbc29aaa01093de629efa17cc..f2a99a63a89db765a8f56ec883494ac6da11bf35 100644 (file)
                                };
 
                                macaddr_factory_21000: macaddr@21000 {
+                                       compatible = "mac-base";
                                        reg = <0x21000 0x6>;
+                                       #nvmem-cell-cells = <1>;
                                };
                        };
                };
                reg = <0x0000 0 0 0 0>;
                ieee80211-freq-limit = <5000000 6000000>;
 
-               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_21000>;
+               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_21000 5>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <(5)>;
        };
 };
 
                reg = <0x0000 0 0 0 0>;
                ieee80211-freq-limit = <2400000 2500000>;
 
-               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_21000>;
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_21000 4>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <(4)>;
        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_21000>;
+       nvmem-cells = <&macaddr_factory_21000 0>;
        nvmem-cell-names = "mac-address";
 };
 
        label = "wan";
        phy-handle = <&ethphy0>;
 
-       nvmem-cells = <&macaddr_factory_21000>;
+       nvmem-cells = <&macaddr_factory_21000 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <(1)>;
 };
 
 &mdio {
index e3e248d48f960e8a119cf7eec31e8cc090cd6fb5..e2c0165e6bb3a751e0d16fd63df3b37c4e6ac527 100644 (file)
         * 0x10000000-0xfc00000=0x400000
         */
 };
+
+&pcie1 {
+       wlan_2g: wifi@0,0 {
+               compatible = "mediatek,mt76";
+               reg = <0x0000 0 0 0 0>;
+               ieee80211-freq-limit = <2400000 2500000>;
+
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_1000 0>;
+               nvmem-cell-names = "eeprom", "mac-address";
+       };
+};
index 2a1f2758158c84964849a4b1ebcf7204f6ae0acd..00f4957c574d2b0bc1af3201d97e2cfa3d2611df 100644 (file)
                                };
 
                                macaddr_factory_21000: macaddr@21000 {
+                                       compatible = "mac-base";
                                        reg = <0x21000 0x6>;
+                                       #nvmem-cell-cells = <1>;
                                };
                        };
                };
                reg = <0x0000 0 0 0 0>;
                ieee80211-freq-limit = <5000000 6000000>;
 
-               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_21000>;
+               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_21000 5>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <(5)>;
        };
 };
 
                reg = <0x0000 0 0 0 0>;
                ieee80211-freq-limit = <2400000 2500000>;
 
-               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_21000>;
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_21000 4>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <(4)>;
        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_21000>;
+       nvmem-cells = <&macaddr_factory_21000 0>;
        nvmem-cell-names = "mac-address";
 };
 
        label = "wan";
        phy-handle = <&ethphy0>;
 
-       nvmem-cells = <&macaddr_factory_21000>;
+       nvmem-cells = <&macaddr_factory_21000 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <(1)>;
 };
 
 &mdio {
index df80f49e97ea37edf9993ec698ebfc9e8d4b9945..f9b53ae0b368fae6e9edd07a3b6c5f6ffebe0498 100644 (file)
@@ -9,22 +9,19 @@
 
 &pcie0 {
        wifi@0,0 {
-               nvmem-cells = <&macaddr_factory_21000>;
+               nvmem-cells = <&macaddr_factory_21000 5>;
                nvmem-cell-names = "mac-address";
-               mac-address-increment = <(5)>;
        };
 };
 
 &pcie1 {
        wifi@0,0 {
-               nvmem-cells = <&macaddr_factory_21000>;
+               nvmem-cells = <&macaddr_factory_21000 4>;
                nvmem-cell-names = "mac-address";
-               mac-address-increment = <(4)>;
        };
 };
 
 &gmac1 {
-       nvmem-cells = <&macaddr_factory_21000>;
+       nvmem-cells = <&macaddr_factory_21000 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <(1)>;
 };
index 354c1c5314572b94cc09a5225bf74bdd35908f33..83855f9dc898bf0985b518d87ff4a5f6c725573e 100644 (file)
                                        };
 
                                        macaddr_factory_28: macaddr@28 {
+                                               compatible = "mac-base";
                                                reg = <0x28 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_28>;
+       nvmem-cells = <&macaddr_factory_28 3>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <3>;
 };
 
 &switch0 {
                wan: port@1 {
                        status = "okay";
                        label = "wan";
-                       nvmem-cells = <&macaddr_factory_28>;
+                       nvmem-cells = <&macaddr_factory_28 0>;
                        nvmem-cell-names = "mac-address";
                };
 
index 81933ba21d8123fb03d00d2dc1d9e356e255e3bf..b4ba1519d3df37b856234a16eb69bac3114e69d2 100644 (file)
                                        };
 
                                        macaddr_factory_4: macaddr@4 {
+                                               compatible = "mac-base";
                                                reg = <0x4 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cells = <&macaddr_factory_4 (-1)>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <(-1)>;
 };
 
 &gmac1 {
        label = "wan";
        phy-handle = <&ethphy0>;
 
-       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cells = <&macaddr_factory_4 (-1)>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <(-1)>;
 };
 
 &mdio {
index 106b16573b39fe1c2c737e8613340453387bc4e8..ac0c19c0228607537c3a053f284f85299d17fa15 100644 (file)
@@ -97,7 +97,9 @@
                                        #size-cells = <1>;
 
                                        macaddr_factory_e000: macaddr@e000 {
+                                               compatible = "mac-base";
                                                reg = <0xe000 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cells = <&macaddr_factory_e000 0>;
        nvmem-cell-names = "mac-address";
 };
 
                port@0 {
                        status = "okay";
                        label = "wan";
-                       nvmem-cells = <&macaddr_factory_e000>;
+                       nvmem-cells = <&macaddr_factory_e000 1>;
                        nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
                };
 
                port@4 {
index 759abe7ba586ef888bf6fa1006be574c25021a83..29d6f9e41a98f595ed6954c2f6eeded66a630848 100644 (file)
@@ -53,9 +53,8 @@
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_bdinfo_de00>;
+       nvmem-cells = <&macaddr_bdinfo_de00 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &gmac1 {
@@ -63,7 +62,7 @@
        label = "lan";
        phy-handle = <&ethphy4>;
 
-       nvmem-cells = <&macaddr_bdinfo_de00>;
+       nvmem-cells = <&macaddr_bdinfo_de00 0>;
        nvmem-cell-names = "mac-address";
 };
 
                                        #size-cells = <1>;
 
                                        macaddr_bdinfo_de00: macaddr@de00 {
+                                               compatible = "mac-base";
                                                reg = <0xde00 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
index ab9f7c6507193f983d09707f5d9a69502e652c36..e87209fbb1d86685b019456d4c4b8e1a7fb52809 100644 (file)
                                        #size-cells = <1>;
 
                                        macaddr_bdinfo_de00: macaddr@de00 {
+                                               compatible = "mac-base";
                                                reg = <0xde00 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
        wifi@0,0 {
                compatible = "pci14c3,7603";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_factory_0>, <&macaddr_bdinfo_de00>;
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_bdinfo_de00 0>;
                nvmem-cell-names = "eeprom", "mac-address";
                ieee80211-freq-limit = <2400000 2500000>;
 
        wifi@0,0 {
                compatible = "pci14c3,7662";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_bdinfo_de00>;
+               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_bdinfo_de00 2>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <2>;
                ieee80211-freq-limit = <5000000 6000000>;
 
                led {
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_bdinfo_de00>;
+       nvmem-cells = <&macaddr_bdinfo_de00 0>;
        nvmem-cell-names = "mac-address";
 };
 
        label = "wan";
        phy-handle = <&ethphy4>;
 
-       nvmem-cells = <&macaddr_bdinfo_de00>;
+       nvmem-cells = <&macaddr_bdinfo_de00 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &mdio {
index 64beabea939247ebad8323008e0bf9eaf39a5dc3..fc38e27ac1857beed8cd80fc3f72b19ddb0ee3bb 100644 (file)
@@ -78,7 +78,7 @@
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_bdinfo_de00>;
+       nvmem-cells = <&macaddr_bdinfo_de00 0>;
        nvmem-cell-names = "mac-address";
 };
 
                                        #size-cells = <1>;
 
                                        macaddr_bdinfo_de00: macaddr@de00 {
+                                               compatible = "mac-base";
                                                reg = <0xde00 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
        label = "wan";
        phy-handle = <&ethphy4>;
 
-       nvmem-cells = <&macaddr_bdinfo_de00>;
+       nvmem-cells = <&macaddr_bdinfo_de00 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &mdio {
index 3ba72d5f971f151661c685f637ab4f7320d66194..940a0598c10f1e8551970909dd4decabed76e945 100644 (file)
                        #size-cells = <1>;
 
                        macaddr_bdinfo_de00: macaddr@de00 {
+                               compatible = "mac-base";
                                reg = <0xde00 0x6>;
+                               #nvmem-cell-cells = <1>;
                        };
                };
        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_bdinfo_de00>;
+       nvmem-cells = <&macaddr_bdinfo_de00 0>;
        nvmem-cell-names = "mac-address";
 };
 
 &gmac1 {
-       nvmem-cells = <&macaddr_bdinfo_de00>;
+       nvmem-cells = <&macaddr_bdinfo_de00 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &wifi {
-       nvmem-cells = <&macaddr_bdinfo_de00>;
+       nvmem-cells = <&macaddr_bdinfo_de00 0>;
        nvmem-cell-names = "mac-address";
 };
index f4d50d42e72c719d95c874a80142c32ff3b10e88..70e6a845a4bbda65c8cc855dc1d6165eb587cf64 100644 (file)
                        #size-cells = <1>;
 
                        macaddr_bdinfo_de00: macaddr@de00 {
+                               compatible = "mac-base";
                                reg = <0xde00 0x6>;
+                               #nvmem-cell-cells = <1>;
                        };
                };
        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_bdinfo_de00>;
+       nvmem-cells = <&macaddr_bdinfo_de00 0>;
        nvmem-cell-names = "mac-address";
 };
 
 &gmac1 {
-       nvmem-cells = <&macaddr_bdinfo_de00>;
+       nvmem-cells = <&macaddr_bdinfo_de00 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &wifi {
-       nvmem-cells = <&macaddr_bdinfo_de00>;
+       nvmem-cells = <&macaddr_bdinfo_de00 0>;
        nvmem-cell-names = "mac-address";
 };
index d352d27b76c50a2c35900972507b75ce3ea740d7..e0a714c9dc64612eca474d392b8698cbf0737a20 100644 (file)
                linux,default-trigger = "usbport";
        };
 };
-
-&wifi0 {
-       nvmem-cells = <&macaddr_factory_e000>;
-       nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
-};
-
-&wifi1 {
-       nvmem-cells = <&macaddr_factory_e000>;
-       nvmem-cell-names = "mac-address";
-       mac-address-increment = <2>;
-};
index 127a9a3417f3ada9a3738040501d68c5a7cdc507..d4b8069a33308944a9056eeec3dd2c4a0ca22342 100644 (file)
                linux,default-trigger = "usbport";
        };
 };
-
-&wifi0 {
-       nvmem-cells = <&macaddr_factory_e000>;
-       nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
-};
-
-&wifi1 {
-       nvmem-cells = <&macaddr_factory_e000>;
-       nvmem-cell-names = "mac-address";
-       mac-address-increment = <2>;
-};
index 02fd35d60e92c4508e6948a417287a5af9ca5529..a4590cb35fc5a7187c3648d396b27c9e00430dd0 100644 (file)
                linux,default-trigger = "usbport";
        };
 };
-
-&wifi0 {
-       nvmem-cells = <&macaddr_factory_e000>;
-       nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
-};
-
-&wifi1 {
-       nvmem-cells = <&macaddr_factory_e000>;
-       nvmem-cell-names = "mac-address";
-       mac-address-increment = <2>;
-};
index 23995079fdb5f2f90a8e321de49cd2ce55d4e621..1cca6f6b57851cdc1d4ff90afbeec3e6a8a9e9f9 100644 (file)
                                };
 
                                macaddr_factory_e000: macaddr@e000 {
+                                       compatible = "mac-base";
                                        reg = <0xe000 0x6>;
+                                       #nvmem-cell-cells = <1>;
                                };
 
                                macaddr_factory_e006: macaddr@e006 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
                ieee80211-freq-limit = <2400000 6000000>;
-               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000>;
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000 1>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <1>;
        };
 };
 
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
                ieee80211-freq-limit = <5000000 6000000>;
-               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000>;
+               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000 3>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <3>;
        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cells = <&macaddr_factory_e000 0>;
        nvmem-cell-names = "mac-address";
 };
 
index 290638f7355f1f18db604e36b5cd4a95a17febf3..bce0e6996befa25eb5caa44db5fe81d2db4b6a59 100644 (file)
 
                /* 5 GHz (phy1) does not take the address from calibration data,
                   but setting it manually here works */
-               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4>;
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4 0>;
                nvmem-cell-names = "eeprom", "mac-address";
        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cells = <&macaddr_factory_4 (-1)>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <(-1)>;
 };
 
 &gmac1 {
        label = "wan";
        phy-handle = <&ethphy4>;
 
-       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cells = <&macaddr_factory_4 (-2)>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <(-2)>;
 };
 
 &mdio {
index 9d770dda2f708abb74f75a86c934780dd49bd6cf..6eb3f3cdd9bf7dfd3ee165d9a577c40bb724440e 100644 (file)
@@ -94,7 +94,9 @@
                                };
 
                                macaddr_factory_e000: macaddr@e000 {
+                                       compatible = "mac-base";
                                        reg = <0xe000 0x6>;
+                                       #nvmem-cell-cells = <1>;
                                };
 
                                macaddr_factory_e006: macaddr@e006 {
        wifi0: wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cells = <&macaddr_factory_e000 1>;
                nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <2400000 2500000>;
 
        wifi1: wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_factory_8000>;
+               nvmem-cells = <&macaddr_factory_e000 2>;
                nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <5000000 6000000>;
 
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cells = <&macaddr_factory_e000 0>;
        nvmem-cell-names = "mac-address";
 };
 
index 93380e306747d36331b2cfd7fcf2e40cd3cd639c..bccd19b12d8e4c90aa0ce41278db0c95c6ae2740 100644 (file)
@@ -44,7 +44,9 @@
                                        };
 
                                        macaddr_factory_4: macaddr@4 {
+                                               compatible = "mac-base";
                                                reg = <0x4 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
 
                                        macaddr_factory_e000: macaddr@e000 {
index cafda8e1ecc6bc9b9a76293545c6ab9de93ac838..2c35a8839cb6372343eb22cab14a16a1884482a4 100644 (file)
                                        #size-cells = <1>;
 
                                        macaddr_factory_e000: macaddr@e000 {
+                                               compatible = "mac-base";
                                                reg = <0xe000 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
                        status = "okay";
                        label = "wan";
 
-                       nvmem-cells = <&macaddr_factory_e000>;
+                       nvmem-cells = <&macaddr_factory_e000 1>;
                        nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
                };
        };
 };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cells = <&macaddr_factory_e000 0>;
        nvmem-cell-names = "mac-address";
 };
 
index b280790d64f06cc708ee35cf4d376b3e27ab1c9a..9c0353ae28b7373812754f20a8554576146cfd8f 100644 (file)
@@ -67,7 +67,7 @@
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cells = <&macaddr_factory_e000 0>;
        nvmem-cell-names = "mac-address";
 };
 
                                        };
 
                                        macaddr_factory_e000: macaddr@e000 {
+                                               compatible = "mac-base";
                                                reg = <0xe000 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
 
                                        macaddr_factory_e006: macaddr@e006 {
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000>;
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000 1>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <1>;
        };
 };
 
index 90309dad0a12a1c788658daa9df79bc348d00ac5..64e21bb704a1db8476f0b77796e8f4d774541403 100644 (file)
                                };
 
                                macaddr_factory_21000: macaddr@21000 {
+                                       compatible = "mac-base";
                                        reg = <0x21000 0x6>;
+                                       #nvmem-cell-cells = <1>;
                                };
                        };
                };
                reg = <0x0000 0 0 0 0>;
                ieee80211-freq-limit = <5000000 6000000>;
 
-               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_21000>;
+               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_21000 3>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <(3)>;
        };
 };
 
                reg = <0x0000 0 0 0 0>;
                ieee80211-freq-limit = <2400000 2500000>;
 
-               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_21000>;
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_21000 2>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <(2)>;
        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_21000>;
+       nvmem-cells = <&macaddr_factory_21000 0>;
        nvmem-cell-names = "mac-address";
 };
 
        label = "wan";
        phy-handle = <&ethphy0>;
 
-       nvmem-cells = <&macaddr_factory_21000>;
+       nvmem-cells = <&macaddr_factory_21000 11>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <(11)>;
 };
 
 &mdio {
index a9d9da872e3b9557aad42990b9c50f1bc2828ba6..c2c2acac9f2841d1f12213145dab2ccc2dd25e4f 100644 (file)
@@ -88,7 +88,9 @@
                                        };
 
                                        macaddr_factory_e000: macaddr@e000 {
+                                               compatible = "mac-base";
                                                reg = <0xe000 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cells = <&macaddr_factory_e000 0>;
        nvmem-cell-names = "mac-address";
 };
 
                port@4 {
                        status = "okay";
                        label = "wan";
-                       nvmem-cells = <&macaddr_factory_e000>;
+                       nvmem-cells = <&macaddr_factory_e000 1>;
                        nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
                };
        };
 };
index 778b2f07981b017c395a2a8f50eef671aff5af7d..d224fd388d7fc725ca484152ddf39e5e6826e54b 100644 (file)
@@ -86,7 +86,9 @@
                                        };
 
                                        macaddr_factory_e000: macaddr@e000 {
+                                               compatible = "mac-base";
                                                reg = <0xe000 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cells = <&macaddr_factory_e000 0>;
        nvmem-cell-names = "mac-address";
 };
 
        label = "wan";
        phy-handle = <&ethphy4>;
 
-       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cells = <&macaddr_factory_e000 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &mdio {
index 94a9b1c092b6a6673687567f40f9a47b5d65e37d..891fe7c730f26ab6de5544331b262b353e14f1ad 100644 (file)
                                        };
 
                                        macaddr_factory_4000: macaddr@4000 {
+                                               compatible = "mac-base";
                                                reg = <0x4000 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_4000>;
+       nvmem-cells = <&macaddr_factory_4000 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &gmac1 {
        label = "wan";
        phy-handle = <&ethphy4>;
 
-       nvmem-cells = <&macaddr_factory_4000>;
+       nvmem-cells = <&macaddr_factory_4000 0>;
        nvmem-cell-names = "mac-address";
 };
 
index 6d9608d18f8eecabedc83f41bd2531e2af673f3d..6549abaec956973dbba21c547f7293631dad61b9 100644 (file)
@@ -63,7 +63,7 @@
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_8004>;
+       nvmem-cells = <&macaddr_factory_8004 0>;
        nvmem-cell-names = "mac-address";
 };
 
@@ -72,9 +72,8 @@
        label = "wan";
        phy-handle = <&ethphy4>;
 
-       nvmem-cells = <&macaddr_factory_8004>;
+       nvmem-cells = <&macaddr_factory_8004 (-3)>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <(-3)>;
 };
 
 &mdio {
                                };
 
                                macaddr_factory_8004: macaddr@8004 {
+                                       compatible = "mac-base";
                                        reg = <0x8004 0x6>;
+                                       #nvmem-cell-cells = <1>;
                                };
                        };
                };
index 7bec688f866fe5ac00a8edffd8ed4ea4da5e4043..5737c0ce68f1261ee0b7fec215015e4f35125027 100644 (file)
@@ -93,7 +93,9 @@
                                        };
 
                                        macaddr_factory_4: macaddr@4 {
+                                               compatible = "mac-base";
                                                reg = <0x4 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
 
                                        macaddr_factory_8004: macaddr@8004 {
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cells = <&macaddr_factory_4 0>;
        nvmem-cell-names = "mac-address";
 };
 
                port@0 {
                        status = "okay";
                        label = "wan";
-                       nvmem-cells = <&macaddr_factory_4>;
+                       nvmem-cells = <&macaddr_factory_4 1>;
                        nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
                };
 
                port@1 {
index b93102163fbfeb3bcca99150001d1c0a7077e45d..b46ba87f39407d8e7156cd685ec56c21ab9725ae 100644 (file)
                                        };
 
                                        macaddr_factory_4: macaddr@4 {
+                                               compatible = "mac-base";
                                                reg = <0x4 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
        label = "wan";
        phy-handle = <&ethphy0>;
 
-       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cells = <&macaddr_factory_4 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &mdio {
index 5b9d0d59b214f730a05761ac5580ecf38c25afa4..6bd5e733f4a6fd29e2572764e796302f8b8eabbe 100644 (file)
                                        };
 
                                        macaddr_factory_4: macaddr@4 {
+                                               compatible = "mac-base";
                                                reg = <0x4 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cells = <&macaddr_factory_4 0>;
        nvmem-cell-names = "mac-address";
 };
 
        label = "wan";
        phy-handle = <&ethphy0>;
 
-       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cells = <&macaddr_factory_4 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &mdio {
index 6b77902136728812291529748ffd7c9034671b32..05346a10d4a7d59451e8f5b07d733d8a78026439 100644 (file)
@@ -79,7 +79,9 @@
                                        #size-cells = <1>;
 
                                        macaddr_uboot_1fc40: macaddr@1fc40 {
+                                               compatible = "mac-base";
                                                reg = <0x1fc40 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_uboot_1fc40>;
+       nvmem-cells = <&macaddr_uboot_1fc40 2>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <(2)>;
 };
 
 &gmac1 {
        label = "wan";
        phy-handle = <&ethphy0>;
 
-       nvmem-cells = <&macaddr_uboot_1fc40>;
+       nvmem-cells = <&macaddr_uboot_1fc40 0>;
        nvmem-cell-names = "mac-address";
 };
 
index 92e8eab918c59b0d3a3df1e44a44668cbf5fa4a9..2394a343c2464e7550d3406118f19fa08a6ee752 100644 (file)
@@ -90,7 +90,9 @@
                                };
 
                                macaddr_factory_4: macaddr@4 {
+                                       compatible = "mac-base";
                                        reg = <0x4 0x6>;
+                                       #nvmem-cell-cells = <1>;
                                };
 
                                macaddr_factory_8004: macaddr@8004 {
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cells = <&macaddr_factory_4 3>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <(3)>;
 };
 
 &gmac1 {
        label = "wan";
        phy-handle = <&ethphy0>;
 
-       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cells = <&macaddr_factory_4 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <(1)>;
 };
 
 &mdio {
index 38b1c196a100a10f7a1177c521e4a85ef1600ae7..ec02679c23bc8d4e135492afb5781d25c6fc3ded 100644 (file)
@@ -83,7 +83,9 @@
                                #size-cells = <1>;
 
                                macaddr_factory_4: macaddr@4 {
+                                       compatible = "mac-base";
                                        reg = <0x4 0x6>;
+                                       #nvmem-cell-cells = <1>;
                                };
                        };
                };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cells = <&macaddr_factory_4 3>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <3>;
 };
 
 &gmac1 {
        label = "wan";
        phy-handle = <&ethphy0>;
 
-       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cells = <&macaddr_factory_4 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &mdio {
index 3874953e45203789f4ad9258b9910eca64966c1b..8e2d866b3b913b8cb564cc1c2d5e0d9b8abf9ef1 100644 (file)
                                        #size-cells = <1>;
 
                                        macaddr_factory_5: macaddr@5 {
+                                               compatible = "mac-base";
                                                reg = <0x5 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_5>;
+       nvmem-cells = <&macaddr_factory_5 0>;
        nvmem-cell-names = "mac-address";
 };
 
        label = "wan";
        phy-handle = <&ethphy4>;
 
-       nvmem-cells = <&macaddr_factory_5>;
+       nvmem-cells = <&macaddr_factory_5 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &mdio {
index b538805851db25091af89bb06def34de01a485e3..d663dc63b24e1cdb499fd4f733a8d7471dde7b7b 100644 (file)
@@ -82,7 +82,9 @@
                                        #size-cells = <1>;
 
                                        macaddr_config_8: macaddr@8 {
+                                               compatible = "mac-base";
                                                reg = <0x8 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
                mediatek,mtd-eeprom = <&radio 0x0>;
-               nvmem-cells = <&macaddr_config_8>;
+               nvmem-cells = <&macaddr_config_8 0>;
                nvmem-cell-names = "mac-address";
                mediatek,disable-radar-background;
        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_config_8>;
+       nvmem-cells = <&macaddr_config_8 0>;
        nvmem-cell-names = "mac-address";
 };
 
        label = "wan";
        phy-handle = <&ethphy0>;
 
-       nvmem-cells = <&macaddr_config_8>;
+       nvmem-cells = <&macaddr_config_8 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &mdio {
index 90639180781083aa1bf7338a5dc118c9cd769a34..0052040f36932132cb430e65c0a2fef4f3063622 100644 (file)
@@ -75,7 +75,9 @@
                                        };
 
                                        macaddr_factory_e000: macaddr@e000 {
+                                               compatible = "mac-base";
                                                reg = <0xe000 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
@@ -97,7 +99,7 @@
        mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
                ieee80211-freq-limit = <5000000 6000000>;
-               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000>;
+               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000 0>;
                nvmem-cell-names = "eeprom", "mac-address";
        };
 };
        mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
                ieee80211-freq-limit = <2400000 2500000>;
-               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000>;
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000 0>;
                nvmem-cell-names = "eeprom", "mac-address";
        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cells = <&macaddr_factory_e000 0>;
        nvmem-cell-names = "mac-address";
 };
 
        phy-mode = "rgmii-rxid";
        phy-handle = <&ethphy5>;
 
-       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cells = <&macaddr_factory_e000 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &mdio {
                        status = "okay";
                        label = "wan1";
 
-                       nvmem-cells = <&macaddr_factory_e000>;
+                       nvmem-cells = <&macaddr_factory_e000 1>;
                        nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
                };
        };
 };
index 3065970807ba9d56c59f60fa36c62592aa127384..43b021fa13ae816e32234241f29cec6f690c36e2 100644 (file)
@@ -96,7 +96,9 @@
                                        };
 
                                        macaddr_factory_4: macaddr@4 {
+                                               compatible = "mac-base";
                                                reg = <0x4 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cells = <&macaddr_factory_4 0>;
        nvmem-cell-names = "mac-address";
 };
 
                port@4 {
                        status = "okay";
                        label = "wan";
-                       nvmem-cells = <&macaddr_factory_4>;
+                       nvmem-cells = <&macaddr_factory_4 1>;
                        nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
                };
        };
 };
index 1589d2de4b8ebe1d8ce2e78c4a48d285c2f9800e..f5cffb4a2a42b2494a5c3206de6f274bbc46d240 100644 (file)
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cells = <&macaddr_factory_4 0>;
        nvmem-cell-names = "mac-address";
 };
 
        label = "wan";
        phy-handle = <&ethphy4>;
 
-       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cells = <&macaddr_factory_4 2>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <2>;
 };
 
 &mdio {
                                #size-cells = <1>;
 
                                macaddr_factory_4: macaddr@4 {
+                                       compatible = "mac-base";
                                        reg = <0x4 0x6>;
+                                       #nvmem-cell-cells = <1>;
                                };
                        };
                };
index 87fe42c7774e64915d80fb883431ab54d1ebc761..fd73bfcb3edad23fb96e2ed1b17ef645b641e451 100644 (file)
@@ -96,7 +96,7 @@
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cells = <&macaddr_factory_4 0>;
        nvmem-cell-names = "mac-address";
 };
 
        label = "wan";
        phy-handle = <&ethphy4>;
 
-       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cells = <&macaddr_factory_4 2>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <2>;
 };
 
 &mdio {
                                #size-cells = <1>;
 
                                macaddr_factory_4: macaddr@4 {
+                                       compatible = "mac-base";
                                        reg = <0x4 0x6>;
+                                       #nvmem-cell-cells = <1>;
                                };
                        };
                };
index 880a04710bd38cf19fc26ecf195e446e12968c66..239159996337e20195877670e3ff87ae063bdcdf 100644 (file)
                                        #size-cells = <1>;
 
                                        macaddr_bdinfo_9: macaddr@9 {
+                                               compatible = "mac-base";
                                                reg = <0x9 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_bdinfo_9>;
+       nvmem-cells = <&macaddr_bdinfo_9 0>;
        nvmem-cell-names = "mac-address";
 };
 
        label = "wan";
        phy-handle = <&ethphy4>;
 
-       nvmem-cells = <&macaddr_bdinfo_9>;
+       nvmem-cells = <&macaddr_bdinfo_9 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &mdio {
index b01a976c18691535556772dcc7bf776f3fd56d13..8a32a86e7bb045ce06e866a0a8fa30947a857783 100644 (file)
@@ -86,7 +86,9 @@
                                        };
 
                                        macaddr_factory_4: macaddr@4 {
+                                               compatible = "mac-base";
                                                reg = <0x4 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
                ieee80211-freq-limit = <5000000 6000000>;
-               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_4>;
+               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_4 1>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <1>;
        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cells = <&macaddr_factory_4 (-2)>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <(-2)>;
 };
 
 &gmac1 {
        label = "wan";
        phy-handle = <&ethphy4>;
 
-       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cells = <&macaddr_factory_4 (-1)>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <(-1)>;
 };
 
 &mdio {
index c476cf949573189cda6640186b616743078b8b7d..b722df5bbb82606240437ddd2b66283e70b38735 100644 (file)
@@ -9,22 +9,19 @@
 
 &pcie0 {
        wifi@0,0 {
-               nvmem-cells = <&macaddr_factory_21000>;
+               nvmem-cells = <&macaddr_factory_21000 3>;
                nvmem-cell-names = "mac-address";
-               mac-address-increment = <(3)>;
        };
 };
 
 &pcie1 {
        wifi@0,0 {
-               nvmem-cells = <&macaddr_factory_21000>;
+               nvmem-cells = <&macaddr_factory_21000 2>;
                nvmem-cell-names = "mac-address";
-               mac-address-increment = <(2)>;
        };
 };
 
 &gmac1 {
-       nvmem-cells = <&macaddr_factory_21000>;
+       nvmem-cells = <&macaddr_factory_21000 11>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <(11)>;
 };
index 67f70a3b60c5764553e2b9af2e2585f8a86ea577..36d576108d7fb595ee4b48785ca9397a96d6347c 100644 (file)
                                };
 
                                macaddr_factory_21000: macaddr@21000 {
+                                       compatible = "mac-base";
                                        reg = <0x21000 0x6>;
+                                       #nvmem-cell-cells = <1>;
                                };
                        };
                };
index 576273cc99a023bdde3458bc36961f17208c1da9..44b1077bc60abcba51153254dcc868c022f92675 100644 (file)
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cells = <&macaddr_factory_e000 0>;
        nvmem-cell-names = "mac-address";
 };
 
                                };
 
                                macaddr_factory_e000: macaddr@e000 {
+                                       compatible = "mac-base";
                                        reg = <0xe000 0x6>;
+                                       #nvmem-cell-cells = <1>;
                                };
                        };
                };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000>;
+               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000 1>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <1>;
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0 0 0 0 0>;
-               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000>;
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000 2>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <2>;
                ieee80211-freq-limit = <2400000 2500000>;
        };
 };
index 651466a3a4662469036ec72fdf8a295c248743e6..bea5998935f6bd6a907d4db5a693255513a3f49f 100644 (file)
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cells = <&macaddr_factory_e000 0>;
        nvmem-cell-names = "mac-address";
 };
 
                                };
 
                                macaddr_factory_e000: macaddr@e000 {
+                                       compatible = "mac-base";
                                        reg = <0xe000 0x6>;
+                                       #nvmem-cell-cells = <1>;
                                };
                        };
                };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000>;
+               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000 1>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <1>;
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0 0 0 0 0>;
-               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000>;
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000 2>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <2>;
                ieee80211-freq-limit = <2400000 2500000>;
        };
 };
index 6344f477e8e565e0be69524a3fa995a7286b6f0d..09862b8067a15f0aa1c3fe08db14cbf4c6a4bbe0 100644 (file)
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_1000>;
+       nvmem-cells = <&macaddr_factory_1000 0>;
        nvmem-cell-names = "mac-address";
 };
 
                                };
 
                                macaddr_factory_1000: macaddr@1000 {
+                                       compatible = "mac-base";
                                        reg = <0x1000 0x6>;
+                                       #nvmem-cell-cells = <1>;
                                };
                        };
                };
                reg = <0x0000 0 0 0 0>;
                ieee80211-freq-limit = <5000000 6000000>;
 
-               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_1000>;
-               nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <2>;
-       };
-};
-
-&pcie1 {
-       wlan_2g: wifi@0,0 {
-               compatible = "mediatek,mt76";
-               reg = <0x0000 0 0 0 0>;
-               ieee80211-freq-limit = <2400000 2500000>;
-
-               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_1000>;
+               nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_1000 2>;
                nvmem-cell-names = "eeprom", "mac-address";
        };
 };
                        status = "okay";
                        label = "wan";
 
-                       nvmem-cells = <&macaddr_factory_1000>;
+                       nvmem-cells = <&macaddr_factory_1000 1>;
                        nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
                };
        };
 };
index 39d7f0398fbbc8c256b30386fc685863ab367c40..60817edbbff7bb4c947443570330c7e1982962ec 100644 (file)
@@ -85,7 +85,9 @@
                                        };
 
                                        macaddr_factory_e006: macaddr@e006 {
+                                               compatible = "mac-base";
                                                reg = <0xe006 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cells = <&macaddr_factory_e006 0>;
        nvmem-cell-names = "mac-address";
 };
 
        label = "wan";
        phy-handle = <&ethphy4>;
 
-       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cells = <&macaddr_factory_e006 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &mdio {
index 6c983dd54a0b0a39eb79c2a9922bc7d614ec38da..4d8fa7f320d94aa023a91e3bebcdb31920a3ed47 100644 (file)
                                        };
 
                                        macaddr_factory_e006: macaddr@e006 {
+                                               compatible = "mac-base";
                                                reg = <0xe006 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cells = <&macaddr_factory_e006 0>;
        nvmem-cell-names = "mac-address";
 };
 
                port@4 {
                        status = "okay";
                        label = "wan";
-                       nvmem-cells = <&macaddr_factory_e006>;
+                       nvmem-cells = <&macaddr_factory_e006 1>;
                        nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
                };
        };
 };
index f4b8d171767ce965c56a0baa46cf2a45ffe73947..7b1e5d863b5c1c96d1a7d03e709beae2850cf13a 100644 (file)
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cells = <&macaddr_factory_4 0>;
        nvmem-cell-names = "mac-address";
 };
 
        label = "wan";
        phy-handle = <&ethphy0>;
 
-       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cells = <&macaddr_factory_4 (-2)>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <(-2)>;
 };
 
 &mdio {
                                        };
 
                                        macaddr_factory_4: macaddr@4 {
+                                               compatible = "mac-base";
                                                reg = <0x4 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
index 8edae7de875d56864539e70a52b3159fc2b9e2fe..dd6cc5d844b78395edb518fdc78b56b335af1e23 100644 (file)
@@ -81,7 +81,9 @@
                                        };
 
                                        macaddr_factory_e000: macaddr@e000 {
+                                               compatible = "mac-base";
                                                reg = <0xe000 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cells = <&macaddr_factory_e000 0>;
        nvmem-cell-names = "mac-address";
 };
 
        label = "wan";
        phy-handle = <&ethphy4>;
 
-       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cells = <&macaddr_factory_e000 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &mdio {
index 74b9a9541b145b77284307b12aa62d924757a9c7..1bc3f7e4f50de62efa483ef4d196f2bb33d72387 100644 (file)
                                        #size-cells = <1>;
 
                                        macaddr_config_8: macaddr@8 {
+                                               compatible = "mac-base";
                                                reg = <0x8 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
                mediatek,mtd-eeprom = <&radio 0x0>;
-               nvmem-cells = <&macaddr_config_8>;
+               nvmem-cells = <&macaddr_config_8 0>;
                nvmem-cell-names = "mac-address";
                mediatek,disable-radar-background;
        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_config_8>;
+       nvmem-cells = <&macaddr_config_8 0>;
        nvmem-cell-names = "mac-address";
 };
 
        label = "wan";
        phy-handle = <&ethphy4>;
 
-       nvmem-cells = <&macaddr_config_8>;
+       nvmem-cells = <&macaddr_config_8 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &mdio {
index a2c7d8e635c5fe261d0dc38b188f4b8b8ffe5dc0..522408b220c8090389fb54c5ae7fdf25b46e5d23 100644 (file)
                                        #size-cells = <1>;
 
                                        macaddr_config_8: macaddr@8 {
+                                               compatible = "mac-base";
                                                reg = <0x8 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
        mt76@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_8>;
+               nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_8 0>;
                nvmem-cell-names = "eeprom", "mac-address";
                ieee80211-freq-limit = <2400000 2500000>;
        };
        mt76@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_radio_8000>, <&macaddr_config_8>;
+               nvmem-cells = <&eeprom_radio_8000>, <&macaddr_config_8 (-1)>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <(-1)>;
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_config_8>;
+       nvmem-cells = <&macaddr_config_8 0>;
        nvmem-cell-names = "mac-address";
 };
 
        label = "wan";
        phy-handle = <&ethphy0>;
 
-       nvmem-cells = <&macaddr_config_8>;
+       nvmem-cells = <&macaddr_config_8 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &mdio {
index f8fa7487ce829997cfedef2b55f92b39f05754df..d3db8cd602cb76443e59b98bfc8e9281190dd2a8 100644 (file)
                                        #size-cells = <1>;
 
                                        macaddr_config_8: macaddr@8 {
+                                               compatible = "mac-base";
                                                reg = <0x8 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_8>;
+               nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_8 1>;
                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>;
-               nvmem-cells = <&eeprom_radio_8000>, <&macaddr_config_8>;
+               nvmem-cells = <&eeprom_radio_8000>, <&macaddr_config_8 2>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <2>;
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_config_8>;
+       nvmem-cells = <&macaddr_config_8 0>;
        nvmem-cell-names = "mac-address";
 };
 
index 64df8cf6b1f2262d33fce29ca58cfc433fc33a22..a91a18efc75808c1e26c8d9baa804fc6a86a5935 100644 (file)
@@ -92,7 +92,9 @@
                                        #size-cells = <1>;
 
                                        macaddr_info_8: macaddr@8 {
+                                               compatible = "mac-base";
                                                reg = <0x8 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 &pcie0 {
        wifi@0,0 {
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_radio_0>, <&macaddr_info_8>;
+               nvmem-cells = <&eeprom_radio_0>, <&macaddr_info_8 0>;
                nvmem-cell-names = "eeprom", "mac-address";
        };
 };
        wifi@0,0 {
                reg = <0x0000 0 0 0 0>;
                ieee80211-freq-limit = <5000000 6000000>;
-               nvmem-cells = <&eeprom_radio_8000>, <&macaddr_info_8>;
+               nvmem-cells = <&eeprom_radio_8000>, <&macaddr_info_8 1>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <1>;
        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cells = <&macaddr_info_8 0>;
        nvmem-cell-names = "mac-address";
 };
 
        label = "lan0";
        phy-handle = <&ethphy0>;
 
-       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cells = <&macaddr_info_8 0>;
        nvmem-cell-names = "mac-address";
 };
 
index f4bc79a165842e44d7548579b667643f30adf79a..6b73ffff24f182d094a89839ecfb2ad417941c49 100644 (file)
                                        #size-cells = <1>;
 
                                        macaddr_romfile_f100: romfile@f100 {
+                                               compatible = "mac-base";
                                                reg = <0xf100 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
        mt76@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_radio_0>, <&macaddr_romfile_f100>;
+               nvmem-cells = <&eeprom_radio_0>, <&macaddr_romfile_f100 0>;
                nvmem-cell-names = "eeprom", "mac-address";
                ieee80211-freq-limit = <2400000 2500000>;
        };
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
                ieee80211-freq-limit = <5000000 6000000>;
-               nvmem-cells = <&eeprom_radio_8000>, <&macaddr_romfile_f100>;
+               nvmem-cells = <&eeprom_radio_8000>, <&macaddr_romfile_f100 (-1)>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <(-1)>;
        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_romfile_f100>;
+       nvmem-cells = <&macaddr_romfile_f100 0>;
        nvmem-cell-names = "mac-address";
 };
 
        label = "wan";
        phy-handle = <&ethphy4>;
 
-       nvmem-cells = <&macaddr_romfile_f100>;
+       nvmem-cells = <&macaddr_romfile_f100 0>;
        nvmem-cell-names = "mac-address";
 };
 
index be1011d1da43c82ea0b574f8052328f27b5053b3..be23abf4c83edf7160cc97f7e06f0713a7d8320b 100644 (file)
                                        #size-cells = <1>;
 
                                        macaddr_config_10008: macaddr@10008 {
+                                               compatible = "mac-base";
                                                reg = <0x10008 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 &pcie0 {
        mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_10008>;
+               nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_10008 1>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <1>;
        };
 };
 
        mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
                ieee80211-freq-limit = <5000000 6000000>;
-               nvmem-cells = <&eeprom_radio_8000>, <&macaddr_config_10008>;
+               nvmem-cells = <&eeprom_radio_8000>, <&macaddr_config_10008 2>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <2>;
        };
 };
 
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_config_10008>;
+       nvmem-cells = <&macaddr_config_10008 0>;
        nvmem-cell-names = "mac-address";
 };
 
index 692aed5bfc3e172c6367c6fb7c564180ac578df9..7dcd5e553cd79caac0107c18ad33643dc2085fb2 100644 (file)
                                        #size-cells = <1>;
 
                                        macaddr_config_10008: macaddr@10008 {
+                                               compatible = "mac-base";
                                                reg = <0x10008 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_10008>;
+               nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_10008 1>;
                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>;
-               nvmem-cells = <&eeprom_radio_8000>, <&macaddr_config_10008>;
+               nvmem-cells = <&eeprom_radio_8000>, <&macaddr_config_10008 2>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <2>;
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_config_10008>;
+       nvmem-cells = <&macaddr_config_10008 0>;
        nvmem-cell-names = "mac-address";
 };
 
index 650f741eff7f58b1277e82305957585b6014df98..3784a4f3c952f97890b611d98e15a868628405d7 100644 (file)
                                        #size-cells = <1>;
 
                                        macaddr_config_10008: macaddr@10008 {
+                                               compatible = "mac-base";
                                                reg = <0x10008 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_10008>;
+               nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_10008 1>;
                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>;
-               nvmem-cells = <&eeprom_radio_8000>, <&macaddr_config_10008>;
+               nvmem-cells = <&eeprom_radio_8000>, <&macaddr_config_10008 2>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <2>;
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_config_10008>;
+       nvmem-cells = <&macaddr_config_10008 0>;
        nvmem-cell-names = "mac-address";
 };
 
index 3c133dd0168b9a262a91b845687faf380c6b49da..1e0fd2023970ca9fc8c01987ba10b21b5670090b 100644 (file)
                                        #size-cells = <1>;
 
                                        macaddr_config_2008: macaddr@2008 {
+                                               compatible = "mac-base";
                                                reg = <0x2008 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_2008>;
+               nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_2008 0>;
                nvmem-cell-names = "eeprom", "mac-address";
                ieee80211-freq-limit = <2400000 2500000>;
        };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               nvmem-cells = <&eeprom_radio_8000>, <&macaddr_config_2008>;
+               nvmem-cells = <&eeprom_radio_8000>, <&macaddr_config_2008 1>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <1>;
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_config_2008>;
+       nvmem-cells = <&macaddr_config_2008 0>;
        nvmem-cell-names = "mac-address";
 };
 
index 488a40db5c3d2e23f8cc544f2ee0b8759ab8ded7..cd19893e1451dff952b153bb1b5816b7e5e726ce 100644 (file)
@@ -67,7 +67,9 @@
                                        };
 
                                        macaddr_eeprom_6: macaddr@6 {
+                                               compatible = "mac-base";
                                                reg = <0x6 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 
        mediatek,mtd-eeprom = <&factory 0x20000>;
 
-       nvmem-cells = <&macaddr_eeprom_6>;
-       nvmem-cell-names = "mac-address";
-
        /* This is a workaround.
         *
         * Ubiquiti uses a +2 offset in the first octet relative
         * mac80211 increases the first octet by two for each VAP, leading
         * to conflicting MAC addresses for subsequent interfaces.
         */
-       mac-address-increment = <1>;
+       nvmem-cells = <&macaddr_eeprom_6 1>;
+       nvmem-cell-names = "mac-address";
 
        ieee80211-freq-limit = <5000000 6000000>;
 
index f9cdf4433c602c57d42d8b0a1a460e61e058b2ff..36df3ef883dcc898dfd22bcf434a86fd33fa58bb 100644 (file)
@@ -74,7 +74,9 @@
                                        #size-cells = <1>;
 
                                        macaddr_eeprom_0: macaddr@0 {
+                                               compatible = "mac-base";
                                                reg = <0x0 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_eeprom_0>;
+       nvmem-cells = <&macaddr_eeprom_0 0>;
        nvmem-cell-names = "mac-address";
 };
 
                mediatek,mtd-eeprom = <&factory 0x0>;
                // On newer devices there is a MediaTek MAC in the above
                // device EEPROM, so override it with a calculated one.
-               nvmem-cells = <&macaddr_eeprom_0>;
+               nvmem-cells = <&macaddr_eeprom_0 1>;
                nvmem-cell-names = "mac-address";
-               mac-address-increment = <1>;
        };
 };
 
                mediatek,mtd-eeprom = <&factory 0x8000>;
                // On newer devices there is a MediaTek MAC in the above
                // device EEPROM, so override it with a calculated one.
-               nvmem-cells = <&macaddr_eeprom_0>;
+               nvmem-cells = <&macaddr_eeprom_0 2>;
                nvmem-cell-names = "mac-address";
-               mac-address-increment = <2>;
        };
 };
 
index 6c0e2965aa0d107d5d7f40551e8524741384a5ad..4ffe9881536315ccaa081a2196ff269a6de6fe20 100644 (file)
         */
 };
 
-&wlan_2g {
-       mac-address-increment = <1>;
+&pcie1 {
+       wlan_2g: wifi@0,0 {
+               compatible = "mediatek,mt76";
+               reg = <0x0000 0 0 0 0>;
+               ieee80211-freq-limit = <2400000 2500000>;
+
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_1000 1>;
+               nvmem-cell-names = "eeprom", "mac-address";
+       };
 };
index a1eca2807e7006f71e52acdd3ce3c3a7db84d3a5..7bb90e542ec2308b60f7e74fdd4b5570f425d54d 100644 (file)
@@ -77,7 +77,9 @@
                                        #size-cells = <1>;
 
                                        macaddr_factory_4: macaddr@4 {
+                                               compatible = "mac-base";
                                                reg = <0x4 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
@@ -96,7 +98,7 @@
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cells = <&macaddr_factory_4 0>;
        nvmem-cell-names = "mac-address";
 };
 
        label = "wan";
        phy-handle = <&ethphy4>;
 
-       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cells = <&macaddr_factory_4 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &mdio {
index ac638ad92944481e0b6e6feb0e2bd10f27300adc..147713ddce19cf97e047c63d5bf0aa2a348ba393 100644 (file)
                                        };
 
                                        macaddr_factory_e000: macaddr@e000 {
+                                               compatible = "mac-base";
                                                reg = <0xe000 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cells = <&macaddr_factory_e000 0>;
        nvmem-cell-names = "mac-address";
 };
 
                port@4 {
                        status = "okay";
                        label = "wan";
-                       nvmem-cells = <&macaddr_factory_e000>;
+                       nvmem-cells = <&macaddr_factory_e000 1>;
                        nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
                };
        };
 };
index b153cae918b33d4abf38dcc8594dec06f2c0abc7..bbd546f300994f09b6bce5c421100f6bd4d390d4 100644 (file)
                                        #size-cells = <1>;
 
                                        macaddr_factory_e000: macaddr@e000 {
+                                               compatible = "mac-base";
                                                reg = <0xe000 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cells = <&macaddr_factory_e000 0>;
        nvmem-cell-names = "mac-address";
 };
 
        label = "wan";
        phy-handle = <&ethphy0>;
 
-       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cells = <&macaddr_factory_e000 1>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &mdio {
index 6423b69ebdab22e340280117f939bd58ced5852a..3756baa14efe01df54c63c122c6095b8f2d8bfe3 100644 (file)
@@ -90,7 +90,9 @@
                                        };
 
                                        macaddr_factory_e000: macaddr@e000 {
+                                               compatible = "mac-base";
                                                reg = <0xe000 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cells = <&macaddr_factory_e000 0>;
        nvmem-cell-names = "mac-address";
 };
 
                port@4 {
                        status = "okay";
                        label = "wan";
-                       nvmem-cells = <&macaddr_factory_e000>;
+                       nvmem-cells = <&macaddr_factory_e000 1>;
                        nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
                };
        };
 };
index 5c21352cd9e6fcd3ba1653ffbe5365fad01a36c4..87ed1c712970588c48ccab16fafe4a96a2451bd3 100644 (file)
@@ -90,7 +90,9 @@
                                        };
 
                                        macaddr_factory_e000: macaddr@e000 {
+                                               compatible = "mac-base";
                                                reg = <0xe000 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
                                };
                        };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cells = <&macaddr_factory_e000 0>;
        nvmem-cell-names = "mac-address";
 };
 
                port@4 {
                        status = "okay";
                        label = "wan";
-                       nvmem-cells = <&macaddr_factory_e000>;
+                       nvmem-cells = <&macaddr_factory_e000 1>;
                        nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
                };
        };
 };
index 4333ece42e75b5adc2a096721c74959e878e870d..abbb61d5341880efb5ce8715b3c033b49d55bb74 100644 (file)
                                };
 
                                macaddr_factory_fe6e: macaddr@fe6e {
+                                       compatible = "mac-base";
                                        reg = <0xfe6e 0x6>;
+                                       #nvmem-cell-cells = <1>;
                                };
                        };
                };
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_fe6e>;
+       nvmem-cells = <&macaddr_factory_fe6e 0>;
        nvmem-cell-names = "mac-address";
 };
 
                compatible = "pci14c3,7615";
                reg = <0x0000 0 0 0 0>;
                mediatek,firmware-eeprom = "mt7615e_eeprom.bin";
-               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_fe6e>;
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_fe6e 1>;
                nvmem-cell-names = "eeprom", "mac-address";
-               mac-address-increment = <(1)>;
        };
 
 };