How could configure GPIO PINs in U-boot using android_p9.0.0_2.1.0-auto-ga BSP

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

How could configure GPIO PINs in U-boot using android_p9.0.0_2.1.0-auto-ga BSP

3,706 Views
hsu_frank
Contributor I

Hi,

We are using android_p9.0.0_2.1.0-auto-ga BSP for iMX8QM Custom Board, in which its unable to configure high/low for GPIO pins in U-boot. But we change to use android_p9.0.0_2.0.0-ga and L4.14.98_2.0.0, we can success to set high/low for same PINs in U-boot.

Example:

We try to set SC_P_SPI3_CS1_LSIO_GPIO2_IO21 to high and work good in android_p9.0.0_2.0.0-ga and L4.14.98_2.0.0.

But failed in android_p9.0.0_2.1.0-auto-ga. 

 

How to solve this problem?

Thanks.

0 Kudos
6 Replies

3,537 Views
compmas2
Contributor V

I am having the same issue with GPIO not working but in the Linux BSP u-boot rel_imx_5.4.24_2.1.0 on an i.MX6UL.  I used the same functions listed here and they used to work in an older version of u-boot too.

I submitted the following question/issue about it:
https://community.nxp.com/t5/i-MX-Processors/GPIO-silently-fails-in-u-boot-rel-imx-5-4-24-2-1-0/m-p/...

 

0 Kudos

3,575 Views
jamesbone
NXP TechSupport
NXP TechSupport

Can you please provide your code about the "set SC_P_SPI3_CS1_LSIO_GPIO2_IO21 to high".

0 Kudos

3,575 Views
hsu_frank
Contributor I

We follow android_build/vendor/nxp-opensource/uboot-imx/board/freescale/imx8qm_mek/imx8qm_mek.c using API "gpio_request" and "gpio_direction_output" to set GPIO pin to high/low. For example: 

gpio_request(IMX_GPIO_NR(2, 21), "power_enable");

gpio_direction_output(IMX_GPIO_NR(2, 21), 1);

 

These API can work in android_p9.0.0_2.0.0-ga and L4.14.98_2.0.0 but failed in android_p9.0.0_2.1.0-auto-ga.

Thanks.

0 Kudos

3,575 Views
jamesbone
NXP TechSupport
NXP TechSupport

I found no diff between the two branch in uboot. Could you provide the error log when set the gpio.

0 Kudos

3,575 Views
hsu_frank
Contributor I

U-boot will not show any error message about gpio setting.

But if we try to set gpio pins in u-boot console, we will get these message.

"lsio_gpio1 [200] not owned by curr partition"
"Error: lsio_gpio1 Power up failed! (error = 4)"

Thanks.

0 Kudos

3,575 Views
jamesbone
NXP TechSupport
NXP TechSupport

which platform you chose when lunch? Did car and car2 all have the issue?

in addition, please check the &gpio2 node in the dts.

0 Kudos