I was attempting to enable the LEDs on the AM335x EVM and I was running into some issues.
I've been looking at the Rev 1.4A schematic and I found the User LED's section (Page 6). The are labeled D4-D7. Taking a look at one of the LEDs (D7) It looks like if any of the three inputs:
AM335X_UART1_TXD (D15)
AM335X_MCASP0_AHCLKX (A14)
AM335X_GPMC_A9 (U16)
are driven high, then the LED should turn on. Examining sheet 2 of the schematic, these Lines are connected to A14, D15, and U16 respectively. Each of these lines have GPIO functions
A14->GPIO3_21
D15->GPIO0_15
U16->GPIO1_25
I checked the /sys/kernel/debug/gpio and see none of these pins are in use, so I enabled them all as outputs:
root@am335x-evm: /sys/class/gpio# echo 15 > export
root@am335x-evm: /sys/class/gpio# echo 21 > export
root@am335x-evm: /sys/class/gpio# echo 25 > export
root@am335x-evm: /sys/class/gpio# echo "out" > gpio15/direction
root@am335x-evm: /sys/class/gpio# echo "out" > gpio21/direction
root@am335x-evm: /sys/class/gpio# echo "out" > gpio25/direction
root@am335x-evm: /sys/class/gpio# echo 1 > gpio15/value
root@am335x-evm: /sys/class/gpio# echo 1 > gpio21/value
root@am335x-evm: /sys/class/gpio# echo 1 > gpio25/value
Reading back we see:
root@am335x-evm:/sys/class/gpio# cat /sys/kernel/debug/gpio
GPIOs 0-31, gpio:
gpio-2 (volume-up ) in hi
gpio-3 (volume-down ) in hi
gpio-6 (mmc_cd ) in lo
gpio-15 (sysfs ) out hi
gpio-21 (sysfs ) out hi
gpio-25 (sysfs ) out hi
So they are enabled, but the LED doesn't turn on, so my question is what else needs to be done?
First I note that the GPIO banks on the schematic (GPIOX) are different so do we have to "export" something else special?
Is there a way to check via the file system if the chip is correctly configured for GPIO operation on each of these pads?
Is there a way to check via the file system if there is power on each circuit or do I need to measure that with a meter?