diff options
author | Zick Wei <zick.wei@quanta.corp-partner.google.com> | 2020-06-16 10:57:24 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-06-16 18:41:55 +0000 |
commit | 2264f108f13885317445c837c0b1cfdbc867acfc (patch) | |
tree | 18f140732b473dfa7eadd7cf84f6d13a56b54478 | |
parent | 612c24abe261dfd6ccc3bd51c67934d6feaaa8c0 (diff) | |
download | chrome-ec-2264f108f13885317445c837c0b1cfdbc867acfc.tar.gz |
berknip: enable keyboard factory scanning
This patch add for factory keyboard connector test.
BUG=none
BRANCH=none
TEST=short keyboard pins and make sure "ectool kbfactorytest" works.
Change-Id: I7c93322d6644163a58e2ec0890cd12b9d0c186b8
Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2246012
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Commit-Queue: Edward Hill <ecgh@chromium.org>
-rw-r--r-- | board/berknip/board.c | 18 | ||||
-rw-r--r-- | board/berknip/board.h | 7 |
2 files changed, 25 insertions, 0 deletions
diff --git a/board/berknip/board.c b/board/berknip/board.c index 74b1654f9c..f47be3a11e 100644 --- a/board/berknip/board.c +++ b/board/berknip/board.c @@ -486,3 +486,21 @@ void hdmi_hpd_interrupt(enum ioex_signal signal) /* Debounce for 2 msec. */ hook_call_deferred(&hdmi_hpd_handler_data, (2 * MSEC)); } + +#ifdef CONFIG_KEYBOARD_FACTORY_TEST +/* + * 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] = { + {0, 5}, {1, 1}, {1, 0}, {0, 6}, {0, 7}, + {1, 4}, {1, 3}, {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}, {-1, -1}, {-1, -1}, +}; + +const int keyboard_factory_scan_pins_used = + ARRAY_SIZE(keyboard_factory_scan_pins); +#endif diff --git a/board/berknip/board.h b/board/berknip/board.h index 9fa3da69f4..f6c0523a9a 100644 --- a/board/berknip/board.h +++ b/board/berknip/board.h @@ -38,6 +38,8 @@ #define CONFIG_LID_ANGLE_SENSOR_BASE BASE_ACCEL #define CONFIG_LID_ANGLE_SENSOR_LID LID_ACCEL +#define CONFIG_KEYBOARD_FACTORY_TEST + /* Type C mux/retimer */ #define CONFIG_USB_MUX_PS8743 #define CONFIG_USBC_RETIMER_TUSB544 @@ -211,6 +213,11 @@ extern struct usb_mux usbc1_amd_fp5_usb_mux; void hdmi_hpd_interrupt(enum ioex_signal signal); +#ifdef CONFIG_KEYBOARD_FACTORY_TEST +extern const int keyboard_factory_scan_pins[][2]; +extern const int keyboard_factory_scan_pins_used; +#endif + #endif /* !__ASSEMBLER__ */ #endif /* __CROS_EC_BOARD_H */ |