[Bugfix][API-647][ETH]No eth2 exists after the reboot for GSW

Change-Id: Ie4bde1e1cd96f93bc0a53dfbcfa5b2a3c5093899
diff --git a/src/bsp/lk/platform/mt2735/drivers/gpio/mt_gpio.c b/src/bsp/lk/platform/mt2735/drivers/gpio/mt_gpio.c
index 719f9f1..bf8d8bd 100644
--- a/src/bsp/lk/platform/mt2735/drivers/gpio/mt_gpio.c
+++ b/src/bsp/lk/platform/mt2735/drivers/gpio/mt_gpio.c
@@ -901,21 +901,15 @@
     //you.chen2022/4/8 modify for wifi gpio start
 	mt_set_gpio_out(GPIO202, GPIO_OUT_ONE);
     //you.chen2022/4/8 modify for wifi gpio end
-    //xf.li2022/8/19 modify for phy gpio start
-        /* GPIO26 */
-	mt_set_gpio_mode(GPIO26, 0);
-	mt_set_gpio_dir(GPIO26, GPIO_DIR_OUT);
-	mt_set_gpio_out(GPIO26, GPIO_OUT_ONE);
+    //xf.li2022/11/09 modify for phy gpio start
         /* GPIO07 */
 	mt_set_gpio_mode(GPIO7, 0);
 	mt_set_gpio_dir(GPIO7, GPIO_DIR_OUT);
-	mt_set_gpio_out(GPIO7, GPIO_OUT_ZERO);
-    //xf.li2022/8/19 modify for phy gpio end
-    //xf.li2022/9/19 modify for phy gpio start
+	mt_set_gpio_out(GPIO7, GPIO_OUT_ONE);
+        /* GPIO025 */
 	mt_set_gpio_mode(GPIO25, 0);
 	mt_set_gpio_dir(GPIO25, GPIO_DIR_IN);
-	mt_set_gpio_pull_select(GPIO25, GPIO_PULL_UP);
-    //xf.li2022/9/19 modify for phy gpio end
+    //xf.li2022/11/09 modify for phy gpio end
 
 //dongyu@2022.11.03 Modify the gpio of imu/smi230 start
         mt_set_gpio_mode(GPIO29,0);
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 c847653..467f4ae 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
@@ -41,6 +41,8 @@
 /* Add delay on RX_CLK */
 #define Q2110_RGMII_RX_TIMING_CTRL	BIT(14)
 
+int if_suspend = 0;
+
 /* Set and/or override some configuration registers based on the
  * marvell,88q2110 property stored in the of_node for the phydev.
  * marvell,88q2110 = <speed master>,...;
@@ -216,29 +218,38 @@
 
 int q2220_suspend(struct phy_device *phydev)
 {
-    //xf.li 2022/9/9 modify for LPSD mode
+    //xf.li 2022/11/9 modify for API-647
     printk("phy sleep start\n");
+    gpio_direction_output(7 + 268, 0);
+    mdelay(1);
     phy_write(phydev, MII_ADDR_C45 | 0x038022, 0x1);
     mdelay(10);
     printk("reg 038022 = %x\n", phy_read(phydev, (MII_ADDR_C45 | 0x038022)));
     phy_write(phydev, (MII_ADDR_C45 | 0x038020), 0x1);
     printk("reg 038020 = %x\n", phy_read(phydev, (MII_ADDR_C45 | 0x038020)));
     gpio_direction_output(26 + 268, 0);
-
+    if_suspend = 1;
     return 0;
-    //xf.li 2022/9/9 modify for LPSD mode
+    //xf.li 2022/11/9 modify for API-647
 }
 int q2220_resume(struct phy_device *phydev)
 {
-    //xf.li 2022/9/9 modify for LPSD mode
-    printk("phy awake start\n");
-    gpio_direction_output(7 + 268, 1);
-    udelay(1100);
-    gpio_direction_output(26 + 268, 1);
-    gpio_direction_output(7 + 268, 0);
-    q2110_config_init(phydev);
+    //xf.li 2022/11/9 modify for API-647
+    if(if_suspend == 1)
+    {
+        printk("phy awake start\n");
+        gpio_direction_output(7 + 268, 1);
+        udelay(1100);
+        gpio_direction_output(26 + 268, 1);
+        gpio_direction_output(7 + 268, 0);
+	if_suspend = 0;
+    }
+    else
+    {
+        printk("q2220_resume: no suspend! In boot state.");
+    }
     return 0;
-    //xf.li 2022/9/9 modify for LPSD mode
+    //xf.li 2022/11/9 modify for API-647
 }