lx2160a control GPIO3[3] output in uboot

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

lx2160a control GPIO3[3] output in uboot

Jump to solution
998 Views
156614400
Contributor III

UBOOT下面 GPIO3[3]无法控制输出高低电平

 1 

RCW中加了2个配置项

IRQ03_00_PMUX=1

EVT43_PMUX=1

EVT20_PMUX=1

2  uboot中加了GPIO3[3]控制

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);

 

烧录启动后,发现GPIO3[3]一直都是0

3

uboot下手动操作

=> md.l 0x2320000

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

手动控制GPIO3[3]也无法控制

mw 0x2320008 0x8

返回还是

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

 

请问这个怎么办啊

谢谢!

0 Kudos
1 Solution
971 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the following patches to make the MPC8XXX gpio driver to suppor fsl-layerscape platforms.

http://patchwork.ozlabs.org/project/uboot/patch/20200929092950.35372-1-ran.wang_1@nxp.com/

https://patchwork.ozlabs.org/project/uboot/patch/20200724110343.47079-2-hui.song_1@nxp.com/

https://patchwork.ozlabs.org/project/uboot/patch/20200724110343.47079-3-hui.song_1@nxp.com/

Please add "CONFIG_MPC8XXX_GPIO=y" in configs/lx2160ardb_tfa_defconfig in u-boot source code.

View solution in original post

2 Replies
972 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the following patches to make the MPC8XXX gpio driver to suppor fsl-layerscape platforms.

http://patchwork.ozlabs.org/project/uboot/patch/20200929092950.35372-1-ran.wang_1@nxp.com/

https://patchwork.ozlabs.org/project/uboot/patch/20200724110343.47079-2-hui.song_1@nxp.com/

https://patchwork.ozlabs.org/project/uboot/patch/20200724110343.47079-3-hui.song_1@nxp.com/

Please add "CONFIG_MPC8XXX_GPIO=y" in configs/lx2160ardb_tfa_defconfig in u-boot source code.

938 Views
156614400
Contributor III

1 when rebuild uboot,  have building error as this...,  add code,  then can rebuild  truely...

2  after program firmware to SD,   re-power on,  in uboot command,   also can not control GPIO3[3]

3 Uboot  log  as this

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