diff options
Diffstat (limited to 'board/hammer/gpio.inc')
-rw-r--r-- | board/hammer/gpio.inc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/board/hammer/gpio.inc b/board/hammer/gpio.inc index 8bba90b5da..3f11a9c2a5 100644 --- a/board/hammer/gpio.inc +++ b/board/hammer/gpio.inc @@ -10,6 +10,33 @@ GPIO_INT(TOUCHPAD_INT, PIN(A, 1), GPIO_INT_FALLING | GPIO_PULL_UP, elan_tp_interrupt) +/* Keyboard inputs */ +#define GPIO_KB_INPUT (GPIO_INPUT | GPIO_PULL_UP | GPIO_INT_BOTH) +#define GPIO_KB_OUTPUT GPIO_ODR_HIGH + +GPIO_INT(KB_IN00, PIN(A, 3), GPIO_KB_INPUT, keyboard_raw_gpio_interrupt) +GPIO_INT(KB_IN01, PIN(A, 2), GPIO_KB_INPUT, keyboard_raw_gpio_interrupt) +GPIO_INT(KB_IN02, PIN(A, 11), GPIO_KB_INPUT, keyboard_raw_gpio_interrupt) +GPIO_INT(KB_IN03, PIN(A, 4), GPIO_KB_INPUT, keyboard_raw_gpio_interrupt) +GPIO_INT(KB_IN04, PIN(A, 5), GPIO_KB_INPUT, keyboard_raw_gpio_interrupt) +GPIO_INT(KB_IN05, PIN(A, 6), GPIO_KB_INPUT, keyboard_raw_gpio_interrupt) +GPIO_INT(KB_IN06, PIN(A, 7), GPIO_KB_INPUT, keyboard_raw_gpio_interrupt) +GPIO_INT(KB_IN07, PIN(A, 8), GPIO_KB_INPUT, keyboard_raw_gpio_interrupt) + +GPIO(KB_OUT00, PIN(B, 0), GPIO_KB_OUTPUT) +GPIO(KB_OUT01, PIN(B, 10), GPIO_KB_OUTPUT) +GPIO(KB_OUT02, PIN(B, 12), GPIO_KB_OUTPUT) +GPIO(KB_OUT03, PIN(B, 2), GPIO_KB_OUTPUT) +GPIO(KB_OUT04, PIN(B, 11), GPIO_KB_OUTPUT) +GPIO(KB_OUT05, PIN(D, 14), GPIO_KB_OUTPUT) +GPIO(KB_OUT06, PIN(D, 13), GPIO_KB_OUTPUT) +GPIO(KB_OUT07, PIN(D, 15), GPIO_KB_OUTPUT) +GPIO(KB_OUT08, PIN(C, 2), GPIO_KB_OUTPUT) +GPIO(KB_OUT09, PIN(B, 1), GPIO_KB_OUTPUT) +GPIO(KB_OUT10, PIN(C, 5), GPIO_KB_OUTPUT) +GPIO(KB_OUT11, PIN(C, 4), GPIO_KB_OUTPUT) +GPIO(KB_OUT12, PIN(D, 5), GPIO_KB_OUTPUT) + /* I2C pins should be configured as inputs until I2C module is */ /* initialized. This will avoid driving the lines unintentionally.*/ GPIO(MASTER_I2C_SCL, PIN(B, 8), GPIO_INPUT) |