[Feture][ZXW][PL]enable GNSS

Change-Id: I54f40efe70b945f997024dd115da61613f70262f
diff --git a/boot/common/src/uboot/drivers/peripheral/peripheral.c b/boot/common/src/uboot/drivers/peripheral/peripheral.c
index 564c2ca..4b0d8fe 100644
--- a/boot/common/src/uboot/drivers/peripheral/peripheral.c
+++ b/boot/common/src/uboot/drivers/peripheral/peripheral.c
@@ -33,7 +33,9 @@
 ****************************************************************************/

 #define SD1_IO_1V8_EN	0x13c830

 #define REG32(x)			    (*(volatile u32*)(x))

-

+//xf.li@20230412 add for enable GNSS start

+#define ZX_TOP_CRM_BASE	0x0013B000

+//xf.li@20230412 add for enable GNSS end

 /****************************************************************************

 *											   Local Types

 ****************************************************************************/

@@ -79,6 +81,20 @@
 	

 	REG32(SD1_IO_1V8_EN) |=(1<<1);

 #endif

+//xf.li@20230412 add for enable GNSS start

+#if 1 //enable GNSS

+	REG32(ZX_TOP_CRM_BASE + 0x34) |= (0x1<<5);

+	zDrvGpio_SetFunc(GPIO15,GPIO15_CLK_OUT0);

+

+	zDrvGpio_SetFunc(GPIO86,GPIO86_GPIO86);

+	zDrvGpio_SetDirection(GPIO86,GPIO_OUT);

+	zDrvGpio_SetOutputValue(GPIO86,GPIO_HIGH);

+

+	zDrvGpio_SetFunc(GPIO126,GPIO126_GPIO126);

+	zDrvGpio_SetDirection(GPIO126,GPIO_OUT);

+	zDrvGpio_SetOutputValue(GPIO126,GPIO_LOW);

+#endif

+//xf.li@20230412 add for enable GNSS end

 	zx234502_charger_enable();

 

 	return ret ;

diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/at_ctl/src/atctrl/at_context.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/at_ctl/src/atctrl/at_context.c
index bbadca5..2b34dda 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/at_ctl/src/atctrl/at_context.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/at_ctl/src/atctrl/at_context.c
@@ -242,8 +242,9 @@
 		if(timeout > 0 && timeout < INT_MAX/1000)//kw 3

 			g_farps_select_timeout = timeout;

 	}

-

-	g_farps_fd0 = at_open("/dev/ttyS2",O_RDWR);	

+	//xf.li@20230417 modify for enable GNSS start

+	//g_farps_fd0 = at_open("/dev/ttyS2",O_RDWR);	

+	//xf.li@20230417 modify for enable GNSS end

 	at_print(AT_ERR,"init open ttyS2 => fd: %d er_no: %d\n", g_farps_fd0, errno);

 	if(g_farps_fd0 >= 0){

 		if(at_portmng_set_state_proc("/dev/ttyS2",1,g_farps_fd0) != 0){