mb/google/guybrush: Reconfigure GPIO_5

On Guybrush, pen is stuffed and GPIO_5 is used to enable Pen power. On
Nipperkin board version 1, pen is not stuffed and instead the GPIO is
used to control LCD Privacy settings. On upcoming Nipperkin board
versions and other variants, GPIO_5 is not used. Configure GPIO_5
accordingly.

BUG=b:202992077
TEST=Build and boot to OS in Guybrush. Ensure that the configuration is
retained on existing boards.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Change-Id: I2aa2f16282b91f157701212ee27ddd2e89918767
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58597
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
This commit is contained in:
Karthikeyan Ramasubramanian 2021-10-25 20:48:56 -06:00 committed by Raul Rangel
parent d687d8dc68
commit d125566582
3 changed files with 14 additions and 3 deletions

View File

@ -21,8 +21,8 @@ static const struct soc_amd_gpio base_gpio_table[] = {
PAD_INT(GPIO_3, PULL_NONE, EDGE_LOW, STATUS_DELIVERY),
/* SOC_PEN_DETECT_ODL */
PAD_WAKE(GPIO_4, PULL_NONE, EDGE_HIGH, S0i3),
/* EN_PP5000_PEN */
PAD_GPO(GPIO_5, HIGH),
/* Unused */
PAD_NC(GPIO_5),
/* EN_PP3300_WLAN */
PAD_GPO(GPIO_6, HIGH),
/* EN_PP3300_TCHPAD */

View File

@ -17,6 +17,14 @@ static const struct soc_amd_gpio bid1_ramstage_gpio_table[] = {
PAD_GPO(GPIO_70, HIGH),
/* RAM_ID_CHAN_SEL */
PAD_GPI(GPIO_74, PULL_NONE),
/* EN_PP5000_PEN */
PAD_GPO(GPIO_5, HIGH),
};
/* This table is used by guybrush variant with board version >= 2. */
static const struct soc_amd_gpio bid2_ramstage_gpio_table[] = {
/* EN_PP5000_PEN */
PAD_GPO(GPIO_5, HIGH),
};
/* This table is used by guybrush variant with board version < 2. */
@ -42,7 +50,8 @@ const struct soc_amd_gpio *variant_override_gpio_table(size_t *size)
return bid1_ramstage_gpio_table;
}
return NULL;
*size = ARRAY_SIZE(bid2_ramstage_gpio_table);
return bid2_ramstage_gpio_table;
}
const struct soc_amd_gpio *variant_early_override_gpio_table(size_t *size)

View File

@ -12,6 +12,8 @@ static const struct soc_amd_gpio override_gpio_table[] = {
/* Unused TP1063 */
PAD_NC(GPIO_17),
PAD_NC(GPIO_18),
/* LCD_PRIVACY_PCH */
PAD_GPO(GPIO_5, HIGH),
};
static const struct soc_amd_gpio override_early_gpio_table[] = {