ramips: mt7621-dts: mux phy0/4 to gmac1
authorArınç ÜNAL <arinc.unal@arinc9.com>
Tue, 5 Jul 2022 22:20:32 +0000 (01:20 +0300)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 20 Aug 2022 20:56:12 +0000 (22:56 +0200)
Mux the MT7530 switch's phy0/4 to the SoC's gmac1 on devices where RGMII2
pins are available. This achieves 2 Gbps total bandwidth to the CPU using
the second RGMII.

The ports called "wan" are muxed where possible. On a minority of devices,
this is not possible. Those cases:

mt7621_ampedwireless_ally-r1900k.dts: lan3
mt7621_ubnt_edgerouter-x.dts: eth0
mt7621_gnubee_gb-pc1.dts: ethblue
mt7621_linksys_re6500.dts: lan1
mt7621_netgear_wac104.dts: lan4
mt7621_tplink_eap235-wall-v1.dts: lan0
mt7621_tplink_eap615-wall-v1.dts: lan0
mt7621_ubnt_usw-flex.dts: lan1

The "wan" port is just what the vendor designated on the board/plastic
chasis of the device. On a technical level, there is no difference between
a lan and wan port on MT7621AT, MT7621DAT and MT7621ST SoCs. Prefer
connecting to WAN via the port described above for these devices to benefit
the feature brought with this patch.

mt7621_d-team_newifi-d2.dts cannot benefit this feature, although it looks
like it should, because the rgmii2 pins are wired to unused components.

Tested on a range of devices documented on the GitHub PR.

Link: https://github.com/openwrt/openwrt/pull/10238
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
113 files changed:
target/linux/ramips/dts/mt7621_adslr_g7.dts
target/linux/ramips/dts/mt7621_afoundry_ew1200.dts
target/linux/ramips/dts/mt7621_ampedwireless_ally-r1900k.dts
target/linux/ramips/dts/mt7621_arcadyan_wg4xx223.dtsi
target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts
target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts
target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts
target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi
target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts
target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts
target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts
target/linux/ramips/dts/mt7621_beeline_smartbox-turbo.dts
target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts
target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts
target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts
target/linux/ramips/dts/mt7621_cudy_wr1300.dts
target/linux/ramips/dts/mt7621_cudy_wr2100.dts
target/linux/ramips/dts/mt7621_cudy_x6.dts
target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts
target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts
target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts
target/linux/ramips/dts/mt7621_dlink_dir-867-a1.dts
target/linux/ramips/dts/mt7621_dlink_dir-878-a1.dts
target/linux/ramips/dts/mt7621_dlink_dir-878-r1.dts
target/linux/ramips/dts/mt7621_dlink_dir-882-a1.dts
target/linux/ramips/dts/mt7621_dlink_dir-882-r1.dts
target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi
target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi
target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi
target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts
target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts
target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts
target/linux/ramips/dts/mt7621_elecom_wrc-1750gs.dts
target/linux/ramips/dts/mt7621_elecom_wrc-1750gst2.dts
target/linux/ramips/dts/mt7621_elecom_wrc-1750gsv.dts
target/linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts
target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk-i.dts
target/linux/ramips/dts/mt7621_elecom_wrc-2533gs2.dts
target/linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts
target/linux/ramips/dts/mt7621_elecom_wrc-2533gst2.dts
target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi
target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts
target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts
target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts
target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts
target/linux/ramips/dts/mt7621_humax_e10.dts
target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts
target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts
target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts
target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi
target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts
target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts
target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts
target/linux/ramips/dts/mt7621_iptime_a3004t.dts
target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi
target/linux/ramips/dts/mt7621_iptime_a8004t.dts
target/linux/ramips/dts/mt7621_iptime_ax2004m.dts
target/linux/ramips/dts/mt7621_iptime_t5004.dts
target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts
target/linux/ramips/dts/mt7621_jcg_q20.dts
target/linux/ramips/dts/mt7621_jcg_y2.dts
target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts
target/linux/ramips/dts/mt7621_linksys_e5600.dts
target/linux/ramips/dts/mt7621_linksys_ea6350-v4.dts
target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi
target/linux/ramips/dts/mt7621_linksys_re6500.dts
target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts
target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts
target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts
target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts
target/linux/ramips/dts/mt7621_mqmaker_witi.dts
target/linux/ramips/dts/mt7621_netgear_r6220.dts
target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi
target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi
target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
target/linux/ramips/dts/mt7621_netgear_wac104.dts
target/linux/ramips/dts/mt7621_netgear_wax202.dts
target/linux/ramips/dts/mt7621_netgear_wndr3700-v5.dts
target/linux/ramips/dts/mt7621_netis_wf2881.dts
target/linux/ramips/dts/mt7621_oraybox_x3a.dts
target/linux/ramips/dts/mt7621_phicomm_k2p.dts
target/linux/ramips/dts/mt7621_planex_vr500.dts
target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts
target/linux/ramips/dts/mt7621_renkforce_ws-wn530hp3-a.dts
target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts
target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts
target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts
target/linux/ramips/dts/mt7621_totolink_a7000r.dts
target/linux/ramips/dts/mt7621_totolink_x5000r.dts
target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts
target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts
target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts
target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts
target/linux/ramips/dts/mt7621_unielec_u7621-01-16m.dts
target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi
target/linux/ramips/dts/mt7621_unielec_u7621-06-16m.dts
target/linux/ramips/dts/mt7621_unielec_u7621-06-64m.dts
target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi
target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts
target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts
target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi
target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dtsi
target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi
target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts
target/linux/ramips/dts/mt7621_youhua_wr1200js.dts
target/linux/ramips/dts/mt7621_youku_yk-l2.dts
target/linux/ramips/dts/mt7621_yuncore_ax820.dts
target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts
target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts
target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi
target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi

index 95f2ac3a20b7a0946485a0d0f2e774517653ccc0..956733f7c3e8a6fa402614d627c451ab924bdf8f 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e00c>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e00c>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
-               };
        };
 };
 
index 2ed9f716ab748b4b2af66e4edf81064a26d3ad81..119acd977c03c7342f929c0bf0261100e6b42b28 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e000>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
-               };
        };
 };
 
index cd2536e179069f951c267141e2388aa0b9ce935c..07e0d23788d7f651b1bc8ae27fe0e418e4d51cc0 100644 (file)
@@ -7,6 +7,18 @@
        model = "Amped Wireless ALLY-R1900K";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "lan3";
+       phy-handle = <&ethphy4>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@1 {
                        status = "okay";
                        label = "lan2";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "lan3";
-               };
        };
 };
index 5a845c4e9ba4e4c155f88765a18b112313bbad75..8c4be8440d590bbae5c1c365b7321f738eb564e9 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_fff0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@2 {
                        status = "okay";
                        label = "lan1";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-               };
        };
 };
 
index c74fee3102c96e4a5ad151486c3050ddfac89c77..5e57842d6812dbd11a9b322f90b5eba9d2317b98 100644 (file)
@@ -7,19 +7,27 @@
        model = "AsiaRF AP7621-001";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e000>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
-               };
        };
 };
index 907b6d1470109d4d976ce2ba32e7e27a395080cc..dabc1a3bd340184fc54704e329ba7c50d8b9e7ff 100644 (file)
@@ -7,16 +7,24 @@
        model = "AsiaRF AP7621-NV1";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e000>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
-               };
-
                port@2 {
                        status = "okay";
                        label = "lan1";
index 60ab3e1646c63daa7c2e2f0bd37bc00a7afe9c1b..4e8c68ddf16974ca8fe59708e328e34044916c3d 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e006>;
-                       nvmem-cell-names = "mac-address";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan1";
index 0ccc3c7ecc5fe71bbcb88cc633e8e373e5fcde57..b71437bfe62dfdd981048193c206caa4c447527a 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan1";
index 790f6cecb54e331ac789b1785b439e03773f903b..329121595abb3fe656cedb693ea6b2fbfc3c4a46 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan1";
index 63ab424b881c4a67bbddbf0673285eb654dbb2a5..c8d286e7ed154ba0deabcbdd6c5e87e44776992f 100644 (file)
@@ -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;
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan1";
                };
-
-               wan: port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_4>;
-                       nvmem-cell-names = "mac-address";
-               };
        };
 };
 
index efea79e2e204748386685c239859b7a4d8e4e8c9..22fc065eb299076e86533f371faf1a8c9f98fc22 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
-&switch0 {
-       ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
 
-                       nvmem-cells = <&macaddr_factory_21000>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <(1)>;
-               };
+       nvmem-cells = <&macaddr_factory_21000>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <(1)>;
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
 
+&switch0 {
+       ports {
                port@1 {
                        status = "okay";
                        label = "lan1";
index d987046a0f358763a988f663611aba3d9ce4f5d6..733be13e1366a8c01be31ed6a077cfb1509e097f 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
-&switch0 {
-       ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
 
-                       nvmem-cells = <&macaddr_factory_21000>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <(1)>;
-               };
+       nvmem-cells = <&macaddr_factory_21000>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <(1)>;
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
 
+&switch0 {
+       ports {
                port@1 {
                        status = "okay";
                        label = "lan1";
index 5a259e154c578f8f64d5b94552079bfb6a75782e..a8d76b544e2576e2b67330e89866d1fa4595330c 100644 (file)
        };
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-               };
        };
 };
 
index 789edca6dfa87e4f1bb1126ad29599d7549ecb89..be85e8ee6ecbbdb86204c39efd0672fdc71fad4e 100644 (file)
        mac-address-increment = <(-1)>;
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <(-1)>;
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan4";
index 15d055bee65d9459344869d89403293d823aead4..f46bc256d0c064b62c7ed45f6453ab884232e7d9 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-               };
        };
 };
 
index 3fd67c967a234cc7f6bbd48b5a7b9e0f0d9d09a5..2398612847ec532babef1622ca80ea70ab8ffc7a 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_bdinfo_de00>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan1";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_bdinfo_de00>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
-               };
        };
 };
 
index 21d03322a75e1228594f4b14fb5b018011b52b2d..b2e75762a5d132910390be2ecb6e24ab934bcee8 100644 (file)
        };
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_bdinfo_de00>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-
-                       nvmem-cells = <&macaddr_bdinfo_de00>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
-               };
        };
 };
 
index ebb21491720bf7eaa1b29619f2d4f58248c38513..ad51aca28faceafcce46b9c0036f0562287e5fa9 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_bdinfo_de00>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_bdinfo_de00>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
-               };
        };
 };
 
index 49d0c050f59f9a9f7320caf88b2ecba0cba8455a..5408e5139997f20b5602ecd5614baaf3237ce2e8 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan1";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e006>;
-                       nvmem-cell-names = "mac-address";
-               };
        };
 };
 
index c0ad172939aba804ac5bf82e38f191e882098638..8ec6ef3a7d29b672302129c1284459ee9142b458 100644 (file)
@@ -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;
        mac-address-increment = <(-1)>;
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <(-2)>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan1";
                };
-
-               wan: port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_4>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <(-2)>;
-               };
        };
 };
 
index 7a48a931e71e346617980eb88207e9ecabd1ff64..fac41f206bb9f96616de7ac20bc2aa2ff01e559f 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_radio_4>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan4";
index 0f09fae246005a9775fce7e494df5e9144983dcf..ae0cc8fc8a923eb50b7b450a73af1091f12d1f72 100644 (file)
@@ -17,7 +17,7 @@
        nvmem-cell-names = "mac-address";
 };
 
-&wan {
+&gmac1 {
        nvmem-cells = <&macaddr_factory_e006>;
        nvmem-cell-names = "mac-address";
 };
index 9c73ffa12365e180e951786b19cb0aa45b5987c8..31b41f8384736f04b8937eae1de78496a1b4a120 100644 (file)
@@ -17,7 +17,7 @@
        nvmem-cell-names = "mac-address";
 };
 
-&wan {
+&gmac1 {
        nvmem-cells = <&macaddr_factory_e006>;
        nvmem-cell-names = "mac-address";
 };
index b6453bdd216a047fb5fdc83d62efed9da8169f94..dbde89b2207b129800bed89a278b356ebf55d0f5 100644 (file)
@@ -17,7 +17,7 @@
        nvmem-cell-names = "mac-address";
 };
 
-&wan {
+&gmac1 {
        nvmem-cells = <&macaddr_factory_e006>;
        nvmem-cell-names = "mac-address";
 };
index 3db056f68f49a74c85cc73420fae0e1a076dd43a..d6206427bf0ee5c17e91be69509e7067d0e950e1 100644 (file)
@@ -33,7 +33,7 @@
        nvmem-cell-names = "mac-address";
 };
 
-&wan {
+&gmac1 {
        nvmem-cells = <&macaddr_factory_e006>;
        nvmem-cell-names = "mac-address";
 };
index 6cfa28b7cf215bad742a76f618b47e94833786d3..6288d19c8a85213d6b5a562058278b79cefca6b6 100644 (file)
@@ -33,7 +33,7 @@
        nvmem-cell-names = "mac-address";
 };
 
-&wan {
+&gmac1 {
        nvmem-cells = <&macaddr_factory_e006>;
        nvmem-cell-names = "mac-address";
 };
index 556ca8b0037df189cfbd39dc87112c74dbc33572..b570d074c6f7e8b30eefeee0ab0b29a740a7eea7 100644 (file)
        };
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan1";
                };
-
-               wan: port@4 {
-                       status = "okay";
-                       label = "wan";
-               };
        };
 };
 
index 9dcc050af2a97e9f8033952b3882978b8aad57b8..07f84592e4b02f09dfea62cd7e1b78130d56b932 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan1";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e006>;
-                       nvmem-cell-names = "mac-address";
-               };
        };
 };
 
index f9a6c375c2a6952a9a0310181d5e2ff1b34a290f..1301f1375c8856f44b8984d7e2b5b534bfac923d 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan4";
index 8e87fd06bc6e645fdf216918ac07ddb70130ff9d..2fdb62840a68adcc819957a3a49e030a8d0d5f98 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e006>;
-                       nvmem-cell-names = "mac-address";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan4";
index 97e0ab2956e8e3d329309ab5632d01d80a789761..81ace64e44bcbfd5a5b73cdca26f9a20c60dcd36 100644 (file)
@@ -12,7 +12,7 @@
        nvmem-cell-names = "mac-address";
 };
 
-&wan {
+&gmac1 {
        nvmem-cells = <&macaddr_factory_fffa>;
        nvmem-cell-names = "mac-address";
 };
index dfc58c1ff603a5db0eabad9a1da5e3be81ef08f6..cb2e202793754655d6caa887f269e2a69bc4536a 100644 (file)
@@ -12,7 +12,7 @@
        nvmem-cell-names = "mac-address";
 };
 
-&wan {
+&gmac1 {
        nvmem-cells = <&macaddr_factory_e006>;
        nvmem-cell-names = "mac-address";
 };
index 2f82eaf12b4695de1e962fe7e31434eb26b492a3..8450af5907403267527690652b439e7fa2a24d89 100644 (file)
@@ -44,7 +44,7 @@
        nvmem-cell-names = "mac-address";
 };
 
-&wan {
+&gmac1 {
        nvmem-cells = <&macaddr_factory_e006>;
        nvmem-cell-names = "mac-address";
 };
index 2eda4ba23a811199c0d16585d256df1ff1e84703..a57a4290affa8fb5dc78d994f61114783a92ec3a 100644 (file)
@@ -44,7 +44,7 @@
        nvmem-cell-names = "mac-address";
 };
 
-&wan {
+&gmac1 {
        nvmem-cells = <&macaddr_factory_e006>;
        nvmem-cell-names = "mac-address";
 };
index 7f2f04d9eacef37a41543f8eb15c54e9ef8a86e5..f01f6fc25f0313c9021bb7140c0ca0ba03a38b11 100644 (file)
@@ -44,7 +44,7 @@
        nvmem-cell-names = "mac-address";
 };
 
-&wan {
+&gmac1 {
        nvmem-cells = <&macaddr_factory_e006>;
        nvmem-cell-names = "mac-address";
 };
index df66c2772d72497e24a5d3cdd8ae324089ef96e5..ec433e265de34fed3ce5a8264421dfac015dbe8b 100644 (file)
@@ -44,7 +44,7 @@
        nvmem-cell-names = "mac-address";
 };
 
-&wan {
+&gmac1 {
        nvmem-cells = <&macaddr_factory_e006>;
        nvmem-cell-names = "mac-address";
 };
index a5436d55d7b07d770949c39b65c8fad308b38b3a..8da1099dc94852167c9eaacdeeaa988e48a9b08c 100644 (file)
        };
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan4";
index 0036b52032ddb4ec8ff1f6035a85ddef8776c198..7e88f7be04f4269dd3559adc24253ea2e4d847a1 100644 (file)
@@ -44,7 +44,7 @@
        nvmem-cell-names = "mac-address";
 };
 
-&wan {
+&gmac1 {
        nvmem-cells = <&macaddr_factory_fffa>;
        nvmem-cell-names = "mac-address";
 };
index acf6ddab9427bcad5bf6d4e84d03ef3f70dbacbe..1d174006bd0d2eac56b799f5ae60dee71af61098 100644 (file)
@@ -42,7 +42,7 @@
        nvmem-cell-names = "mac-address";
 };
 
-&wan {
+&gmac1 {
        nvmem-cells = <&macaddr_factory_e006>;
        nvmem-cell-names = "mac-address";
 };
index dbf0f4d20244cf8f5f7c024a21fc35df0ed40596..b71a2b4390f1786f144df8d6fdaae7a56da7df03 100644 (file)
@@ -44,7 +44,7 @@
        nvmem-cell-names = "mac-address";
 };
 
-&wan {
+&gmac1 {
        nvmem-cells = <&macaddr_factory_e006>;
        nvmem-cell-names = "mac-address";
 };
index 9cf2b666b4e17ef3226a1df55e437ac14d7e9c06..acd3004eb7b6aa58ae1edb0be90db5e060a31652 100644 (file)
@@ -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 {
        };
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               wan: port@0 {
-                       status = "okay";
-                       label = "wan";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan4";
index 4f652b90bb2989d2b999272014ffee508cad853b..cb9f9bdad1eb0a1bca977b28066230634c166916 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan3";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e000>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
-               };
        };
 };
 
index 384da1bfa9faaa67fd73fb15a664b3b3ca655a8b..a332a87a5727571b429cb5ac0f3435a362dedda9 100644 (file)
@@ -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 {
        mac-address-increment = <1>;
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_4000>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@2 {
                        status = "okay";
                        label = "lan2";
                };
-
-               wan: port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_4000>;
-                       nvmem-cell-names = "mac-address";
-               };
        };
 };
 
index 21a18391275bb5d24472ef216d8d1350698de629..29f9f09ee587a573fa90da21f3e65ab91676b114 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "ethblue";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "ethblack";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "ethblue";
-               };
        };
 };
 
index 9776f43e02b298456c49426436f928ede79ead05..3fb267d78216d6cca0e1bc9be0d9c05e73d8c0e9 100644 (file)
        };
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-               };
        };
 };
 
index 774fb93d9cd652134e0d8466859286ed8cebe57b..d9ca1012ceaf416b8c57274161f3563f266c5ef9 100644 (file)
        };
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@1 {
                        status = "okay";
                        label = "lan3";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-               };
        };
 };
 
index 41587629c03576a092beeb8593481a6bf9e652be..638d73c3effe1e87f189f23ca7cea576d2e5fbf4 100644 (file)
@@ -15,7 +15,7 @@
                led-failsafe = &led_power;
                led-running = &led_power;
                led-upgrade = &led_power;
-               label-mac-device = &wan;
+               label-mac-device = &gmac1;
        };
 
        gpio-export {
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_1000d>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               wan: port@0 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_1000d>;
-                       nvmem-cell-names = "mac-address";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan";
index cc6446b75c849fc3c31f7e699a7b63ca679f95d5..69c79d7dc768db13ba65196eb64a69868409251b 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_4>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan4";
index b63b4783b8d3a9ed09f59934c57bfb874ef222d9..4837f29a46ce3b36dd45e44b61bec46cbd9bc8e1 100644 (file)
@@ -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 {
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_1e006>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               wan: port@0 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_1e006>;
-                       nvmem-cell-names = "mac-address";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan4";
index 398a84117c1d7af01fb22883f88e6ba0552bb9c2..8a09675bffbe7a8044d5a42f86c207fc9f39429f 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_4>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan4";
index 1dd3d77878012a4d2026f3ffc4601e91dc52bfbb..89e7f4b3e9fc2b97143e2d69febb0f9e660da09b 100644 (file)
@@ -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 {
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               wan: port@0 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e006>;
-                       nvmem-cell-names = "mac-address";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan4";
index 6af6bdce7a71bf3a6841d5fb92db3553e0a0c8f1..871327f8a70cccea4d7cc0093a0b86ee3ff96759 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan4";
index dc63adedf0435cfda5ea619a2d3fbc5c3a0501be..678ce0680643b7a9c8f8db4247269be84f6eb31e 100644 (file)
        mac-address-increment = <(2)>;
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_uboot_1fc40>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_uboot_1fc40>;
-                       nvmem-cell-names = "mac-address";
-               };
-
                port@3 {
                        status = "okay";
                        label = "lan1";
index fa3f146e81c6d26f60eff7ee088b65d1ea365b0f..c08b6427e7697b479ba0a77d5b0253c13a770214 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_uboot_1fc40>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_uboot_1fc40>;
-                       nvmem-cell-names = "mac-address";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan1";
index 704ecac721144929023084a98bbf8db08011fa50..97b6b1c3ee0f37207fab96051fe4a0d25b49bb2f 100644 (file)
        mac-address-increment = <(3)>;
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <(1)>;
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_4>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <(1)>;
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan4";
index a033d7f665350b79a6fd389ac1c0320f7c744886..b00fbeb47f913885583884db00ca7939b3e0793c 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_uboot_1fc40>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_uboot_1fc40>;
-                       nvmem-cell-names = "mac-address";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan1";
index a00e921a4985774083c7aac60e9b575e19aa5df5..0f5870140fb701f6a3b7ac77fd79476753abde12 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_uboot_1fc40>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_uboot_1fc40>;
-                       nvmem-cell-names = "mac-address";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan4";
index 6da223689c2046d63f1f1ea82b26f8c81522b88b..554d73ce3d4cd34459b81a4d5aed8771ef2f6277 100644 (file)
        mac-address-increment = <3>;
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_4>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan4";
index c6c919cfb1f1fe25add86a9aa402af38e321a012..ee82ffbd85742d8ab29c7d9c6189639065ac56c7 100644 (file)
        };
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan4";
index da832d6df56a8fcf3dcc267c96dea01d3f6408cc..5d346be1d274e6f0bc6e2633612883b197728904 100644 (file)
@@ -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 {
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-               wan: port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_4>;
-                       nvmem-cell-names = "mac-address";
-               };
        };
 };
 
index c9bf648a31af454f2ce7f3798cf714e816110936..0425c534386c0cc741b98afbedc59492634af962 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_3fffa>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_3fffa>;
-                       nvmem-cell-names = "mac-address";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan1";
index 5de6ba6d950b2023c33ad27b201a1f07511ec05c..f8ae9b41df80353bc0f91721d3f179828041d9d6 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan1";
                };
-
-               wan: port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e006>;
-                       nvmem-cell-names = "mac-address";
-               };
        };
 };
 
index e8069ec3945b61bb3bdee54f56fb6f2b96af165c..a6e38234dafba49c758b5e8cc8c29b1a7e290d0e 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@1 {
                        status = "okay";
                        label = "lan1";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e006>;
-                       nvmem-cell-names = "mac-address";
-               };
        };
 };
 
index 91db315914e4988ed0b7ba344a41e3c97a821373..3b23a25f8b5163da6975d810b9193cfd722634e6 100644 (file)
        };
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-               };
        };
 };
 
index 272b01af1e6ba76502cfe07032ff5edce41906f0..654c9aa70f4ebcbd4d13648e025200b481f39b65 100644 (file)
@@ -7,6 +7,20 @@
        model = "Linksys EA6350 v4";
 };
 
+&gmac1 {
+        phy-handle = <&ethphy4>;
+};
+
+&mdio {
+       ethernet-phy@0 {
+               status = "disabled";
+       };
+
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
@@ -30,8 +44,7 @@
                };
 
                port@4 {
-                       status = "okay";
-                       label = "wan";
+                       status = "disabled";
                };
        };
 };
index 5e9c82507d4a5b0b5d999a8913efa7d3344348a4..4663d873fe95b7ba062e213ec1216ab3b34b0c2c 100644 (file)
        };
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan1";
index 680bc863cd4ce2f9fbd364ba9fca57f31dd0a866..0d0c5c3be5c726e51338e52b597eac76fcbf7e11 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "lan1";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_2e>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "lan1";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan2";
index a89d9189c09367dff55cf643a87a7c4f4c5f5313..557abcc21af2eac5c3a05ba40087de759a03b951 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_5>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_5>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
-               };
        };
 };
 
index dcdcc261b3fb2d1e0bd2476c8cb005d778152400..2da7f983a930886e1e4e80b2f9649c73d4002290 100644 (file)
        status = "okay";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-               };
        };
 };
 
index 7f329b23593fcf80b3c182a3c6dae138cc252520..aad8a6776d29edcfadbd5b509327ce4e609c2b82 100644 (file)
                function = "gpio";
        };
 };
+
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
+&switch0 {
+       ports {
+               port@0 {
+                       status = "disabled";
+               };
+       };
+};
index d457c43426d3c705c2e093147fee01584e68c587..223d03b9fd12dddb0d9c708e87a15e89ce7feb94 100644 (file)
        };
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan1";
index cb6310df18d162638a4c6080b04b7d00c404a21c..16cebbad74c0ea05ef512f28b05c84b817dbb08b 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e000>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
-               };
        };
 };
 
index 54489243b88295515107cbaefafdc0a43a3f0be8..0f476ef060402fda4ca2911898f0247c62d0d080 100644 (file)
@@ -60,7 +60,7 @@
        nvmem-cell-names = "mac-address";
 };
 
-&wan {
+&gmac1 {
        nvmem-cells = <&macaddr_factory_4>;
        nvmem-cell-names = "mac-address";
        mac-address-increment = <1>;
index ae9e40e621160f4c914cd67ffa466d52ddb9a497..0ae6ab46f7a3142c96eeec4dcacdb65df28f3444 100644 (file)
        };
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan1";
                };
-
-               wan: port@4 {
-                       status = "okay";
-                       label = "wan";
-               };
        };
 };
 
index 2be3f878692d2b927269343d32dd47e00ece3104..9fa4af8fd666cea1e8950ca0da9b8b5719acba10 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <2>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan1";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_4>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <2>;
-               };
        };
 };
 
index c2dc98787114ddb59c3a980b9ee59e5e4a53e8d2..eaf12a891ef267b7dd34487d3f79402cf0d71331 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <2>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan1";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_4>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <2>;
-               };
        };
 };
 
index 61ab0574a7d0f2f34fd50f769e37bc9a4cf3bdbc..3b5d6ae2d99bb5a1c698a85c3f9541cc5131b966 100644 (file)
        };
 };
 
+&gmac1 {
+       status = "okay";
+       label = "lan4";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "lan4";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan3";
index fef80942561241d32b02d6c430bd064452b37935..f17a8053630ea120c98a70dfe90c821a81c97ceb 100644 (file)
        };
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        gpio-controller;
        #gpio-cells = <2>;
 
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan1";
index 972aba1c5e406a43f67ea505a1891839e67968d3..276e7c959f5614db6041a0bd2981ba45a11b6aee 100644 (file)
@@ -56,7 +56,7 @@
        nvmem-cell-names = "mac-address";
 };
 
-&wan {
+&gmac1 {
        nvmem-cells = <&macaddr_factory_4>;
        nvmem-cell-names = "mac-address";
        mac-address-increment = <1>;
index 56a2647638cb023223633b585966fd4276370d9a..af09073e3d3624704e00a5d3bd5767d66714d3f2 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan1";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e006>;
-                       nvmem-cell-names = "mac-address";
-               };
        };
 };
 
index a97b0900aa775b1b52560eb45c9df82f06ab0b59..fd7a8e6eca1d3e532030c64ab7534d0891f336e6 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       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 {
                        status = "okay";
                        label = "lan1";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_bdinfo_9>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
-               };
        };
 };
 
index 078b76a50b4587ff0a1dad5e88b28eb6a2fc6296..b18d12608acc75d6cc56683d217fea006967b4ed 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e006>;
-                       nvmem-cell-names = "mac-address";
-               };
        };
 };
 
index fb6a42166f599c1d6d4e9cc4bd2cbd352dda7569..1da6d2cca125838472ab59878b2a4748c6ada5e7 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e006>;
-                       nvmem-cell-names = "mac-address";
-               };
        };
 };
 
index 13d39195a92ca90f34c229551b10562b47c98c4a..3c5f1e520c79e8256120abb48e1c7e02dd363cc1 100644 (file)
        };
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan1";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-               };
        };
 };
 
index 13e37d7124eb73501be9568e23086e60d3740931..c56c2f1554c0231fff516eb4c660fd2744d42d77 100644 (file)
        mac-address-increment = <(-2)>;
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <(-1)>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan1";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_4>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <(-1)>;
-               };
        };
 };
 
index 929c2a8f26516cc384318d95662c8a89af6e6f1e..d1f51feddddf6a043d6184913d5ce77ebba85ca2 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e006>;
-                       nvmem-cell-names = "mac-address";
-               };
        };
 };
 
index 19eb11111dbc117175be2eac2455e3669b03eee5..833e1b07d0c9462ea1db61d88e2a2b3f62d0dc7e 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e006>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
-               };
        };
 };
 
index d658c454a878133fa3a3541134be3080132f7822..2d91d1c481a171eeedd1776c52814a526ae7d15d 100644 (file)
@@ -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 {
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <(-2)>;
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               wan_port: port@0 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_4>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <(-2)>;
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan1";
index e817278728f20e418478472e738df6ef60bf4fd8..bba0d4a5d37090eb4d78c1c468ba42af9b261d93 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e000>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
-               };
        };
 };
 
index 8066340c5debc9d88e3c3ff2dbcfbb2e5652711d..bc03ed86906492647fb69bffb7907a4d399c55b7 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e006>;
-                       nvmem-cell-names = "mac-address";
-               };
        };
 };
 
index 67668657bd147d51f6dc34b26a157e39d9a230c5..c626df1ef4e6f4d5fb56683dd14a8da8a819a981 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_config_8>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_config_8>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan1";
index b40448791abc3a4f1ae2b7ea34f51578dd7d9347..cd7cae635509ca0adb9d23bd8740ee4792dfddc7 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "lan0";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "lan0";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan3";
index 0be4af39e8e2623a3bb74ead94f0719bc18d80ab..4fa799789c04d2f4b399375345a39e25e9ff1e9d 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "lan0";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        compatible = "mediatek,mt7530";
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "lan0";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan3";
index bca7c616900f983210aa7d865f2ea4d5b3b4a659..2b5993db44f249132e8cf358c2f8ef78ca3c5665 100644 (file)
@@ -4,3 +4,26 @@
        model = "Ubiquiti EdgeRouter X";
        compatible = "ubnt,edgerouter-x", "mediatek,mt7621-soc";
 };
+
+&gmac1 {
+       status = "okay";
+       label = "eth0";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_22>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
+&switch0 {
+       ports {
+               port@0 {
+                       status = "disabled";
+               };
+       };
+};
index 166320cacabcb26de0c397d1d0ad7294ec81a4aa..e148242387f3cf951ce32aa8e99855da010c2021 100644 (file)
        label = "dsa";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "lan1";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_eeprom>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan2";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "lan1";
-               };
        };
 };
 
index 84172cdd175a9da23a401ba2c96b13580d8f67be..6e75d1b9309f9f189e7df32d3cea5f1b363cf35b 100644 (file)
@@ -52,7 +52,7 @@
        nvmem-cell-names = "mac-address";
 };
 
-&wan {
+&gmac1 {
        nvmem-cells = <&macaddr_factory_e000>;
        nvmem-cell-names = "mac-address";
        mac-address-increment = <1>;
index 1d070c7909f9290aaed6c915aed6a1d35779f21f..f2900e48060be2bc0c179653430f7a45a3a2b42f 100644 (file)
        };
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               wan: port@0 {
-                       status = "okay";
-                       label = "wan";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan1";
index 41aa2dce5e6c60fc2884ecd46db65d3c9b1a7c50..d7dd4ccd46169b2056eda48c4b08fdac2e3321da 100644 (file)
@@ -57,7 +57,7 @@
        nvmem-cell-names = "mac-address";
 };
 
-&wan {
+&gmac1 {
        nvmem-cells = <&macaddr_factory_e000>;
        nvmem-cell-names = "mac-address";
        mac-address-increment = <1>;
index a66969a8035c6614b4a090361649fc51f94901f4..669340f194c3288ca8be49025f14a68a6337dd6f 100644 (file)
@@ -58,7 +58,7 @@
        nvmem-cell-names = "mac-address";
 };
 
-&wan {
+&gmac1 {
        nvmem-cells = <&macaddr_factory_e000>;
        nvmem-cell-names = "mac-address";
        mac-address-increment = <1>;
index 8dad53812f1ee41ceb4a64df0912ec292012a287..9e91a0a2993d9b8179921da172811979a0122820 100644 (file)
        status = "okay";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               wan: port@4 {
-                       status = "okay";
-                       label = "wan";
-               };
        };
 };
 
index e9bd6e1cab35cfef062a64f5cd889ff35754ba62..64f588dc501503dcf8893a24fd9791870c1a476b 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@1 {
                        status = "okay";
                        label = "lan1";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e000>;
-                       nvmem-cell-names = "mac-address";
-               };
        };
 };
 
index 67a44dad117f4d482709ca4c5a01d4724fb8b0f2..232a720e5492cfbfc1624c902b52dc0624b7585c 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@1 {
                        status = "okay";
                        label = "lan1";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e006>;
-                       nvmem-cell-names = "mac-address";
-               };
        };
 };
 
index 4c469a2836fa27a6d4e8ee8b6de18d3925d06e62..a0ee79ae23ce473087a5099f92d2aec30dcc5f3c 100644 (file)
@@ -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 {
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@2 {
                        status = "okay";
                        label = "lan1";
                };
-
-               wan: port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e006>;
-                       nvmem-cell-names = "mac-address";
-               };
        };
 };
 
index dfdbcc77d4379cd8a5a22c6649b87204f8153e53..a6c0033227eac7184112efa778ec1c7819bac713 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_3fffa>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan3";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_3fffa>;
-                       nvmem-cell-names = "mac-address";
-               };
        };
 };
 
index 7faf9b3e89ac5b53ae4aa8ede930a04c8face70c..78f154b3aed18bb367a330d058cc015835c5d693 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e006>;
-                       nvmem-cell-names = "mac-address";
-               };
-
                port@2 {
                        status = "okay";
                        label = "lan1";
index 0027bc96fe4ab8830097a8a028057f6435298ac2..e4de0b82310fd77462e0fb68ffa54e2b7636ab42 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_4>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
-               };
        };
 };
 
index 6813a2cf05c061e33efd4a9afc0393665def70f5..2d61b8756052bff9f127cca352f95e78aedc17b4 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e006>;
-                       nvmem-cell-names = "mac-address";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan1";
index 19ba7c08de34e30fe60d533fb1397b2eca35c069..e588e047eb52ddb54d350e706c861e74e09ed7e9 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e006>;
-                       nvmem-cell-names = "mac-address";
-               };
        };
 };
 
index 9638f1f060909b1cb778172f0b76e6e2d7c86b5d..75fe3cf5818566bcc576f16373c27172baeb0e4d 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e000>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <1>;
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan";
index 80166158b29da1ca145f5dc59ecd100479565381..6aafe385ae6872e0134df4abc062badbcb13ccb1 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e006>;
-                       nvmem-cell-names = "mac-address";
-               };
        };
 };
 
index b156b12fc8e01f13068cac3978145a57ca75d6fd..a6d0e9a7c2053d21d73b8a496b088fa6c14f0c9b 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e006>;
-                       nvmem-cell-names = "mac-address";
-               };
        };
 };
 
index 356cf4b442f267f0c25d180e37e264c325596c9c..c80544cfc95ddfea4c4b7b61a6d9a816abd889bf 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        ports {
                port@0 {
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e006>;
-                       nvmem-cell-names = "mac-address";
-               };
        };
 };
 
index d25217598e000514535b00fe37135b6380a01289..f19cb4db171134d29579da2c8ca0f054148eefdc 100644 (file)
        nvmem-cell-names = "mac-address";
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy4>;
+
+       nvmem-cells = <&macaddr_factory_e006>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy4: ethernet-phy@4 {
+               reg = <4>;
+       };
+};
+
 &switch0 {
        gpio-controller;
        #gpio-cells = <2>;
                        status = "okay";
                        label = "lan4";
                };
-
-               port@4 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_e006>;
-                       nvmem-cell-names = "mac-address";
-               };
        };
 };