How to access GPIO in LS1021AIOT board from u-boot.

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

How to access GPIO in LS1021AIOT board from u-boot.

1,426 Views
dhruvalkumarpat
Contributor III

I have used few processor pins as GPIO and I want to add specific GPIO functionality(set , clear , toggle) to those pin. Which files to include for GPIO support for LS1021AIOT board. I didn't find a files that I can use and modify GPIO at will . Can nay one guide me here ??  I do know the set and clear function for u-boot. but I am talking about the structure for GPIO.

Thanks

Dhruval

Labels (1)
0 Kudos
5 Replies

1,076 Views
alexander_yakov
NXP Employee
NXP Employee

We do not offer GPIO driver for U-boot for our LS1021A processor, but U-boot driver structure is relatively simple, so you can create your own GPIO driver using other GPIO drivers as reference. For example drivers please look /drivers/gpio/ folder in U-boot sources.

1,076 Views
dhruvalkumarpat
Contributor III

Thanks . Is it possible to only use part of a PORT pins as GPIO ??? For Example I have eMMC connected on my BOARD which uses pins multiplexed with GPIO4 and I want to use GPIO4_21 and GPIO4_22 as GPIO pins for ls1020a .

0 Kudos

1,076 Views
alexander_yakov
NXP Employee
NXP Employee

Yes, pins GPIO4_21 and GPIO4_22 are configurable separately. Please look LS1021A Reference Manual, Table 3-16 for more details.

1,076 Views
dhruvalkumarpat
Contributor III

Thanks a lot . Got it to work .

0 Kudos

1,076 Views
pro-supportengi
NXP Employee
NXP Employee

Have the same question for the LS1043ARDB.

0 Kudos