GPIO5_IO02 not working

Hello,

We are currently working on a custom board, with a custom Yocto on a Colibri iMX6 SOM, and we experienced some problems with GPIO5_IO02 (pin 86).

I tested some GPIOs, and all of them work except GPIO5_IO2. In the .dtsi, the pad is configured like this :
MX6QDL_PAD_EIM_A25__GPIO5_IO02 PAD_CTRL_HYS_PU and the other reference to this pin is commented.

I exported the GPIO, set the direction out, and set the value to 1. When I do cat /sys/class/gpio/gpio130/value the value is still 0! On voltmeter the value is 0V and does not change at all.

Do we miss something?

Regards,
Pierre-Olivier

Hi Pierre-Oliver

The GPIO Config tool from our image actually looks at the pinmuxing / gpio registers to read the current state of the pins.
So you can use that tool to see if the EIM_A25 is actually muxed to GPIO, set to Output, and set to ‘1’.
My guess is that your pad configuration is not active and the pin is in its default ADDR23 function which outputs a ‘0’.

Since the pin you are using in the standard configuration is used as a GPIO to provide a SPI chip select I’m confident that the pin can be used as a GPIO output.

Note that, unless you set the SION bit, you cannot read back the currently commanded value with ‘cat /sys/class/gpio/gpio130/value’ on a i.MX 6.

Regards
Max