[Feature][T8TSK-170]compatible with gpio power mode
Change-Id: I0be471cafa484e3d646388a3ca6cdb2915338946
diff --git a/src/kernel/linux/v4.19/drivers/net/phy/marvell-88q.c b/src/kernel/linux/v4.19/drivers/net/phy/marvell-88q.c
index 0f36430..9010740 100755
--- a/src/kernel/linux/v4.19/drivers/net/phy/marvell-88q.c
+++ b/src/kernel/linux/v4.19/drivers/net/phy/marvell-88q.c
@@ -45,6 +45,8 @@
#define NAD_WAKEUP_PHY1 275
/* NAD_RESET_PHY1 : GPIO26 */
#define NAD_RESET_PHY1 294
+/* PHY_POWER_SUPPLY : GPIO178 */
+#define PHY_POWER_SUPPLY 446
#define Q2220_LPSD_CTRL_1 (MII_ADDR_C45 | 0x038021)
#define Q2220_LPSD_DISABLE_REMOTE_WAKE_UP BIT(15) | BIT(11)
@@ -241,6 +243,8 @@
mdelay(50);
printk("reg 038020 = %x\n", phy_read(phydev, Q2220_LPSD_STATUS));
gpio_direction_output(NAD_RESET_PHY1, 0);
+ mdelay(1);
+ gpio_direction_output(PHY_POWER_SUPPLY, 0);
if_suspend = 1;
return 0;
//xf.li 2022/11/9 modify for API-647
@@ -251,6 +255,8 @@
if(if_suspend == 1)
{
printk("phy awake start\n");
+ gpio_direction_output(PHY_POWER_SUPPLY, 1);
+ mdelay(1);
gpio_direction_output(NAD_WAKEUP_PHY1, 1);
udelay(1100);
gpio_direction_output(NAD_WAKEUP_PHY1, 0);