Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/71152 )
Change subject: mb/google/reef: Implement touchscreen power sequencing ......................................................................
mb/google/reef: Implement touchscreen power sequencing
For touchscreens on reef variants, drive the enable GPIO high starting in romstage, then disable the reset GPIO in ramstage. This will allow coreboot to detect the presence of i2c touchscreens during ACPI SSDT generation (implemented in a subsequent commit). As the GPIOs are already correct in ramstage, only the romstage ones need to be set.
TEST=tested with rest of patch train
Change-Id: I10d1789c8de23653bac81e1f9604a47f93fa3f7d Signed-off-by: Matt DeVillier matt.devillier@gmail.com --- M src/mainboard/google/reef/variants/baseboard/gpio.c 1 file changed, 27 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/52/71152/1
diff --git a/src/mainboard/google/reef/variants/baseboard/gpio.c b/src/mainboard/google/reef/variants/baseboard/gpio.c index e8b8600..d13f65b 100644 --- a/src/mainboard/google/reef/variants/baseboard/gpio.c +++ b/src/mainboard/google/reef/variants/baseboard/gpio.c @@ -392,11 +392,18 @@ return sleep_gpio_table; }
+/* GPIOs needed to be set in romstage. */ +static const struct pad_config romstage_gpio_table[] = { + /* Enable touchscreen, hold in reset */ + PAD_CFG_GPO(GPIO_152, 1, DEEP), /* Touch enable */ + PAD_CFG_GPO(GPIO_36, 1, DEEP), /* Touch reset */ +}; + /* Weak implementation of romstage gpio */ const struct pad_config *__weak variant_romstage_gpio_table(size_t *num) { - *num = 0; - return NULL; + *num = ARRAY_SIZE(romstage_gpio_table); + return romstage_gpio_table; }
static const struct cros_gpio cros_gpios[] = {