Tool/software: Linux
I have been trying for months to get this working, and it just doesn't seem to want to work.
Firstly, I have found every spare GPIO I could find on the dev board that is wired to headers and nothing else, namely gpio53-55, 58-61, 133, and three others I can't remember (file isn't in front of me right now)
In the DTS file, I have specified all of those to be eg:
OMAP_CORE1_IOPAD(0x20B2, PIN_INPUT_PULLUP | MUX_MODE4) /* gpio53 */
In the kernel config I've got the GPIO sysfs interface checked (GPIOLIB=Y & GPIO_SYSFS=Y)
Once recompiled and booted, in sys/class/gpio I do:
# echo 53 > export (and 54, 55, etc)
# cat gpio53/direction
in
# cat gpio53/active_low
0
# cat gpio53/value
0
Attach a cable from 1.8V (J32 pin1) to GPIO53 (J31 pin 2).
# cat gpio53/value
0
Change cable to Ground
# cat gpio53/value
0
I've tried every GPIO I can find, all the same. I've tried both active_low = 1 and = 0
I've tried gpio+/-1 just in case the numbering is off either way or the other. (ie physically connect pin gpio54, test gpio53, 54, 55 in software).
Nothing works.
I've tried using them as outputs with a scope attached:
# echo out > gpio53/direction
# cat gpio53/direction
in
# cat gpio53/value
0
# echo 1 > gpio53/value
# cat gpio53/value
1
So Linux thinks that the pin has changed. So something's getting written to some register somewhere. But the physical pin Just. Doesn't. Change.
The only thing that works is the buttons.
# cat /sys/kernel/debug/gpio
...
gpio-178 ( |gpio2 ) in hi IRQ
*Press and hold Button*
# cat /sys/kernel/debug/gpio
...
gpio-178 ( |gpio2 ) in lo IRQ
So the buttons are changing.
Short of removing the button itself from the devkit board and soldering a header to that GPIO input, what else can / should I be doing to actually get this damn thing to get a GPIO input?