From 3022c82b020f4cafeb5be7978eef6045d1408cd5 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Fri, 24 Jan 2014 17:14:54 -0600 Subject: [PATCH] rambi: fix trackpad and touchscreen wake sources The GPIOs were not being put into SCI mode to enable their respective interrupt lines as wake sources. Also the bit index into the GPE block was incorrect. Fix both of these issues. BUG=chrome-os-partner:25251 BRANCH=baytrail TEST=Noted the appropriate bit was enabled for wake. Also was able to wake with the track pad. Change-Id: Ia1b6e4c8cb4b012d76ad27a2158e28d183581025 Signed-off-by: Aaron Durbin Reviewed-on: https://chromium-review.googlesource.com/183598 Reviewed-by: Duncan Laurie --- src/mainboard/google/rambi/gpio.c | 4 ++-- src/mainboard/google/rambi/irqroute.h | 1 + src/mainboard/google/rambi/onboard.h | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mainboard/google/rambi/gpio.c b/src/mainboard/google/rambi/gpio.c index 89e9c8c6c9..81f1867319 100644 --- a/src/mainboard/google/rambi/gpio.c +++ b/src/mainboard/google/rambi/gpio.c @@ -164,8 +164,8 @@ static const struct soc_gpio_map gpscore_gpio_map[] = { /* SSUS GPIOs */ static const struct soc_gpio_map gpssus_gpio_map[] = { GPIO_ACPI_SCI, /* S500 - PCH_WAKE# */ - GPIO_FUNC6, /* S501 - TRACKPAD_INT# - INT */ - GPIO_FUNC6, /* S502 - TOUCH_INT# - INT */ + GPIO_ACPI_SCI, /* S501 - TRACKPAD_INT# - INT */ + GPIO_ACPI_SCI, /* S502 - TOUCH_INT# - INT */ GPIO_FUNC6, /* S503 - LTE_WAKE_L# - INT */ GPIO_NC, /* S504 - SOC_JTAG2_TDO (NC/PU) */ GPIO_FUNC1, /* S505 - SUS_CLK_WLAN (NC) */ diff --git a/src/mainboard/google/rambi/irqroute.h b/src/mainboard/google/rambi/irqroute.h index 733979381e..0f4ca17acc 100644 --- a/src/mainboard/google/rambi/irqroute.h +++ b/src/mainboard/google/rambi/irqroute.h @@ -19,6 +19,7 @@ #include #include +#include #define PCI_DEV_PIRQ_ROUTES \ PCI_DEV_PIRQ_ROUTE(GFX_DEV, A, B, C, D), \ diff --git a/src/mainboard/google/rambi/onboard.h b/src/mainboard/google/rambi/onboard.h index 8fb7a3f5cc..18ceca384d 100644 --- a/src/mainboard/google/rambi/onboard.h +++ b/src/mainboard/google/rambi/onboard.h @@ -24,13 +24,13 @@ #define BOARD_TRACKPAD_NAME "trackpad" #define BOARD_TRACKPAD_IRQ GPIO_S0_DED_IRQ(TPAD_IRQ_OFFSET) -#define BOARD_TRACKPAD_WAKE_GPIO 1 /* GPSSUS1 */ +#define BOARD_TRACKPAD_WAKE_GPIO ACPI_ENABLE_WAKE_SUS_GPIO(1) #define BOARD_TRACKPAD_I2C_BUS 0 #define BOARD_TRACKPAD_I2C_ADDR 0x4b #define BOARD_TOUCHSCREEN_NAME "touchscreen" #define BOARD_TOUCHSCREEN_IRQ GPIO_S0_DED_IRQ(TOUCH_IRQ_OFFSET) -#define BOARD_TOUCHSCREEN_WAKE_GPIO 2 /* GPSSUS2 */ +#define BOARD_TOUCHSCREEN_WAKE_GPIO ACPI_ENABLE_WAKE_SUS_GPIO(2) #define BOARD_TOUCHSCREEN_I2C_BUS 5 #define BOARD_TOUCHSCREEN_I2C_ADDR 0x4a /* TODO(shawnn): Check this */