I have a custom iMX6 board with multiple GPIO pins on it being used. All of the GPIOs that I am using as outputs work and all but one of my inputs work. The input that is not working has the same voltage divider and filtering capacitors as the other inputs, so the circuitry is the same. For some reason GPIO7_IO01 always reads 0 regardless of whether the input pin is at 0V or 3.3V. I use the below commands to read the input:
echo 193 >> /sys/class/gpio/export
echo in >> /sys/class/gpio/gpio193/direction
In my device tree, I have tried with the pin not specified as anything and throwing in pinctrl_hog set as below:
In both cases, 0 is always read. The SD3 pins are not being used for an SDIO interface. I am using four of the SD3 pins for my two CAN interfaces (CMD, CLK, DAT0 and DAT1). Some of the other pins are being used for GPIO (DAT6, DAT7 and RST) and they work. The other GPIO are not specified in the device tree.
I am really at a loss for this one, any ideas?