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 <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89817
Reviewed-by: Huang, Cliff <cliff.huang@intel.com>
Reviewed-by: Pranava Y N <pranavayn@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Subrata Banik 2025-10-30 11:40:45 +05:30
commit 111da2557a

View file

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