How to use GPIO on LS1021A

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to use GPIO on LS1021A

ソリューションへジャンプ
2,041件の閲覧回数
maumontadrien
Contributor III
Hello, I will use GPIO 3_13 and 3_14 LS1021A but the documentation does not explain anything about it.
Could someone give me the steps to follow for that?
- Kernel configuration
- RCW modification ...  
ps: I use the rocko branch of yocto and the meta-freescale.
ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,713件の閲覧回数
Pavel
NXP Employee
NXP Employee

If LS1021a GPIO1_15 is used, the LS1021a RCW UART_BASE bits should be cleared.

If LS1021a GPIO3_13 and GPIO3_15 are used, the LS1021a RCW EC1 bits should be set to 001.

See the Table 4-14 of the LS1021a Reference Manual.


Have a great day,
Pavel Chubakov

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
6 返答(返信)
1,713件の閲覧回数
maumontadrien
Contributor III

I find the solution, the RCW is include in u-boot on yocto.

The binary on the folder "work/ls1021atwr-poky-linux-gnueabi/rcw/git-r0/git/ls1021atwr/SSR_PNS_30/rcw_1200_sdboot.bin" is not used by u-boot generation.

We should modified the binary "work/ls1021atwr-poky-linux-gnueabi/u-boot-qoriq/2017.09+fslgit-r0/git/board/freescale/ls1021atwr/ls102xa_rcw_sd_ifc.cfg". This is the only file used by yocto to generate the final u-boot.img.

0 件の賞賛
返信
1,714件の閲覧回数
Pavel
NXP Employee
NXP Employee

If LS1021a GPIO1_15 is used, the LS1021a RCW UART_BASE bits should be cleared.

If LS1021a GPIO3_13 and GPIO3_15 are used, the LS1021a RCW EC1 bits should be set to 001.

See the Table 4-14 of the LS1021a Reference Manual.


Have a great day,
Pavel Chubakov

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
1,713件の閲覧回数
maumontadrien
Contributor III

Should I change the RCW file to activate the GPIO control ?

0 件の賞賛
返信
1,713件の閲覧回数
Pavel
NXP Employee
NXP Employee

NXP SDK supports sysfs possibility for GPIO using.

 

Look at the following pages:

https://www.kernel.org/doc/Documentation/gpio/sysfs.txt

 

http://falsinsoft.blogspot.ru/2012/11/access-gpio-from-linux-user-space.html

 

https://wiki.openwrt.org/doc/hardware/port.gpio

 

http://linux-sunxi.org/GPIO

 

The sysfs driver has been tested and is working. It has been accepted into the mainline kernel.

The SysFs interface is a very simple way to access the GPIO from user space and has the advantage of requiring very little setup.


Have a great day,
Pavel Chubakov

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
1,713件の閲覧回数
maumontadrien
Contributor III

Thank you for your help. I have added the sysfs gpio support and the GPIO driver on my kernel configuration.

I detect the 4 gpiochip. I can set the device direction to "out". But when I want set the gpio value, the output voltage doesn't change. I test with differents GPIO (GPIO3_13, GPIO3_14, GPIO1_15).

0 件の賞賛
返信
1,149件の閲覧回数
Axent
Contributor II
0 件の賞賛
返信