From 2dc4680dee25b84ed924be3f5dad9624248b3922 Mon Sep 17 00:00:00 2001 From: Wonjoon Lee Date: Wed, 4 Sep 2013 11:08:18 +0900 Subject: pit: Add board specific keyscan config This timing values act as most similar with 8042 which we used in snow And some keyscan jig can not regognize current debounce timing, It based on 8042 timing. BUG=chrome-os-partner:22019 TEST= build and update ec, reboot and see keyscan is fine Change-Id: I48f01f2e1247db5fa324b0896301616c42032585 Signed-off-by: Wonjoon Lee Reviewed-on: https://chromium-review.googlesource.com/168003 Reviewed-by: Simon Glass Reviewed-by: Randall Spangler Tested-by: Randall Spangler Commit-Queue: Randall Spangler --- board/pit/board.c | 15 +++++++++++++++ board/pit/board.h | 1 + 2 files changed, 16 insertions(+) diff --git a/board/pit/board.c b/board/pit/board.c index da85dafcb8..b0bcf35bd5 100644 --- a/board/pit/board.c +++ b/board/pit/board.c @@ -10,6 +10,7 @@ #include "gaia_power.h" #include "gpio.h" #include "i2c.h" +#include "keyboard_scan.h" #include "keyboard_raw.h" #include "lid_switch.h" #include "pmu_tpschrome.h" @@ -17,6 +18,7 @@ #include "pwm_data.h" #include "registers.h" #include "spi.h" +#include "timer.h" #include "task.h" #include "util.h" @@ -109,6 +111,19 @@ const struct i2c_port_t i2c_ports[] = { }; BUILD_ASSERT(ARRAY_SIZE(i2c_ports) == I2C_PORTS_USED); +struct keyboard_scan_config keyscan_config = { + .output_settle_us = 40, + .debounce_down_us = 6 * MSEC, + .debounce_up_us = 30 * MSEC, + .scan_period_us = 1500, + .min_post_scan_delay_us = 1000, + .poll_timeout_us = SECOND, + .actual_key_mask = { + 0x14, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff, + 0xa4, 0xff, 0xf6, 0x55, 0xfa, 0xc8 /* full set */ + }, +}; + /* PWM channels */ const struct pwm_t pwm_channels[] = { [PWM_CH_POWER_LED] = {STM32_TIM(2), STM32_TIM_CH(3), diff --git a/board/pit/board.h b/board/pit/board.h index 2b9f6c2e29..cea3e48749 100644 --- a/board/pit/board.h +++ b/board/pit/board.h @@ -16,6 +16,7 @@ #define CONFIG_CMD_PMU #define CONFIG_EXTPOWER_GPIO #define CONFIG_I2C +#define CONFIG_KEYBOARD_BOARD_CONFIG #define CONFIG_KEYBOARD_PROTOCOL_MKBP #define CONFIG_PMU_HARD_RESET #define CONFIG_PMU_POWERINFO -- cgit v1.2.1