summaryrefslogtreecommitdiff
path: root/src/mainboard/google/octopus/variants/ampton/gpio.c
diff options
context:
space:
mode:
authorMatt DeVillier <matt.devillier@gmail.com>2022-03-28 22:40:47 -0500
committerFelix Held <felix-coreboot@felixheld.de>2022-12-21 13:40:31 +0000
commit34ffa64ba8993b167ff3723a5aa86588b9a8e8ba (patch)
treeb21a3e0e51951bd05a842f6fb39a7d89e68ba6c0 /src/mainboard/google/octopus/variants/ampton/gpio.c
parent53bf72b131d68216b589306ab68b787a6de4c18c (diff)
mb/google/octopus: Implement touchscreen/digitizer power sequencing
For octopus variants with a touchscreen/digitizer, drive the enable and reset GPIOs high in romstage, then disable the reset GPIOs in ramstage. Where available, only set the GPIOs for SKUs which have a touchscreen. This will allow coreboot to detect the presence of i2c touchscreens during ACPI SSDT generation (implemented in a subsequent commit). TEST=tested with rest of patch train Change-Id: Ia725b4054069c0a4f60afd7e0bca6e2fd5fdcbba Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/63212 Reviewed-by: Raul Rangel <rrangel@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/octopus/variants/ampton/gpio.c')
-rw-r--r--src/mainboard/google/octopus/variants/ampton/gpio.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/mainboard/google/octopus/variants/ampton/gpio.c b/src/mainboard/google/octopus/variants/ampton/gpio.c
index 4c4c3d661c..c67dc255f1 100644
--- a/src/mainboard/google/octopus/variants/ampton/gpio.c
+++ b/src/mainboard/google/octopus/variants/ampton/gpio.c
@@ -53,13 +53,14 @@ static const struct pad_config variant_override_table[] = {
/* LPSS */
PAD_CFG_GPIO_HI_Z(GPIO_81, UP_20K, DEEP, HIZCRx0, DISPUPD), /* GPIO_81_DEBUG (Boot halt) -- MIPI60 DEBUG */
PAD_NC(GPIO_84, NONE), /* LPSS_SPI_2_CLK - unused */
+ PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_105, 0, DEEP, NONE, Tx1RxDCRx0, DISPUPD),/* GPIO_105 -- TOUCHSCREEN_RST */
PAD_CFG_GPI_APIC_IOS(GPIO_137, NONE, DEEP, EDGE_BOTH, INVERT, HIZCRx1,
DISPUPD),/* GPIO_137 -- HP_INT_ODL */
PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_140, 0, DEEP, NONE, Tx1RxDCRx0, DISPUPD),/* GPIO_140 -- PEN_RESET */
PAD_NC(GPIO_143, UP_20K), /* GPIO_143 - NC */
PAD_NC(GPIO_144, UP_20K), /* GPIO_144 - PEN_EJECT */
PAD_NC(GPIO_145, UP_20K), /* GPIO_145 - PEN_EJECT */
- PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_146, 0, DEEP, NONE, Tx0RxDCRx0, DISPUPD), /* EN_PP3300_TOUCHSCREEN */
+ PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_146, 1, DEEP, NONE, Tx0RxDCRx0, DISPUPD), /* EN_PP3300_TOUCHSCREEN */
/* AUDIO COMMUNITY GPIOS*/
PAD_NC(GPIO_157, DN_20K),/* AVS_I2S0_BCLK -- unused */
@@ -115,3 +116,20 @@ 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 */
+ /* EN_PP3300_TOUCHSCREEN */
+ PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_146, 1, DEEP, NONE, Tx0RxDCRx0, DISPUPD),
+ /* GPIO_105 -- TOUCHSCREEN_RST */
+ PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_105, 1, DEEP, NONE, Tx1RxDCRx0, DISPUPD),
+ /* GPIO_140 -- PEN_RESET */
+ PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_140, 1, DEEP, NONE, Tx1RxDCRx0, DISPUPD),
+};
+
+const struct pad_config *variant_romstage_gpio_table(size_t *num)
+{
+ *num = ARRAY_SIZE(romstage_gpio_table);
+ return romstage_gpio_table;
+}