summaryrefslogtreecommitdiff
path: root/board/dratini/board.c
diff options
context:
space:
mode:
authorDevin Lu <devin.lu@quantatw.com>2019-11-05 16:43:14 +0800
committerCommit Bot <commit-bot@chromium.org>2019-11-06 12:58:03 +0000
commit57da6c3f8b9861cb37e5a62c539fe563bcc9b07e (patch)
tree07419049bea766e9cd77eed09c7ed8f54399d7fe /board/dratini/board.c
parent7c7f736b851243194997c75c240b8de9fd26c136 (diff)
downloadchrome-ec-57da6c3f8b9861cb37e5a62c539fe563bcc9b07e.tar.gz
dratini: enable keyboard factory scanning
Clone from CL:1309572 This patch add for factory keyboard connector test. BUG=none BRANCH=none TEST=Short keyboard pins and make sure "ectool kbfactorytest" works. Change-Id: I06deb1539845bc3490c69943579aa4b6bbc1d4ab Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1898258 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'board/dratini/board.c')
-rw-r--r--board/dratini/board.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/board/dratini/board.c b/board/dratini/board.c
index 54eae7cabc..310fbfaf18 100644
--- a/board/dratini/board.c
+++ b/board/dratini/board.c
@@ -429,3 +429,21 @@ uint32_t board_override_feature_flags1(uint32_t flags1)
{
return flags1;
}
+
+#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] = {
+ {-1, -1}, {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