summaryrefslogtreecommitdiff
path: root/board/osiris
diff options
context:
space:
mode:
authorYu-An Chen <yu-an.chen@quanta.corp-partner.google.com>2022-06-02 11:05:37 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-06-10 23:41:14 +0000
commitc09ca7dbadb9fdf0a853ca0ef6a52e8b07722c70 (patch)
tree8a6e85e2508e7225ebda57df3667506426b51931 /board/osiris
parent85a557651d91dd1ae45483df342f964afb11cb8d (diff)
downloadchrome-ec-c09ca7dbadb9fdf0a853ca0ef6a52e8b07722c70.tar.gz
osiris: Support factory keyboard test
Support factory keyboard connector test BUG=b:224423318 BRANCH=none TEST=check ectool kbfactorytest pass Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: Ie2c0e5e10bd3f8713bca2e1807f8e5e60eca01fb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3686009 Commit-Queue: Parth Malkan <parthmalkan@google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com> Reviewed-by: Parth Malkan <parthmalkan@google.com>
Diffstat (limited to 'board/osiris')
-rw-r--r--board/osiris/board.c21
-rw-r--r--board/osiris/board.h6
2 files changed, 27 insertions, 0 deletions
diff --git a/board/osiris/board.c b/board/osiris/board.c
index d74e7e6088..8d20de1550 100644
--- a/board/osiris/board.c
+++ b/board/osiris/board.c
@@ -57,3 +57,24 @@ __override void board_kblight_init(void)
gpio_set_level(GPIO_EC_KB_BL_EN_L, 1);
msleep(10);
}
+
+/* keyboard factory test */
+#ifdef CONFIG_KEYBOARD_FACTORY_TEST
+/*
+ * 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);
+#endif
diff --git a/board/osiris/board.h b/board/osiris/board.h
index abddb9104c..2277b1ce9a 100644
--- a/board/osiris/board.h
+++ b/board/osiris/board.h
@@ -145,6 +145,7 @@
#define RGB_GRID0_ROW 1
#define I2C_PORT_KBMCU I2C_PORT_RGBKB
+#define CONFIG_KEYBOARD_FACTORY_TEST
#ifndef __ASSEMBLER__
@@ -188,6 +189,11 @@ enum mft_channel {
MFT_CH_COUNT
};
+#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 */