[][kernel][common][eth][Add a Ethernet passive Mux support]

[Description]
Add a Ethernet passive Mux support.

If your board that XGMAC1 connects a 10G PHY and a SFP cage through a
passive Mux, please apply the patch as follows.
==============================================================
 			phy-handle = <&phy8>;
 		};
 	};
+
+	mux: mux-bus {
+		mux1: ethernet-mux@1 {
+			compatible = "mediatek,eth-mux";
+			reg = <1>;
+
+			chan-sel-gpios = <&pio 30 0>;
+			mod-def0-gpios = <&pio 82 1>;
+
+			channel0: channel@0 {
+				reg = <0>;
+				mac-type = "xgdm";
+				phy-mode = "usxgmii";
+				phy-handle = <&phy0>;
+			};
+
+			channel1: channel@1 {
+				reg = <1>;
+				mac-type = "xgdm";
+				phy-mode = "10gbase-kr";
+				managed = "in-band-status";
+				sfp = <&sfp_esp1>;
+			};
+		};
+	};

 	mdio: mdio-bus {
 		#address-cells = <1>;
 		#size-cells = <0>;
==============================================================

After applying this patch, the ETH driver has the ability to dynamically
switch the network interface via a passive Mux.

Without this patch, the ETH driver is unable to dynamically switch the
network interface between the 10G PHY and the SFP cage.

[Release-log]
N/A


Change-Id: I9d55370ca6952dd08d28e4151c1139737c4918a2
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7979960
3 files changed