From ef68e98ff4a4f0fd9af24083e3c6d3dbcaf41879 Mon Sep 17 00:00:00 2001 From: Tyler Wang Date: Fri, 13 Oct 2023 14:29:41 +0800 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/78336 Reviewed-by: Subrata Banik Reviewed-by: David Wu Tested-by: build bot (Jenkins) --- src/mainboard/google/rex/variants/karis/gpio.c | 6 +++--- src/mainboard/google/rex/variants/karis/overridetree.cb | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/mainboard/google/rex/variants/karis/gpio.c b/src/mainboard/google/rex/variants/karis/gpio.c index 2a94caee13..4f1361c9ef 100644 --- a/src/mainboard/google/rex/variants/karis/gpio.c +++ b/src/mainboard/google/rex/variants/karis/gpio.c @@ -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 */ diff --git a/src/mainboard/google/rex/variants/karis/overridetree.cb b/src/mainboard/google/rex/variants/karis/overridetree.cb index e6164c9290..814f51c4b9 100644 --- a/src/mainboard/google/rex/variants/karis/overridetree.cb +++ b/src/mainboard/google/rex/variants/karis/overridetree.cb @@ -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" -- cgit v1.2.3