diff --git a/target/linux/ramips/dts/mt7621_adslr_g7.dts b/target/linux/ramips/dts/mt7621_adslr_g7.dts index 3290a5e71..1b9e35b7e 100644 --- a/target/linux/ramips/dts/mt7621_adslr_g7.dts +++ b/target/linux/ramips/dts/mt7621_adslr_g7.dts @@ -104,6 +104,19 @@ 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 { @@ -125,13 +138,6 @@ 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 ed9e9852d..a7200c19c 100644 --- a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts +++ b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts @@ -109,6 +109,19 @@ 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 { @@ -130,13 +143,6 @@ 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 cf91dc031..eb9d10b3b 100644 --- a/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts +++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts @@ -7,18 +7,26 @@ 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 5a4c03fb7..e23b5190a 100644 --- a/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts +++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts @@ -7,15 +7,23 @@ 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 78f5584b4..a860b3cc7 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts @@ -133,14 +133,21 @@ 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 b5e8655cb..63d5c612b 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi +++ b/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi @@ -134,13 +134,22 @@ 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 b78e594ff..2d4145423 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; @@ -143,6 +143,19 @@ 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 { @@ -164,12 +177,6 @@ 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 5a259e154..a8d76b544 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 048eac5a3..376490113 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts @@ -168,13 +168,23 @@ 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 3436757e1..8c85f775e 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts @@ -176,6 +176,19 @@ 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 { @@ -197,11 +210,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 a66ce942a..609cd8581 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr1300.dts +++ b/target/linux/ramips/dts/mt7621_cudy_wr1300.dts @@ -156,6 +156,21 @@ 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 { @@ -177,13 +192,6 @@ 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 692c94da5..142a50afb 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr2100.dts +++ b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts @@ -81,6 +81,21 @@ 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"; }; @@ -189,13 +204,5 @@ 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 738bcdc7d..972a31895 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts @@ -166,6 +166,19 @@ 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 { @@ -187,12 +200,6 @@ 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 09e46b011..0819d66ea 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; led-running = &led_power_blue; @@ -105,6 +105,21 @@ 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 { @@ -126,13 +141,6 @@ 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 f843f6280..ac5758596 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts @@ -112,13 +112,21 @@ 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 7ab0e8bd5..f6fc9caab 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi @@ -95,6 +95,19 @@ 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 { @@ -116,12 +129,6 @@ 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 a54b2be4f..4c367eeb1 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi @@ -155,6 +155,19 @@ 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 { @@ -176,12 +189,6 @@ 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 3f3bae43f..bc138ee73 100644 --- a/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi +++ b/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi @@ -121,13 +121,21 @@ 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 b6a738355..936076fd7 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts @@ -70,14 +70,21 @@ 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 6349fd487..c367cf130 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>; }; -&wan { +&gmac1 { 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 11b782488..a7d2dabb7 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>; }; -&wan { +&gmac1 { 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 a5436d55d..8da1099dc 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-gs-2pci.dtsi b/target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi index 642724da1..412bd73ba 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>; }; -&wan { +&gmac1 { 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 9cf2b666b..acd3004eb 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_glinet_gl-mt1300.dts b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts index 20f63902a..e3f12386b 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 { @@ -119,6 +119,19 @@ 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 { @@ -130,12 +143,6 @@ status = "okay"; label = "lan2"; }; - - wan: port@4 { - status = "okay"; - label = "wan"; - mtd-mac-address = <&factory 0x4000>; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_hilink_hlk-7621a.dts b/target/linux/ramips/dts/mt7621_hilink_hlk-7621a.dts index ccb771d1b..307fd73c4 100644 --- a/target/linux/ramips/dts/mt7621_hilink_hlk-7621a.dts +++ b/target/linux/ramips/dts/mt7621_hilink_hlk-7621a.dts @@ -73,11 +73,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - }; }; }; @@ -85,6 +80,18 @@ 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"; @@ -110,4 +117,4 @@ &i2c { status = "okay"; -}; \ No newline at end of file +}; diff --git a/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts b/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts index 774fb93d9..d9ca1012c 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_iodata_wn-ax1167gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts index 879fb68c8..5e3859786 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts @@ -131,15 +131,23 @@ 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 055c1abde..ab28797ed 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 { @@ -130,14 +130,21 @@ 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 06d024e9a..ad215dafa 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts @@ -131,15 +131,23 @@ 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 ff9e525ae..6f8e75e6d 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 { @@ -121,14 +121,22 @@ 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 0e808f689..572293ce9 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts @@ -123,13 +123,22 @@ 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 4ebd98052..5aa4b350c 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a6ns-m.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a6ns-m.dts @@ -114,14 +114,22 @@ 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 df6aed664..04134beec 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts @@ -98,14 +98,22 @@ 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 ae312fcc5..99dc6d0ba 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 { @@ -132,6 +132,19 @@ 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 { @@ -156,7 +169,6 @@ 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 c604bca1c..c67455a28 100644 --- a/target/linux/ramips/dts/mt7621_jcg_jhr-ac945m.dts +++ b/target/linux/ramips/dts/mt7621_jcg_jhr-ac945m.dts @@ -93,6 +93,19 @@ 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 { @@ -114,12 +127,6 @@ 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 c9bf648a3..5464ca06c 100644 --- a/target/linux/ramips/dts/mt7621_jcg_q20.dts +++ b/target/linux/ramips/dts/mt7621_jcg_q20.dts @@ -144,19 +144,24 @@ }; &gmac0 { - nvmem-cells = <&macaddr_factory_3fff4>; - nvmem-cell-names = "mac-address"; + 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>; + }; }; &switch0 { ports { - port@0 { - status = "okay"; - label = "wan"; - nvmem-cells = <&macaddr_factory_3fffa>; - nvmem-cell-names = "mac-address"; - }; - port@1 { status = "okay"; label = "lan1"; @@ -175,17 +180,3 @@ function = "gpio"; }; }; - -&factory { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_factory_3fff4: macaddr@3fff4 { - reg = <0x3fff4 0x6>; - }; - - macaddr_factory_3fffa: macaddr@3fffa { - reg = <0x3fffa 0x6>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts index fa2690072..b506457de 100644 --- a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts +++ b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts @@ -135,6 +135,19 @@ 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 { @@ -146,12 +159,6 @@ 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 91db31591..3b23a25f8 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_ea7xxx.dtsi b/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi index ecff6406d..848223a1d 100644 --- a/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi +++ b/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi @@ -173,13 +173,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 319d0d7fb..3a2e42e77 100644 --- a/target/linux/ramips/dts/mt7621_linksys_re6500.dts +++ b/target/linux/ramips/dts/mt7621_linksys_re6500.dts @@ -116,13 +116,22 @@ 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 811b02fe0..ae6d89fbb 100644 --- a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts +++ b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts @@ -116,6 +116,21 @@ 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 { @@ -137,13 +152,6 @@ 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 dcdcc261b..2da7f983a 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 7f329b235..aad8a6776 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 d457c4342..223d03b9f 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 45901474d..275baf5c7 100644 --- a/target/linux/ramips/dts/mt7621_mqmaker_witi.dts +++ b/target/linux/ramips/dts/mt7621_mqmaker_witi.dts @@ -97,6 +97,21 @@ 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 { @@ -118,13 +133,6 @@ 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 1a19cd048..96c7e001a 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi @@ -110,6 +110,21 @@ 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 { @@ -131,13 +146,6 @@ 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 71c95e75b..de695b467 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi @@ -165,6 +165,21 @@ 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 { @@ -186,13 +201,6 @@ 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 7a15cd1f6..36909015b 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi @@ -99,6 +99,21 @@ 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 { @@ -120,13 +135,6 @@ 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 7dfd133a4..902e765c8 100644 --- a/target/linux/ramips/dts/mt7621_netis_wf2881.dts +++ b/target/linux/ramips/dts/mt7621_netis_wf2881.dts @@ -125,6 +125,19 @@ 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 { @@ -146,12 +159,6 @@ 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 a97b0900a..fd7a8e6ec 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_planex_vr500.dts b/target/linux/ramips/dts/mt7621_planex_vr500.dts index 5f8f190a9..a75e2d375 100644 --- a/target/linux/ramips/dts/mt7621_planex_vr500.dts +++ b/target/linux/ramips/dts/mt7621_planex_vr500.dts @@ -78,6 +78,19 @@ 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 { @@ -99,12 +112,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - mtd-mac-address = <&factory 0xe006>; - }; }; }; diff --git a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts index 9561c97b7..ec9f74381 100644 --- a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts +++ b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts @@ -109,6 +109,19 @@ 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 { @@ -130,12 +143,6 @@ 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 d44960a9a..b6f3a9489 100644 --- a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts +++ b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts @@ -105,6 +105,21 @@ 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 { @@ -126,13 +141,6 @@ 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 ef0d48b8c..3768dd3b5 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 { @@ -112,14 +112,21 @@ 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 d0e38f172..396df1c4e 100644 --- a/target/linux/ramips/dts/mt7621_totolink_a7000r.dts +++ b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts @@ -103,6 +103,21 @@ 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 { @@ -124,13 +139,6 @@ 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 ef491087e..5d9552baf 100644 --- a/target/linux/ramips/dts/mt7621_totolink_x5000r.dts +++ b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts @@ -100,6 +100,19 @@ 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 { @@ -121,12 +134,6 @@ 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 01f338186..634e07de2 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts @@ -165,15 +165,23 @@ 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 bca7c6169..18eb7d1c3 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts @@ -4,3 +4,25 @@ 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 3b149df85..d976c0981 100644 --- a/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi @@ -77,6 +77,21 @@ 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 { @@ -98,13 +113,6 @@ 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 e8f3a50db..19eee423b 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,6 +179,19 @@ 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 { @@ -195,12 +208,6 @@ 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 18cbe0c01..589a3ee2d 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts @@ -68,6 +68,19 @@ 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 { @@ -79,12 +92,6 @@ 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 4c469a283..a0ee79ae2 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_youhua_wr1200js.dts b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts index a77d13c71..d1752d190 100644 --- a/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts +++ b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts @@ -128,14 +128,21 @@ 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 627188873..092848a3b 100644 --- a/target/linux/ramips/dts/mt7621_youku_yk-l2.dts +++ b/target/linux/ramips/dts/mt7621_youku_yk-l2.dts @@ -136,6 +136,19 @@ 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 { @@ -157,12 +170,6 @@ 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 cd71166f4..75847c59f 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts @@ -77,6 +77,19 @@ 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 { @@ -98,12 +111,6 @@ 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 10e08cd3d..82b3afa93 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts @@ -99,6 +99,19 @@ 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 { @@ -120,12 +133,6 @@ status = "okay"; label = "lan4"; }; - - port@4 { - status = "okay"; - label = "wan"; - mtd-mac-address = <&factory 0xe006>; - }; }; };