diff options
author | Sue Chen <sue.chen@quanta.corp-partner.google.com> | 2021-06-02 12:54:23 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-06-23 08:44:43 +0000 |
commit | 354521683e2ec0b3c3b9147c904212f6132f5e9b (patch) | |
tree | b1936c9db95712a1dbabad9e0af5003fc539c476 /board/icarus/board.c | |
parent | 610c6877bbbe5a0b0c7f3625102413f833fa6e39 (diff) | |
download | chrome-ec-354521683e2ec0b3c3b9147c904212f6132f5e9b.tar.gz |
Cozmo: support factory keyboard test.
connector-to-GPIO map:
{-1, -1}, {GPIO_KSO_H, 4}, {GPIO_KSO_H, 0}, {GPIO_KSO_H, 1},
{GPIO_KSO_H, 3}, {GPIO_KSO_H, 2}, {-1, -1}, {-1, -1},
{GPIO_KSO_L, 5}, {GPIO_KSO_L, 6}, {-1, -1}, {GPIO_KSO_L, 3},
{GPIO_KSO_L, 2}, {GPIO_KSI, 0}, {GPIO_KSO_L, 1}, {GPIO_KSO_L, 4},
{GPIO_KSI, 3}, {GPIO_KSI, 2}, {GPIO_KSO_L, 0}, {GPIO_KSI, 5},
{GPIO_KSI, 4}, {GPIO_KSO_L, 7}, {GPIO_KSI, 6}, {GPIO_KSI, 7},
{GPIO_KSI, 1}, {-1, -1}, {GPIO_KSO_H, 5}, {-1, -1},
{GPIO_KSO_H, 6}, {-1, -1}, {-1, -1},
BUG=none
BRANCH=icarus
TEST=`ectool kbfactorytest` PASS.
Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com>
Change-Id: Ifc22d87f84ce86dee6f68b33a2a9a2964f71170f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2936262
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'board/icarus/board.c')
-rw-r--r-- | board/icarus/board.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/board/icarus/board.c b/board/icarus/board.c index defdfd1187..d094210c67 100644 --- a/board/icarus/board.c +++ b/board/icarus/board.c @@ -46,6 +46,25 @@ #include "gpio_list.h" +/* + * Map keyboard connector pins to EC GPIO pins for factory test. + * Pins mapped to {-1, -1} are skipped. + * The connector has 24 pins total, and there is no pin 0. + */ +const int keyboard_factory_scan_pins[][2] = { + {-1, -1}, {GPIO_KSO_H, 4}, {GPIO_KSO_H, 0}, {GPIO_KSO_H, 1}, + {GPIO_KSO_H, 3}, {GPIO_KSO_H, 2}, {-1, -1}, {-1, -1}, + {GPIO_KSO_L, 5}, {GPIO_KSO_L, 6}, {-1, -1}, {GPIO_KSO_L, 3}, + {GPIO_KSO_L, 2}, {GPIO_KSI, 0}, {GPIO_KSO_L, 1}, {GPIO_KSO_L, 4}, + {GPIO_KSI, 3}, {GPIO_KSI, 2}, {GPIO_KSO_L, 0}, {GPIO_KSI, 5}, + {GPIO_KSI, 4}, {GPIO_KSO_L, 7}, {GPIO_KSI, 6}, {GPIO_KSI, 7}, + {GPIO_KSI, 1}, {-1, -1}, {GPIO_KSO_H, 5}, {-1, -1}, + {GPIO_KSO_H, 6}, {-1, -1}, {-1, -1}, +}; + +const int keyboard_factory_scan_pins_used = + ARRAY_SIZE(keyboard_factory_scan_pins); + /* Wake-up pins for hibernate */ const enum gpio_signal hibernate_wake_pins[] = { GPIO_AC_PRESENT, |