i.MX6SX Linux GPIO mapping

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

i.MX6SX Linux GPIO mapping

Jump to solution
1,156 Views
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?

Labels (3)
Tags (5)
1 Solution
468 Views
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!

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

View solution in original post

0 Kudos
2 Replies
469 Views
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 Kudos
468 Views
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