[][[Panther][AX8400][MT7986A][MT7976][ePA][WiFi]The 2.5G wan interface didn't show any link up/down log when cable plug/unplug]

Add a external interrupt handler for GPY211 single phy chip.

This interrupt handler will display link up/down message and notify kernel when receiving link status change interrupt.

Note1: This patch will disable UART2 on the 2500WAN RFB, since single phy external interrupt occupied UART2_RXD and UART2_TXD.
Note2: The interrupt handler will not notify kernel on the 2500WAN GSW RFB.


Change-Id: Ibbecb437049f02a4ce479fee2cb035b7c17dac66
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/6194248
diff --git a/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_soc.h
index d74107b..88f9280 100755
--- a/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -1196,6 +1196,21 @@
 	u32 count[32];
+/* struct mtk_phylink_priv - This is the structure holding private data for phylink
+ * @desc:		Pointer to the memory holding info about the phylink gpio
+ * @id:			The element is used to record the phy index of phylink
+ * @phyaddr:		The element is used to record the phy address of phylink
+ * @link:		The element is used to record the phy link status of phylink
+ */
+struct mtk_phylink_priv {
+	struct net_device	*dev;
+	struct gpio_desc	*desc;
+	char			label[16];
+	int			id;
+	int			phyaddr;
+	int			link;
 /* struct mtk_eth -	This is the main datasructure for holding the state
  *			of the driver
  * @dev:		The device pointer
@@ -1290,6 +1305,7 @@
 	struct device_node		*of_node;
 	struct phylink			*phylink;
 	struct phylink_config		phylink_config;
+	struct mtk_phylink_priv		phylink_priv;
 	struct mtk_eth			*hw;
 	struct mtk_hw_stats		*hw_stats;
 	__be32				hwlro_ip[MTK_MAX_LRO_IP_CNT];