mb/google/rex/var/karis: Use 2 gpio for stylus detect/wake

Use 2 gpio for stylus detect and wake function.
GPP_E04 is the IRQ source, and GPP_E09 is the wake source.

BUG=b:304680060
TEST=Build and test on karis, stylus detect function works

Change-Id: I7a83326f76932c8e501e6369bb845fc7236291b4
Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78336
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: David Wu <david_wu@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Tyler Wang
2023-10-13 14:29:41 +08:00
committed by Matt DeVillier
parent 69892eedf6
commit ef68e98ff4
2 changed files with 7 additions and 4 deletions

View File

@@ -196,7 +196,7 @@ static const struct pad_config gpio_table[] = {
/* GPP_E03 : [] ==> GSC_SOC_INT_ODL */
PAD_CFG_GPI_APIC_LOCK(GPP_E03, NONE, LEVEL, INVERT, LOCK_CONFIG),
/* GPP_E04 : [] ==> SOC_PEN_DETECT */
PAD_CFG_GPI_IRQ_WAKE(GPP_E04, NONE, PLTRST, LEVEL, INVERT),
PAD_CFG_GPI_GPIO_DRIVER(GPP_E04, NONE, PLTRST),
/* GPP_E05 : [] ==> USB_A0_RT_RST_ODL */
PAD_CFG_GPO(GPP_E05, 1, DEEP),
/* GPP_E06 : GPP_E06_STRAP ==> Component NC */
@@ -205,8 +205,8 @@ static const struct pad_config gpio_table[] = {
PAD_NC(GPP_E07, NONE),
/* GPP_E08 : NC net. */
PAD_NC(GPP_E08, NONE),
/* GPP_E09 : Not Connected */
PAD_NC(GPP_E09, NONE),
/* GPP_E09 : SOC_PEN_DETECT */
PAD_CFG_GPI_SCI_LOCK(GPP_E09, NONE, EDGE_SINGLE, NONE, LOCK_CONFIG),
/* GPP_E10 : [] ==> SOC_FPMCU_INT_L */
PAD_CFG_GPI_IRQ_WAKE_LOCK(GPP_E10, NONE, LEVEL, INVERT, LOCK_CONFIG),
/* GPP_E11 : [] ==> MEM_STRAP_0 */

View File

@@ -397,8 +397,11 @@ chip soc/intel/meteorlake
end
chip drivers/generic/gpio_keys
register "name" = ""PENH""
# GPP_E04 is the IRQ source
# GPP_E04 is the IRQ source, and GPP_E09 is the wake source
register "gpio" = "ACPI_GPIO_INPUT_ACTIVE_LOW(GPP_E04)"
register "key.wake_gpe" = "GPE0_DW1_09"
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"