diff options
-rw-r--r-- | baseboard/volteer/baseboard.c | 17 | ||||
-rw-r--r-- | board/delbin/board.c | 38 | ||||
-rw-r--r-- | board/eldrid/board.c | 18 | ||||
-rw-r--r-- | board/halvor/board.c | 18 | ||||
-rw-r--r-- | board/lindar/board.c | 17 | ||||
-rw-r--r-- | board/lingcod/board.c | 17 | ||||
-rw-r--r-- | board/malefor/board.c | 17 | ||||
-rw-r--r-- | board/terrador/board.c | 18 | ||||
-rw-r--r-- | board/todor/board.c | 18 | ||||
-rw-r--r-- | board/trondo/board.c | 18 | ||||
-rw-r--r-- | board/volteer/board.c | 18 | ||||
-rw-r--r-- | board/voxel/board.c | 18 |
12 files changed, 195 insertions, 37 deletions
diff --git a/baseboard/volteer/baseboard.c b/baseboard/volteer/baseboard.c index 1fa95af8f3..88eed00b47 100644 --- a/baseboard/volteer/baseboard.c +++ b/baseboard/volteer/baseboard.c @@ -75,23 +75,6 @@ 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 */ - }, -}; - -/******************************************************************************/ /* Charger Chip Configuration */ const struct charger_config_t chg_chips[] = { { diff --git a/board/delbin/board.c b/board/delbin/board.c index 6c8e2b1884..a1676e8298 100644 --- a/board/delbin/board.c +++ b/board/delbin/board.c @@ -45,6 +45,24 @@ #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args) +/* 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 = { + 0x1c, 0xfe, 0xff, 0xff, 0xff, 0xf5, 0xff, + 0xa4, 0xff, 0xfe, 0x55, 0xfe, 0xff, 0xff, + 0xff /* full set */ + }, +}; + +/******************************************************************************/ /* * FW_CONFIG defaults for Delbin if the CBI data is not initialized. */ @@ -383,26 +401,6 @@ __override const struct ec_response_keybd_config return &delbin_kb; } -static void keyboard_init(void) -{ - keyscan_config.actual_key_mask[0] = 0x1c; - keyscan_config.actual_key_mask[1] = 0xfe; - keyscan_config.actual_key_mask[2] = 0xff; - keyscan_config.actual_key_mask[3] = 0xff; - keyscan_config.actual_key_mask[4] = 0xff; - keyscan_config.actual_key_mask[5] = 0xf5; - keyscan_config.actual_key_mask[6] = 0xff; - keyscan_config.actual_key_mask[7] = 0xa4; - keyscan_config.actual_key_mask[8] = 0xff; - keyscan_config.actual_key_mask[9] = 0xfe; - keyscan_config.actual_key_mask[10] = 0x55; - keyscan_config.actual_key_mask[11] = 0xfe; - keyscan_config.actual_key_mask[12] = 0xff; - keyscan_config.actual_key_mask[13] = 0xff; - keyscan_config.actual_key_mask[14] = 0xff; -} -DECLARE_HOOK(HOOK_INIT, keyboard_init, HOOK_PRIO_INIT_I2C + 1); - /* Called on AP S0ix -> S0 transition */ static void board_chipset_resume(void) { diff --git a/board/eldrid/board.c b/board/eldrid/board.c index 36dc137516..da11fdb076 100644 --- a/board/eldrid/board.c +++ b/board/eldrid/board.c @@ -26,6 +26,7 @@ #include "gpio.h" #include "hooks.h" #include "lid_switch.h" +#include "keyboard_scan.h" #include "power.h" #include "power_button.h" #include "pwm.h" @@ -47,6 +48,23 @@ #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args) +/* 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 */ + }, +}; + +/******************************************************************************/ /* * FW_CONFIG defaults for Volteer if the CBI data is not initialized. */ diff --git a/board/halvor/board.c b/board/halvor/board.c index 1281e0c6fb..da9b72805d 100644 --- a/board/halvor/board.c +++ b/board/halvor/board.c @@ -20,6 +20,7 @@ #include "extpower.h" #include "gpio.h" #include "hooks.h" +#include "keyboard_scan.h" #include "lid_switch.h" #include "power.h" #include "power_button.h" @@ -39,6 +40,23 @@ #include "gpio_list.h" /* Must come after other header files. */ +/* 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 */ + }, +}; + +/******************************************************************************/ /* * FW_CONFIG defaults for Halvor if the CBI data is not initialized. */ diff --git a/board/lindar/board.c b/board/lindar/board.c index b65ee1ef6c..122baebe6f 100644 --- a/board/lindar/board.c +++ b/board/lindar/board.c @@ -42,6 +42,23 @@ #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args) #define CPRINTF(format, args...) cprintf(CC_CHIPSET, format, ## args) +/* 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 */ + }, +}; + +/******************************************************************************/ /* * FW_CONFIG defaults for Malefor if the CBI data is not initialized. */ diff --git a/board/lingcod/board.c b/board/lingcod/board.c index ac199a4836..57b0f7d3e4 100644 --- a/board/lingcod/board.c +++ b/board/lingcod/board.c @@ -43,6 +43,23 @@ #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args) #define CPRINTF(format, args...) cprintf(CC_CHIPSET, format, ## args) +/* 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 */ + }, +}; + +/******************************************************************************/ /* * FW_CONFIG defaults for Malefor if the CBI data is not initialized. */ diff --git a/board/malefor/board.c b/board/malefor/board.c index 473f9f90f8..32c575a9c2 100644 --- a/board/malefor/board.c +++ b/board/malefor/board.c @@ -44,6 +44,23 @@ #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args) #define CPRINTF(format, args...) cprintf(CC_CHIPSET, format, ## args) +/* 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 */ + }, +}; + +/******************************************************************************/ /* * FW_CONFIG defaults for Malefor if the CBI data is not initialized. */ diff --git a/board/terrador/board.c b/board/terrador/board.c index 0a30b259e6..303f18f184 100644 --- a/board/terrador/board.c +++ b/board/terrador/board.c @@ -23,6 +23,7 @@ #include "fan_chip.h" #include "gpio.h" #include "hooks.h" +#include "keyboard_scan.h" #include "lid_switch.h" #include "power.h" #include "power_button.h" @@ -45,6 +46,23 @@ #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args) +/* 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 */ + }, +}; + +/******************************************************************************/ /* * FW_CONFIG defaults for Terrador if the CBI data is not initialized. */ diff --git a/board/todor/board.c b/board/todor/board.c index 377af50ff3..41c13c4509 100644 --- a/board/todor/board.c +++ b/board/todor/board.c @@ -23,6 +23,7 @@ #include "fan_chip.h" #include "gpio.h" #include "hooks.h" +#include "keyboard_scan.h" #include "lid_switch.h" #include "power.h" #include "power_button.h" @@ -45,6 +46,23 @@ #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args) +/* 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 */ + }, +}; + +/******************************************************************************/ /* * FW_CONFIG defaults for Todor if the CBI data is not initialized. */ diff --git a/board/trondo/board.c b/board/trondo/board.c index 06805a46fe..de229342cf 100644 --- a/board/trondo/board.c +++ b/board/trondo/board.c @@ -24,6 +24,7 @@ #include "fan_chip.h" #include "gpio.h" #include "hooks.h" +#include "keyboard_scan.h" #include "lid_switch.h" #include "power.h" #include "power_button.h" @@ -46,6 +47,23 @@ #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args) +/* 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 */ + }, +}; + +/******************************************************************************/ /* * FW_CONFIG defaults for Trondo if the CBI data is not initialized. */ diff --git a/board/volteer/board.c b/board/volteer/board.c index 2eaa4c4408..9a06e8bddd 100644 --- a/board/volteer/board.c +++ b/board/volteer/board.c @@ -25,6 +25,7 @@ #include "fan_chip.h" #include "gpio.h" #include "hooks.h" +#include "keyboard_scan.h" #include "lid_switch.h" #include "power.h" #include "power_button.h" @@ -47,6 +48,23 @@ #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args) +/* 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 */ + }, +}; + +/******************************************************************************/ /* * FW_CONFIG defaults for Volteer if the CBI data is not initialized. */ diff --git a/board/voxel/board.c b/board/voxel/board.c index 49ef505c00..d37f81f6d3 100644 --- a/board/voxel/board.c +++ b/board/voxel/board.c @@ -23,6 +23,7 @@ #include "fan_chip.h" #include "gpio.h" #include "hooks.h" +#include "keyboard_scan.h" #include "lid_switch.h" #include "power.h" #include "power_button.h" @@ -45,6 +46,23 @@ #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args) +/* 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 */ + }, +}; + +/******************************************************************************/ /* * FW_CONFIG defaults for Voxel if the CBI data is not initialized. */ |