diff options
-rw-r--r-- | board/dirinboz/board.c | 17 | ||||
-rw-r--r-- | board/dirinboz/board.h | 7 |
2 files changed, 24 insertions, 0 deletions
diff --git a/board/dirinboz/board.c b/board/dirinboz/board.c index 7517ee2130..d7240f1728 100644 --- a/board/dirinboz/board.c +++ b/board/dirinboz/board.c @@ -520,3 +520,20 @@ int usb_port_enable[USBA_PORT_COUNT] = { IOEX_EN_USB_A0_5V, IOEX_EN_USB_A1_5V_DB, }; + +#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/dirinboz/board.h b/board/dirinboz/board.h index 2538918873..c88edb6f10 100644 --- a/board/dirinboz/board.h +++ b/board/dirinboz/board.h @@ -24,6 +24,8 @@ #define CONFIG_USB_PD_PORT_MAX_COUNT 2 #define CONFIG_USB_PORT_ENABLE_DYNAMIC +#define CONFIG_KEYBOARD_FACTORY_TEST + /* USB-A config */ #define GPIO_USB1_ILIM_SEL IOEX_USB_A0_CHARGE_EN_L #define GPIO_USB2_ILIM_SEL IOEX_USB_A1_CHARGE_EN_DB_L @@ -174,6 +176,11 @@ void tcpc_alert_event(enum gpio_signal signal); void bc12_interrupt(enum gpio_signal signal); void ppc_interrupt(enum gpio_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 */ |