summaryrefslogtreecommitdiff
path: root/src/mainboard/google/volteer/variants/lindar/gpio.c
diff options
context:
space:
mode:
authorMatt DeVillier <matt.devillier@gmail.com>2022-12-21 08:38:17 -0600
committerMartin L Roth <gaumless@gmail.com>2022-12-22 20:31:48 +0000
commit7ed61304287e930dedeceec6d785855574622284 (patch)
tree6540da7bab0b170910a77d3fb4623194dd241dbb /src/mainboard/google/volteer/variants/lindar/gpio.c
parent7413815a01838d03718b8cfa16b4fff81bdb7f3b (diff)
mb/google/volteer: Implement touchscreen power sequencing
For touchscreens on volteer 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). BUG=b:121309055 TEST=tested with rest of patch train Change-Id: Ie4c3b94594253ced6a875af78e6390cda8dcbc7d Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/71181 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/volteer/variants/lindar/gpio.c')
-rw-r--r--src/mainboard/google/volteer/variants/lindar/gpio.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/mainboard/google/volteer/variants/lindar/gpio.c b/src/mainboard/google/volteer/variants/lindar/gpio.c
index a38f7d753e..9a6f26871a 100644
--- a/src/mainboard/google/volteer/variants/lindar/gpio.c
+++ b/src/mainboard/google/volteer/variants/lindar/gpio.c
@@ -9,7 +9,7 @@ static const struct pad_config override_gpio_table[] = {
/* A7 : I2S2_SCLK ==> EN_PP3300_TRACKPAD */
PAD_CFG_GPO(GPP_A7, 1, DEEP),
/* A8 : I2S2_SFRM ==> EN_PP3300_TOUCHSCREEN */
- PAD_CFG_GPO(GPP_A8, 0, DEEP),
+ PAD_CFG_GPO(GPP_A8, 1, DEEP),
/* A10 : I2S2_RXD ==> EN_SPKR_PA */
PAD_CFG_GPO(GPP_A10, 1, DEEP),
/* A13 : PMC_I2C_SCL ==> BT_DISABLE_L */
@@ -33,7 +33,7 @@ static const struct pad_config override_gpio_table[] = {
PAD_NC(GPP_B22, NONE),
/* C10 : UART0_RTS# ==> USI_RST_L */
- PAD_CFG_GPO(GPP_C10, 0, DEEP),
+ PAD_CFG_GPO(GPP_C10, 1, DEEP),
/* C16 : I2C0_SDA ==> PCH_I2C0_1V8_AUDIO_SDA */
PAD_CFG_NF(GPP_C16, NONE, DEEP, NF1),
/* C17 : I2C0_SCL ==> PCH_I2C0_1V8_AUDIO_SCL */
@@ -179,3 +179,18 @@ const struct pad_config *variant_early_gpio_table(size_t *num)
*num = ARRAY_SIZE(early_gpio_table);
return early_gpio_table;
}
+
+/* GPIOs needed to be set in romstage. */
+static const struct pad_config romstage_gpio_table[] = {
+ /* Enable touchscreen, hold in reset */
+ /* A8 : I2S2_SFRM ==> EN_PP3300_TOUCHSCREEN */
+ PAD_CFG_GPO(GPP_A8, 1, DEEP),
+ /* C10 : UART0_RTS# ==> USI_RST_L */
+ PAD_CFG_GPO(GPP_C10, 0, DEEP),
+};
+
+const struct pad_config *variant_romstage_gpio_table(size_t *num)
+{
+ *num = ARRAY_SIZE(romstage_gpio_table);
+ return romstage_gpio_table;
+}