How can lx2160a control the GPIO3[3] in uboot ?

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

How can lx2160a control the GPIO3[3] in uboot ?

1,636 Views
156614400
Contributor III

How can lx2160a control the GPIO3[3] in uboot ?  

I  want to control GPIO3[3] of lx2160a, but can not set GPIO3 high  or low.

1:

I have added setting to RCW

IRQ03_00_PMUX=1

EVT43_PMUX=1

EVT20_PMUX=1

2

use GPIO3[3] to generate a signal of PCIE card reset

so I add the code to UBOOT

#define GPIO3_BASE_ADDR 0x2320000

        u32 val = 0x00000008;

        u32 tmp = 0;

        readsl(GPIO3_BASE_ADDR, &tmp, 1);

        val = val | tmp;

        writesl(GPIO3_BASE_ADDR, &val, 1);

        readsl(GPIO3_BASE_ADDR + 0x4, &tmp, 1);

        val = 0x00000008;

        val = tmp & (~val);

        writesl(GPIO3_BASE_ADDR + 0x4, &val, 1);

        readsl(GPIO3_BASE_ADDR + 0x8, &tmp, 1);

        val = 0x00000008;

        val = tmp & (~val);

        writesl(GPIO3_BASE_ADDR + 0x8, &val, 1);

        udelay(1000*20);

        val = 0x00000008;

        val = tmp | val;

        writesl(GPIO3_BASE_ADDR + 0x8, &val, 1);

 3  after rebuild the uboot, and load the bin to SD card,  I reset the lx2160a board,  

find that  value of GPIO3[3]  is always  0

=> md.l 0x2320000

02320000: 00000008 00000000 00000000 00000000    ................

manual control GPIO3[3]  under uboot command,  also can not control

mw 0x2320008 0x8

return vale also is :

=> md.l 0x2320000

02320000: 00000008 00000000 00000000 00000000    ................

 

 

5 so How can lx2160a control the GPIO3[3] in uboot ?   

thanks

0 Kudos
9 Replies

1,583 Views
156614400
Contributor III

mw 2320008 FFFFFFFF
 md 2320000
02320000: ffffffff 00000000 ff0f8000 ff0f8000 ................
02320010: 00000000 00000000 ffffffff 00000000 ................
02320020: 00000000 00000000 00000000 00000000 ................
mw 2320008 0
 md 2320000
02320000: ffffffff 00000000 00000000 ff0f8000 ................
02320010: 00000000 00000000 ffffffff 00000000 ................
02320020: 00000000 00000000 00000000 00000000 ................

0 Kudos

1,578 Views
ufedor
NXP Employee
NXP Employee

Please provide the processor connection schematics as PDF for inspection and explain where/how the GPIO3[3] is probed.

Also please consider that U-Boot operates in big-endian - i.e. for the GPIO3[3] corresponding bit is 0x10000000.

0 Kudos

1,587 Views
156614400
Contributor III

please  refer the attach file ... also can not control GPIO3[3]

mw 2320008 FFFFFFFF
md 2320000
02320000: ffffffff 00000000 ff0f8000 ff0f8000 ................
02320010: 00000000 00000000 ffffffff 00000000 ................
02320020: 00000000 00000000 00000000 00000000 ................
mw 2320008 0
md 2320000
02320000: ffffffff 00000000 00000000 ff0f8000 ................
02320010: 00000000 00000000 ffffffff 00000000 ................
02320020: 00000000 00000000 00000000 00000000 ................

0 Kudos

1,631 Views
ufedor
NXP Employee
NXP Employee

GPIO should be enabled in the GPIBE register - refer to the QorIQ LX2160A Reference Manual, 20.5.1.7 GPIO Input Buffer Enable Register (GPIBE).

Please provide U-Boot booting log as textual attachment.

0 Kudos

1,622 Views
156614400
Contributor III

the attach file  is  my log,   under uboot command,   also  can not set GPIO3[3]  high  or low...

How can I  set GPIO3[3]  high  or low.

thanks

0 Kudos

1,617 Views
ufedor
NXP Employee
NXP Employee

Please try the following and check the GPIO3[3] behaviour:

mw 2320000 FFFFFFFF

mw 2320008 FFFFFFFF // check

mw 2320008 0 // check

1,559 Views
156614400
Contributor III

=> md 2320000
02320000: 00000000 00000000 00000000 00000000 ................
02320010: 00000000 00000000 00000000 00000000 ................
02320020: 00000000 00000000 00000000 00000000 ................
=> mw 2320000 FFFFFFFF
=> md 2320000
02320000: ffffffff 00000000 00000000 00000000 ................
02320010: 00000000 00000000 00000000 00000000 ................
02320020: 00000000 00000000 00000000 00000000 ................
=> mw 2320008 FFFFFFFF
=> md 2320000
02320000: ffffffff 00000000 00000000 00000000 ................
02320010: 00000000 00000000 00000000 00000000 ................
02320020: 00000000 00000000 00000000 00000000 ................
=> mw 2320018 FFFFFFFF
=> md 2320000
02320000: ffffffff 00000000 ff0f8000 ff0f8000 ................
02320010: 00000000 00000000 ffffffff 00000000 ................
02320020: 00000000 00000000 00000000 00000000 ................
=> mw 2320008 FFFFFFFF
=> md 2320000
02320000: ffffffff 00000000 ff0f8000 ff0f8000 ................
02320010: 00000000 00000000 ffffffff 00000000 ................
02320020: 00000000 00000000 00000000 00000000 ................
=> mw 2320008 0
=> md 2320000
02320000: ffffffff 00000000 00000000 ff0f8000 ................
02320010: 00000000 00000000 ffffffff 00000000 ................
02320020: 00000000 00000000 00000000 00000000 ................

0 Kudos

1,557 Views
156614400
Contributor III

delete

0 Kudos

1,557 Views
156614400
Contributor III

delete

0 Kudos