eth: txhd2 add new flow for suspend [1/2]

PD#SWPL-138487

Problem:
add new flow for txhd2

Solution:
add new flow for txhd2

Verify:
BE311

Change-Id: Id8a839b8fdb53b58d2cbcb7651b58156ecb14d92
Signed-off-by: Zhuo Wang <zhuo.wang@amlogic.com>
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
index 3d18857..eb32cd9 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
@@ -678,6 +678,11 @@ static void dwmac_resume(struct meson8b_dwmac *dwmac)
 		usleep_range(100, 200);
 		writel(0x508200a0, phy_analog_config_addr + 0x44);
 		writel(0x00000110, phy_analog_config_addr + 0x4c);
+		if (phy_mode == 2) {
+			writel(0x74047, phy_analog_config_addr + 0x84);
+			writel(0x34047, phy_analog_config_addr + 0x84);
+			writel(0x74047, phy_analog_config_addr + 0x84);
+		}
 	} else {
 		writel(0x19c0040a, phy_analog_config_addr + 0x44);
 	}
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h
index 897a3ce..156b6ad 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h
@@ -24,6 +24,7 @@ extern const struct dev_pm_ops stmmac_pltfr_pm_ops;
 #if IS_ENABLED(CONFIG_AMLOGIC_ETH_PRIVE)
 extern void __iomem *phy_analog_config_addr;
 extern unsigned int phy_pll_mode;
+extern unsigned int phy_mode;
 #endif
 static inline void *get_stmmac_bsp_priv(struct device *dev)
 {