summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
authorrex_chou <rex_chou@compal.corp-partner.google.com>2023-12-29 14:14:38 +0800
committerFelix Held <felix-coreboot@felixheld.de>2024-01-08 13:05:23 +0000
commit3526b9fcaf33c6c7725fa7f0bd901be8ca122a2a (patch)
tree12ef65b5d52eacea28abff7b29758eeece87bd37 /src/mainboard/google
parentafed45dbaabafc684883bd2ceade1d76f3eb6089 (diff)
mb/google/nissa/var/craaskov: Implement touchscreen power sequencing
For brya variants with a touchscreen, drive the enable GPIO high starting in romstage while holding in reset, then disable the reset GPIO in ramstage (done in the baseboard). BUG=b:317746281 TEST=emerge-nissa coreboot chromeos-bootimage Change-Id: I3ca2e2d12a86eaae9e37870a2541c0287e354690 Signed-off-by: Rex Chou <rex_chou@compal.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79764 Reviewed-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com> Reviewed-by: Ian Feng <ian_feng@compal.corp-partner.google.com> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-by: Eric Lai <ericllai@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/brya/variants/craaskov/Makefile.inc2
-rw-r--r--src/mainboard/google/brya/variants/craaskov/gpio.c14
2 files changed, 16 insertions, 0 deletions
diff --git a/src/mainboard/google/brya/variants/craaskov/Makefile.inc b/src/mainboard/google/brya/variants/craaskov/Makefile.inc
index 7822c45089..d3f2f68f59 100644
--- a/src/mainboard/google/brya/variants/craaskov/Makefile.inc
+++ b/src/mainboard/google/brya/variants/craaskov/Makefile.inc
@@ -1,6 +1,8 @@
# SPDX-License-Identifier: GPL-2.0-or-later
bootblock-y += gpio.c
+romstage-y += gpio.c
+
ramstage-y += gpio.c
ramstage-y += variant.c
ramstage-$(CONFIG_FW_CONFIG) += fw_config.c
diff --git a/src/mainboard/google/brya/variants/craaskov/gpio.c b/src/mainboard/google/brya/variants/craaskov/gpio.c
index 8b1446d931..0d280ce2bd 100644
--- a/src/mainboard/google/brya/variants/craaskov/gpio.c
+++ b/src/mainboard/google/brya/variants/craaskov/gpio.c
@@ -63,6 +63,14 @@ static const struct pad_config early_gpio_table[] = {
PAD_CFG_NF(GPP_H11, NONE, DEEP, NF2),
};
+static const struct pad_config romstage_gpio_table[] = {
+ /* Enable touchscreen, hold in reset */
+ /* C0 : SMBCLK ==> EN_PP3300_TCHSCR */
+ PAD_CFG_GPO(GPP_C0, 1, DEEP),
+ /* C1 : SMBDATA ==> USI_RST_L */
+ PAD_CFG_GPO(GPP_C1, 0, DEEP),
+};
+
const struct pad_config *variant_gpio_override_table(size_t *num)
{
*num = ARRAY_SIZE(override_gpio_table);
@@ -74,3 +82,9 @@ const struct pad_config *variant_early_gpio_table(size_t *num)
*num = ARRAY_SIZE(early_gpio_table);
return early_gpio_table;
}
+
+const struct pad_config *variant_romstage_gpio_table(size_t *num)
+{
+ *num = ARRAY_SIZE(romstage_gpio_table);
+ return romstage_gpio_table;
+}