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>
This commit is contained in:
Karthikeyan Ramasubramanian 2018-12-07 11:05:51 -07:00 committed by Patrick Georgi
parent c4427393c5
commit 2b27e236b5
3 changed files with 15 additions and 1 deletions

View File

@ -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

View File

@ -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 */

View File

@ -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