summaryrefslogtreecommitdiff
path: root/src/mainboard/google/rex/variants/rex0/gpio.c
diff options
context:
space:
mode:
authorSubrata Banik <subratabanik@google.com>2022-09-15 00:17:20 -0700
committerMartin L Roth <gaumless@gmail.com>2022-09-19 09:50:58 +0000
commite8097f7a283228e3bbb8ddc525e4f8c861a5bcb8 (patch)
tree4430d4dec6d9c05351cab92aab2177358580c3bb /src/mainboard/google/rex/variants/rex0/gpio.c
parentdbe4fe2c8870024c093ee2a23c6d761e838f49c5 (diff)
mb/google/rex: Add ELAN6918 touchscreen
ELAN6918 Power Sequencing seems not perfectly matching with the previous platforms and setting GPP_C06 to high prior to the power sequencing is actually makes it work. Ideally Power Sequencing should be as below for ELAN6918 (in ACPI) `POWER enabled -> RESET deasserted -> Report EN enabled` But below sequence is only working currently: `Report EN enabled (ramstage) -> POWER enabled (ACPI) -> RESET deasserted (ACPI)` BUG=b:247029304 TEST=Verified ELAN touch panel is working as expected after booting Google/rex device to ChromeOS. Change-Id: Ideaeb0faa882b8e603534bbface51ea76923d436 Signed-off-by: Eran Mitrani <mitrani@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/66990 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tarun Tuli <taruntuli@google.com>
Diffstat (limited to 'src/mainboard/google/rex/variants/rex0/gpio.c')
-rw-r--r--src/mainboard/google/rex/variants/rex0/gpio.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/mainboard/google/rex/variants/rex0/gpio.c b/src/mainboard/google/rex/variants/rex0/gpio.c
index 96de47f719..541402c372 100644
--- a/src/mainboard/google/rex/variants/rex0/gpio.c
+++ b/src/mainboard/google/rex/variants/rex0/gpio.c
@@ -95,7 +95,7 @@ static const struct pad_config gpio_table_id0[] = {
PAD_CFG_GPI_LOCK(GPP_B23, NONE, LOCK_CONFIG),
/* GPP_C00 : [] ==> EN_PP3300_TCHSCR */
- PAD_CFG_GPO(GPP_C00, 1, DEEP),
+ PAD_CFG_GPO(GPP_C00, 0, DEEP),
/* GPP_C01 : [] ==> USI_RST_L */
PAD_CFG_GPO(GPP_C01, 0, DEEP),
/* GPP_C02 : GPP_C02_STRAP ==> Component NC */
@@ -107,7 +107,20 @@ static const struct pad_config gpio_table_id0[] = {
/* GPP_C05 : [] ==> WWAN_PERST_L_STRAP */
PAD_CFG_GPO(GPP_C05, 1, PLTRST),
/* GPP_C06 : [] ==> USI_REPORT_EN */
- PAD_CFG_GPO(GPP_C06, 0, DEEP),
+ /*
+ * FIXME: Remove this code after resolving b/247029304.
+ *
+ * ELAN6918 Power Sequencing seems not perfectly matching
+ * with the previous platforms and setting GPP_C06 to high prior
+ * to the power sequencing is actually makes it work.
+ *
+ * Ideally Power Sequencing should be as below for ELAN6918 (in ACPI)
+ * `POWER enabled -> RESET deasserted -> Report EN enabled`
+ *
+ * But below sequence is only working currently:
+ * `Report EN enabled (ramstage) -> POWER enabled (ACPI) -> RESET deasserted (ACPI)`
+ */
+ PAD_CFG_GPO(GPP_C06, 1, DEEP),
/* GPP_C07 : [] ==> USI_INT */
PAD_CFG_GPI_APIC(GPP_C07, NONE, PLTRST, LEVEL, NONE),
/* GPP_C08 : [] ==> SOCHOT_ODL */