summaryrefslogtreecommitdiff
path: root/board/meep/board.c
diff options
context:
space:
mode:
authorDevin Lu <devin.lu@quantatw.com>2018-10-31 18:09:24 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-10-31 21:59:30 -0700
commit58b9437d7e0e7a7b8941289cf1abdf20c735a24e (patch)
tree2b3810eb34272d7d4c0fff55150ccd5781d23b4f /board/meep/board.c
parentaefbc98e7e117864012170703e96972366603166 (diff)
downloadchrome-ec-58b9437d7e0e7a7b8941289cf1abdf20c735a24e.tar.gz
meep: 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: Ic343b99343f5f6d7a8967bf1c4bec642638d8568 Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/1309572 Reviewed-by: Justin TerAvest <teravest@chromium.org>
Diffstat (limited to 'board/meep/board.c')
-rw-r--r--board/meep/board.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/board/meep/board.c b/board/meep/board.c
index 5abf3338d6..0f7e2f12ff 100644
--- a/board/meep/board.c
+++ b/board/meep/board.c
@@ -305,3 +305,21 @@ void lid_angle_peripheral_enable(int enable)
keyboard_scan_enable(enable, KB_SCAN_DISABLE_LID_ANGLE);
}
#endif
+
+#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