[][Add Airoha EN8801SC Giga Etherent phy support]
[Description]
Add Airoha EN8801SC Giga Etherent phy support for MT7981.
1. dts example to connect 2nd GMAC and EN8801SC gphy.
gmac1: mac@1 {
compatible = "mediatek,eth-mac";
reg = <1>;
phy-mode = "sgmii";
phy-handle = <&phy0>; // add phy handler
};
mdio: mdio-bus {
#address-cells = <1>;
#size-cells = <0>;
phy0: ethernet-phy@0 {
compatible = "ethernet-phy-id03a2.9471"; // define phy id
reg = <24>; // set phy address to 0x18
phy-mode = "sgmii";
};
};
2. After bootup, mii_mgr command can be used to access PHY CR.
For example, reading clause 22 PHY ID
mii_mgr -g -p 18 -r 2
mii_mgr -g -p 18 -r 3
[Release-log]
N/A
Change-Id: I3badca2c5d54ef1ebeae459ac6dd240060d84be0
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/6325268
diff --git a/target/linux/mediatek/mt7981/config-5.4 b/target/linux/mediatek/mt7981/config-5.4
index 11083ef..4033585 100644
--- a/target/linux/mediatek/mt7981/config-5.4
+++ b/target/linux/mediatek/mt7981/config-5.4
@@ -1,6 +1,7 @@
CONFIG_64BIT=y
CONFIG_AHCI_MTK=y
# CONFIG_AIROHA_EN8801S_PHY is not set
+CONFIG_AIROHA_EN8801SC_PHY=y
CONFIG_ARCH_CLOCKSOURCE_DATA=y
CONFIG_ARCH_DMA_ADDR_T_64BIT=y
CONFIG_ARCH_KEEP_MEMBLOCK=y