summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/berknip/board.c18
-rw-r--r--board/berknip/board.h7
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 */