diff options
-rw-r--r-- | baseboard/volteer/baseboard.c | 18 | ||||
-rw-r--r-- | baseboard/volteer/baseboard.h | 6 | ||||
-rw-r--r-- | board/volteer/ec.tasklist | 4 |
3 files changed, 27 insertions, 1 deletions
diff --git a/baseboard/volteer/baseboard.c b/baseboard/volteer/baseboard.c index be0370074f..7a2eb207dc 100644 --- a/baseboard/volteer/baseboard.c +++ b/baseboard/volteer/baseboard.c @@ -9,6 +9,7 @@ #include "charge_state.h" #include "gpio.h" #include "i2c.h" +#include "keyboard_scan.h" #include "pwm.h" #include "pwm_chip.h" @@ -23,6 +24,23 @@ const enum gpio_signal hibernate_wake_pins[] = { const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins); /******************************************************************************/ +/* Keyboard scan setting */ +struct keyboard_scan_config keyscan_config = { + /* Increase from 50 us, because KSO_02 passes through the H1. */ + .output_settle_us = 80, + /* Other values should be the same as the default configuration. */ + .debounce_down_us = 9 * MSEC, + .debounce_up_us = 30 * MSEC, + .scan_period_us = 3 * MSEC, + .min_post_scan_delay_us = 1000, + .poll_timeout_us = 100 * MSEC, + .actual_key_mask = { + 0x14, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff, + 0xa4, 0xff, 0xfe, 0x55, 0xfa, 0xca /* full set */ + }, +}; + +/******************************************************************************/ /* I2C port map configuration */ const struct i2c_port_t i2c_ports[] = { { diff --git a/baseboard/volteer/baseboard.h b/baseboard/volteer/baseboard.h index e2ebea1c21..6ff7421ec1 100644 --- a/baseboard/volteer/baseboard.h +++ b/baseboard/volteer/baseboard.h @@ -53,6 +53,12 @@ #define CONFIG_BOARD_HAS_RTC_RESET /* Common Keyboard Defines */ +#define CONFIG_CMD_KEYBOARD +#define CONFIG_KEYBOARD_BOARD_CONFIG +#define CONFIG_KEYBOARD_COL2_INVERTED +#define CONFIG_KEYBOARD_KEYPAD +#define CONFIG_KEYBOARD_PROTOCOL_8042 +#define CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI2 /* Sensors */ diff --git a/board/volteer/ec.tasklist b/board/volteer/ec.tasklist index f8b67701bf..aa43567270 100644 --- a/board/volteer/ec.tasklist +++ b/board/volteer/ec.tasklist @@ -9,6 +9,8 @@ #define CONFIG_TASK_LIST \ TASK_ALWAYS(HOOKS, hook_task, NULL, LARGER_TASK_STACK_SIZE) \ + TASK_NOTEST(KEYPROTO, keyboard_protocol_task, NULL, TASK_STACK_SIZE) \ TASK_ALWAYS(HOSTCMD, host_command_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_ALWAYS(CONSOLE, console_task, NULL, VENTI_TASK_STACK_SIZE) \ - TASK_ALWAYS(POWERBTN, power_button_task, NULL, LARGER_TASK_STACK_SIZE) + TASK_ALWAYS(POWERBTN, power_button_task, NULL, LARGER_TASK_STACK_SIZE) \ + TASK_NOTEST(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE) |