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?
Solved! Go to Solution.
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!
-----------------------------------------------------------------------------------------------------------------------
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!
-----------------------------------------------------------------------------------------------------------------------
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