Hi
I'm trying to use one the two switch on the Sabre board in u-boo to select the boot device, either boot from SD-card or network.
But I'm stuck at the gpio part. I'm not able to read the value of either of the switches.
According to Definitive GPIO guide - Studio Kousagi Wiki the iopin number will be 138 for Sw3 (usr_bt1). I know that the source calculates on a imx6 but I assume that the calculations for the iopin is the same on the Imx7
I have tried, in u-boot:
"gpio i 138"
but the value returned is always 0.
I have also browsed through the u-boot code, but I was not able to find anything regarding gpio in the imx7. This leads me to believe that it isn't configured. Is this true? And if not are there any example/guides on how to enable it?
/Jens
Hi Jens
mentioned link described gpios in linux, while uboot is not linux.
In u-boot one can just write/read to processor registers using commands md,mw.
Also please use i.MX7D Reference Manual sect.8.2 IOMUX Controller (IOMUXC),
sect.8.3. General Purpose Input/Output (GPIO)
http://cache.nxp.com/files/32bit/doc/ref_manual/IMX7DRM.pdf
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------