diff --git a/target/linux/ramips/dts/mt7621_adslr_g7.dts b/target/linux/ramips/dts/mt7621_adslr_g7.dts index f797393f043814..ef3a64e031a23b 100644 --- a/target/linux/ramips/dts/mt7621_adslr_g7.dts +++ b/target/linux/ramips/dts/mt7621_adslr_g7.dts @@ -82,7 +82,9 @@ }; macaddr_factory_e00c: macaddr@e00c { + compatible = "mac-base"; reg = <0xe00c 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -121,7 +123,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_e00c>; + nvmem-cells = <&macaddr_factory_e00c 0>; nvmem-cell-names = "mac-address"; }; @@ -130,9 +132,8 @@ label = "wan"; phy-handle = <ðphy4>; - nvmem-cells = <&macaddr_factory_e00c>; + nvmem-cells = <&macaddr_factory_e00c 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts index a846e5d8d5ddff..d63ae33311fb96 100644 --- a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts +++ b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts @@ -89,7 +89,9 @@ }; macaddr_factory_e000: macaddr@e000 { + compatible = "mac-base"; reg = <0xe000 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -138,7 +140,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_e000>; + nvmem-cells = <&macaddr_factory_e000 0>; nvmem-cell-names = "mac-address"; }; @@ -147,9 +149,8 @@ label = "wan"; phy-handle = <ðphy4>; - nvmem-cells = <&macaddr_factory_e000>; + nvmem-cells = <&macaddr_factory_e000 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts b/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts index 5e57842d6812db..2d4bc016c1dd95 100644 --- a/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts +++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts @@ -7,22 +7,6 @@ model = "AsiaRF AP7621-001"; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - - 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 { diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts b/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts index dabc1a3bd34018..f6914e43599c28 100644 --- a/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts +++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts @@ -7,22 +7,6 @@ model = "AsiaRF AP7621-NV1"; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy0>; - - 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 { diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi b/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi index 658164fe08bece..acb2c81a0d8858 100644 --- a/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi +++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi @@ -85,7 +85,9 @@ #size-cells = <1>; macaddr_factory_e000: macaddr@e000 { + compatible = "mac-base"; reg = <0xe000 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -109,8 +111,23 @@ 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 = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e000 1>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts b/target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts index 24fb7577815448..f2a99a63a89db7 100644 --- a/target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts +++ b/target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts @@ -113,7 +113,9 @@ }; macaddr_factory_21000: macaddr@21000 { + compatible = "mac-base"; reg = <0x21000 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -187,9 +189,8 @@ 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)>; }; }; @@ -199,14 +200,13 @@ 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"; }; @@ -215,9 +215,8 @@ label = "wan"; phy-handle = <ðphy0>; - nvmem-cells = <&macaddr_factory_21000>; + nvmem-cells = <&macaddr_factory_21000 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(1)>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_beeline_smartbox-pro.dts b/target/linux/ramips/dts/mt7621_beeline_smartbox-pro.dts index e3e248d48f960e..e2c0165e6bb3a7 100644 --- a/target/linux/ramips/dts/mt7621_beeline_smartbox-pro.dts +++ b/target/linux/ramips/dts/mt7621_beeline_smartbox-pro.dts @@ -116,3 +116,14 @@ * 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"; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo-plus.dts b/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo-plus.dts index 2a1f2758158c84..00f4957c574d2b 100644 --- a/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo-plus.dts +++ b/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo-plus.dts @@ -119,7 +119,9 @@ }; macaddr_factory_21000: macaddr@21000 { + compatible = "mac-base"; reg = <0x21000 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -180,9 +182,8 @@ 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)>; }; }; @@ -192,14 +193,13 @@ 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"; }; @@ -208,9 +208,8 @@ label = "wan"; phy-handle = <ðphy0>; - nvmem-cells = <&macaddr_factory_21000>; + nvmem-cells = <&macaddr_factory_21000 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(1)>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo.dts b/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo.dts index df80f49e97ea37..f9b53ae0b368fa 100644 --- a/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo.dts +++ b/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo.dts @@ -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)>; }; diff --git a/target/linux/ramips/dts/mt7621_bolt_arion.dts b/target/linux/ramips/dts/mt7621_bolt_arion.dts index 354c1c5314572b..83855f9dc898bf 100644 --- a/target/linux/ramips/dts/mt7621_bolt_arion.dts +++ b/target/linux/ramips/dts/mt7621_bolt_arion.dts @@ -118,7 +118,9 @@ }; macaddr_factory_28: macaddr@28 { + compatible = "mac-base"; reg = <0x28 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -157,9 +159,8 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_28>; + nvmem-cells = <&macaddr_factory_28 3>; nvmem-cell-names = "mac-address"; - mac-address-increment = <3>; }; &switch0 { @@ -172,7 +173,7 @@ wan: port@1 { status = "okay"; label = "wan"; - nvmem-cells = <&macaddr_factory_28>; + nvmem-cells = <&macaddr_factory_28 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts index 81933ba21d8123..b4ba1519d3df37 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts @@ -149,7 +149,9 @@ }; macaddr_factory_4: macaddr@4 { + compatible = "mac-base"; reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -182,9 +184,8 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_4>; + nvmem-cells = <&macaddr_factory_4 (-1)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-1)>; }; &gmac1 { @@ -192,9 +193,8 @@ label = "wan"; phy-handle = <ðphy0>; - nvmem-cells = <&macaddr_factory_4>; + nvmem-cells = <&macaddr_factory_4 (-1)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-1)>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts b/target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts index 106b16573b39fe..ac0c19c0228607 100644 --- a/target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts +++ b/target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts @@ -97,7 +97,9 @@ #size-cells = <1>; macaddr_factory_e000: macaddr@e000 { + compatible = "mac-base"; reg = <0xe000 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -112,7 +114,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_e000>; + nvmem-cells = <&macaddr_factory_e000 0>; nvmem-cell-names = "mac-address"; }; @@ -121,9 +123,8 @@ 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 { diff --git a/target/linux/ramips/dts/mt7621_cudy_m1800.dts b/target/linux/ramips/dts/mt7621_cudy_m1800.dts index 759abe7ba586ef..29d6f9e41a98f5 100644 --- a/target/linux/ramips/dts/mt7621_cudy_m1800.dts +++ b/target/linux/ramips/dts/mt7621_cudy_m1800.dts @@ -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 = <ðphy4>; - nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cells = <&macaddr_bdinfo_de00 0>; nvmem-cell-names = "mac-address"; }; @@ -154,7 +153,9 @@ #size-cells = <1>; macaddr_bdinfo_de00: macaddr@de00 { + compatible = "mac-base"; reg = <0xde00 0x6>; + #nvmem-cell-cells = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts b/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts index ab9f7c6507193f..e87209fbb1d866 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts +++ b/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts @@ -133,7 +133,9 @@ #size-cells = <1>; macaddr_bdinfo_de00: macaddr@de00 { + compatible = "mac-base"; reg = <0xde00 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -149,7 +151,7 @@ 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>; @@ -163,9 +165,8 @@ 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 { @@ -176,7 +177,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cells = <&macaddr_bdinfo_de00 0>; nvmem-cell-names = "mac-address"; }; @@ -185,9 +186,8 @@ label = "wan"; phy-handle = <ðphy4>; - nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cells = <&macaddr_bdinfo_de00 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_cudy_wr2100.dts b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts index 64beabea939247..fc38e27ac1857b 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr2100.dts +++ b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts @@ -78,7 +78,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cells = <&macaddr_bdinfo_de00 0>; nvmem-cell-names = "mac-address"; }; @@ -180,7 +180,9 @@ #size-cells = <1>; macaddr_bdinfo_de00: macaddr@de00 { + compatible = "mac-base"; reg = <0xde00 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -200,9 +202,8 @@ label = "wan"; phy-handle = <ðphy4>; - nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cells = <&macaddr_bdinfo_de00 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_cudy_x6-v1.dts b/target/linux/ramips/dts/mt7621_cudy_x6-v1.dts index 3ba72d5f971f15..940a0598c10f1e 100644 --- a/target/linux/ramips/dts/mt7621_cudy_x6-v1.dts +++ b/target/linux/ramips/dts/mt7621_cudy_x6-v1.dts @@ -37,24 +37,25 @@ #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"; }; diff --git a/target/linux/ramips/dts/mt7621_cudy_x6-v2.dts b/target/linux/ramips/dts/mt7621_cudy_x6-v2.dts index f4d50d42e72c71..70e6a845a4bbda 100644 --- a/target/linux/ramips/dts/mt7621_cudy_x6-v2.dts +++ b/target/linux/ramips/dts/mt7621_cudy_x6-v2.dts @@ -37,24 +37,25 @@ #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"; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts index d352d27b76c50a..e0a714c9dc6461 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts @@ -15,15 +15,3 @@ 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>; -}; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts index 127a9a3417f3ad..d4b8069a333089 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts @@ -22,15 +22,3 @@ 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>; -}; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts index 02fd35d60e92c4..a4590cb35fc5a7 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts @@ -22,15 +22,3 @@ 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>; -}; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts index 23995079fdb5f2..1cca6f6b57851c 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts @@ -129,7 +129,9 @@ }; macaddr_factory_e000: macaddr@e000 { + compatible = "mac-base"; reg = <0xe000 0x6>; + #nvmem-cell-cells = <1>; }; macaddr_factory_e006: macaddr@e006 { @@ -186,9 +188,8 @@ 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>; }; }; @@ -197,14 +198,13 @@ 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"; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts index 290638f7355f1f..bce0e6996befa2 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts @@ -97,15 +97,14 @@ /* 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 { @@ -113,9 +112,8 @@ label = "wan"; phy-handle = <ðphy4>; - nvmem-cells = <&macaddr_factory_4>; + nvmem-cells = <&macaddr_factory_4 (-2)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-2)>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi index 9d770dda2f708a..6eb3f3cdd9bf7d 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi @@ -94,7 +94,9 @@ }; macaddr_factory_e000: macaddr@e000 { + compatible = "mac-base"; reg = <0xe000 0x6>; + #nvmem-cell-cells = <1>; }; macaddr_factory_e006: macaddr@e006 { @@ -149,7 +151,7 @@ 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>; @@ -163,7 +165,7 @@ 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>; @@ -174,7 +176,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_e000>; + nvmem-cells = <&macaddr_factory_e000 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_flash-16m-r1.dtsi b/target/linux/ramips/dts/mt7621_dlink_flash-16m-r1.dtsi index 93380e306747d3..bccd19b12d8e4c 100644 --- a/target/linux/ramips/dts/mt7621_dlink_flash-16m-r1.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_flash-16m-r1.dtsi @@ -44,7 +44,9 @@ }; macaddr_factory_4: macaddr@4 { + compatible = "mac-base"; reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; }; macaddr_factory_e000: macaddr@e000 { diff --git a/target/linux/ramips/dts/mt7621_dual-q_h721.dts b/target/linux/ramips/dts/mt7621_dual-q_h721.dts index cafda8e1ecc6bc..2c35a8839cb637 100644 --- a/target/linux/ramips/dts/mt7621_dual-q_h721.dts +++ b/target/linux/ramips/dts/mt7621_dual-q_h721.dts @@ -128,7 +128,9 @@ #size-cells = <1>; macaddr_factory_e000: macaddr@e000 { + compatible = "mac-base"; reg = <0xe000 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -176,9 +178,8 @@ status = "okay"; label = "wan"; - nvmem-cells = <&macaddr_factory_e000>; + nvmem-cells = <&macaddr_factory_e000 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; }; }; @@ -188,7 +189,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_e000>; + nvmem-cells = <&macaddr_factory_e000 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts index b280790d64f06c..9c0353ae28b737 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts @@ -67,7 +67,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_e000>; + nvmem-cells = <&macaddr_factory_e000 0>; nvmem-cell-names = "mac-address"; }; @@ -150,7 +150,9 @@ }; macaddr_factory_e000: macaddr@e000 { + compatible = "mac-base"; reg = <0xe000 0x6>; + #nvmem-cell-cells = <1>; }; macaddr_factory_e006: macaddr@e006 { @@ -195,9 +197,8 @@ 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>; }; }; diff --git a/target/linux/ramips/dts/mt7621_etisalat_s3.dts b/target/linux/ramips/dts/mt7621_etisalat_s3.dts index 90309dad0a12a1..64e21bb704a1db 100644 --- a/target/linux/ramips/dts/mt7621_etisalat_s3.dts +++ b/target/linux/ramips/dts/mt7621_etisalat_s3.dts @@ -119,7 +119,9 @@ }; macaddr_factory_21000: macaddr@21000 { + compatible = "mac-base"; reg = <0x21000 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -180,9 +182,8 @@ 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)>; }; }; @@ -192,14 +193,13 @@ 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"; }; @@ -208,9 +208,8 @@ label = "wan"; phy-handle = <ðphy0>; - nvmem-cells = <&macaddr_factory_21000>; + nvmem-cells = <&macaddr_factory_21000 11>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(11)>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts index a9d9da872e3b95..c2c2acac9f2841 100644 --- a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts +++ b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts @@ -88,7 +88,9 @@ }; macaddr_factory_e000: macaddr@e000 { + compatible = "mac-base"; reg = <0xe000 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -129,7 +131,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_e000>; + nvmem-cells = <&macaddr_factory_e000 0>; nvmem-cell-names = "mac-address"; }; @@ -158,9 +160,8 @@ 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>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts index 778b2f07981b01..d224fd388d7fc7 100644 --- a/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts +++ b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts @@ -86,7 +86,9 @@ }; macaddr_factory_e000: macaddr@e000 { + compatible = "mac-base"; reg = <0xe000 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -127,7 +129,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_e000>; + nvmem-cells = <&macaddr_factory_e000 0>; nvmem-cell-names = "mac-address"; }; @@ -136,9 +138,8 @@ label = "wan"; phy-handle = <ðphy4>; - nvmem-cells = <&macaddr_factory_e000>; + nvmem-cells = <&macaddr_factory_e000 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts index 94a9b1c092b6a6..891fe7c730f26a 100644 --- a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts +++ b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts @@ -102,7 +102,9 @@ }; macaddr_factory_4000: macaddr@4000 { + compatible = "mac-base"; reg = <0x4000 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -130,9 +132,8 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_4000>; + nvmem-cells = <&macaddr_factory_4000 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &gmac1 { @@ -140,7 +141,7 @@ label = "wan"; phy-handle = <ðphy4>; - nvmem-cells = <&macaddr_factory_4000>; + nvmem-cells = <&macaddr_factory_4000 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi b/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi index 6d9608d18f8eec..6549abaec95697 100644 --- a/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi +++ b/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi @@ -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 = <ðphy4>; - nvmem-cells = <&macaddr_factory_8004>; + nvmem-cells = <&macaddr_factory_8004 (-3)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-3)>; }; &mdio { @@ -117,7 +116,9 @@ }; macaddr_factory_8004: macaddr@8004 { + compatible = "mac-base"; reg = <0x8004 0x6>; + #nvmem-cell-cells = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_hanyang_hyc-g920.dts b/target/linux/ramips/dts/mt7621_hanyang_hyc-g920.dts index 7bec688f866fe5..5737c0ce68f126 100644 --- a/target/linux/ramips/dts/mt7621_hanyang_hyc-g920.dts +++ b/target/linux/ramips/dts/mt7621_hanyang_hyc-g920.dts @@ -93,7 +93,9 @@ }; macaddr_factory_4: macaddr@4 { + compatible = "mac-base"; reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; }; macaddr_factory_8004: macaddr@8004 { @@ -164,7 +166,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_4>; + nvmem-cells = <&macaddr_factory_4 0>; nvmem-cell-names = "mac-address"; }; @@ -173,9 +175,8 @@ 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 { diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts index b93102163fbfeb..b46ba87f39407d 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts @@ -103,7 +103,9 @@ }; macaddr_factory_4: macaddr@4 { + compatible = "mac-base"; reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -165,9 +167,8 @@ label = "wan"; phy-handle = <ðphy0>; - nvmem-cells = <&macaddr_factory_4>; + nvmem-cells = <&macaddr_factory_4 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts index 5b9d0d59b214f7..6bd5e733f4a6fd 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts @@ -103,7 +103,9 @@ }; macaddr_factory_4: macaddr@4 { + compatible = "mac-base"; reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -142,7 +144,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_4>; + nvmem-cells = <&macaddr_factory_4 0>; nvmem-cell-names = "mac-address"; }; @@ -151,9 +153,8 @@ label = "wan"; phy-handle = <ðphy0>; - nvmem-cells = <&macaddr_factory_4>; + nvmem-cells = <&macaddr_factory_4 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts b/target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts index 6b779021367288..05346a10d4a7d5 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts @@ -79,7 +79,9 @@ #size-cells = <1>; macaddr_uboot_1fc40: macaddr@1fc40 { + compatible = "mac-base"; reg = <0x1fc40 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -116,9 +118,8 @@ }; &gmac0 { - nvmem-cells = <&macaddr_uboot_1fc40>; + nvmem-cells = <&macaddr_uboot_1fc40 2>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(2)>; }; &gmac1 { @@ -126,7 +127,7 @@ label = "wan"; phy-handle = <ðphy0>; - nvmem-cells = <&macaddr_uboot_1fc40>; + nvmem-cells = <&macaddr_uboot_1fc40 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_iptime_a3004t.dts b/target/linux/ramips/dts/mt7621_iptime_a3004t.dts index 92e8eab918c59b..2394a343c2464e 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a3004t.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a3004t.dts @@ -90,7 +90,9 @@ }; macaddr_factory_4: macaddr@4 { + compatible = "mac-base"; reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; }; macaddr_factory_8004: macaddr@8004 { @@ -121,9 +123,8 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_4>; + nvmem-cells = <&macaddr_factory_4 3>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(3)>; }; &gmac1 { @@ -131,9 +132,8 @@ label = "wan"; phy-handle = <ðphy0>; - nvmem-cells = <&macaddr_factory_4>; + nvmem-cells = <&macaddr_factory_4 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(1)>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts b/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts index 38b1c196a100a1..ec02679c23bc8d 100644 --- a/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts +++ b/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts @@ -83,7 +83,9 @@ #size-cells = <1>; macaddr_factory_4: macaddr@4 { + compatible = "mac-base"; reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -117,9 +119,8 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_4>; + nvmem-cells = <&macaddr_factory_4 3>; nvmem-cell-names = "mac-address"; - mac-address-increment = <3>; }; &gmac1 { @@ -127,9 +128,8 @@ label = "wan"; phy-handle = <ðphy0>; - nvmem-cells = <&macaddr_factory_4>; + nvmem-cells = <&macaddr_factory_4 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts index 3874953e452037..8e2d866b3b913b 100644 --- a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts +++ b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts @@ -104,7 +104,9 @@ #size-cells = <1>; macaddr_factory_5: macaddr@5 { + compatible = "mac-base"; reg = <0x5 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -123,7 +125,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_5>; + nvmem-cells = <&macaddr_factory_5 0>; nvmem-cell-names = "mac-address"; }; @@ -132,9 +134,8 @@ label = "wan"; phy-handle = <ðphy4>; - nvmem-cells = <&macaddr_factory_5>; + nvmem-cells = <&macaddr_factory_5 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts b/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts index b538805851db25..d663dc63b24e1c 100644 --- a/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts +++ b/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts @@ -82,7 +82,9 @@ #size-cells = <1>; macaddr_config_8: macaddr@8 { + compatible = "mac-base"; reg = <0x8 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -111,14 +113,14 @@ 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"; }; @@ -127,9 +129,8 @@ label = "wan"; phy-handle = <ðphy0>; - nvmem-cells = <&macaddr_config_8>; + nvmem-cells = <&macaddr_config_8 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_mqmaker_witi.dts b/target/linux/ramips/dts/mt7621_mqmaker_witi.dts index 90639180781083..0052040f369321 100644 --- a/target/linux/ramips/dts/mt7621_mqmaker_witi.dts +++ b/target/linux/ramips/dts/mt7621_mqmaker_witi.dts @@ -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"; }; }; @@ -106,13 +108,13 @@ 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"; }; @@ -122,9 +124,8 @@ phy-mode = "rgmii-rxid"; phy-handle = <ðphy5>; - nvmem-cells = <&macaddr_factory_e000>; + nvmem-cells = <&macaddr_factory_e000 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &mdio { @@ -159,9 +160,8 @@ status = "okay"; label = "wan1"; - nvmem-cells = <&macaddr_factory_e000>; + nvmem-cells = <&macaddr_factory_e000 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts index 3065970807ba9d..43b021fa13ae81 100644 --- a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts +++ b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts @@ -96,7 +96,9 @@ }; macaddr_factory_4: macaddr@4 { + compatible = "mac-base"; reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -121,7 +123,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_4>; + nvmem-cells = <&macaddr_factory_4 0>; nvmem-cell-names = "mac-address"; }; @@ -150,9 +152,8 @@ 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>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi index 1589d2de4b8ebe..f5cffb4a2a42b2 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi @@ -162,7 +162,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_4>; + nvmem-cells = <&macaddr_factory_4 0>; nvmem-cell-names = "mac-address"; }; @@ -171,9 +171,8 @@ label = "wan"; phy-handle = <ðphy4>; - nvmem-cells = <&macaddr_factory_4>; + nvmem-cells = <&macaddr_factory_4 2>; nvmem-cell-names = "mac-address"; - mac-address-increment = <2>; }; &mdio { @@ -350,7 +349,9 @@ #size-cells = <1>; macaddr_factory_4: macaddr@4 { + compatible = "mac-base"; reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi index 87fe42c7774e64..fd73bfcb3edad2 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi @@ -96,7 +96,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_4>; + nvmem-cells = <&macaddr_factory_4 0>; nvmem-cell-names = "mac-address"; }; @@ -105,9 +105,8 @@ label = "wan"; phy-handle = <ðphy4>; - nvmem-cells = <&macaddr_factory_4>; + nvmem-cells = <&macaddr_factory_4 2>; nvmem-cell-names = "mac-address"; - mac-address-increment = <2>; }; &mdio { @@ -277,7 +276,9 @@ #size-cells = <1>; macaddr_factory_4: macaddr@4 { + compatible = "mac-base"; reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_oraybox_x3a.dts b/target/linux/ramips/dts/mt7621_oraybox_x3a.dts index 880a04710bd38c..239159996337e2 100644 --- a/target/linux/ramips/dts/mt7621_oraybox_x3a.dts +++ b/target/linux/ramips/dts/mt7621_oraybox_x3a.dts @@ -109,7 +109,9 @@ #size-cells = <1>; macaddr_bdinfo_9: macaddr@9 { + compatible = "mac-base"; reg = <0x9 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -137,7 +139,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_bdinfo_9>; + nvmem-cells = <&macaddr_bdinfo_9 0>; nvmem-cell-names = "mac-address"; }; @@ -146,9 +148,8 @@ label = "wan"; phy-handle = <ðphy4>; - nvmem-cells = <&macaddr_bdinfo_9>; + nvmem-cells = <&macaddr_bdinfo_9 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_renkforce_ws-wn530hp3-a.dts b/target/linux/ramips/dts/mt7621_renkforce_ws-wn530hp3-a.dts index b01a976c186915..8a32a86e7bb045 100644 --- a/target/linux/ramips/dts/mt7621_renkforce_ws-wn530hp3-a.dts +++ b/target/linux/ramips/dts/mt7621_renkforce_ws-wn530hp3-a.dts @@ -86,7 +86,9 @@ }; macaddr_factory_4: macaddr@4 { + compatible = "mac-base"; reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -119,16 +121,14 @@ 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 { @@ -136,9 +136,8 @@ label = "wan"; phy-handle = <ðphy4>; - nvmem-cells = <&macaddr_factory_4>; + nvmem-cells = <&macaddr_factory_4 (-1)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-1)>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_rostelecom_rt-sf-1.dts b/target/linux/ramips/dts/mt7621_rostelecom_rt-sf-1.dts index c476cf94957318..b722df5bbb8260 100644 --- a/target/linux/ramips/dts/mt7621_rostelecom_rt-sf-1.dts +++ b/target/linux/ramips/dts/mt7621_rostelecom_rt-sf-1.dts @@ -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)>; }; diff --git a/target/linux/ramips/dts/mt7621_sercomm_dxx_nand_256m.dtsi b/target/linux/ramips/dts/mt7621_sercomm_dxx_nand_256m.dtsi index 67f70a3b60c576..36d576108d7fb5 100644 --- a/target/linux/ramips/dts/mt7621_sercomm_dxx_nand_256m.dtsi +++ b/target/linux/ramips/dts/mt7621_sercomm_dxx_nand_256m.dtsi @@ -117,7 +117,9 @@ }; macaddr_factory_21000: macaddr@21000 { + compatible = "mac-base"; reg = <0x21000 0x6>; + #nvmem-cell-cells = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_sercomm_na502.dts b/target/linux/ramips/dts/mt7621_sercomm_na502.dts index 576273cc99a023..44b1077bc60abc 100644 --- a/target/linux/ramips/dts/mt7621_sercomm_na502.dts +++ b/target/linux/ramips/dts/mt7621_sercomm_na502.dts @@ -100,7 +100,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_e000>; + nvmem-cells = <&macaddr_factory_e000 0>; nvmem-cell-names = "mac-address"; }; @@ -142,7 +142,9 @@ }; macaddr_factory_e000: macaddr@e000 { + compatible = "mac-base"; reg = <0xe000 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -192,9 +194,8 @@ 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>; }; }; @@ -203,9 +204,8 @@ 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>; }; }; diff --git a/target/linux/ramips/dts/mt7621_sercomm_na502s.dts b/target/linux/ramips/dts/mt7621_sercomm_na502s.dts index 651466a3a46624..bea5998935f6bd 100644 --- a/target/linux/ramips/dts/mt7621_sercomm_na502s.dts +++ b/target/linux/ramips/dts/mt7621_sercomm_na502s.dts @@ -204,7 +204,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_e000>; + nvmem-cells = <&macaddr_factory_e000 0>; nvmem-cell-names = "mac-address"; }; @@ -246,7 +246,9 @@ }; macaddr_factory_e000: macaddr@e000 { + compatible = "mac-base"; reg = <0xe000 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -296,9 +298,8 @@ 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>; }; }; @@ -307,9 +308,8 @@ 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>; }; }; diff --git a/target/linux/ramips/dts/mt7621_sercomm_s1500.dtsi b/target/linux/ramips/dts/mt7621_sercomm_s1500.dtsi index 6344f477e8e565..09862b8067a15f 100644 --- a/target/linux/ramips/dts/mt7621_sercomm_s1500.dtsi +++ b/target/linux/ramips/dts/mt7621_sercomm_s1500.dtsi @@ -158,7 +158,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_1000>; + nvmem-cells = <&macaddr_factory_1000 0>; nvmem-cell-names = "mac-address"; }; @@ -195,7 +195,9 @@ }; macaddr_factory_1000: macaddr@1000 { + compatible = "mac-base"; reg = <0x1000 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -231,19 +233,7 @@ 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"; }; }; @@ -281,9 +271,8 @@ status = "okay"; label = "wan"; - nvmem-cells = <&macaddr_factory_1000>; + nvmem-cells = <&macaddr_factory_1000 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts index 39d7f0398fbbc8..60817edbbff7bb 100644 --- a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts +++ b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts @@ -85,7 +85,9 @@ }; macaddr_factory_e006: macaddr@e006 { + compatible = "mac-base"; reg = <0xe006 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -122,7 +124,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_e006>; + nvmem-cells = <&macaddr_factory_e006 0>; nvmem-cell-names = "mac-address"; }; @@ -131,9 +133,8 @@ label = "wan"; phy-handle = <ðphy4>; - nvmem-cells = <&macaddr_factory_e006>; + nvmem-cells = <&macaddr_factory_e006 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts b/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts index 6c983dd54a0b0a..4d8fa7f320d94a 100644 --- a/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts +++ b/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts @@ -124,7 +124,9 @@ }; macaddr_factory_e006: macaddr@e006 { + compatible = "mac-base"; reg = <0xe006 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -143,7 +145,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_e006>; + nvmem-cells = <&macaddr_factory_e006 0>; nvmem-cell-names = "mac-address"; }; @@ -172,9 +174,8 @@ 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>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts b/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts index f4b8d171767ce9..7b1e5d863b5c1c 100644 --- a/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts +++ b/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts @@ -112,7 +112,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_4>; + nvmem-cells = <&macaddr_factory_4 0>; nvmem-cell-names = "mac-address"; }; @@ -121,9 +121,8 @@ label = "wan"; phy-handle = <ðphy0>; - nvmem-cells = <&macaddr_factory_4>; + nvmem-cells = <&macaddr_factory_4 (-2)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-2)>; }; &mdio { @@ -209,7 +208,9 @@ }; macaddr_factory_4: macaddr@4 { + compatible = "mac-base"; reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_totolink_a7000r.dts b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts index 8edae7de875d56..dd6cc5d844b783 100644 --- a/target/linux/ramips/dts/mt7621_totolink_a7000r.dts +++ b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts @@ -81,7 +81,9 @@ }; macaddr_factory_e000: macaddr@e000 { + compatible = "mac-base"; reg = <0xe000 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -120,7 +122,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_e000>; + nvmem-cells = <&macaddr_factory_e000 0>; nvmem-cell-names = "mac-address"; }; @@ -129,9 +131,8 @@ label = "wan"; phy-handle = <ðphy4>; - nvmem-cells = <&macaddr_factory_e000>; + nvmem-cells = <&macaddr_factory_e000 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts b/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts index 74b9a9541b145b..1bc3f7e4f50de6 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts @@ -115,7 +115,9 @@ #size-cells = <1>; macaddr_config_8: macaddr@8 { + compatible = "mac-base"; reg = <0x8 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -144,14 +146,14 @@ 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"; }; @@ -160,9 +162,8 @@ label = "wan"; phy-handle = <ðphy4>; - nvmem-cells = <&macaddr_config_8>; + nvmem-cells = <&macaddr_config_8 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts index a2c7d8e635c5fe..522408b220c809 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts @@ -126,7 +126,9 @@ #size-cells = <1>; macaddr_config_8: macaddr@8 { + compatible = "mac-base"; reg = <0x8 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -168,7 +170,7 @@ 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>; }; @@ -178,15 +180,14 @@ 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"; }; @@ -195,9 +196,8 @@ label = "wan"; phy-handle = <ðphy0>; - nvmem-cells = <&macaddr_config_8>; + nvmem-cells = <&macaddr_config_8 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi b/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi index f8fa7487ce8299..d3db8cd602cb76 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi +++ b/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi @@ -119,7 +119,9 @@ #size-cells = <1>; macaddr_config_8: macaddr@8 { + compatible = "mac-base"; reg = <0x8 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -162,9 +164,8 @@ 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>; }; }; @@ -173,9 +174,8 @@ 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>; }; }; @@ -185,7 +185,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_config_8>; + nvmem-cells = <&macaddr_config_8 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts index 64df8cf6b1f226..a91a18efc75808 100644 --- a/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts @@ -92,7 +92,9 @@ #size-cells = <1>; macaddr_info_8: macaddr@8 { + compatible = "mac-base"; reg = <0x8 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -160,7 +162,7 @@ &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"; }; }; @@ -169,14 +171,13 @@ 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"; }; @@ -185,7 +186,7 @@ label = "lan0"; phy-handle = <ðphy0>; - nvmem-cells = <&macaddr_info_8>; + nvmem-cells = <&macaddr_info_8 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts b/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts index f4bc79a165842e..6b73ffff24f182 100644 --- a/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts +++ b/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts @@ -119,7 +119,9 @@ #size-cells = <1>; macaddr_romfile_f100: romfile@f100 { + compatible = "mac-base"; reg = <0xf100 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -162,7 +164,7 @@ 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>; }; @@ -173,14 +175,13 @@ 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"; }; @@ -189,7 +190,7 @@ label = "wan"; phy-handle = <ðphy4>; - nvmem-cells = <&macaddr_romfile_f100>; + nvmem-cells = <&macaddr_romfile_f100 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts index be1011d1da43c8..be23abf4c83edf 100644 --- a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts @@ -118,7 +118,9 @@ #size-cells = <1>; macaddr_config_10008: macaddr@10008 { + compatible = "mac-base"; reg = <0x10008 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -153,9 +155,8 @@ &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>; }; }; @@ -163,9 +164,8 @@ 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>; }; }; @@ -174,7 +174,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_config_10008>; + nvmem-cells = <&macaddr_config_10008 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_re650-v2.dts b/target/linux/ramips/dts/mt7621_tplink_re650-v2.dts index 692aed5bfc3e17..7dcd5e553cd79c 100644 --- a/target/linux/ramips/dts/mt7621_tplink_re650-v2.dts +++ b/target/linux/ramips/dts/mt7621_tplink_re650-v2.dts @@ -127,7 +127,9 @@ #size-cells = <1>; macaddr_config_10008: macaddr@10008 { + compatible = "mac-base"; reg = <0x10008 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -170,9 +172,8 @@ 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>; }; }; @@ -181,9 +182,8 @@ 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>; }; }; @@ -193,7 +193,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_config_10008>; + nvmem-cells = <&macaddr_config_10008 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi index 650f741eff7f58..3784a4f3c952f9 100644 --- a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi +++ b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi @@ -124,7 +124,9 @@ #size-cells = <1>; macaddr_config_10008: macaddr@10008 { + compatible = "mac-base"; reg = <0x10008 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -171,9 +173,8 @@ 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>; }; }; @@ -182,9 +183,8 @@ 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>; }; }; @@ -194,7 +194,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_config_10008>; + nvmem-cells = <&macaddr_config_10008 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_tl-wpa8631p-v3.dts b/target/linux/ramips/dts/mt7621_tplink_tl-wpa8631p-v3.dts index 3c133dd0168b9a..1e0fd2023970ca 100644 --- a/target/linux/ramips/dts/mt7621_tplink_tl-wpa8631p-v3.dts +++ b/target/linux/ramips/dts/mt7621_tplink_tl-wpa8631p-v3.dts @@ -122,7 +122,9 @@ #size-cells = <1>; macaddr_config_2008: macaddr@2008 { + compatible = "mac-base"; reg = <0x2008 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -165,7 +167,7 @@ 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>; }; @@ -175,9 +177,8 @@ 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>; }; }; @@ -187,7 +188,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_config_2008>; + nvmem-cells = <&macaddr_config_2008 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts b/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts index 488a40db5c3d2e..cd19893e1451df 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts @@ -67,7 +67,9 @@ }; macaddr_eeprom_6: macaddr@6 { + compatible = "mac-base"; reg = <0x6 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -112,9 +114,6 @@ 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 @@ -127,7 +126,8 @@ * 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>; diff --git a/target/linux/ramips/dts/mt7621_ubnt_unifi-flexhd.dts b/target/linux/ramips/dts/mt7621_ubnt_unifi-flexhd.dts index f9cdf4433c602c..36df3ef883dcc8 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_unifi-flexhd.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_unifi-flexhd.dts @@ -74,7 +74,9 @@ #size-cells = <1>; macaddr_eeprom_0: macaddr@0 { + compatible = "mac-base"; reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -106,7 +108,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_eeprom_0>; + nvmem-cells = <&macaddr_eeprom_0 0>; nvmem-cell-names = "mac-address"; }; @@ -129,9 +131,8 @@ 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>; }; }; @@ -141,9 +142,8 @@ 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>; }; }; diff --git a/target/linux/ramips/dts/mt7621_wifire_s1500-nbn.dts b/target/linux/ramips/dts/mt7621_wifire_s1500-nbn.dts index 6c0e2965aa0d10..4ffe9881536315 100644 --- a/target/linux/ramips/dts/mt7621_wifire_s1500-nbn.dts +++ b/target/linux/ramips/dts/mt7621_wifire_s1500-nbn.dts @@ -76,6 +76,13 @@ */ }; -&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"; + }; }; diff --git a/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts index a1eca2807e7006..7bb90e542ec230 100644 --- a/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts +++ b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts @@ -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"; }; @@ -105,9 +107,8 @@ label = "wan"; phy-handle = <ðphy4>; - nvmem-cells = <&macaddr_factory_4>; + nvmem-cells = <&macaddr_factory_4 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts index ac638ad9294448..147713ddce19cf 100644 --- a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts +++ b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts @@ -131,7 +131,9 @@ }; macaddr_factory_e000: macaddr@e000 { + compatible = "mac-base"; reg = <0xe000 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -177,7 +179,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_e000>; + nvmem-cells = <&macaddr_factory_e000 0>; nvmem-cell-names = "mac-address"; }; @@ -206,9 +208,8 @@ 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>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts index b153cae918b33d..bbd546f300994f 100644 --- a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts +++ b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts @@ -122,7 +122,9 @@ #size-cells = <1>; macaddr_factory_e000: macaddr@e000 { + compatible = "mac-base"; reg = <0xe000 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -150,7 +152,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_e000>; + nvmem-cells = <&macaddr_factory_e000 0>; nvmem-cell-names = "mac-address"; }; @@ -159,9 +161,8 @@ label = "wan"; phy-handle = <ðphy0>; - nvmem-cells = <&macaddr_factory_e000>; + nvmem-cells = <&macaddr_factory_e000 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &mdio { diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts index 6423b69ebdab22..3756baa14efe01 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts @@ -90,7 +90,9 @@ }; macaddr_factory_e000: macaddr@e000 { + compatible = "mac-base"; reg = <0xe000 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -134,7 +136,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_e000>; + nvmem-cells = <&macaddr_factory_e000 0>; nvmem-cell-names = "mac-address"; }; @@ -163,9 +165,8 @@ 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>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi index 5c21352cd9e6fc..87ed1c71297058 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi @@ -90,7 +90,9 @@ }; macaddr_factory_e000: macaddr@e000 { + compatible = "mac-base"; reg = <0xe000 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -135,7 +137,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_e000>; + nvmem-cells = <&macaddr_factory_e000 0>; nvmem-cell-names = "mac-address"; }; @@ -164,9 +166,8 @@ 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>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_zyxel_lte3301-plus.dts b/target/linux/ramips/dts/mt7621_zyxel_lte3301-plus.dts index 4333ece42e75b5..abbb61d5341880 100644 --- a/target/linux/ramips/dts/mt7621_zyxel_lte3301-plus.dts +++ b/target/linux/ramips/dts/mt7621_zyxel_lte3301-plus.dts @@ -139,7 +139,9 @@ }; macaddr_factory_fe6e: macaddr@fe6e { + compatible = "mac-base"; reg = <0xfe6e 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -175,7 +177,7 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_fe6e>; + nvmem-cells = <&macaddr_factory_fe6e 0>; nvmem-cell-names = "mac-address"; }; @@ -211,9 +213,8 @@ 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)>; }; };