From 33951848257848d220f39410b8f949c788d8b5af Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 7 Nov 2023 19:39:00 -0800 Subject: [PATCH] ramips: mt7621: nix mac-address-increment nvmem-layout allows removal Signed-off-by: Rosen Penev --- target/linux/ramips/dts/mt7621_adslr_g7.dts | 7 ++++--- .../ramips/dts/mt7621_afoundry_ew1200.dts | 7 ++++--- .../ramips/dts/mt7621_asiarf_ap7621-001.dts | 16 -------------- .../ramips/dts/mt7621_asiarf_ap7621-nv1.dts | 16 -------------- .../ramips/dts/mt7621_asiarf_ap7621.dtsi | 19 ++++++++++++++++- .../dts/mt7621_beeline_smartbox-giga.dts | 13 ++++++------ .../dts/mt7621_beeline_smartbox-pro.dts | 11 ++++++++++ .../mt7621_beeline_smartbox-turbo-plus.dts | 13 ++++++------ .../dts/mt7621_beeline_smartbox-turbo.dts | 9 +++----- target/linux/ramips/dts/mt7621_bolt_arion.dts | 7 ++++--- .../dts/mt7621_buffalo_wsr-2533dhpl.dts | 8 +++---- .../ramips/dts/mt7621_comfast_cf-e390ax.dts | 7 ++++--- target/linux/ramips/dts/mt7621_cudy_m1800.dts | 7 ++++--- .../ramips/dts/mt7621_cudy_wr1300-v1.dts | 12 +++++------ .../linux/ramips/dts/mt7621_cudy_wr2100.dts | 7 ++++--- target/linux/ramips/dts/mt7621_cudy_x6-v1.dts | 9 ++++---- target/linux/ramips/dts/mt7621_cudy_x6-v2.dts | 9 ++++---- .../ramips/dts/mt7621_dlink_dir-1960-a1.dts | 12 ----------- .../ramips/dts/mt7621_dlink_dir-2640-a1.dts | 12 ----------- .../ramips/dts/mt7621_dlink_dir-2660-a1.dts | 12 ----------- .../ramips/dts/mt7621_dlink_dir-3060-a1.dts | 10 ++++----- .../ramips/dts/mt7621_dlink_dir-853-r1.dts | 8 +++---- .../ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi | 8 ++++--- .../ramips/dts/mt7621_dlink_flash-16m-r1.dtsi | 2 ++ .../linux/ramips/dts/mt7621_dual-q_h721.dts | 7 ++++--- .../dts/mt7621_elecom_wrc-1167ghbk2-s.dts | 7 ++++--- .../linux/ramips/dts/mt7621_etisalat_s3.dts | 13 ++++++------ .../ramips/dts/mt7621_firefly_firewrt.dts | 7 ++++--- .../ramips/dts/mt7621_gehua_ghl-r-001.dts | 7 ++++--- .../ramips/dts/mt7621_glinet_gl-mt1300.dts | 7 ++++--- .../ramips/dts/mt7621_haier-sim_wr1800k.dtsi | 7 ++++--- .../ramips/dts/mt7621_hanyang_hyc-g920.dts | 7 ++++--- .../ramips/dts/mt7621_iodata_wn-ax1167gr.dts | 5 +++-- .../ramips/dts/mt7621_iodata_wn-gx300gr.dts | 7 ++++--- .../ramips/dts/mt7621_iptime_a3002mesh.dts | 7 ++++--- .../linux/ramips/dts/mt7621_iptime_a3004t.dts | 8 +++---- .../ramips/dts/mt7621_iptime_ax2004m.dts | 8 +++---- .../dts/mt7621_mediatek_ap-mt7621a-v60.dts | 7 ++++--- .../ramips/dts/mt7621_mercusys_mr70x-v1.dts | 9 ++++---- .../linux/ramips/dts/mt7621_mqmaker_witi.dts | 14 ++++++------- target/linux/ramips/dts/mt7621_mtc_wr1201.dts | 7 ++++--- .../dts/mt7621_netgear_sercomm_bzv.dtsi | 7 ++++--- .../dts/mt7621_netgear_sercomm_chj.dtsi | 7 ++++--- .../linux/ramips/dts/mt7621_oraybox_x3a.dts | 7 ++++--- .../dts/mt7621_renkforce_ws-wn530hp3-a.dts | 11 +++++----- .../ramips/dts/mt7621_rostelecom_rt-sf-1.dts | 9 +++----- .../dts/mt7621_sercomm_dxx_nand_256m.dtsi | 2 ++ .../linux/ramips/dts/mt7621_sercomm_na502.dts | 10 ++++----- .../ramips/dts/mt7621_sercomm_na502s.dts | 10 ++++----- .../ramips/dts/mt7621_sercomm_s1500.dtsi | 21 +++++-------------- .../dts/mt7621_storylink_sap-g3200u3.dts | 7 ++++--- .../dts/mt7621_telco-electronics_x1.dts | 7 ++++--- .../ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts | 7 ++++--- .../ramips/dts/mt7621_totolink_a7000r.dts | 7 ++++--- .../dts/mt7621_tplink_archer-ax23-v1.dts | 9 ++++---- .../dts/mt7621_tplink_archer-c6u-v1.dts | 12 +++++------ .../dts/mt7621_tplink_archer-x6-v3.dtsi | 10 ++++----- .../dts/mt7621_tplink_eap235-wall-v1.dts | 11 +++++----- .../ramips/dts/mt7621_tplink_mr600-v2-eu.dts | 11 +++++----- .../ramips/dts/mt7621_tplink_re350-v1.dts | 10 ++++----- .../ramips/dts/mt7621_tplink_re650-v2.dts | 10 ++++----- .../ramips/dts/mt7621_tplink_rexx0-v1.dtsi | 10 ++++----- .../dts/mt7621_tplink_tl-wpa8631p-v3.dts | 9 ++++---- .../ramips/dts/mt7621_ubnt_unifi-6-lite.dts | 8 +++---- .../ramips/dts/mt7621_ubnt_unifi-flexhd.dts | 10 ++++----- .../ramips/dts/mt7621_wifire_s1500-nbn.dts | 11 ++++++++-- .../linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts | 7 ++++--- .../dts/mt7621_xzwifi_creativebox-v1.dts | 7 ++++--- .../linux/ramips/dts/mt7621_yuncore_ax820.dts | 7 ++++--- .../ramips/dts/mt7621_zbtlink_zbt-wg2626.dts | 7 ++++--- .../ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi | 7 ++++--- .../ramips/dts/mt7621_zyxel_lte3301-plus.dts | 7 ++++--- 72 files changed, 319 insertions(+), 331 deletions(-) diff --git a/target/linux/ramips/dts/mt7621_adslr_g7.dts b/target/linux/ramips/dts/mt7621_adslr_g7.dts index f797393f04381..ef3a64e031a23 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 a846e5d8d5ddf..d63ae33311fb9 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 5e57842d6812d..2d4bc016c1dd9 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 dabc1a3bd3401..f6914e43599c2 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 658164fe08bec..acb2c81a0d885 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 24fb757781544..f2a99a63a89db 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 e3e248d48f960..e2c0165e6bb3a 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 2a1f2758158c8..00f4957c574d2 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 df80f49e97ea3..f9b53ae0b368f 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 354c1c5314572..83855f9dc898b 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 81933ba21d812..b4ba1519d3df3 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 106b16573b39f..ac0c19c022860 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 759abe7ba586e..29d6f9e41a98f 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 ab9f7c6507193..e87209fbb1d86 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 64beabea93924..fc38e27ac1857 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 3ba72d5f971f1..940a0598c10f1 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 f4d50d42e72c7..70e6a845a4bbd 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 d352d27b76c50..e0a714c9dc646 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 127a9a3417f3a..d4b8069a33308 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 02fd35d60e92c..a4590cb35fc5a 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 23995079fdb5f..1cca6f6b57851 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 290638f7355f1..bce0e6996befa 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 9d770dda2f708..6eb3f3cdd9bf7 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 93380e306747d..bccd19b12d8e4 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 cafda8e1ecc6b..2c35a8839cb63 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 b280790d64f06..9c0353ae28b73 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 90309dad0a12a..64e21bb704a1d 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 a9d9da872e3b9..c2c2acac9f284 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 778b2f07981b0..d224fd388d7fc 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 94a9b1c092b6a..891fe7c730f26 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 6d9608d18f8ee..6549abaec9569 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 7bec688f866fe..5737c0ce68f12 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 b93102163fbfe..b46ba87f39407 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 5b9d0d59b214f..6bd5e733f4a6f 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 6b77902136728..05346a10d4a7d 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 92e8eab918c59..2394a343c2464 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 38b1c196a100a..ec02679c23bc8 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 3874953e45203..8e2d866b3b913 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 b538805851db2..d663dc63b24e1 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 9063918078108..0052040f36932 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 3065970807ba9..43b021fa13ae8 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 1589d2de4b8eb..f5cffb4a2a42b 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 87fe42c7774e6..fd73bfcb3edad 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 880a04710bd38..239159996337e 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 b01a976c18691..8a32a86e7bb04 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 c476cf9495731..b722df5bbb826 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 67f70a3b60c57..36d576108d7fb 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 576273cc99a02..44b1077bc60ab 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 651466a3a4662..bea5998935f6b 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 6344f477e8e56..09862b8067a15 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 39d7f0398fbbc..60817edbbff7b 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 6c983dd54a0b0..4d8fa7f320d94 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 f4b8d171767ce..7b1e5d863b5c1 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 8edae7de875d5..dd6cc5d844b78 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 74b9a9541b145..1bc3f7e4f50de 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 a2c7d8e635c5f..522408b220c80 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 f8fa7487ce829..d3db8cd602cb7 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 64df8cf6b1f22..a91a18efc7580 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 f4bc79a165842..6b73ffff24f18 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 be1011d1da43c..be23abf4c83ed 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 692aed5bfc3e1..7dcd5e553cd79 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 650f741eff7f5..3784a4f3c952f 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 3c133dd0168b9..1e0fd2023970c 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 488a40db5c3d2..cd19893e1451d 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 f9cdf4433c602..36df3ef883dcc 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 6c0e2965aa0d1..4ffe988153631 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 a1eca2807e700..7bb90e542ec23 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 ac638ad929444..147713ddce19c 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 b153cae918b33..bbd546f300994 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 6423b69ebdab2..3756baa14efe0 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 5c21352cd9e6f..87ed1c7129705 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 4333ece42e75b..abbb61d534188 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)>; }; };