diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi index ff29244ca..dec7058dc 100644 --- a/target/linux/ramips/dts/mt7621.dtsi +++ b/target/linux/ramips/dts/mt7621.dtsi @@ -490,7 +490,13 @@ compatible = "mediatek,eth-mac"; reg = <1>; status = "disabled"; - phy-mode = "rgmii-rxid"; + phy-mode = "rgmii"; + + fixed-link { + speed = <1000>; + full-duplex; + pause; + }; }; mdio: mdio-bus { @@ -567,7 +573,7 @@ mtketh-wan = "wan"; mtketh-ppd = "lan"; mtketh-lan = "lan"; - mtketh-max-gmac = <2>; + mtketh-max-gmac = <1>; mtkdsa-wan-port = <4>; }; diff --git a/target/linux/ramips/dts/mt7621_adslr_g7.dts b/target/linux/ramips/dts/mt7621_adslr_g7.dts index 1b9e35b7e..3290a5e71 100644 --- a/target/linux/ramips/dts/mt7621_adslr_g7.dts +++ b/target/linux/ramips/dts/mt7621_adslr_g7.dts @@ -104,19 +104,6 @@ mtd-mac-address = <&factory 0xe00c>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - mtd-mac-address = <&factory 0xe00c>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -138,6 +125,13 @@ status = "okay"; label = "lan4"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe00c>; + mtd-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 a7200c19c..ed9e9852d 100644 --- a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts +++ b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts @@ -109,19 +109,6 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - mtd-mac-address = <&factory 0xe000>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -143,6 +130,13 @@ status = "okay"; label = "lan4"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe000>; + mtd-mac-address-increment = <1>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts b/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts index eb9d10b3b..cf91dc031 100644 --- a/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts +++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts @@ -7,26 +7,18 @@ model = "AsiaRF AP7621-001"; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - - mtd-mac-address = <&factory 0xe000>; - mtd-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"; + mtd-mac-address = <&factory 0xe000>; + mtd-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 e23b5190a..5a4c03fb7 100644 --- a/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts +++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts @@ -7,23 +7,15 @@ model = "AsiaRF AP7621-NV1"; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy0>; - - mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <1>; -}; - -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; -}; - &switch0 { ports { + port@0 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe000>; + mtd-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 a860b3cc7..78f5584b4 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts @@ -133,21 +133,14 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy0>; - mtd-mac-address = <&factory 0xe006>; -}; - -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; -}; - &switch0 { ports { + port@0 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe006>; + }; + 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 63d5c612b..b5e8655cb 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi +++ b/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi @@ -134,22 +134,13 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy0>; - - mtd-mac-address = <&factory 0xe000>; -}; - -&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 2d4145423..b78e594ff 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 = &gmac1; + label-mac-device = &wan; led-boot = &led_power; led-failsafe = &led_power; led-running = &led_power; @@ -143,19 +143,6 @@ mtd-mac-address = <&factory 0x8004>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - mtd-mac-address = <&factory 0x4>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -177,6 +164,12 @@ status = "okay"; label = "lan1"; }; + + wan: port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0x4>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts index a8d76b544..5a259e154 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts @@ -152,18 +152,6 @@ }; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -185,6 +173,11 @@ 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 376490113..048eac5a3 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts @@ -168,23 +168,13 @@ mtd-mac-address-increment = <(-1)>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy0>; - - mtd-mac-address = <&factory 0x4>; - mtd-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 8c85f775e..3436757e1 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts @@ -176,19 +176,6 @@ mtd-mac-address = <&factory 0x4>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - mtd-mac-address = <&factory 0x4>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -210,6 +197,11 @@ 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 609cd8581..a66ce942a 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr1300.dts +++ b/target/linux/ramips/dts/mt7621_cudy_wr1300.dts @@ -156,21 +156,6 @@ mtd-mac-address = <&bdinfo 0xde00>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - - mtd-mac-address = <&bdinfo 0xde00>; - mtd-mac-address-increment = <1>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -192,6 +177,13 @@ status = "okay"; label = "lan1"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&bdinfo 0xde00>; + mtd-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 142a50afb..692c94da5 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr2100.dts +++ b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts @@ -81,21 +81,6 @@ mtd-mac-address = <&bdinfo 0xde00>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - - mtd-mac-address = <&bdinfo 0xde00>; - mtd-mac-address-increment = <1>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &pcie { status = "okay"; }; @@ -204,5 +189,13 @@ status = "okay"; label = "lan4"; }; + + port@4 { + status = "okay"; + label = "wan"; + + mtd-mac-address = <&bdinfo 0xde00>; + mtd-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 972a31895..738bcdc7d 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts @@ -166,19 +166,6 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - mtd-mac-address = <&factory 0xe006>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -200,6 +187,12 @@ status = "okay"; label = "lan1"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe006>; + }; }; }; 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 0819d66ea..09e46b011 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 = &gmac1; + label-mac-device = &wan; led-boot = &led_power_orange; led-failsafe = &led_power_blue; led-running = &led_power_blue; @@ -105,21 +105,6 @@ mtd-mac-address-increment = <(-1)>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - - mtd-mac-address = <&factory 0x4>; - mtd-mac-address-increment = <(-2)>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -141,6 +126,13 @@ status = "okay"; label = "lan1"; }; + + wan: port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0x4>; + mtd-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 ac5758596..f843f6280 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts @@ -112,21 +112,13 @@ mtd-mac-address = <&radio 0x4>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy0>; - mtd-mac-address = <&radio 0x4>; -}; - -&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-8xx.dtsi b/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi index f6fc9caab..7ab0e8bd5 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi @@ -95,19 +95,6 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - mtd-mac-address = <&factory 0xe006>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -129,6 +116,12 @@ status = "okay"; label = "lan1"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe006>; + }; }; }; 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 4c367eeb1..a54b2be4f 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi @@ -155,19 +155,6 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - mtd-mac-address = <&factory 0xe006>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -189,6 +176,12 @@ status = "okay"; label = "lan1"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe006>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi b/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi index bc138ee73..3f3bae43f 100644 --- a/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi +++ b/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi @@ -121,21 +121,13 @@ mtd-mac-address = <&factory 0x4>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy0>; - mtd-mac-address = <&factory 0x4>; -}; - -&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 936076fd7..b6a738355 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts @@ -70,21 +70,14 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy0>; - mtd-mac-address = <&factory 0xe006>; -}; - -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; -}; - &switch0 { ports { + port@0 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe006>; + }; + 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 c367cf130..6349fd487 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts @@ -11,7 +11,7 @@ mtd-mac-address = <&factory 0xfff4>; }; -&gmac1 { +&wan { mtd-mac-address = <&factory 0xfffa>; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts index a7d2dabb7..11b782488 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts @@ -11,7 +11,7 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { +&wan { mtd-mac-address = <&factory 0xe006>; }; 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 8da1099dc..a5436d55d 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk-i.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk-i.dts @@ -136,20 +136,13 @@ }; }; -&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-gs-2pci.dtsi b/target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi index 412bd73ba..642724da1 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi @@ -6,7 +6,7 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { +&wan { mtd-mac-address = <&factory 0xe006>; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi b/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi index acd3004eb..9cf2b666b 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 = &gmac1; + label-mac-device = &wan; }; leds: leds { @@ -83,20 +83,13 @@ }; }; -&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 7d3573a71..50e47a543 100644 --- a/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts +++ b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts @@ -113,14 +113,7 @@ &gmac1 { mtd-mac-address = <&factory 0xe000>; mtd-mac-address-increment = <1>; - phy-mode = "rgmii"; status = "okay"; - - fixed-link { - speed = <1000>; - full-duplex; - pause; - }; }; &gsw { diff --git a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts index e3f12386b..20f63902a 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 = &gmac1; + label-mac-device = &wan; }; chosen { @@ -119,19 +119,6 @@ mtd-mac-address-increment = <1>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - mtd-mac-address = <&factory 0x4000>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@2 { @@ -143,6 +130,12 @@ status = "okay"; label = "lan2"; }; + + wan: port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0x4000>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts index 95dc635b2..bec557089 100644 --- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts +++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts @@ -104,24 +104,16 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "ethblue"; - phy-handle = <ðphy4>; - mtd-mac-address = <&factory 0xe000>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { status = "okay"; - label = "ethblack"; + label = "lan1"; + }; + + port@4 { + status = "okay"; + label = "lan2"; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts index 7820206ef..5ba206919 100644 --- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts +++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts @@ -104,30 +104,16 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "ethyellow"; - phy-handle = <ðphy5>; - mtd-mac-address = <&factory 0xe000>; -}; - -&mdio { - ethphy5: ethernet-phy@5 { - reg = <5>; - phy-mode = "rgmii-rxid"; - }; -}; - &switch0 { ports { port@0 { status = "okay"; - label = "ethblack"; + label = "lan1"; }; port@4 { status = "okay"; - label = "ethblue"; + label = "lan2"; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_hilink_hlk-7621a.dts b/target/linux/ramips/dts/mt7621_hilink_hlk-7621a.dts index 307fd73c4..d7b0ca394 100644 --- a/target/linux/ramips/dts/mt7621_hilink_hlk-7621a.dts +++ b/target/linux/ramips/dts/mt7621_hilink_hlk-7621a.dts @@ -73,6 +73,11 @@ status = "okay"; label = "lan4"; }; + + port@4 { + status = "okay"; + label = "wan"; + }; }; }; @@ -80,18 +85,6 @@ mtd-mac-address = <&factory 0x8004>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &state_default { gpio { groups = "rgmii2", "jtag"; diff --git a/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts b/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts index d9ca1012c..774fb93d9 100644 --- a/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts +++ b/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts @@ -129,18 +129,6 @@ }; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@1 { @@ -157,6 +145,11 @@ status = "okay"; label = "lan3"; }; + + port@4 { + status = "okay"; + label = "wan"; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts index 5e3859786..879fb68c8 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts @@ -131,23 +131,15 @@ mtd-mac-address = <&iNIC_rf 0x4>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy0>; - - mtd-mac-address = <&factory 0x4>; - mtd-mac-address-increment = <1>; -}; - -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; -}; - &switch0 { ports { + port@0 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0x4>; + mtd-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 ab28797ed..055c1abde 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 = &gmac1; + label-mac-device = &wan; }; leds { @@ -130,21 +130,14 @@ mtd-mac-address = <&factory 0x1e000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy0>; - mtd-mac-address = <&factory 0x1e006>; -}; - -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; -}; - &switch0 { ports { + wan: port@0 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0x1e006>; + }; + 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 ad215dafa..06d024e9a 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts @@ -131,23 +131,15 @@ mtd-mac-address = <&factory 0x4>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy0>; - - mtd-mac-address = <&factory 0x4>; - mtd-mac-address-increment = <1>; -}; - -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; -}; - &switch0 { ports { + port@0 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0x4>; + mtd-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 6f8e75e6d..ff9e525ae 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 = &gmac1; + label-mac-device = &wan; }; leds { @@ -121,22 +121,14 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy0>; - - mtd-mac-address = <&factory 0xe006>; -}; - -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; -}; - &switch0 { ports { + wan: port@0 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe006>; + }; + 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 572293ce9..0e808f689 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts @@ -123,22 +123,13 @@ mtd-mac-address = <&factory 0x4>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy0>; - - mtd-mac-address = <&factory 0x4>; -}; - -&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_a6ns-m.dts b/target/linux/ramips/dts/mt7621_iptime_a6ns-m.dts index 5aa4b350c..4ebd98052 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a6ns-m.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a6ns-m.dts @@ -114,22 +114,14 @@ mtd-mac-address = <&uboot 0x1fc20>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy0>; - - mtd-mac-address = <&uboot 0x1fc40>; -}; - -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; -}; - &switch0 { ports { + port@0 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&uboot 0x1fc40>; + }; + 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 04134beec..df6aed664 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts @@ -98,22 +98,14 @@ mtd-mac-address = <&uboot 0x1fc20>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy0>; - - mtd-mac-address = <&uboot 0x1fc40>; -}; - -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; -}; - &switch0 { ports { + port@0 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&uboot 0x1fc40>; + }; + 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 99dc6d0ba..ae312fcc5 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 = &gmac1; + label-mac-device = &wan; }; leds { @@ -132,19 +132,6 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - mtd-mac-address = <&factory 0x4>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -169,6 +156,7 @@ wan: port@4 { status = "okay"; label = "wan"; + mtd-mac-address = <&factory 0x4>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_jcg_jhr-ac945m.dts b/target/linux/ramips/dts/mt7621_jcg_jhr-ac945m.dts index c67455a28..c604bca1c 100644 --- a/target/linux/ramips/dts/mt7621_jcg_jhr-ac945m.dts +++ b/target/linux/ramips/dts/mt7621_jcg_jhr-ac945m.dts @@ -93,19 +93,6 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - mtd-mac-address = <&factory 0xe006>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -127,6 +114,12 @@ status = "okay"; label = "lan4"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe006>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_jcg_q20.dts b/target/linux/ramips/dts/mt7621_jcg_q20.dts index 3f4978c72..f0e829393 100644 --- a/target/linux/ramips/dts/mt7621_jcg_q20.dts +++ b/target/linux/ramips/dts/mt7621_jcg_q20.dts @@ -147,25 +147,14 @@ mtd-mac-address = <&factory 0x3fff4>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy0>; - mtd-mac-address = <&factory 0x3fffa>; -}; - -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; -}; - -&hnat { - mtkdsa-wan-port = <0>; -}; - &switch0 { ports { + port@0 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0x3fffa>; + }; + 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 ccbe9f8c1..bd88923f7 100644 --- a/target/linux/ramips/dts/mt7621_jcg_y2.dts +++ b/target/linux/ramips/dts/mt7621_jcg_y2.dts @@ -94,14 +94,7 @@ &gmac1 { mtd-mac-address = <&factory 0xe006>; - phy-mode = "rgmii"; status = "okay"; - - fixed-link { - speed = <1000>; - full-duplex; - pause; - }; }; &gsw { diff --git a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts index b506457de..fa2690072 100644 --- a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts +++ b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts @@ -135,19 +135,6 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - mtd-mac-address = <&factory 0xe006>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@1 { @@ -159,6 +146,12 @@ status = "okay"; label = "lan1"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe006>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_linksys_e5600.dts b/target/linux/ramips/dts/mt7621_linksys_e5600.dts index 3b23a25f8..91db31591 100644 --- a/target/linux/ramips/dts/mt7621_linksys_e5600.dts +++ b/target/linux/ramips/dts/mt7621_linksys_e5600.dts @@ -148,18 +148,6 @@ }; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -181,6 +169,11 @@ status = "okay"; label = "lan4"; }; + + port@4 { + status = "okay"; + label = "wan"; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi b/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi index 848223a1d..ecff6406d 100644 --- a/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi +++ b/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi @@ -173,20 +173,13 @@ }; }; -&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 3a2e42e77..319d0d7fb 100644 --- a/target/linux/ramips/dts/mt7621_linksys_re6500.dts +++ b/target/linux/ramips/dts/mt7621_linksys_re6500.dts @@ -116,22 +116,13 @@ mtd-mac-address = <&factory 0x2e>; }; -&gmac1 { - status = "okay"; - label = "lan1"; - phy-handle = <ðphy0>; - - mtd-mac-address = <&factory 0x2e>; -}; - -&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 ae6d89fbb..811b02fe0 100644 --- a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts +++ b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts @@ -116,21 +116,6 @@ mtd-mac-address = <&factory 0x5>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - - mtd-mac-address = <&factory 0x5>; - mtd-mac-address-increment = <1>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -152,6 +137,13 @@ status = "okay"; label = "lan4"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0x5>; + mtd-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 2da7f983a..dcdcc261b 100644 --- a/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts +++ b/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts @@ -39,18 +39,6 @@ status = "okay"; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -72,6 +60,11 @@ 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 aad8a6776..7f329b235 100644 --- a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts +++ b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts @@ -35,23 +35,3 @@ 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 223d03b9f..d457c4342 100644 --- a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts +++ b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts @@ -90,20 +90,13 @@ }; }; -&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 275baf5c7..45901474d 100644 --- a/target/linux/ramips/dts/mt7621_mqmaker_witi.dts +++ b/target/linux/ramips/dts/mt7621_mqmaker_witi.dts @@ -97,21 +97,6 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - - mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <1>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -133,6 +118,13 @@ status = "okay"; label = "lan4"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe000>; + mtd-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 96c7e001a..1a19cd048 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi @@ -110,21 +110,6 @@ mtd-mac-address = <&factory 0x4>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - - mtd-mac-address = <&factory 0x4>; - mtd-mac-address-increment = <1>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -146,6 +131,13 @@ status = "okay"; label = "lan1"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0x4>; + mtd-mac-address-increment = <1>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi index de695b467..71c95e75b 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi @@ -165,21 +165,6 @@ mtd-mac-address = <&factory 0x4>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - - mtd-mac-address = <&factory 0x4>; - mtd-mac-address-increment = <2>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -201,6 +186,13 @@ status = "okay"; label = "lan1"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0x4>; + mtd-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 36909015b..7a15cd1f6 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi @@ -99,21 +99,6 @@ mtd-mac-address = <&factory 0x4>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - - mtd-mac-address = <&factory 0x4>; - mtd-mac-address-increment = <2>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -135,6 +120,13 @@ status = "okay"; label = "lan1"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0x4>; + mtd-mac-address-increment = <2>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_netis_wf2881.dts b/target/linux/ramips/dts/mt7621_netis_wf2881.dts index 902e765c8..7dfd133a4 100644 --- a/target/linux/ramips/dts/mt7621_netis_wf2881.dts +++ b/target/linux/ramips/dts/mt7621_netis_wf2881.dts @@ -125,19 +125,6 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - mtd-mac-address = <&factory 0xe006>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -159,6 +146,12 @@ status = "okay"; label = "lan1"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe006>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_oraybox_x3a.dts b/target/linux/ramips/dts/mt7621_oraybox_x3a.dts index fd7a8e6ec..a97b0900a 100644 --- a/target/linux/ramips/dts/mt7621_oraybox_x3a.dts +++ b/target/linux/ramips/dts/mt7621_oraybox_x3a.dts @@ -128,22 +128,6 @@ 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 { @@ -155,6 +139,14 @@ 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 01fb5e866..ad64ee5d5 100644 --- a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts +++ b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts @@ -107,14 +107,7 @@ &gmac1 { mtd-mac-address = <&factory 0xe006>; - phy-mode = "rgmii"; status = "okay"; - - fixed-link { - speed = <1000>; - full-duplex; - pause; - }; }; &gsw { diff --git a/target/linux/ramips/dts/mt7621_planex_vr500.dts b/target/linux/ramips/dts/mt7621_planex_vr500.dts index a75e2d375..5f8f190a9 100644 --- a/target/linux/ramips/dts/mt7621_planex_vr500.dts +++ b/target/linux/ramips/dts/mt7621_planex_vr500.dts @@ -78,19 +78,6 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - mtd-mac-address = <&factory 0xe006>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -112,6 +99,12 @@ status = "okay"; label = "lan4"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe006>; + }; }; }; 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 5b55487b7..f38f150be 100644 --- a/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts +++ b/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts @@ -115,14 +115,7 @@ }; &gmac1 { - phy-mode = "rgmii"; status = "okay"; - - fixed-link { - speed = <1000>; - full-duplex; - pause; - }; }; &gsw { diff --git a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts index ec9f74381..9561c97b7 100644 --- a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts +++ b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts @@ -109,19 +109,6 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - mtd-mac-address = <&factory 0xe006>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -143,6 +130,12 @@ status = "okay"; label = "lan4"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe006>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts index b6f3a9489..d44960a9a 100644 --- a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts +++ b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts @@ -105,21 +105,6 @@ mtd-mac-address = <&factory 0xe006>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - - mtd-mac-address = <&factory 0xe006>; - mtd-mac-address-increment = <1>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -141,6 +126,13 @@ status = "okay"; label = "lan4"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe006>; + mtd-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 3768dd3b5..ef0d48b8c 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 = &gmac1; + label-mac-device = &wan_port; }; chosen { @@ -112,21 +112,14 @@ mtd-mac-address = <&factory 0x4>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy0>; - mtd-mac-address = <&factory 0x28>; -}; - -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; -}; - &switch0 { ports { + wan_port: port@0 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0x28>; + }; + 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 396df1c4e..d0e38f172 100644 --- a/target/linux/ramips/dts/mt7621_totolink_a7000r.dts +++ b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts @@ -103,21 +103,6 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - - mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <1>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -139,6 +124,13 @@ status = "okay"; label = "lan4"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe000>; + mtd-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 5d9552baf..ef491087e 100644 --- a/target/linux/ramips/dts/mt7621_totolink_x5000r.dts +++ b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts @@ -100,19 +100,6 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - mtd-mac-address = <&factory 0xe006>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -134,6 +121,12 @@ status = "okay"; label = "lan4"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe006>; + }; }; }; 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 634e07de2..01f338186 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts @@ -165,23 +165,15 @@ mtd-mac-address = <&config 0x8>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy0>; - - mtd-mac-address = <&config 0x8>; - mtd-mac-address-increment = <1>; -}; - -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; -}; - &switch0 { ports { + port@0 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&config 0x8>; + mtd-mac-address-increment = <1>; + }; + port@1 { status = "okay"; label = "lan1"; diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts index 18eb7d1c3..bca7c6169 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts @@ -4,25 +4,3 @@ model = "Ubiquiti EdgeRouter X"; compatible = "ubnt,edgerouter-x", "mediatek,mt7621-soc"; }; - -&gmac1 { - status = "okay"; - label = "eth0"; - phy-handle = <ðphy0>; - - mtd-mac-address = <&factory 0x22>; -}; - -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; -}; - -&switch0 { - ports { - port@0 { - status = "disabled"; - }; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi b/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi index d976c0981..3b149df85 100644 --- a/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi @@ -77,21 +77,6 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - - mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <1>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -113,6 +98,13 @@ status = "okay"; label = "lan4"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe000>; + mtd-mac-address-increment = <1>; + }; }; }; 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 19eee423b..e8f3a50db 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 @@ -179,19 +179,6 @@ mtd-mac-address = <&factory 0xe006>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - mtd-mac-address = <&factory 0xe000>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@1 { @@ -208,6 +195,12 @@ status = "okay"; label = "lan1"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe000>; + }; }; }; 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 589a3ee2d..18cbe0c01 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts @@ -68,19 +68,6 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - mtd-mac-address = <&factory 0xe006>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@1 { @@ -92,6 +79,12 @@ status = "okay"; label = "lan1"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe006>; + }; }; }; 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 a0ee79ae2..4c469a283 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 = &gmac1; + label-mac-device = &wan; }; chosen { @@ -135,21 +135,6 @@ 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 { @@ -161,6 +146,13 @@ 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.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dts index b5d2d9a19..2057deca9 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dts @@ -135,14 +135,7 @@ &gmac1 { mtd-mac-address = <&factory 0x3fffa>; - phy-mode = "rgmii"; status = "okay"; - - fixed-link { - speed = <1000>; - full-duplex; - pause; - }; }; &gsw { diff --git a/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi index 7df108072..9d6b5428a 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi +++ b/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi @@ -30,14 +30,7 @@ &gmac1 { mtd-mac-address = <&factory 0xe006>; - phy-mode = "rgmii"; status = "okay"; - - fixed-link { - speed = <1000>; - full-duplex; - pause; - }; }; &gsw { diff --git a/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts index 5bda61cbc..57e6cc42a 100644 --- a/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts +++ b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts @@ -91,14 +91,7 @@ &gmac1 { mtd-mac-address = <&factory 0x4>; mtd-mac-address-increment = <1>; - phy-mode = "rgmii"; status = "okay"; - - fixed-link { - speed = <1000>; - full-duplex; - pause; - }; }; &gsw { diff --git a/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts index d1752d190..a77d13c71 100644 --- a/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts +++ b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts @@ -128,21 +128,14 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy0>; - mtd-mac-address = <&factory 0xe006>; -}; - -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; -}; - &switch0 { ports { + port@0 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe006>; + }; + 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 092848a3b..627188873 100644 --- a/target/linux/ramips/dts/mt7621_youku_yk-l2.dts +++ b/target/linux/ramips/dts/mt7621_youku_yk-l2.dts @@ -136,19 +136,6 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - mtd-mac-address = <&factory 0xe006>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -170,6 +157,12 @@ status = "okay"; label = "lan4"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe006>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts index 75847c59f..cd71166f4 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts @@ -77,19 +77,6 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - mtd-mac-address = <&factory 0xe006>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -111,6 +98,12 @@ status = "okay"; label = "lan4"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe006>; + }; }; }; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts index 82b3afa93..10e08cd3d 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts @@ -99,19 +99,6 @@ mtd-mac-address = <&factory 0xe000>; }; -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - mtd-mac-address = <&factory 0xe006>; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@0 { @@ -133,6 +120,12 @@ status = "okay"; label = "lan4"; }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe006>; + }; }; }; diff --git a/target/linux/ramips/files/drivers/net/ethernet/mtk/mtk_eth_soc.c b/target/linux/ramips/files/drivers/net/ethernet/mtk/mtk_eth_soc.c index 12cfc089e..c811c7006 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/mtk/mtk_eth_soc.c +++ b/target/linux/ramips/files/drivers/net/ethernet/mtk/mtk_eth_soc.c @@ -3400,7 +3400,6 @@ static const struct net_device_ops mtk_netdev_ops = { static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) { - const char *name = of_get_property(np, "label", NULL); const __be32 *_id = of_get_property(np, "reg", NULL); struct phylink *phylink; int phy_mode, id, err; @@ -3491,9 +3490,6 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) eth->netdev[id]->irq = eth->irq[0]; eth->netdev[id]->dev.of_node = np; - if (name) - strlcpy(eth->netdev[id]->name, name, IFNAMSIZ); - return 0; free_netdev: diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index 83623652e..dab53124c 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -57,11 +57,9 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "4:wan" "6u@eth0" "5u@eth1" ;; - gnubee,gb-pc1) - ucidef_set_interface_lan "ethblack ethblue" - ;; + gnubee,gb-pc1|\ gnubee,gb-pc2) - ucidef_set_interface_lan "ethblack ethblue ethyellow" + ucidef_set_interface_lan "lan1 lan2" ;; hatlab,gateboard-one) ucidef_set_interfaces_lan_wan "eth0 eth1 eth2 eth3 eth4" "eth5"