GPIO control on LS1021ATSN

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

GPIO control on LS1021ATSN

757 Views
Waner
Contributor III

Hi, 

I am looking for doing a test code with controling some GPIO on my NXP LS1021ATSN board, such as turn on a led, or put a GPIO at high state for example. 

But with searching on the board, I really do not find anything concerning this GPIO manipulation, and I do not find sysfs macro such as "export" or a folder called /sys/class/gpio. 

Can you help me to know how to control GPIOs on this board ? 

Thanks. 

Tags (1)
0 Kudos
5 Replies

726 Views
Waner
Contributor III

Hi, 

Thanks for your answer, I took a look on both links and on documents on which they refer to. 

However, concerning RCW, they are using a bitbake compilation but I did not start from a yocto project but from the SDK in the getting started document. (I found my RCW file here : /openil/output/build/host-uboot-tools-2020.01/board/freescale/ls1021atsn)

Moreover, I cannot find GPIO Driver configuration in make menuconfig, so I cannot link GPIO with sysfs.. 

Do I really need to start with a yocto project just to control one GPIO on my board, or do I not understand the way to do it ? 

 

Thanks for your answer. 

0 Kudos

716 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please run the following command to build Linux Kernel image with GPIO driver enabled.

$ make nxp_ls1021atsn_defconfig

$ make linux-menuconfig

Configure Linux Kernel as the following.

Device Drivers  --->

   -*- GPIO Support  --->

        [*]   /sys/class/gpio/... (sysfs interface)

        Memory mapped GPIO drivers  --->

           [*] MPC512x/MPC8xxx/QorIQ GPIO support

$ make linux

 

Please modify rcw file in output/build/qoriq-rcw/git/ls1021atsn/SSR_PNS_30/, then run the following command to rebuild RCW.

$ make host-qoriq-rcw-rebuild

 

 

Tags (1)
0 Kudos

706 Views
Waner
Contributor III

Hi @yipingwang 

Thank you for the first step, I did not know that it was make linux-menuconfig instead of classic menuconfig. 

 

However, the path for rcw that you gave me does not exist for me in my openil SDK. (I checked after the make linux command). 

0 Kudos

693 Views
yipingwang
NXP TechSupport
NXP TechSupport

In my openil build environment, RCW is in output/build/host-qoriq-rcw-LSDK-20.04/ls1021atsn/SSR_PNS_30/.

0 Kudos