From 5474f8e3cf54dc9d9eb699de1ff0e3fdbe66dfe6 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Wed, 5 Aug 2020 14:54:39 -0700 Subject: mb/google/zork: Add touchscreen power control This change adds support for touchscreen power control using: * GPIO_90 for trembyle based boards * GPIO_32 for dalboz based boards By default, baseboard tables configure these GPIOs as PAD_GPO driven low and override trees expose these pads as enable_gpio to be used by ACPI power resource. In order to support pre-v3.6 boards, override tables configure these pads as PAD_NC and drop the enable_gpio setting from device tree based on board version. BUG=b:161935640, b:162747210 Change-Id: Iba5e36b65b44ea11613b4d5fc8f13ce6433f83ab Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/c/coreboot/+/44193 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/mainboard/google/zork/variants/woomax/gpio.c | 2 ++ src/mainboard/google/zork/variants/woomax/overridetree.cb | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src/mainboard/google/zork/variants/woomax') diff --git a/src/mainboard/google/zork/variants/woomax/gpio.c b/src/mainboard/google/zork/variants/woomax/gpio.c index 3625a71786..d49388266e 100644 --- a/src/mainboard/google/zork/variants/woomax/gpio.c +++ b/src/mainboard/google/zork/variants/woomax/gpio.c @@ -18,6 +18,8 @@ static const struct soc_amd_gpio woomax_gpio_set_stage_ram[] = { PAD_NC(GPIO_69), /* RAM_ID_4 */ PAD_NC(GPIO_84), + /* TP */ + PAD_NC(GPIO_90), /* USI_RESET */ PAD_GPO(GPIO_140, HIGH), /* GPIO_141 NC */ diff --git a/src/mainboard/google/zork/variants/woomax/overridetree.cb b/src/mainboard/google/zork/variants/woomax/overridetree.cb index bdcc9bbde9..557e032a49 100644 --- a/src/mainboard/google/zork/variants/woomax/overridetree.cb +++ b/src/mainboard/google/zork/variants/woomax/overridetree.cb @@ -69,6 +69,8 @@ chip soc/amd/picasso register "generic.desc" = ""ELAN Touchscreen"" register "generic.probed" = "1" register "generic.irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_12)" + register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_90)" + register "generic.enable_delay_ms" = "1" register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_140)" register "generic.reset_delay_ms" = "20" register "generic.has_power_resource" = "1" -- cgit v1.2.3