i.MX6SX Linux GPIO mapping

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

i.MX6SX Linux GPIO mapping

跳至解决方案
1,804 次查看
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,116 次查看
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,117 次查看
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,116 次查看
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