I would like to hijack some of the push buttons on the daughter board of the AM335x EVM. I've reviewed the schematics and I see they're all used for something right now:
SW1-6 - Keypad - gpio 53/54 - 57/58/59
SW7 - Wakeup - EXT_WAKEUP (I think)
SW9 - Volume up - gpio 2
SW10 - Volume down - gpio 3
I wanted to export control of a few of these GPIO's to the sysfs so I could read them, but it looks like all the GPIO tied buttons are in use:
root@am335x-evm:/#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
GPIOs 32-63, gpio:
gpio-48 (wlan_en ) out lo
gpio-53 (matrix_kbd_col ) out hi
gpio-54 (matrix_kbd_col ) out hi
gpio-57 (matrix_kbd_row ) in lo
gpio-58 (matrix_kbd_row ) in lo
gpio-59 (matrix_kbd_row ) in lo
So there are a few points here I'm trying to understand:
1) the keypad buttons (SW1-6) are in use by the matrix_kbd for row and col. If I kill the matrix:
/etc/init.d/matrix-gui-2.0 stop
the GPIO's are not released. Is there anyway I can release the buttons in use for the matrix keyboard?
2) WRT the keys, the v1.2 schematic page 10 shows the KEYPAD_SCNX outputs from the buttons. The way it's wired it looks like there's no way to tell differentiate between a SW1 and SW4 press. (Assuming both KEYPAD_PWRA and KEYPAD_PWRB are active). Is that correct? (Same with SW2/SW5 and SW3/SW6)
3) Am I correct in assuming that output from SW7 (remote wakeup switch), that is AM335X_WAKEUP, is tied to C5 (EXT_WAKEUP) on the AM335X? I don't see anything correlating those two names, but it seems logical.