Hi team we are using ls2088ardb custom board.
We need to control 2 gpio led in rcw and u-boot.
In rcw gpio2_04 needs to low and gpio4_07 need to be high.
after u-boot boot the gpio2_04 should be high and gpio4_07 should be low.
Can u tell me the code changes for this in u-boot and rcw.?
The LS2088 GPDAT (0x02330008) register controls the GPIO4 outputs.
Write 0x0000_0800 to this register for setting for setting gpio4_22 to high and gpio4_09 to low.
Write 0x0040_0800 to the register GPDIR (0x02330008) for setting these pins to outputs.
Have a great day,
Pavel Chubakov
It looks like that your PBI changes are correct.
Insert a few wait in your PBI code.
See the Section 7.2.10 of the LS2088a Reference Manual.
Have a great day,
Pavel Chubakov
Hi Pavel,
Thank you for the above confirmation.
Now i have another issue.When i have two different gpio i am able to do but when it comes to same gpio with different port i am facing issue.
suppose i have gpio4 with different port how to control them individually?
for example i need to make gpio4_22 as direction out with value to be high.
and gpio4_09 as direction out and with value to be low.
How do we do this ?how to calculate the address for this?
It looks like that the following writing in PBI is needed:
Setting for the GPIO2_4
address 0x02310000:
data 0x10
address 0x02310008:
data 0x0
Setting for the GPIO4_7
address 0x02330000:
data 0x80
address 0x02310008:
data 0x80
Attached file contains u_boot readme file. The file is available using the following link:
https://github.com/u-boot/u-boot/blob/master/README
Find the following section in this file:
Standalone HOWTO:
Use this section for developing standalone program for GPIO using.
Have a great day,
Pavel Chubakov
-------------------------------------------------------------------------------
Note:
This thread is continued as a private discussion with the submitter,
NXP support is not following the thread anymore.
-------------------------------------------------------------------------------
Hii Pavel,
is the above pbi changes correct for gpio4_07(low)
also how can we add a delay in pbl for led to be off and later to be on.
The LS2088a RCW provides pin assigning between the LS2088a peripheral interfaces. This pin assigning includes pin assigning to GPIO.
The LS2088a RCW does not provide level setting for the GPIO pins.
See the Section 4.9.7.9 of the LS2088a Reference Manual:
https://www.nxp.com/webapp/Download?colCode=LS2088ARM
Use PBI commands for GPIO level setting. These commands are executed before the LS2088a starting.
See the Chapter 7 of the LS2088a Reference Manual.
Draw attention on the Section 7.2.2.1 about writing to CCSR address space.
Have a great day,
Pavel Chubakov
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi Pavel,
In pbi i made changes as below to make gpio4_07 to high and gio2_04 to low.
CCSR 4bytes Write to 0x02310000,data=0x00000000
CCSR 4bytes Write to 0x02330000,data=0x02a08000
is the above changes correct.
Also to makes gpio2_04 t0 high and gpio4_07 to low in u-boot what changes should i do in code.