diff options
author | Matt DeVillier <matt.devillier@gmail.com> | 2022-12-20 16:29:02 -0600 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2022-12-22 20:36:42 +0000 |
commit | beb58a93cf52025db6c3c9eeedfa5531a67190e0 (patch) | |
tree | b1c81caa0cc99985cb4d0f38bda5e28601b21cae /src/mainboard/google/reef/variants | |
parent | 40c8cc9cde3096e83e9908dd353fb8be9817a6d8 (diff) | |
download | coreboot-beb58a93cf52025db6c3c9eeedfa5531a67190e0.tar.gz coreboot-beb58a93cf52025db6c3c9eeedfa5531a67190e0.tar.bz2 coreboot-beb58a93cf52025db6c3c9eeedfa5531a67190e0.zip |
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.
BUG=b:121309055
TEST=tested with rest of patch train
Change-Id: I10d1789c8de23653bac81e1f9604a47f93fa3f7d
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/71152
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/reef/variants')
-rw-r--r-- | src/mainboard/google/reef/variants/baseboard/gpio.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mainboard/google/reef/variants/baseboard/gpio.c b/src/mainboard/google/reef/variants/baseboard/gpio.c index e8b86001ec0a..d13f65bf0feb 100644 --- a/src/mainboard/google/reef/variants/baseboard/gpio.c +++ b/src/mainboard/google/reef/variants/baseboard/gpio.c @@ -392,11 +392,18 @@ variant_sleep_gpio_table(u8 slp_typ, size_t *num) 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[] = { |