diff options
author | Dino Li <dino.li@ite.com.tw> | 2015-12-14 17:14:37 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-12-14 20:04:54 -0800 |
commit | 57e703ea24bcbaf6773288335110517e7da90da3 (patch) | |
tree | b36ac989291544b93c952fe62b2393b8ff6bad5a /board | |
parent | 313f2ab8c5cf2c1cf52c7316ed8600894b4fc977 (diff) | |
download | chrome-ec-57e703ea24bcbaf6773288335110517e7da90da3.tar.gz |
it8380dev: Implement GPIO mode for KBS pins and fix gpio_set_level()
1. KSO[0-15] and KSI[0-7] can be used as GPIO input if they are not set for
keyboard scan function.
2. Critical section for gpio_set_level().
Signed-off-by: Dino Li <dino.li@ite.com.tw>
BRANCH=none
BUG=none
TEST=console commands: gpioset, gpioget, and version.
Change-Id: I8edae122525e6dcebaa3489116642d8e48520569
Reviewed-on: https://chromium-review.googlesource.com/318112
Commit-Ready: Dino Li <dino.li@ite.com.tw>
Tested-by: Dino Li <dino.li@ite.com.tw>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/it8380dev/board.h | 1 | ||||
-rw-r--r-- | board/it8380dev/gpio.inc | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/board/it8380dev/board.h b/board/it8380dev/board.h index 0a1cc35caf..c9597a8af0 100644 --- a/board/it8380dev/board.h +++ b/board/it8380dev/board.h @@ -12,6 +12,7 @@ #define CHIP_FAMILY_IT839X #define CONFIG_BATTERY_SMART +#define CONFIG_BOARD_VERSION #define CONFIG_FANS 1 #define CONFIG_I2C #define CONFIG_I2C_MASTER diff --git a/board/it8380dev/gpio.inc b/board/it8380dev/gpio.inc index e438771a58..84a3bef164 100644 --- a/board/it8380dev/gpio.inc +++ b/board/it8380dev/gpio.inc @@ -38,6 +38,11 @@ GPIO(UART2_SIN1, PIN(H, 1), GPIO_INPUT) GPIO(UART2_SOUT1, PIN(H, 2), GPIO_INPUT) #endif +/* KSO/KSI pins can be used as GPIO input. */ +GPIO(BOARD_VERSION1, PIN(KSO_H, 5), GPIO_INPUT) +GPIO(BOARD_VERSION2, PIN(KSO_H, 6), GPIO_INPUT) +GPIO(BOARD_VERSION3, PIN(KSO_H, 7), GPIO_INPUT) + /* Unimplemented signals which we need to emulate for now */ UNIMPLEMENTED(ENTERING_RW) |