From f1c9afd801380a05a91d979b475c76cc0a67caae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= Date: Wed, 6 Jul 2022 01:20:32 +0300 Subject: [PATCH] ramips: mt7621-dts: mux phy0/4 to gmac1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- target/linux/ramips/dts/mt7621_adslr_g7.dts | 24 +++++++++++------ .../ramips/dts/mt7621_afoundry_ew1200.dts | 24 +++++++++++------ .../dts/mt7621_ampedwireless_ally-r1900k.dts | 17 ++++++++---- .../ramips/dts/mt7621_arcadyan_wg4xx223.dtsi | 20 ++++++++++---- .../ramips/dts/mt7621_asiarf_ap7621-001.dts | 24 +++++++++++------ .../ramips/dts/mt7621_asiarf_ap7621-nv1.dts | 24 +++++++++++------ .../linux/ramips/dts/mt7621_asus_rt-ac57u.dts | 22 +++++++++++----- .../ramips/dts/mt7621_asus_rt-acx5p.dtsi | 20 ++++++++++---- .../linux/ramips/dts/mt7621_asus_rt-ax53u.dts | 20 ++++++++++---- .../ramips/dts/mt7621_asus_rt-n56u-b1.dts | 24 +++++++++++------ .../dts/mt7621_beeline_smartbox-giga.dts | 25 +++++++++++------- .../dts/mt7621_beeline_smartbox-turbo.dts | 25 +++++++++++------- .../ramips/dts/mt7621_buffalo_wsr-1166dhp.dts | 17 ++++++++---- .../dts/mt7621_buffalo_wsr-2533dhpl.dts | 21 +++++++++++---- .../ramips/dts/mt7621_buffalo_wsr-600dhp.dts | 20 ++++++++++---- .../linux/ramips/dts/mt7621_cudy_wr1300.dts | 24 +++++++++++------ .../linux/ramips/dts/mt7621_cudy_wr2100.dts | 25 +++++++++++------- target/linux/ramips/dts/mt7621_cudy_x6.dts | 24 +++++++++++------ .../ramips/dts/mt7621_dlink_dir-853-a3.dts | 22 +++++++++++----- .../ramips/dts/mt7621_dlink_dir-853-r1.dts | 26 ++++++++++++------- .../ramips/dts/mt7621_dlink_dir-860l-b1.dts | 20 ++++++++++---- .../ramips/dts/mt7621_dlink_dir-867-a1.dts | 2 +- .../ramips/dts/mt7621_dlink_dir-878-a1.dts | 2 +- .../ramips/dts/mt7621_dlink_dir-878-r1.dts | 2 +- .../ramips/dts/mt7621_dlink_dir-882-a1.dts | 2 +- .../ramips/dts/mt7621_dlink_dir-882-r1.dts | 2 +- .../ramips/dts/mt7621_dlink_dir-8xx.dtsi | 17 ++++++++---- .../ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi | 22 +++++++++++----- .../linux/ramips/dts/mt7621_edimax_rx21s.dtsi | 20 ++++++++++---- .../dts/mt7621_elecom_wrc-1167ghbk2-s.dts | 22 +++++++++++----- .../dts/mt7621_elecom_wrc-1167gs2-b.dts | 2 +- .../ramips/dts/mt7621_elecom_wrc-1167gst2.dts | 2 +- .../ramips/dts/mt7621_elecom_wrc-1750gs.dts | 2 +- .../ramips/dts/mt7621_elecom_wrc-1750gst2.dts | 2 +- .../ramips/dts/mt7621_elecom_wrc-1750gsv.dts | 2 +- .../ramips/dts/mt7621_elecom_wrc-1900gst.dts | 2 +- .../dts/mt7621_elecom_wrc-2533ghbk-i.dts | 17 ++++++++---- .../ramips/dts/mt7621_elecom_wrc-2533gs2.dts | 2 +- .../ramips/dts/mt7621_elecom_wrc-2533gst.dts | 2 +- .../ramips/dts/mt7621_elecom_wrc-2533gst2.dts | 2 +- .../ramips/dts/mt7621_elecom_wrc-gs.dtsi | 19 +++++++++----- .../ramips/dts/mt7621_gehua_ghl-r-001.dts | 24 +++++++++++------ .../ramips/dts/mt7621_glinet_gl-mt1300.dts | 24 +++++++++++------ .../linux/ramips/dts/mt7621_gnubee_gb-pc1.dts | 20 ++++++++++---- .../dts/mt7621_hilink_hlk-7621a-evb.dts | 17 ++++++++---- .../linux/ramips/dts/mt7621_hiwifi_hc5962.dts | 17 ++++++++---- target/linux/ramips/dts/mt7621_humax_e10.dts | 24 +++++++++++------ .../ramips/dts/mt7621_iodata_wn-ax1167gr.dts | 24 +++++++++++------ .../ramips/dts/mt7621_iodata_wn-dx1200gr.dts | 24 +++++++++++------ .../ramips/dts/mt7621_iodata_wn-gx300gr.dts | 24 +++++++++++------ .../ramips/dts/mt7621_iodata_wn-xx-xr.dtsi | 24 +++++++++++------ .../ramips/dts/mt7621_iodata_wnpr2600g.dts | 20 ++++++++++---- .../ramips/dts/mt7621_iptime_a3002mesh.dts | 22 +++++++++++----- .../ramips/dts/mt7621_iptime_a3004ns-dual.dts | 22 +++++++++++----- .../linux/ramips/dts/mt7621_iptime_a3004t.dts | 24 +++++++++++------ .../ramips/dts/mt7621_iptime_a6004ns-m.dtsi | 22 +++++++++++----- .../linux/ramips/dts/mt7621_iptime_a8004t.dts | 22 +++++++++++----- .../ramips/dts/mt7621_iptime_ax2004m.dts | 24 +++++++++++------ .../linux/ramips/dts/mt7621_iptime_t5004.dts | 17 ++++++++---- .../ramips/dts/mt7621_jcg_jhr-ac876m.dts | 23 +++++++++++----- target/linux/ramips/dts/mt7621_jcg_q20.dts | 22 +++++++++++----- target/linux/ramips/dts/mt7621_jcg_y2.dts | 22 +++++++++++----- .../ramips/dts/mt7621_lenovo_newifi-d1.dts | 22 +++++++++++----- .../linux/ramips/dts/mt7621_linksys_e5600.dts | 17 ++++++++---- .../ramips/dts/mt7621_linksys_ea6350-v4.dts | 17 ++++++++++-- .../ramips/dts/mt7621_linksys_ea7xxx.dtsi | 17 ++++++++---- .../ramips/dts/mt7621_linksys_re6500.dts | 20 ++++++++++---- .../dts/mt7621_mediatek_ap-mt7621a-v60.dts | 24 +++++++++++------ .../dts/mt7621_mediatek_mt7621-eval-board.dts | 17 ++++++++---- .../mt7621_mikrotik_routerboard-750gr3.dts | 20 ++++++++++++++ .../dts/mt7621_mikrotik_routerboard-m33g.dts | 17 ++++++++---- .../linux/ramips/dts/mt7621_mqmaker_witi.dts | 24 +++++++++++------ .../linux/ramips/dts/mt7621_netgear_r6220.dts | 2 +- .../dts/mt7621_netgear_sercomm_ayx.dtsi | 17 ++++++++---- .../dts/mt7621_netgear_sercomm_bzv.dtsi | 24 +++++++++++------ .../dts/mt7621_netgear_sercomm_chj.dtsi | 24 +++++++++++------ .../ramips/dts/mt7621_netgear_wac104.dts | 20 ++++++++++---- .../ramips/dts/mt7621_netgear_wax202.dts | 17 ++++++++---- .../ramips/dts/mt7621_netgear_wndr3700-v5.dts | 2 +- .../linux/ramips/dts/mt7621_netis_wf2881.dts | 22 +++++++++++----- .../linux/ramips/dts/mt7621_oraybox_x3a.dts | 24 +++++++++++------ .../linux/ramips/dts/mt7621_phicomm_k2p.dts | 22 +++++++++++----- .../linux/ramips/dts/mt7621_planex_vr500.dts | 22 +++++++++++----- .../dts/mt7621_raisecom_msg1500-x-00.dts | 17 ++++++++---- .../dts/mt7621_renkforce_ws-wn530hp3-a.dts | 24 +++++++++++------ .../dts/mt7621_samknows_whitebox-v8.dts | 22 +++++++++++----- .../dts/mt7621_storylink_sap-g3200u3.dts | 24 +++++++++++------ .../ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts | 26 ++++++++++++------- .../ramips/dts/mt7621_totolink_a7000r.dts | 24 +++++++++++------ .../ramips/dts/mt7621_totolink_x5000r.dts | 22 +++++++++++----- .../dts/mt7621_tplink_archer-c6u-v1.dts | 24 +++++++++++------ .../dts/mt7621_tplink_eap235-wall-v1.dts | 20 ++++++++++---- .../dts/mt7621_tplink_eap615-wall-v1.dts | 20 ++++++++++---- .../ramips/dts/mt7621_ubnt_edgerouter-x.dts | 23 ++++++++++++++++ .../linux/ramips/dts/mt7621_ubnt_usw-flex.dts | 20 ++++++++++---- .../dts/mt7621_unielec_u7621-01-16m.dts | 2 +- .../ramips/dts/mt7621_unielec_u7621-01.dtsi | 17 ++++++++---- .../dts/mt7621_unielec_u7621-06-16m.dts | 2 +- .../dts/mt7621_unielec_u7621-06-64m.dts | 2 +- .../ramips/dts/mt7621_unielec_u7621-06.dtsi | 17 ++++++++---- .../dts/mt7621_xiaomi_mi-router-3-pro.dts | 22 +++++++++++----- .../ramips/dts/mt7621_xiaomi_mi-router-4.dts | 22 +++++++++++----- .../dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi | 24 +++++++++++------ .../dts/mt7621_xiaomi_mi-router-cr660x.dtsi | 22 +++++++++++----- .../dts/mt7621_xiaomi_router-ac2100.dtsi | 22 +++++++++++----- .../linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts | 24 +++++++++++------ .../ramips/dts/mt7621_youhua_wr1200js.dts | 22 +++++++++++----- .../linux/ramips/dts/mt7621_youku_yk-l2.dts | 22 +++++++++++----- .../linux/ramips/dts/mt7621_yuncore_ax820.dts | 24 +++++++++++------ .../ramips/dts/mt7621_zbtlink_zbt-we1326.dts | 22 +++++++++++----- .../ramips/dts/mt7621_zbtlink_zbt-we3526.dts | 22 +++++++++++----- .../ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi | 22 +++++++++++----- .../ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi | 22 +++++++++++----- 113 files changed, 1429 insertions(+), 635 deletions(-) diff --git a/target/linux/ramips/dts/mt7621_adslr_g7.dts b/target/linux/ramips/dts/mt7621_adslr_g7.dts index 95f2ac3a20b7..956733f7c3e8 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 2ed9f716ab74..119acd977c03 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 cd2536e17906..07e0d23788d7 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 5a845c4e9ba4..8c4be8440d59 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 c74fee3102c9..5e57842d6812 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 907b6d147010..dabc1a3bd340 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 60ab3e1646c6..4e8c68ddf169 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 0ccc3c7ecc5f..b71437bfe62d 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 790f6cecb54e..329121595abb 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 63ab424b881c..c8d286e7ed15 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 efea79e2e204..22fc065eb299 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 d987046a0f35..733be13e1366 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 5a259e154c57..a8d76b544e25 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 789edca6dfa8..be85e8ee6ecb 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 15d055bee65d..f46bc256d0c0 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 3fd67c967a23..2398612847ec 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 21d03322a75e..b2e75762a5d1 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 ebb21491720b..ad51aca28fac 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 49d0c050f59f..5408e5139997 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 c0ad172939ab..8ec6ef3a7d29 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 7a48a931e71e..fac41f206bb9 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 0f09fae24600..ae0cc8fc8a92 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 9c73ffa12365..31b41f838473 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 b6453bdd216a..dbde89b2207b 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 3db056f68f49..d6206427bf0e 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 6cfa28b7cf21..6288d19c8a85 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 556ca8b0037d..b570d074c6f7 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 9dcc050af2a9..07f84592e4b0 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 f9a6c375c2a6..1301f1375c88 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 8e87fd06bc6e..2fdb62840a68 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 97e0ab2956e8..81ace64e44bc 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 dfc58c1ff603..cb2e20279375 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 2f82eaf12b46..8450af590740 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 2eda4ba23a81..a57a4290affa 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 7f2f04d9eace..f01f6fc25f03 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 df66c2772d72..ec433e265de3 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 a5436d55d7b0..8da1099dc948 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 0036b52032dd..7e88f7be04f4 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 acf6ddab9427..1d174006bd0d 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 dbf0f4d20244..b71a2b4390f1 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 9cf2b666b4e1..acd3004eb7b6 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 4f652b90bb29..cb9f9bdad1eb 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 384da1bfa9fa..a332a87a5727 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 21a18391275b..29f9f09ee587 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 9776f43e02b2..3fb267d78216 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 774fb93d9cd6..d9ca1012ceaf 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 41587629c035..638d73c3effe 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 cc6446b75c84..69c79d7dc768 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 b63b4783b8d3..4837f29a46ce 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 398a84117c1d..8a09675bffbe 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 1dd3d7787801..89e7f4b3e9fc 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 6af6bdce7a71..871327f8a70c 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 dc63adedf043..678ce0680643 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 fa3f146e81c6..c08b6427e769 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 704ecac72114..97b6b1c3ee0f 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 a033d7f66535..b00fbeb47f91 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 a00e921a4985..0f5870140fb7 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 6da223689c20..554d73ce3d4c 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 c6c919cfb1f1..ee82ffbd8574 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 da832d6df56a..5d346be1d274 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 c9bf648a31af..0425c534386c 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 5de6ba6d950b..f8ae9b41df80 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 e8069ec3945b..a6e38234dafb 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 91db315914e4..3b23a25f8b51 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 272b01af1e6b..654c9aa70f4e 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 5e9c82507d4a..4663d873fe95 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 680bc863cd4c..0d0c5c3be5c7 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 a89d9189c093..557abcc21af2 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 dcdcc261b3fb..2da7f983a930 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 7f329b23593f..aad8a6776d29 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 d457c43426d3..223d03b9fd12 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 cb6310df18d1..16cebbad74c0 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 54489243b882..0f476ef06040 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 ae9e40e62116..0ae6ab46f7a3 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 2be3f878692d..9fa4af8fd666 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 c2dc98787114..eaf12a891ef2 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 61ab0574a7d0..3b5d6ae2d99b 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 fef809425612..f17a8053630e 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 972aba1c5e40..276e7c959f56 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 56a2647638cb..af09073e3d36 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 a97b0900aa77..fd7a8e6eca1d 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 078b76a50b45..b18d12608acc 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 fb6a42166f59..1da6d2cca125 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 13d39195a92c..3c5f1e520c79 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 13e37d7124eb..c56c2f1554c0 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 929c2a8f2651..d1f51feddddf 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 19eb11111dbc..833e1b07d0c9 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 d658c454a878..2d91d1c481a1 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 e817278728f2..bba0d4a5d370 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 8066340c5deb..bc03ed869064 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 67668657bd14..c626df1ef4e6 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 b40448791abc..cd7cae635509 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 0be4af39e8e2..4fa799789c04 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 bca7c616900f..2b5993db44f2 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 166320cacabc..e148242387f3 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 84172cdd175a..6e75d1b9309f 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 1d070c7909f9..f2900e48060b 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 41aa2dce5e6c..d7dd4ccd4616 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 a66969a8035c..669340f194c3 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 8dad53812f1e..9e91a0a2993d 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 e9bd6e1cab35..64f588dc5015 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 67a44dad117f..232a720e5492 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 4c469a2836fa..a0ee79ae23ce 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 dfdbcc77d437..a6c0033227ea 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 7faf9b3e89ac..78f154b3aed1 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 0027bc96fe4a..e4de0b82310f 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 6813a2cf05c0..2d61b8756052 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 19ba7c08de34..e588e047eb52 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 9638f1f06090..75fe3cf58185 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 80166158b29d..6aafe385ae68 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 b156b12fc8e0..a6d0e9a7c205 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 356cf4b442f2..c80544cfc95d 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 d25217598e00..f19cb4db1711 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"; - }; }; }; -- 2.30.2