LS1046A watchdog force pull high/low in u-boot

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LS1046A watchdog force pull high/low in u-boot

Jump to solution
936 Views
charleshuang
Senior Contributor II

Hi NXP Team.

We want to force pull-high or pull-low the Enable/Trigger pins in U-Boot.

So we add some code as below, but it look like no use.

Do you have any suggestion for us ?

 

Enable pin => GPIO2_2

Trigger pin => GPIO2_3

 

*** u-boot/board/freescale/ls1046ardb/ls1046ardb.c  ***

#define WDT_DIRMASK_TRIG 0xefffffff
#define WDT_DATMASK_TRIG 0x10000000
#define WDT_DIRMASK_EN 0xdfffffff
#define WDT_DATMASK_EN 0xdfffffff

static inline void wdt_pinmux_init(void)
{
u32 val;
struct ccsr_gpio *pgpio = (void *)(GPIO2_BASE_ADDR);

/* en pin */
val = in_be32(&pgpio->gpdir);
val &= WDT_DIRMASK_EN;
out_be32(&pgpio->gpdir, val);

printf("WDT_DIRMASK_EN val (0x%X)\n", val);

val = in_be32(&pgpio->gpdat);
val &= WDT_DATMASK_EN;
out_be32(&pgpio->gpdat, val);

printf("WDT_DATMASK_EN val (0x%X)\n", val);

/* trig pin */
val = in_be32(&pgpio->gpdir);
val &= WDT_DIRMASK_TRIG;
out_be32(&pgpio->gpdir, val);

printf("WDT_DIRMASK_TRIG val (0x%X)\n", val);

val = in_be32(&pgpio->gpdat);
val |= WDT_DATMASK_TRIG;
out_be32(&pgpio->gpdat, val);

printf("WDT_DATMASK_TRIG val (0x%X)\n", val);
}

void config_board_mux(void)
{

.....

/* adv-wdt mux init */
wdt_pinmux_init();
}

 

 

0 Kudos
1 Solution
920 Views
Pavel
NXP Employee
NXP Employee

Are these pins assigned to GPIO in the LS1046a RCW?

See the Section 3.4.6 in the LS1046a Reference Manual:

https://www.nxp.com/webapp/Download?colCode=LS1046ARM

View solution in original post

0 Kudos
2 Replies
902 Views
charleshuang
Senior Contributor II

Yes, GPIO2_2/GPIO2_3 pins is already set in RCW.

0 Kudos
921 Views
Pavel
NXP Employee
NXP Employee

Are these pins assigned to GPIO in the LS1046a RCW?

See the Section 3.4.6 in the LS1046a Reference Manual:

https://www.nxp.com/webapp/Download?colCode=LS1046ARM

0 Kudos