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 95f2ac3a20b..956733f7c3e 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 2ed9f716ab7..119acd977c0 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 cd2536e1790..07e0d23788d 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 5a845c4e9ba..8c4be8440d5 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 c74fee3102c..5e57842d681 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 907b6d14701..dabc1a3bd34 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 60ab3e1646c..4e8c68ddf16 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 0ccc3c7ecc5..b71437bfe62 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 790f6cecb54..329121595ab 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 63ab424b881..c8d286e7ed1 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 efea79e2e20..22fc065eb29 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 d987046a0f3..733be13e136 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 5a259e154c5..a8d76b544e2 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 789edca6dfa..be85e8ee6ec 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 15d055bee65..f46bc256d0c 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 3fd67c967a2..2398612847e 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 21d03322a75..b2e75762a5d 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 ebb21491720..ad51aca28fa 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 49d0c050f59..5408e513999 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 c0ad172939a..8ec6ef3a7d2 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 7a48a931e71..fac41f206bb 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 0f09fae2460..ae0cc8fc8a9 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 9c73ffa1236..31b41f83847 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 b6453bdd216..dbde89b2207 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 3db056f68f4..d6206427bf0 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 6cfa28b7cf2..6288d19c8a8 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 556ca8b0037..b570d074c6f 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 9dcc050af2a..07f84592e4b 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 f9a6c375c2a..1301f1375c8 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 8e87fd06bc6..2fdb62840a6 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 97e0ab2956e..81ace64e44b 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 dfc58c1ff60..cb2e2027937 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 2f82eaf12b4..8450af59074 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 2eda4ba23a8..a57a4290aff 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 7f2f04d9eac..f01f6fc25f0 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 df66c2772d7..ec433e265de 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 a5436d55d7b..8da1099dc94 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 0036b52032d..7e88f7be04f 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 acf6ddab942..1d174006bd0 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 dbf0f4d2024..b71a2b4390f 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 9cf2b666b4e..acd3004eb7b 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 4f652b90bb2..cb9f9bdad1e 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 384da1bfa9f..a332a87a572 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 21a18391275..29f9f09ee58 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 9776f43e02b..3fb267d7821 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 774fb93d9cd..d9ca1012cea 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 41587629c03..638d73c3eff 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 cc6446b75c8..69c79d7dc76 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 b63b4783b8d..4837f29a46c 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 398a84117c1..8a09675bffb 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 1dd3d778780..89e7f4b3e9f 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 6af6bdce7a7..871327f8a70 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 dc63adedf04..678ce068064 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 fa3f146e81c..c08b6427e76 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 704ecac7211..97b6b1c3ee0 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 a033d7f6653..b00fbeb47f9 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 a00e921a498..0f5870140fb 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 6da223689c2..554d73ce3d4 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 c6c919cfb1f..ee82ffbd857 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 da832d6df56..5d346be1d27 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 c9bf648a31a..0425c534386 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 5de6ba6d950..f8ae9b41df8 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 e8069ec3945..a6e38234daf 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 91db315914e..3b23a25f8b5 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 272b01af1e6..654c9aa70f4 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 5e9c82507d4..4663d873fe9 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 680bc863cd4..0d0c5c3be5c 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 a89d9189c09..557abcc21af 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 dcdcc261b3f..2da7f983a93 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 7f329b23593..aad8a6776d2 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 d457c43426d..223d03b9fd1 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 cb6310df18d..16cebbad74c 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 54489243b88..0f476ef0604 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 ae9e40e6211..0ae6ab46f7a 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 2be3f878692..9fa4af8fd66 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 c2dc9878711..eaf12a891ef 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 61ab0574a7d..3b5d6ae2d99 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 fef80942561..f17a8053630 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 972aba1c5e4..276e7c959f5 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 56a2647638c..af09073e3d3 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 a97b0900aa7..fd7a8e6eca1 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 078b76a50b4..b18d12608ac 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 fb6a42166f5..1da6d2cca12 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 13d39195a92..3c5f1e520c7 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 13e37d7124e..c56c2f1554c 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 929c2a8f265..d1f51fedddd 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 19eb11111db..833e1b07d0c 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 d658c454a87..2d91d1c481a 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 e817278728f..bba0d4a5d37 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 8066340c5de..bc03ed86906 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 67668657bd1..c626df1ef4e 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 b40448791ab..cd7cae63550 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 0be4af39e8e..4fa799789c0 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 bca7c616900..2b5993db44f 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 166320cacab..e148242387f 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 84172cdd175..6e75d1b9309 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 1d070c7909f..f2900e48060 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 41aa2dce5e6..d7dd4ccd461 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 a66969a8035..669340f194c 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 8dad53812f1..9e91a0a2993 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 e9bd6e1cab3..64f588dc501 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 67a44dad117..232a720e549 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 4c469a2836f..a0ee79ae23c 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 dfdbcc77d43..a6c0033227e 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 7faf9b3e89a..78f154b3aed 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 0027bc96fe4..e4de0b82310 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 6813a2cf05c..2d61b875605 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 19ba7c08de3..e588e047eb5 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 9638f1f0609..75fe3cf5818 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 80166158b29..6aafe385ae6 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 b156b12fc8e..a6d0e9a7c20 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 356cf4b442f..c80544cfc95 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 d25217598e0..f19cb4db171 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