diff options
author | Devn Lu <Devin.lu@quantatw.com> | 2016-03-14 15:23:05 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-04-01 00:21:35 -0700 |
commit | 93be0c3b0ac3ed49d7d1d99c5ace8cd0487de7f5 (patch) | |
tree | d1862b3dbd160bd2983f1a966047c5830d0f7346 /board/chell | |
parent | 55cd6e4c75895c5727ea6fd87b047a39a8730490 (diff) | |
download | chrome-ec-93be0c3b0ac3ed49d7d1d99c5ace8cd0487de7f5.tar.gz |
ectool: Support keyboard factory scanning
This is keyboard test mechanism request for "multiple key press test",
we can thru the testing to scan out kso ksi pins shortting or keyboard has
multiple key pressing, below was the testing steps:
1. Turn off internal keyboard scan function.
2. Set all scan & sense pins to input and internal push up.
3. Set start one pin to output low.
4. check other pins status if any sense low level.
5. repeat step 3~4 for all keyboard KSO/KSI pins.
6. Turn on internal keyboard scan function.
BUG=chrome-os-partner:49235
BRANCH=ToT
TEST=manual
Short any KSO or KSI pins and excute "ectool kbfactorytest", it shows failed.
if no pins short together, it shows passed.
Change-Id: Id2c4310d45e892aebc6d2c0795db22eba5a30641
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Reviewed-on: https://chromium-review.googlesource.com/332322
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'board/chell')
-rw-r--r-- | board/chell/board.c | 19 | ||||
-rw-r--r-- | board/chell/board.h | 6 |
2 files changed, 25 insertions, 0 deletions
diff --git a/board/chell/board.c b/board/chell/board.c index 62701a36b6..dec82b4f1b 100644 --- a/board/chell/board.c +++ b/board/chell/board.c @@ -133,6 +133,25 @@ const enum gpio_signal hibernate_wake_pins[] = { }; const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins); +#ifdef CONFIG_KEYBOARD_FACTORY_TEST +/* + * We have total 28 pins for keyboard connecter, {-1, -1} mean + * the N/A pin that don't consider it and reserve index 0 area + * that we don't have pin 0. + */ +const int keyboard_factory_scan_pins[][2] = { + {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, + {12, 6}, {4, 3}, {4, 2}, {0, 2}, {14, 2}, + {4, 0}, {0, 0}, {-1, -1}, {3, 2}, {10, 3}, + {10, 0}, {12, 5}, {-1, -1}, {10, 2}, {-1, -1}, + {0, 1}, {10, 4}, {-1, -1}, {-1, -1}, {0, 4}, + {10, 7}, {10, 6}, {0, 3}, {0, 5}, +}; + +const int keyboard_factory_scan_pins_used = + ARRAY_SIZE(keyboard_factory_scan_pins); +#endif + struct pi3usb9281_config pi3usb9281_chips[] = { { .i2c_port = I2C_PORT_USB_CHARGER_1, diff --git a/board/chell/board.h b/board/chell/board.h index b28e720bdb..1f735d155e 100644 --- a/board/chell/board.h +++ b/board/chell/board.h @@ -48,6 +48,7 @@ #define CONFIG_I2C_MASTER #define CONFIG_KEYBOARD_PROTOCOL_8042 #define CONFIG_KEYBOARD_COL2_INVERTED +#define CONFIG_KEYBOARD_FACTORY_TEST #define CONFIG_LED_COMMON #define CONFIG_LID_SWITCH #define CONFIG_LOW_POWER_IDLE @@ -205,6 +206,11 @@ enum temp_sensor_id { /* Try to negotiate to 20V since i2c noise problems should be fixed. */ #define PD_MAX_VOLTAGE_MV 20000 +#ifdef CONFIG_KEYBOARD_FACTORY_TEST +extern const int keyboard_factory_scan_pins[][2]; +extern const int keyboard_factory_scan_pins_used; +#endif + /* Reset PD MCU */ void board_reset_pd_mcu(void); |