i.MX6SX Linux GPIO mapping

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

i.MX6SX Linux GPIO mapping

ソリューションへジャンプ
1,815件の閲覧回数
kubiznak_petr
Contributor V

Hi all,I did not manage to find any reliable source of GPIO pads mapping to the Linux /sys/class/gpio driver. For example for IO6_7_SD2_CMD pad, how do I set it to output in Linux (or u-boot)? I tried exporting 167 (5*32+7) and 199 (6*32+7), but any of these changed the output value. Can someone please point me to a source with correct mapping?

ラベル(3)
タグ(5)
1 解決策
1,127件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Petr

general steps are described at

https://community.freescale.com/docs/DOC-1459

http://www.kosagi.com/w/index.php?title=Definitive_GPIO_guide

what BSP and board used in the case,  could it be reproduced on

i.MX6SX Sabre board ?

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,128件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Petr

general steps are described at

https://community.freescale.com/docs/DOC-1459

http://www.kosagi.com/w/index.php?title=Definitive_GPIO_guide

what BSP and board used in the case,  could it be reproduced on

i.MX6SX Sabre board ?

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
1,127件の閲覧回数
kubiznak_petr
Contributor V

Hi Igor,

Thanks for your reply. The links actually don't say anything that I wouldn't know before, but it's good to have it confirmed from other sources.
I did some more research and finally found where the problem was. IOMUX of given pad obviously needs to be initialized in the device tree (e.g. iomuxc.imx6x-sdb.pinctrl_hog), as otherwise changing the GPIO value has no effect. I expected linux would do that automatically, and it's a bit annoying that it doesn't. But ok, solved.

Thanks for your help,

Petr