mb/google/guybrush/var/guybrush: Add GPIO override table

EN_SPKR is routed to SD pin in the ALC1019 speaker amplifier. The
concerned pin has a voltage rating of 1.8V whereas the EN_SPKR GPIO has
a voltage rating of 3.3 V. The schematics has been updated to bridge the
gap. So enable the speaker amplifier by default and add a gpio override
table to disable the speakers before board version 2.

Also update the codec ACPI HID name for the kernel machine driver to
probe the codec successfully.

BUG=b:182960979
TEST=Build and boot to OS in guybrush. Ensure that the GPIO output state
is high.

Change-Id: I32b29bfae9bc94b5119b33a535d8bc825ef89445
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52355
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Mathew King <mathewk@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Karthikeyan Ramasubramanian 2021-04-14 14:25:49 -06:00 committed by Patrick Georgi
parent 63fc236856
commit 74e2c98030
3 changed files with 29 additions and 1 deletions

View File

@ -80,7 +80,7 @@ static const struct soc_amd_gpio base_gpio_table[] = {
/* EN_PP3300_TCHSCR */ /* EN_PP3300_TCHSCR */
PAD_GPO(GPIO_68, LOW), PAD_GPO(GPIO_68, LOW),
/* EN_SPKR */ /* EN_SPKR */
PAD_GPO(GPIO_69, LOW), PAD_GPO(GPIO_69, HIGH),
/* SD_AUX_RESET_L */ /* SD_AUX_RESET_L */
PAD_GPO(GPIO_70, HIGH), PAD_GPO(GPIO_70, HIGH),
/* GPIO_71 - GPIO_73: Not available */ /* GPIO_71 - GPIO_73: Not available */

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-License-Identifier: GPL-2.0-or-later
ramstage-y += gpio.c
subdirs-y += ./memory subdirs-y += ./memory

View File

@ -0,0 +1,26 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <baseboard/gpio.h>
#include <baseboard/variants.h>
#include <boardid.h>
#include <gpio.h>
#include <soc/gpio.h>
/* This table is used by guybrush variant with board version < 2. */
static const struct soc_amd_gpio bid1_gpio_table[] = {
/* EN_SPKR */
PAD_GPO(GPIO_69, LOW),
};
const struct soc_amd_gpio *variant_override_gpio_table(size_t *size)
{
uint32_t board_version = board_id();
*size = 0;
if (board_version < 2) {
*size = ARRAY_SIZE(bid1_gpio_table);
return bid1_gpio_table;
}
return NULL;
}