Merge "[Bugfix][bug-view-2083]Fixed the bug that gpio128(intest emmc power gpio) dropped to 0V after restart/ramdump" into INTEST_PM_SDK6.1_2WIFI
diff --git a/boot/common/src/uboot/drivers/gpio/hal_gpio.c b/boot/common/src/uboot/drivers/gpio/hal_gpio.c
index 82d1e82..33468b1 100644
--- a/boot/common/src/uboot/drivers/gpio/hal_gpio.c
+++ b/boot/common/src/uboot/drivers/gpio/hal_gpio.c
@@ -395,6 +395,22 @@
 			reg32(GPIO1_REG_BASE + 0x40 *i + 0x20)=0;	

 			reg32(GPIO1_REG_BASE + 0x40 *i + 0x24)=0;

 		}

+//xf.li@20250809 add for bug-2083 (intest emmc power gpio) start

+		else if(i==0)//gpio128

+		{

+			reg32(GPIO0_REG_BASE + 0x40 *i + 0x00)=0;

+			reg32(GPIO0_REG_BASE + 0x40 *i + 0x18)=0;

+			reg32(GPIO0_REG_BASE + 0x40 *i + 0x1c)=0;

+			reg32(GPIO0_REG_BASE + 0x40 *i + 0x20)=0;

+			reg32(GPIO0_REG_BASE + 0x40 *i + 0x24)=0;

+

+			reg32(GPIO1_REG_BASE + 0x40 *i + 0x00) &=0x1;

+			reg32(GPIO1_REG_BASE + 0x40 *i + 0x18) &=0x1;

+			reg32(GPIO1_REG_BASE + 0x40 *i + 0x1c) &=0x1;

+			reg32(GPIO1_REG_BASE + 0x40 *i + 0x20) &=0x1;

+			reg32(GPIO1_REG_BASE + 0x40 *i + 0x24) &=0x1;

+		}

+//xf.li@20250809 add for bug-2083 (intest emmc power gpio) end

 		else {

 			reg32(GPIO0_REG_BASE + 0x40 *i + 0x00)=0;

 			reg32(GPIO0_REG_BASE + 0x40 *i + 0x18)=0;

@@ -459,7 +475,13 @@
 	reg32(IO_CFG_REG_BASE + 0x20)=0x00154ff7;

 	reg32(IO_CFG_REG_BASE + 0x24)=0x00555555;	

 	reg32(IO_CFG_REG_BASE + 0x28)=0x00003858;	

-	reg32(IO_CFG_REG_BASE + 0x2c)=0x05555555;	

+	//reg32(IO_CFG_REG_BASE + 0x2c)=0x05555555;

+//xf.li@20250809 add for bug-2083 (intest emmc power gpio) start

+	tmp=reg32(IO_CFG_REG_BASE + 0x2c);

+	tmp &= 0xc0000;

+	tmp |= 0x05515555;

+	reg32(IO_CFG_REG_BASE + 0x2c)=tmp;

+//xf.li@20250809 add for bug-2083 (intest emmc power gpio) end

 	reg32(IO_CFG_REG_BASE + 0x30)=0x000000ad;

 	reg32(IO_CFG_REG_BASE + 0x34)=0x00000048;	

 	reg32(IO_CFG_REG_BASE + 0x38)=0x00000001;