diff options
author | David Huang <david.huang@quanta.corp-partner.google.com> | 2021-06-08 16:45:34 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-06-21 03:10:41 +0000 |
commit | 60ebb39885626747ee8fc8226a8afb4e749c47b4 (patch) | |
tree | ec11a604062e042bb447f1a1f2285c99bfcb5c84 | |
parent | 60241e8d8db585c949aafb330c178012773ad640 (diff) | |
download | chrome-ec-60ebb39885626747ee8fc8226a8afb4e749c47b4.tar.gz |
volet: support factory keyboard test.
connector-to-GPIO map:
{-1,-1}, { 0, 5}, { 1, 1}, { 1, 0}, { 0, 6},
{ 0, 7}, {-1,-1}, {-1,-1}, { 1, 4}, { 1, 3},
{-1,-1}, { 1, 6}, { 1, 7}, { 3, 1}, { 2, 0},
{ 1, 5}, { 2, 6}, { 2, 7}, { 2, 1}, { 2, 4},
{ 2, 5}, { 1, 2}, { 2, 3}, { 2, 2}, { 3, 0},
{-1,-1}, { 0, 4}, {-1 -1}, { 8, 2}, {-1,-1},
{-1,-1},
BUG=b:187622652
BRANCH=volteer
TEST=`ectool kbfactorytest` PASS.
Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com>
Change-Id: I8af839b77466aef9a7d8078b639ab08461935027
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2944523
Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r-- | board/volet/board.c | 17 | ||||
-rw-r--r-- | board/volet/board.h | 4 |
2 files changed, 21 insertions, 0 deletions
diff --git a/board/volet/board.c b/board/volet/board.c index 1b2055a70d..716c4c5481 100644 --- a/board/volet/board.c +++ b/board/volet/board.c @@ -106,6 +106,23 @@ struct keyboard_scan_config keyscan_config = { }, }; +/* + * We have total 30 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}, {0, 5}, {1, 1}, {1, 0}, {0, 6}, + {0, 7}, {-1, -1}, {-1, -1}, {1, 4}, {1, 3}, + {-1, -1}, {1, 6}, {1, 7}, {3, 1}, {2, 0}, + {1, 5}, {2, 6}, {2, 7}, {2, 1}, {2, 4}, + {2, 5}, {1, 2}, {2, 3}, {2, 2}, {3, 0}, + {-1, -1}, {0, 4}, {-1, -1}, {8, 2}, {-1, -1}, + {-1, -1}, +}; +const int keyboard_factory_scan_pins_used = + ARRAY_SIZE(keyboard_factory_scan_pins); + __override uint32_t board_override_feature_flags0(uint32_t flags0) { /* diff --git a/board/volet/board.h b/board/volet/board.h index 9df22bad5f..bf755f5212 100644 --- a/board/volet/board.h +++ b/board/volet/board.h @@ -35,6 +35,7 @@ #define CONFIG_LED_ONOFF_STATES /* Keyboard features */ +#define CONFIG_KEYBOARD_FACTORY_TEST #define CONFIG_KEYBOARD_REFRESH_ROW3 /* Keyboard backliht */ @@ -194,6 +195,9 @@ void board_reset_pd_mcu(void); void motion_interrupt(enum gpio_signal signal); +extern const int keyboard_factory_scan_pins[][2]; +extern const int keyboard_factory_scan_pins_used; + #endif /* !__ASSEMBLER__ */ #endif /* __CROS_EC_BOARD_H */ |