From 111da2557adcc65b74ad47a820cde84651a3aebb Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Thu, 30 Oct 2025 11:40:45 +0530 Subject: [PATCH] mb/google/fatcat: Preserve VGPIO GPE for THC wake on touch The Touch Host Controller (THC) requires its dedicated VGPIO pins to remain enabled as a General Purpose Event (GPE) source for the system to wake up on touch events. This change introduces override_tier_1_gpio_chip_config to explicitly check the thc_wake_on_touch status for each enabled THC interface. If any wake-on-touch functionality is active, the Tier-1 GPE configuration (pmc_gpe0_dw0) is overridden to ensure the GPP_VGPIO bank is included. This guarantees that the VGPIO pins dedicated to THC are always monitored as a wake source when required by the platform configuration. BUG=b:414614106 TEST=Able to build and boot google/fatcat. Change-Id: Ia1165c167850f5d66a8c5a85e3ec64f80e7a40da Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/89817 Reviewed-by: Huang, Cliff Reviewed-by: Pranava Y N Reviewed-by: Paul Menzel Tested-by: build bot (Jenkins) --- src/mainboard/google/fatcat/mainboard.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/mainboard/google/fatcat/mainboard.c b/src/mainboard/google/fatcat/mainboard.c index 5bd9892480..1ea606a6f1 100644 --- a/src/mainboard/google/fatcat/mainboard.c +++ b/src/mainboard/google/fatcat/mainboard.c @@ -16,9 +16,23 @@ void __weak fw_config_gpio_padbased_override(struct pad_config *padbased_table) /* default implementation does nothing */ } +static void override_tier_1_gpio_chip_config(struct soc_intel_pantherlake_config *config) +{ + /* Override the Tier-1 GPIO to ensure VGPIO dedicated for THC remains as wake source */ + for (size_t i = 0; i < NUM_THC; i++) { + if (is_devfn_enabled(_PCI_DEVFN(THC, i)) && config->thc_wake_on_touch[i]) { + /* Atleast one THC interface is enabled, hence, skip checking further */ + config->pmc_gpe0_dw0 = GPP_VGPIO; + break; + } + } +} + void mainboard_update_soc_chip_config(struct soc_intel_pantherlake_config *config) { variant_update_soc_chip_config(config); + + override_tier_1_gpio_chip_config(config); } void __weak variant_update_soc_chip_config(struct soc_intel_pantherlake_config *config)