diff options
author | Sheng-Liang Pan <sheng-liang.pan@quanta.corp-partner.google.com> | 2021-01-27 15:54:04 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-02-07 21:55:27 +0000 |
commit | c87bcf4d9f0f677e52af5a3639f6dd8fb282ad6b (patch) | |
tree | feba90aef229a68b90d3548ff6a7b26bfdd925c2 /src/mainboard/google | |
parent | 1649e0a549b27c7f66e905e1309b5f0e6a310c51 (diff) |
mb/google/volteer/var/voxel: Add gpio-keys ACPI node for PENH
Use gpio_keys driver to add ACPI node for pen eject event. Also
setting gpio wake pin for wake events.
BUG=b:176213181
TEST=emerge-volteer coreboot chromeos-bootimage
Signed-off-by: Pan Sheng-Liang <sheng-liang.pan@quanta.corp-partner.google.com>
Change-Id: If0959df5d0f069048777df81b0d4092ea90314eb
Reviewed-on: https://review.coreboot.org/c/coreboot/+/49967
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r-- | src/mainboard/google/volteer/variants/voxel/gpio.c | 4 | ||||
-rw-r--r-- | src/mainboard/google/volteer/variants/voxel/overridetree.cb | 13 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/mainboard/google/volteer/variants/voxel/gpio.c b/src/mainboard/google/volteer/variants/voxel/gpio.c index b8d1f39936..6be86dedc4 100644 --- a/src/mainboard/google/volteer/variants/voxel/gpio.c +++ b/src/mainboard/google/volteer/variants/voxel/gpio.c @@ -28,7 +28,7 @@ static const struct pad_config override_gpio_table[] = { /* B2 : VRALERT# ==> EN_PP3300_SSD */ PAD_CFG_GPO(GPP_B2, 1, DEEP), /* B3 : CPU_GP2 ==> PEN_DET_ODL */ - PAD_CFG_GPI(GPP_B3, NONE, DEEP), + PAD_CFG_GPI_GPIO_DRIVER(GPP_B3, NONE, PLTRST), /* B5 : ISH_I2C0_CVF_SDA */ PAD_CFG_NF(GPP_B5, NONE, DEEP, NF1), /* B6 : ISH_I2C0_CVF_SCL */ @@ -117,7 +117,7 @@ static const struct pad_config override_gpio_table[] = { PAD_CFG_GPO(GPP_D17, 1, DEEP), /* E1 : SPI1_IO2 ==> PEN_DET_ODL */ - PAD_CFG_GPI_SCI_LOW(GPP_E1, NONE, DEEP, EDGE_SINGLE), + PAD_CFG_GPI_SCI(GPP_E1, NONE, DEEP, EDGE_SINGLE, NONE), /* E2 : SPI1_IO3 ==> WLAN_PCIE_WAKE_ODL */ PAD_CFG_GPI(GPP_E2, NONE, DEEP), /* E3 : CPU_GP0 ==> USI_REPORT_EN */ diff --git a/src/mainboard/google/volteer/variants/voxel/overridetree.cb b/src/mainboard/google/volteer/variants/voxel/overridetree.cb index 82f0bfd09e..879086fb75 100644 --- a/src/mainboard/google/volteer/variants/voxel/overridetree.cb +++ b/src/mainboard/google/volteer/variants/voxel/overridetree.cb @@ -146,6 +146,19 @@ chip soc/intel/tigerlake register "has_power_resource" = "1" device i2c 39 on end end + chip drivers/generic/gpio_keys + register "name" = ""PENH"" + # GPP_B3 is the IRQ source, and GPP_E1 is the wake source + register "gpio" = "ACPI_GPIO_INPUT_ACTIVE_LOW(GPP_B3)" + register "key.wake_gpe" = "GPE0_DW2_01" + register "key.wakeup_route" = "WAKEUP_ROUTE_SCI" + register "key.wakeup_event_action" = "EV_ACT_DEASSERTED" + register "key.dev_name" = ""EJCT"" + register "key.linux_code" = "SW_PEN_INSERTED" + register "key.linux_input_type" = "EV_SW" + register "key.label" = ""pen_eject"" + device generic 0 on end + end end device ref i2c2 on chip drivers/i2c/sx9310 |