diff options
author | Karthikeyan Ramasubramanian <kramasub@chromium.org> | 2018-12-07 11:05:51 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-01-24 13:55:02 +0000 |
commit | 2b27e236b52fc3ce022bae7bf0eafb7651a86554 (patch) | |
tree | 66be7c673facb8dbdfc09e214e16ae60a47a78e8 | |
parent | c4427393c5c7e75c60b2e91113adb7ca0ec94f8f (diff) |
mb/google/octopus/bobba: Add support to handle PEN_EJECT event
Enable gpio_keys driver for bobba and add required configuration in the
device tree to handle the pen eject event.
BRANCH=octopus
BUG=b:117953118
TEST=Ensure that the system boots to ChromeOS. Ensure that the stylus tools
open on pen eject. Ensure that the system wakes on Pen Eject. Ensure that
the system enters S0ix and S3 states after the pen is ejected. Ensure that
the system enters S0ix and S3 states when the pen remains inserted in its
holder. Ensured that the system does not wake when the pen is inserted.
Ensure that the suspend_stress_test runs successfully for 25 iterations
with the pen placed in its holder.
Change-Id: I768b89d2b45f4dcab6d235b11ce00544a827f22d
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/30108
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
-rw-r--r-- | src/mainboard/google/octopus/Kconfig | 1 | ||||
-rw-r--r-- | src/mainboard/google/octopus/variants/baseboard/gpio.c | 3 | ||||
-rw-r--r-- | src/mainboard/google/octopus/variants/bobba/overridetree.cb | 12 |
3 files changed, 15 insertions, 1 deletions
diff --git a/src/mainboard/google/octopus/Kconfig b/src/mainboard/google/octopus/Kconfig index a237741195..50e96a68db 100644 --- a/src/mainboard/google/octopus/Kconfig +++ b/src/mainboard/google/octopus/Kconfig @@ -3,6 +3,7 @@ config BOARD_GOOGLE_BASEBOARD_OCTOPUS def_bool n select SOC_INTEL_GLK select BOARD_ROMSIZE_KB_16384 + select DRIVERS_GENERIC_GPIO_KEYS select DRIVERS_GENERIC_MAX98357A select DRIVERS_I2C_DA7219 select DRIVERS_I2C_GENERIC diff --git a/src/mainboard/google/octopus/variants/baseboard/gpio.c b/src/mainboard/google/octopus/variants/baseboard/gpio.c index d23774d750..5326118a12 100644 --- a/src/mainboard/google/octopus/variants/baseboard/gpio.c +++ b/src/mainboard/google/octopus/variants/baseboard/gpio.c @@ -210,7 +210,8 @@ static const struct pad_config gpio_table[] = { PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_143, 1, DEEP, UP_20K, HIZCRx1, ENPU),/* GPIO_143 -- LTE_SAR_ODL */ /* GPIO_144 -- PEN_EJECT(wake) */ - PAD_CFG_GPI_SCI_HIGH(GPIO_144, UP_20K, DEEP, LEVEL), + PAD_CFG_GPI_SCI_HIGH_DEBEN(GPIO_144, UP_20K, DEEP, EDGE_SINGLE, + DEBOUNCE_256_RTC), /* GPIO_145 -- PEN_EJECT(notifications) */ PAD_CFG_GPI_GPIO_DRIVER(GPIO_145, UP_20K, DEEP), PAD_NC(GPIO_146, UP_20K),/* GPIO_146 -- unused */ diff --git a/src/mainboard/google/octopus/variants/bobba/overridetree.cb b/src/mainboard/google/octopus/variants/bobba/overridetree.cb index 04dc768e12..cd26fabdf2 100644 --- a/src/mainboard/google/octopus/variants/bobba/overridetree.cb +++ b/src/mainboard/google/octopus/variants/bobba/overridetree.cb @@ -97,6 +97,18 @@ chip soc/intel/apollolake register "hid_desc_reg_offset" = "0x1" device i2c 0x9 on end end + chip drivers/generic/gpio_keys + register "name" = ""PENH"" + register "gpio" = "ACPI_GPIO_INPUT_ACTIVE_LOW(GPIO_145)" + register "key.dev_name" = ""EJCT"" + register "key.linux_code" = "SW_PEN_INSERTED" + register "key.linux_input_type" = "EV_SW" + register "key.label" = ""pen_eject"" + register "key.is_wakeup_source" = "1" + register "key.wake" = "GPE0_DW2_04" + register "key.wakeup_event_action" = "EV_ACT_DEASSERTED" + device generic 0 on end + end end # - I2C 0 device pci 17.1 on chip drivers/i2c/da7219 |