diff options
author | Matt DeVillier <matt.devillier@gmail.com> | 2022-12-22 21:44:14 -0600 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2022-12-23 20:58:28 +0000 |
commit | 74edda99dd4baba548daff167ee327e297079fcc (patch) | |
tree | b361159ee92142c1c7cd3e24d4f6c68b552e1367 /src/mainboard/google/poppy/variants/atlas/gpio.c | |
parent | 9d40a0be2fc7da66e328e380cfd17ffb76677ff2 (diff) |
mb/google/poppy: Implement touchscreen,digitizer power sequencing
For touchscreens/digitizers on poppy variants, drive the enable
GPIO high and hold in reset in romstage, then release from reset in
ramstage. This will allow coreboot to detect the presence of i2c
touchscreens/digitizers during ACPI SSDT generation (enabled in a
subsequent commit).
TEST=tested with the rest of patch train
Change-Id: I90ac4f09c343a28328f7d30254f0448cbe0c78b3
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70919
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Diffstat (limited to 'src/mainboard/google/poppy/variants/atlas/gpio.c')
-rw-r--r-- | src/mainboard/google/poppy/variants/atlas/gpio.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/mainboard/google/poppy/variants/atlas/gpio.c b/src/mainboard/google/poppy/variants/atlas/gpio.c index ffea694910..d70e50eab1 100644 --- a/src/mainboard/google/poppy/variants/atlas/gpio.c +++ b/src/mainboard/google/poppy/variants/atlas/gpio.c @@ -141,7 +141,7 @@ static const struct pad_config gpio_table[] = { /* C21 : UART2_TXD ==> PCHTX_SERVORX_UART */ PAD_CFG_NF(GPP_C21, NONE, DEEP, NF1), /* C22 : UART2_RTS# ==> EN_PP3300_DX_TOUCHSCREEN */ - PAD_CFG_GPO(GPP_C22, 0, DEEP), + PAD_CFG_GPO(GPP_C22, 1, DEEP), /* C23 : UART2_CTS# ==> PCH_WP */ PAD_CFG_GPI_GPIO_DRIVER(GPP_C23, UP_20K, DEEP), @@ -213,7 +213,7 @@ static const struct pad_config gpio_table[] = { /* E10 : USB2_OC1# ==> USB_C1_OC_ODL */ PAD_CFG_NF(GPP_E10, NONE, DEEP, NF1), /* E11 : USB2_OC2# ==> TOUCHSCREEN_RESET_L */ - PAD_CFG_GPO(GPP_E11, 0, DEEP), + PAD_CFG_GPO(GPP_E11, 1, DEEP), /* E12 : USB2_OC3# ==> NC */ PAD_NC(GPP_E12, NONE), /* E13 : DDPB_HPD0 ==> USB_C1_DP_HPD */ @@ -418,3 +418,17 @@ const struct pad_config *variant_sku_gpio_table(size_t *num) } return board_gpio_tables; } + +static const struct pad_config romstage_gpio_table[] = { + /* Enable touchscreen, hold in reset */ + /* C22 : UART2_RTS# ==> EN_PP3300_DX_TOUCHSCREEN */ + PAD_CFG_GPO(GPP_C22, 1, DEEP), + /* E11 : USB2_OC2# ==> TOUCHSCREEN_RESET_L */ + PAD_CFG_GPO(GPP_E11, 0, DEEP), +}; + +const struct pad_config *variant_romstage_gpio_table(size_t *num) +{ + *num = ARRAY_SIZE(romstage_gpio_table); + return romstage_gpio_table; +} |