diff options
-rw-r--r-- | board/meep/board.c | 18 | ||||
-rw-r--r-- | board/meep/board.h | 7 |
2 files changed, 25 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 diff --git a/board/meep/board.h b/board/meep/board.h index 7949fe4518..d40abe4146 100644 --- a/board/meep/board.h +++ b/board/meep/board.h @@ -58,6 +58,8 @@ #define CONFIG_MKBP_EVENT #define CONFIG_MKBP_USE_HOST_EVENT +#define CONFIG_KEYBOARD_FACTORY_TEST + #define OCTOPUS_BATT_FUEL_LOW_LED 10 #define CONFIG_ACCEL_LSM6DSM_INT_EVENT TASK_EVENT_CUSTOM(4) @@ -105,6 +107,11 @@ enum battery_type { BATTERY_TYPE_COUNT, }; +#ifdef CONFIG_KEYBOARD_FACTORY_TEST +extern const int keyboard_factory_scan_pins[][2]; +extern const int keyboard_factory_scan_pins_used; +#endif + int board_is_convertible(void); #endif /* !__ASSEMBLER__ */ |