From: Arınç ÜNAL Date: Tue, 5 Jul 2022 22:20:32 +0000 (+0300) Subject: ramips: mt7621-dts: mux phy0/4 to gmac1 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f1c9afd801380a05a91d979b475c76cc0a67caae;p=openwrt%2Fstaging%2Faparcar.git ramips: mt7621-dts: mux phy0/4 to gmac1 Mux the MT7530 switch's phy0/4 to the SoC's gmac1 on devices where RGMII2 pins are available. This achieves 2 Gbps total bandwidth to the CPU using the second RGMII. The ports called "wan" are muxed where possible. On a minority of devices, this is not possible. Those cases: mt7621_ampedwireless_ally-r1900k.dts: lan3 mt7621_ubnt_edgerouter-x.dts: eth0 mt7621_gnubee_gb-pc1.dts: ethblue mt7621_linksys_re6500.dts: lan1 mt7621_netgear_wac104.dts: lan4 mt7621_tplink_eap235-wall-v1.dts: lan0 mt7621_tplink_eap615-wall-v1.dts: lan0 mt7621_ubnt_usw-flex.dts: lan1 The "wan" port is just what the vendor designated on the board/plastic chasis of the device. On a technical level, there is no difference between a lan and wan port on MT7621AT, MT7621DAT and MT7621ST SoCs. Prefer connecting to WAN via the port described above for these devices to benefit the feature brought with this patch. mt7621_d-team_newifi-d2.dts cannot benefit this feature, although it looks like it should, because the rgmii2 pins are wired to unused components. Tested on a range of devices documented on the GitHub PR. Link: https://github.com/openwrt/openwrt/pull/10238 Signed-off-by: Arınç ÜNAL --- diff --git a/target/linux/ramips/dts/mt7621_adslr_g7.dts b/target/linux/ramips/dts/mt7621_adslr_g7.dts index 95f2ac3a20..956733f7c3 100644 --- a/target/linux/ramips/dts/mt7621_adslr_g7.dts +++ b/target/linux/ramips/dts/mt7621_adslr_g7.dts @@ -105,6 +105,22 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e00c>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -126,14 +142,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e00c>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts index 2ed9f716ab..119acd977c 100644 --- a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts +++ b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts @@ -110,6 +110,22 @@ nvmem-cell-names = "mac-address"; }; +&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 { @@ -131,14 +147,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e000>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_ampedwireless_ally-r1900k.dts b/target/linux/ramips/dts/mt7621_ampedwireless_ally-r1900k.dts index cd2536e179..07e0d23788 100644 --- a/target/linux/ramips/dts/mt7621_ampedwireless_ally-r1900k.dts +++ b/target/linux/ramips/dts/mt7621_ampedwireless_ally-r1900k.dts @@ -7,6 +7,18 @@ model = "Amped Wireless ALLY-R1900K"; }; +&gmac1 { + status = "okay"; + label = "lan3"; + phy-handle = <ðphy4>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@1 { @@ -23,10 +35,5 @@ status = "okay"; label = "lan2"; }; - - port@4 { - status = "okay"; - label = "lan3"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_arcadyan_wg4xx223.dtsi b/target/linux/ramips/dts/mt7621_arcadyan_wg4xx223.dtsi index 5a845c4e9b..8c4be8440d 100644 --- a/target/linux/ramips/dts/mt7621_arcadyan_wg4xx223.dtsi +++ b/target/linux/ramips/dts/mt7621_arcadyan_wg4xx223.dtsi @@ -171,6 +171,21 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_fff0>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@2 { @@ -182,11 +197,6 @@ status = "okay"; label = "lan1"; }; - - port@4 { - status = "okay"; - label = "wan"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts b/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts index c74fee3102..5e57842d68 100644 --- a/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts +++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts @@ -7,19 +7,27 @@ 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 { status = "okay"; label = "lan"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e000>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts b/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts index 907b6d1470..dabc1a3bd3 100644 --- a/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts +++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts @@ -7,16 +7,24 @@ 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@0 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e000>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; - }; - port@2 { status = "okay"; label = "lan1"; diff --git a/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts b/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts index 60ab3e1646..4e8c68ddf1 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts @@ -134,15 +134,23 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e006>; - nvmem-cell-names = "mac-address"; - }; - port@1 { status = "okay"; label = "lan1"; diff --git a/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi b/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi index 0ccc3c7ecc..b71437bfe6 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi +++ b/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi @@ -135,13 +135,23 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - }; - port@1 { status = "okay"; label = "lan1"; diff --git a/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts b/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts index 790f6cecb5..329121595a 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts @@ -126,13 +126,23 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - }; - port@1 { status = "okay"; label = "lan1"; diff --git a/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts b/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts index 63ab424b88..c8d286e7ed 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts @@ -10,7 +10,7 @@ model = "ASUS RT-N56U B1"; aliases { - label-mac-device = &wan; + label-mac-device = &gmac1; led-boot = &led_power; led-failsafe = &led_power; led-running = &led_power; @@ -144,6 +144,21 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -165,13 +180,6 @@ status = "okay"; label = "lan1"; }; - - wan: port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_4>; - 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 efea79e2e2..22fc065eb2 100644 --- a/target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts +++ b/target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts @@ -202,17 +202,24 @@ nvmem-cell-names = "mac-address"; }; -&switch0 { - ports { - port@0 { - status = "okay"; - label = "wan"; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; - nvmem-cells = <&macaddr_factory_21000>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <(1)>; - }; + nvmem-cells = <&macaddr_factory_21000>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <(1)>; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; +&switch0 { + ports { port@1 { status = "okay"; label = "lan1"; diff --git a/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo.dts b/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo.dts index d987046a0f..733be13e13 100644 --- a/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo.dts +++ b/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo.dts @@ -202,17 +202,24 @@ nvmem-cell-names = "mac-address"; }; -&switch0 { - ports { - port@0 { - status = "okay"; - label = "wan"; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; - nvmem-cells = <&macaddr_factory_21000>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <(1)>; - }; + nvmem-cells = <&macaddr_factory_21000>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <(1)>; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; +&switch0 { + ports { port@1 { status = "okay"; label = "lan1"; diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts index 5a259e154c..a8d76b544e 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts @@ -152,6 +152,18 @@ }; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -173,11 +185,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts index 789edca6df..be85e8ee6e 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts @@ -169,13 +169,24 @@ mac-address-increment = <(-1)>; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <(-1)>; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - }; - port@1 { status = "okay"; label = "lan4"; diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts index 15d055bee6..f46bc256d0 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts @@ -177,6 +177,21 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -198,11 +213,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_cudy_wr1300.dts b/target/linux/ramips/dts/mt7621_cudy_wr1300.dts index 3fd67c967a..2398612847 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr1300.dts +++ b/target/linux/ramips/dts/mt7621_cudy_wr1300.dts @@ -159,6 +159,22 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -180,14 +196,6 @@ status = "okay"; label = "lan1"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_bdinfo_de00>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_cudy_wr2100.dts b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts index 21d03322a7..b2e75762a5 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr2100.dts +++ b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts @@ -169,6 +169,22 @@ }; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -190,15 +206,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - - nvmem-cells = <&macaddr_bdinfo_de00>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_cudy_x6.dts b/target/linux/ramips/dts/mt7621_cudy_x6.dts index ebb2149172..ad51aca28f 100644 --- a/target/linux/ramips/dts/mt7621_cudy_x6.dts +++ b/target/linux/ramips/dts/mt7621_cudy_x6.dts @@ -128,6 +128,22 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -149,14 +165,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_bdinfo_de00>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts b/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts index 49d0c050f5..5408e51399 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts @@ -169,6 +169,21 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -190,13 +205,6 @@ status = "okay"; label = "lan1"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e006>; - 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 c0ad172939..8ec6ef3a7d 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts @@ -12,7 +12,7 @@ model = "D-Link DIR-853 R1"; aliases { - label-mac-device = &wan; + label-mac-device = &gmac1; led-boot = &led_power_orange; led-failsafe = &led_power_blue; @@ -110,6 +110,22 @@ mac-address-increment = <(-1)>; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <(-2)>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -131,14 +147,6 @@ status = "okay"; label = "lan1"; }; - - wan: port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_4>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <(-2)>; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts index 7a48a931e7..fac41f206b 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts @@ -114,13 +114,23 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_radio_4>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - }; - port@1 { status = "okay"; label = "lan4"; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-867-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-867-a1.dts index 0f09fae246..ae0cc8fc8a 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-867-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-867-a1.dts @@ -17,7 +17,7 @@ nvmem-cell-names = "mac-address"; }; -&wan { +&gmac1 { nvmem-cells = <&macaddr_factory_e006>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-878-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-878-a1.dts index 9c73ffa123..31b41f8384 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-878-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-878-a1.dts @@ -17,7 +17,7 @@ nvmem-cell-names = "mac-address"; }; -&wan { +&gmac1 { nvmem-cells = <&macaddr_factory_e006>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-878-r1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-878-r1.dts index b6453bdd21..dbde89b220 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-878-r1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-878-r1.dts @@ -17,7 +17,7 @@ nvmem-cell-names = "mac-address"; }; -&wan { +&gmac1 { nvmem-cells = <&macaddr_factory_e006>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-882-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-882-a1.dts index 3db056f68f..d6206427bf 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-882-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-882-a1.dts @@ -33,7 +33,7 @@ nvmem-cell-names = "mac-address"; }; -&wan { +&gmac1 { nvmem-cells = <&macaddr_factory_e006>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-882-r1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-882-r1.dts index 6cfa28b7cf..6288d19c8a 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-882-r1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-882-r1.dts @@ -33,7 +33,7 @@ nvmem-cell-names = "mac-address"; }; -&wan { +&gmac1 { nvmem-cells = <&macaddr_factory_e006>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi b/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi index 556ca8b003..b570d074c6 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi @@ -90,6 +90,18 @@ }; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -111,11 +123,6 @@ status = "okay"; label = "lan1"; }; - - wan: port@4 { - status = "okay"; - label = "wan"; - }; }; }; 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 9dcc050af2..07f84592e4 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi @@ -154,6 +154,21 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -175,13 +190,6 @@ status = "okay"; label = "lan1"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e006>; - nvmem-cell-names = "mac-address"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi b/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi index f9a6c375c2..1301f1375c 100644 --- a/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi +++ b/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi @@ -122,13 +122,23 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - }; - port@1 { status = "okay"; label = "lan4"; 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 8e87fd06bc..2fdb62840a 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts @@ -71,15 +71,23 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e006>; - nvmem-cell-names = "mac-address"; - }; - port@1 { status = "okay"; label = "lan4"; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts index 97e0ab2956..81ace64e44 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts @@ -12,7 +12,7 @@ nvmem-cell-names = "mac-address"; }; -&wan { +&gmac1 { nvmem-cells = <&macaddr_factory_fffa>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts index dfc58c1ff6..cb2e202793 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts @@ -12,7 +12,7 @@ nvmem-cell-names = "mac-address"; }; -&wan { +&gmac1 { nvmem-cells = <&macaddr_factory_e006>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1750gs.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gs.dts index 2f82eaf12b..8450af5907 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1750gs.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gs.dts @@ -44,7 +44,7 @@ nvmem-cell-names = "mac-address"; }; -&wan { +&gmac1 { nvmem-cells = <&macaddr_factory_e006>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts index 2eda4ba23a..a57a4290af 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts @@ -44,7 +44,7 @@ nvmem-cell-names = "mac-address"; }; -&wan { +&gmac1 { nvmem-cells = <&macaddr_factory_e006>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1750gsv.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gsv.dts index 7f2f04d9ea..f01f6fc25f 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1750gsv.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1750gsv.dts @@ -44,7 +44,7 @@ nvmem-cell-names = "mac-address"; }; -&wan { +&gmac1 { nvmem-cells = <&macaddr_factory_e006>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts index df66c2772d..ec433e265d 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts @@ -44,7 +44,7 @@ nvmem-cell-names = "mac-address"; }; -&wan { +&gmac1 { nvmem-cells = <&macaddr_factory_e006>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk-i.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk-i.dts index a5436d55d7..8da1099dc9 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk-i.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk-i.dts @@ -136,13 +136,20 @@ }; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - }; - port@1 { status = "okay"; label = "lan4"; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-2533gs2.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gs2.dts index 0036b52032..7e88f7be04 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-2533gs2.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gs2.dts @@ -44,7 +44,7 @@ nvmem-cell-names = "mac-address"; }; -&wan { +&gmac1 { nvmem-cells = <&macaddr_factory_fffa>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts index acf6ddab94..1d174006bd 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts @@ -42,7 +42,7 @@ nvmem-cell-names = "mac-address"; }; -&wan { +&gmac1 { nvmem-cells = <&macaddr_factory_e006>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst2.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst2.dts index dbf0f4d202..b71a2b4390 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst2.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst2.dts @@ -44,7 +44,7 @@ nvmem-cell-names = "mac-address"; }; -&wan { +&gmac1 { nvmem-cells = <&macaddr_factory_e006>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi b/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi index 9cf2b666b4..acd3004eb7 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi @@ -11,7 +11,7 @@ led-failsafe = &led_power_green; led-running = &led_power_green; led-upgrade = &led_power_green; - label-mac-device = &wan; + label-mac-device = &gmac1; }; leds: leds { @@ -83,13 +83,20 @@ }; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - wan: port@0 { - status = "okay"; - label = "wan"; - }; - port@1 { status = "okay"; label = "lan4"; 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 4f652b90bb..cb9f9bdad1 100644 --- a/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts +++ b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts @@ -111,6 +111,22 @@ nvmem-cell-names = "mac-address"; }; +&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 { @@ -127,14 +143,6 @@ status = "okay"; label = "lan3"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e000>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts index 384da1bfa9..a332a87a57 100644 --- a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts +++ b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts @@ -14,7 +14,7 @@ led-failsafe = &led_run; led-running = &led_run; led-upgrade = &led_run; - label-mac-device = &wan; + label-mac-device = &gmac1; }; chosen { @@ -121,6 +121,21 @@ mac-address-increment = <1>; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_4000>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@2 { @@ -132,13 +147,6 @@ status = "okay"; label = "lan2"; }; - - wan: port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_4000>; - nvmem-cell-names = "mac-address"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts index 21a1839127..29f9f09ee5 100644 --- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts +++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts @@ -105,17 +105,27 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "ethblue"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { status = "okay"; label = "ethblack"; }; - - port@4 { - status = "okay"; - label = "ethblue"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts b/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts index 9776f43e02..3fb267d782 100644 --- a/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts +++ b/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts @@ -61,6 +61,18 @@ }; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -82,11 +94,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts b/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts index 774fb93d9c..d9ca1012ce 100644 --- a/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts +++ b/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts @@ -129,6 +129,18 @@ }; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@1 { @@ -145,11 +157,6 @@ status = "okay"; label = "lan3"; }; - - port@4 { - status = "okay"; - label = "wan"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_humax_e10.dts b/target/linux/ramips/dts/mt7621_humax_e10.dts index 41587629c0..638d73c3ef 100644 --- a/target/linux/ramips/dts/mt7621_humax_e10.dts +++ b/target/linux/ramips/dts/mt7621_humax_e10.dts @@ -15,7 +15,7 @@ led-failsafe = &led_power; led-running = &led_power; led-upgrade = &led_power; - label-mac-device = &wan; + label-mac-device = &gmac1; }; gpio-export { @@ -132,15 +132,23 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_1000d>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - wan: port@0 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_1000d>; - nvmem-cell-names = "mac-address"; - }; - port@1 { status = "okay"; label = "lan"; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts index cc6446b75c..69c79d7dc7 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts @@ -132,16 +132,24 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_4>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; - }; - port@1 { status = "okay"; label = "lan4"; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts index b63b4783b8..4837f29a46 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts @@ -14,7 +14,7 @@ led-failsafe = &led_power; led-running = &led_power; led-upgrade = &led_power; - label-mac-device = &wan; + label-mac-device = &gmac1; }; leds { @@ -131,15 +131,23 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_1e006>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - wan: port@0 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_1e006>; - nvmem-cell-names = "mac-address"; - }; - port@1 { status = "okay"; label = "lan4"; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts index 398a84117c..8a09675bff 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts @@ -132,16 +132,24 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_4>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; - }; - port@1 { status = "okay"; label = "lan4"; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi b/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi index 1dd3d77878..89e7f4b3e9 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi +++ b/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi @@ -11,7 +11,7 @@ led-failsafe = &led_power; led-running = &led_power; led-upgrade = &led_power; - label-mac-device = &wan; + label-mac-device = &gmac1; }; leds { @@ -122,15 +122,23 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - wan: port@0 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e006>; - nvmem-cell-names = "mac-address"; - }; - port@1 { status = "okay"; label = "lan4"; diff --git a/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts b/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts index 6af6bdce7a..871327f8a7 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts @@ -124,13 +124,23 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - }; - port@1 { status = "okay"; label = "lan4"; diff --git a/target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts b/target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts index dc63adedf0..678ce06806 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts @@ -109,15 +109,23 @@ mac-address-increment = <(2)>; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_uboot_1fc40>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_uboot_1fc40>; - nvmem-cell-names = "mac-address"; - }; - port@3 { status = "okay"; label = "lan1"; diff --git a/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts b/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts index fa3f146e81..c08b6427e7 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts @@ -94,15 +94,23 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_uboot_1fc40>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_uboot_1fc40>; - nvmem-cell-names = "mac-address"; - }; - port@1 { status = "okay"; label = "lan1"; diff --git a/target/linux/ramips/dts/mt7621_iptime_a3004t.dts b/target/linux/ramips/dts/mt7621_iptime_a3004t.dts index 704ecac721..97b6b1c3ee 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a3004t.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a3004t.dts @@ -120,16 +120,24 @@ mac-address-increment = <(3)>; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <(1)>; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_4>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <(1)>; - }; - port@1 { status = "okay"; label = "lan4"; diff --git a/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi b/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi index a033d7f665..b00fbeb47f 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi +++ b/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi @@ -112,15 +112,23 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_uboot_1fc40>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_uboot_1fc40>; - nvmem-cell-names = "mac-address"; - }; - port@1 { status = "okay"; label = "lan1"; diff --git a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts index a00e921a49..0f5870140f 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts @@ -99,15 +99,23 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_uboot_1fc40>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_uboot_1fc40>; - nvmem-cell-names = "mac-address"; - }; - port@1 { status = "okay"; label = "lan4"; diff --git a/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts b/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts index 6da223689c..554d73ce3d 100644 --- a/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts +++ b/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts @@ -120,16 +120,24 @@ mac-address-increment = <3>; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_4>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; - }; - port@1 { status = "okay"; label = "lan4"; diff --git a/target/linux/ramips/dts/mt7621_iptime_t5004.dts b/target/linux/ramips/dts/mt7621_iptime_t5004.dts index c6c919cfb1..ee82ffbd85 100644 --- a/target/linux/ramips/dts/mt7621_iptime_t5004.dts +++ b/target/linux/ramips/dts/mt7621_iptime_t5004.dts @@ -87,13 +87,20 @@ }; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - }; - port@1 { status = "okay"; label = "lan4"; diff --git a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts index da832d6df5..5d346be1d2 100644 --- a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts +++ b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts @@ -14,7 +14,7 @@ led-failsafe = &led_wps; led-running = &led_wps; led-upgrade = &led_wps; - label-mac-device = &wan; + label-mac-device = &gmac1; }; leds { @@ -133,6 +133,21 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -154,12 +169,6 @@ status = "okay"; label = "lan4"; }; - wan: port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_4>; - nvmem-cell-names = "mac-address"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_jcg_q20.dts b/target/linux/ramips/dts/mt7621_jcg_q20.dts index c9bf648a31..0425c53438 100644 --- a/target/linux/ramips/dts/mt7621_jcg_q20.dts +++ b/target/linux/ramips/dts/mt7621_jcg_q20.dts @@ -148,15 +148,23 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_3fffa>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_3fffa>; - nvmem-cell-names = "mac-address"; - }; - port@1 { status = "okay"; label = "lan1"; diff --git a/target/linux/ramips/dts/mt7621_jcg_y2.dts b/target/linux/ramips/dts/mt7621_jcg_y2.dts index 5de6ba6d95..f8ae9b41df 100644 --- a/target/linux/ramips/dts/mt7621_jcg_y2.dts +++ b/target/linux/ramips/dts/mt7621_jcg_y2.dts @@ -93,6 +93,21 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -114,13 +129,6 @@ status = "okay"; label = "lan1"; }; - - wan: port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e006>; - nvmem-cell-names = "mac-address"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts index e8069ec394..a6e38234da 100644 --- a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts +++ b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts @@ -142,6 +142,21 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@1 { @@ -153,13 +168,6 @@ status = "okay"; label = "lan1"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e006>; - nvmem-cell-names = "mac-address"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_linksys_e5600.dts b/target/linux/ramips/dts/mt7621_linksys_e5600.dts index 91db315914..3b23a25f8b 100644 --- a/target/linux/ramips/dts/mt7621_linksys_e5600.dts +++ b/target/linux/ramips/dts/mt7621_linksys_e5600.dts @@ -148,6 +148,18 @@ }; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -169,11 +181,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_linksys_ea6350-v4.dts b/target/linux/ramips/dts/mt7621_linksys_ea6350-v4.dts index 272b01af1e..654c9aa70f 100644 --- a/target/linux/ramips/dts/mt7621_linksys_ea6350-v4.dts +++ b/target/linux/ramips/dts/mt7621_linksys_ea6350-v4.dts @@ -7,6 +7,20 @@ model = "Linksys EA6350 v4"; }; +&gmac1 { + phy-handle = <ðphy4>; +}; + +&mdio { + ethernet-phy@0 { + status = "disabled"; + }; + + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -30,8 +44,7 @@ }; port@4 { - status = "okay"; - label = "wan"; + status = "disabled"; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi b/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi index 5e9c82507d..4663d873fe 100644 --- a/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi +++ b/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi @@ -177,13 +177,20 @@ }; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - }; - port@1 { status = "okay"; label = "lan1"; diff --git a/target/linux/ramips/dts/mt7621_linksys_re6500.dts b/target/linux/ramips/dts/mt7621_linksys_re6500.dts index 680bc863cd..0d0c5c3be5 100644 --- a/target/linux/ramips/dts/mt7621_linksys_re6500.dts +++ b/target/linux/ramips/dts/mt7621_linksys_re6500.dts @@ -117,13 +117,23 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "lan1"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "lan1"; - }; - port@1 { status = "okay"; label = "lan2"; 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 a89d9189c0..557abcc21a 100644 --- a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts +++ b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts @@ -117,6 +117,22 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_5>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -138,14 +154,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_5>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts b/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts index dcdcc261b3..2da7f983a9 100644 --- a/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts +++ b/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts @@ -39,6 +39,18 @@ status = "okay"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -60,11 +72,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts index 7f329b2359..aad8a6776d 100644 --- a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts +++ b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts @@ -35,3 +35,23 @@ function = "gpio"; }; }; + +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + +&switch0 { + ports { + port@0 { + status = "disabled"; + }; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts index d457c43426..223d03b9fd 100644 --- a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts +++ b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts @@ -90,13 +90,20 @@ }; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - }; - port@1 { status = "okay"; label = "lan1"; diff --git a/target/linux/ramips/dts/mt7621_mqmaker_witi.dts b/target/linux/ramips/dts/mt7621_mqmaker_witi.dts index cb6310df18..16cebbad74 100644 --- a/target/linux/ramips/dts/mt7621_mqmaker_witi.dts +++ b/target/linux/ramips/dts/mt7621_mqmaker_witi.dts @@ -100,6 +100,22 @@ nvmem-cell-names = "mac-address"; }; +&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 { @@ -121,14 +137,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e000>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_r6220.dts b/target/linux/ramips/dts/mt7621_netgear_r6220.dts index 54489243b8..0f476ef060 100644 --- a/target/linux/ramips/dts/mt7621_netgear_r6220.dts +++ b/target/linux/ramips/dts/mt7621_netgear_r6220.dts @@ -60,7 +60,7 @@ nvmem-cell-names = "mac-address"; }; -&wan { +&gmac1 { nvmem-cells = <&macaddr_factory_4>; nvmem-cell-names = "mac-address"; mac-address-increment = <1>; diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi index ae9e40e621..0ae6ab46f7 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi @@ -105,6 +105,18 @@ }; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -126,11 +138,6 @@ status = "okay"; label = "lan1"; }; - - wan: port@4 { - status = "okay"; - label = "wan"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi index 2be3f87869..9fa4af8fd6 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi @@ -166,6 +166,22 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <2>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -187,14 +203,6 @@ status = "okay"; label = "lan1"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_4>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <2>; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi index c2dc987871..eaf12a891e 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi @@ -100,6 +100,22 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <2>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -121,14 +137,6 @@ status = "okay"; label = "lan1"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_4>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <2>; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_wac104.dts b/target/linux/ramips/dts/mt7621_netgear_wac104.dts index 61ab0574a7..3b5d6ae2d9 100644 --- a/target/linux/ramips/dts/mt7621_netgear_wac104.dts +++ b/target/linux/ramips/dts/mt7621_netgear_wac104.dts @@ -138,13 +138,23 @@ }; }; +&gmac1 { + status = "okay"; + label = "lan4"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "lan4"; - }; - port@1 { status = "okay"; label = "lan3"; diff --git a/target/linux/ramips/dts/mt7621_netgear_wax202.dts b/target/linux/ramips/dts/mt7621_netgear_wax202.dts index fef8094256..f17a805363 100644 --- a/target/linux/ramips/dts/mt7621_netgear_wax202.dts +++ b/target/linux/ramips/dts/mt7621_netgear_wax202.dts @@ -243,16 +243,23 @@ }; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { gpio-controller; #gpio-cells = <2>; ports { - port@0 { - status = "okay"; - label = "wan"; - }; - port@1 { status = "okay"; label = "lan1"; diff --git a/target/linux/ramips/dts/mt7621_netgear_wndr3700-v5.dts b/target/linux/ramips/dts/mt7621_netgear_wndr3700-v5.dts index 972aba1c5e..276e7c959f 100644 --- a/target/linux/ramips/dts/mt7621_netgear_wndr3700-v5.dts +++ b/target/linux/ramips/dts/mt7621_netgear_wndr3700-v5.dts @@ -56,7 +56,7 @@ nvmem-cell-names = "mac-address"; }; -&wan { +&gmac1 { nvmem-cells = <&macaddr_factory_4>; nvmem-cell-names = "mac-address"; mac-address-increment = <1>; diff --git a/target/linux/ramips/dts/mt7621_netis_wf2881.dts b/target/linux/ramips/dts/mt7621_netis_wf2881.dts index 56a2647638..af09073e3d 100644 --- a/target/linux/ramips/dts/mt7621_netis_wf2881.dts +++ b/target/linux/ramips/dts/mt7621_netis_wf2881.dts @@ -126,6 +126,21 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -147,13 +162,6 @@ status = "okay"; label = "lan1"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e006>; - nvmem-cell-names = "mac-address"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_oraybox_x3a.dts b/target/linux/ramips/dts/mt7621_oraybox_x3a.dts index a97b0900aa..fd7a8e6eca 100644 --- a/target/linux/ramips/dts/mt7621_oraybox_x3a.dts +++ b/target/linux/ramips/dts/mt7621_oraybox_x3a.dts @@ -128,6 +128,22 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_bdinfo_9>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@2 { @@ -139,14 +155,6 @@ status = "okay"; label = "lan1"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_bdinfo_9>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts index 078b76a50b..b18d12608a 100644 --- a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts +++ b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts @@ -112,6 +112,21 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -133,13 +148,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e006>; - nvmem-cell-names = "mac-address"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_planex_vr500.dts b/target/linux/ramips/dts/mt7621_planex_vr500.dts index fb6a42166f..1da6d2cca1 100644 --- a/target/linux/ramips/dts/mt7621_planex_vr500.dts +++ b/target/linux/ramips/dts/mt7621_planex_vr500.dts @@ -79,6 +79,21 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -100,13 +115,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e006>; - nvmem-cell-names = "mac-address"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts b/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts index 13d39195a9..3c5f1e520c 100644 --- a/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts +++ b/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts @@ -115,6 +115,18 @@ }; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -136,11 +148,6 @@ status = "okay"; label = "lan1"; }; - - port@4 { - status = "okay"; - label = "wan"; - }; }; }; 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 13e37d7124..c56c2f1554 100644 --- a/target/linux/ramips/dts/mt7621_renkforce_ws-wn530hp3-a.dts +++ b/target/linux/ramips/dts/mt7621_renkforce_ws-wn530hp3-a.dts @@ -115,6 +115,22 @@ mac-address-increment = <(-2)>; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <(-1)>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -126,14 +142,6 @@ status = "okay"; label = "lan1"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_4>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <(-1)>; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts index 929c2a8f26..d1f51feddd 100644 --- a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts +++ b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts @@ -110,6 +110,21 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -131,13 +146,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e006>; - nvmem-cell-names = "mac-address"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts index 19eb11111d..833e1b07d0 100644 --- a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts +++ b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts @@ -106,6 +106,22 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -127,14 +143,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e006>; - 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 d658c454a8..2d91d1c481 100644 --- a/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts +++ b/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts @@ -14,7 +14,7 @@ led-failsafe = &led_red; led-running = &led_blue; led-upgrade = &led_red; - label-mac-device = &wan_port; + label-mac-device = &gmac1; }; chosen { @@ -115,16 +115,24 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <(-2)>; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - wan_port: port@0 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_4>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <(-2)>; - }; - port@1 { status = "okay"; label = "lan1"; diff --git a/target/linux/ramips/dts/mt7621_totolink_a7000r.dts b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts index e817278728..bba0d4a5d3 100644 --- a/target/linux/ramips/dts/mt7621_totolink_a7000r.dts +++ b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts @@ -104,6 +104,22 @@ nvmem-cell-names = "mac-address"; }; +&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 { @@ -125,14 +141,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e000>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_totolink_x5000r.dts b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts index 8066340c5d..bc03ed8690 100644 --- a/target/linux/ramips/dts/mt7621_totolink_x5000r.dts +++ b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts @@ -101,6 +101,21 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -122,13 +137,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e006>; - nvmem-cell-names = "mac-address"; - }; }; }; 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 67668657bd..c626df1ef4 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts @@ -168,16 +168,24 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_config_8>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_config_8>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; - }; - port@1 { status = "okay"; label = "lan1"; 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 b40448791a..cd7cae6355 100644 --- a/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts @@ -158,13 +158,23 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "lan0"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "lan0"; - }; - port@1 { status = "okay"; label = "lan3"; diff --git a/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts index 0be4af39e8..4fa799789c 100644 --- a/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts @@ -156,14 +156,24 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "lan0"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { compatible = "mediatek,mt7530"; ports { - port@0 { - status = "okay"; - label = "lan0"; - }; - port@1 { status = "okay"; label = "lan3"; diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts index bca7c61690..2b5993db44 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts @@ -4,3 +4,26 @@ model = "Ubiquiti EdgeRouter X"; compatible = "ubnt,edgerouter-x", "mediatek,mt7621-soc"; }; + +&gmac1 { + status = "okay"; + label = "eth0"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_22>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + +&switch0 { + ports { + port@0 { + status = "disabled"; + }; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts b/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts index 166320caca..e148242387 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts @@ -61,6 +61,21 @@ label = "dsa"; }; +&gmac1 { + status = "okay"; + label = "lan1"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_eeprom>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -82,11 +97,6 @@ status = "okay"; label = "lan2"; }; - - port@4 { - status = "okay"; - label = "lan1"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts b/target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts index 84172cdd17..6e75d1b930 100644 --- a/target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts @@ -52,7 +52,7 @@ nvmem-cell-names = "mac-address"; }; -&wan { +&gmac1 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; mac-address-increment = <1>; diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi b/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi index 1d070c7909..f2900e4806 100644 --- a/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi @@ -72,13 +72,20 @@ }; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - wan: port@0 { - status = "okay"; - label = "wan"; - }; - port@1 { status = "okay"; label = "lan1"; diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-06-16m.dts b/target/linux/ramips/dts/mt7621_unielec_u7621-06-16m.dts index 41aa2dce5e..d7dd4ccd46 100644 --- a/target/linux/ramips/dts/mt7621_unielec_u7621-06-16m.dts +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-06-16m.dts @@ -57,7 +57,7 @@ nvmem-cell-names = "mac-address"; }; -&wan { +&gmac1 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; mac-address-increment = <1>; diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-06-64m.dts b/target/linux/ramips/dts/mt7621_unielec_u7621-06-64m.dts index a66969a803..669340f194 100644 --- a/target/linux/ramips/dts/mt7621_unielec_u7621-06-64m.dts +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-06-64m.dts @@ -58,7 +58,7 @@ nvmem-cell-names = "mac-address"; }; -&wan { +&gmac1 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; mac-address-increment = <1>; diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi b/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi index 8dad53812f..9e91a0a299 100644 --- a/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi @@ -73,6 +73,18 @@ status = "okay"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -94,11 +106,6 @@ status = "okay"; label = "lan4"; }; - - wan: port@4 { - status = "okay"; - label = "wan"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts index e9bd6e1cab..64f588dc50 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts @@ -180,6 +180,21 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@1 { @@ -196,13 +211,6 @@ status = "okay"; label = "lan1"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e000>; - nvmem-cell-names = "mac-address"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts index 67a44dad11..232a720e54 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts @@ -69,6 +69,21 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@1 { @@ -80,13 +95,6 @@ status = "okay"; label = "lan1"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e006>; - nvmem-cell-names = "mac-address"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi index 4c469a2836..a0ee79ae23 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi @@ -11,7 +11,7 @@ led-failsafe = &led_status_yellow; led-running = &led_status_blue; led-upgrade = &led_status_yellow; - label-mac-device = &wan; + label-mac-device = &gmac1; }; chosen { @@ -135,6 +135,21 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@2 { @@ -146,13 +161,6 @@ status = "okay"; label = "lan1"; }; - - wan: port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e006>; - nvmem-cell-names = "mac-address"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dtsi index dfdbcc77d4..a6c0033227 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dtsi +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dtsi @@ -144,6 +144,21 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_3fffa>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -160,13 +175,6 @@ status = "okay"; label = "lan3"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_3fffa>; - nvmem-cell-names = "mac-address"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi index 7faf9b3e89..78f154b3ae 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi +++ b/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi @@ -29,15 +29,23 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e006>; - nvmem-cell-names = "mac-address"; - }; - port@2 { status = "okay"; label = "lan1"; diff --git a/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts index 0027bc96fe..e4de0b8231 100644 --- a/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts +++ b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts @@ -90,6 +90,22 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -111,14 +127,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_4>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts index 6813a2cf05..2d61b87560 100644 --- a/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts +++ b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts @@ -129,15 +129,23 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e006>; - nvmem-cell-names = "mac-address"; - }; - port@1 { status = "okay"; label = "lan1"; diff --git a/target/linux/ramips/dts/mt7621_youku_yk-l2.dts b/target/linux/ramips/dts/mt7621_youku_yk-l2.dts index 19ba7c08de..e588e047eb 100644 --- a/target/linux/ramips/dts/mt7621_youku_yk-l2.dts +++ b/target/linux/ramips/dts/mt7621_youku_yk-l2.dts @@ -137,6 +137,21 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -158,13 +173,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e006>; - nvmem-cell-names = "mac-address"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts index 9638f1f060..75fe3cf581 100644 --- a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts +++ b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts @@ -130,16 +130,24 @@ nvmem-cell-names = "mac-address"; }; +&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@0 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e000>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; - }; - port@1 { status = "okay"; label = "lan"; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts index 80166158b2..6aafe385ae 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts @@ -78,6 +78,21 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -99,13 +114,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e006>; - nvmem-cell-names = "mac-address"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts index b156b12fc8..a6d0e9a7c2 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts @@ -100,6 +100,21 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -121,13 +136,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e006>; - nvmem-cell-names = "mac-address"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi index 356cf4b442..c80544cfc9 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi @@ -153,6 +153,21 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { ports { port@0 { @@ -174,13 +189,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e006>; - nvmem-cell-names = "mac-address"; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi index d25217598e..f19cb4db17 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi @@ -170,6 +170,21 @@ nvmem-cell-names = "mac-address"; }; +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + &switch0 { gpio-controller; #gpio-cells = <2>; @@ -194,13 +209,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_e006>; - nvmem-cell-names = "mac-address"; - }; }; };