From 24fdf4e554f542488ba268fece6e62b2014357fd Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Wed, 20 Nov 2013 14:11:30 -0600 Subject: [PATCH] rambi: use gpio for keyboard irq The rambi board has issues using the SERIRQ method for triggering the keyboard IRQ. Namely, the current level-shifter in place for the bidrectional SERIRQ signal introduces delay resulting in the SERIRQ being out of phase with the clock. Moreover, there appears to be a mismatch of expectations with the number of start frames on the SEIRQ line. Bay Trail uses a fixed 8 while the TI docs suggest it only supports 6. BUG=chrome-os-partner:23965 BRANCH=None TEST=Built and booted rambi with keyboard working in kernel with interrupts. CQ-DEPEND=CL:177223 Change-Id: I05c2b113d801b3fc434a402620cebae0301839f2 Signed-off-by: Aaron Durbin Reviewed-on: https://chromium-review.googlesource.com/177189 Tested-by: Bernie Thompson Reviewed-by: Randall Spangler --- board/rambi/board.c | 3 ++- board/rambi/board.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/board/rambi/board.c b/board/rambi/board.c index 1dc0ced203..036678f7cd 100644 --- a/board/rambi/board.c +++ b/board/rambi/board.c @@ -110,6 +110,7 @@ const struct gpio_info gpio_list[] = { {"VCORE_EN", LM4_GPIO_C, (1<<5), GPIO_OUT_LOW, NULL}, {"WLAN_OFF_L", LM4_GPIO_J, (1<<4), GPIO_OUT_LOW, NULL}, {"PCH_SCI_L", LM4_GPIO_M, (1<<1), GPIO_ODR_HIGH, NULL}, + {"KBD_IRQ_L", LM4_GPIO_M, (1<<4), GPIO_OUT_HIGH, NULL}, }; BUILD_ASSERT(ARRAY_SIZE(gpio_list) == GPIO_COUNT); @@ -122,7 +123,7 @@ const struct gpio_alt_func gpio_alt_funcs[] = { {GPIO_B, 0x80, 3, MODULE_I2C, GPIO_OPEN_DRAIN}, /* I2C5 SDA */ {GPIO_D, 0x0f, 2, MODULE_SPI}, /* SPI1 */ {GPIO_L, 0x3f, 15, MODULE_LPC}, /* LPC */ - {GPIO_M, 0x31, 15, MODULE_LPC}, /* LPC */ + {GPIO_M, 0x21, 15, MODULE_LPC}, /* LPC */ {GPIO_N, 0x50, 1, MODULE_PWM_LED, GPIO_OPEN_DRAIN}, /* FAN0PWM 3&4 */ }; const int gpio_alt_funcs_count = ARRAY_SIZE(gpio_alt_funcs); diff --git a/board/rambi/board.h b/board/rambi/board.h index 7d283c80f1..8d4731db70 100644 --- a/board/rambi/board.h +++ b/board/rambi/board.h @@ -23,6 +23,7 @@ #define CONFIG_CMD_GSV #define CONFIG_EXTPOWER_GPIO #define CONFIG_KEYBOARD_COL2_INVERTED +#define CONFIG_KEYBOARD_IRQ_GPIO GPIO_KBD_IRQ_L #define CONFIG_KEYBOARD_PROTOCOL_8042 #define CONFIG_LED_COMMON #undef CONFIG_PECI @@ -116,6 +117,7 @@ enum gpio_signal { GPIO_VCORE_EN, /* Enable core power supplies */ GPIO_WLAN_OFF_L, /* Disable WiFi radio */ GPIO_PCH_SCI_L, /* Assert SCI to PCH */ + GPIO_KBD_IRQ_L, /* Negative edge triggered irq. */ /* Number of GPIOs; not an actual GPIO */ GPIO_COUNT