Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/52355 )
Change subject: mb/google/guybrush/var/guybrush: Add GPIO override table ......................................................................
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 --- M src/mainboard/google/guybrush/variants/baseboard/gpio.c M src/mainboard/google/guybrush/variants/guybrush/Makefile.inc A src/mainboard/google/guybrush/variants/guybrush/gpio.c 3 files changed, 29 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved Mathew King: Looks good to me, approved
diff --git a/src/mainboard/google/guybrush/variants/baseboard/gpio.c b/src/mainboard/google/guybrush/variants/baseboard/gpio.c index 4023b29..528ace1 100644 --- a/src/mainboard/google/guybrush/variants/baseboard/gpio.c +++ b/src/mainboard/google/guybrush/variants/baseboard/gpio.c @@ -80,7 +80,7 @@ /* EN_PP3300_TCHSCR */ PAD_GPO(GPIO_68, LOW), /* EN_SPKR */ - PAD_GPO(GPIO_69, LOW), + PAD_GPO(GPIO_69, HIGH), /* SD_AUX_RESET_L */ PAD_GPO(GPIO_70, HIGH), /* GPIO_71 - GPIO_73: Not available */ diff --git a/src/mainboard/google/guybrush/variants/guybrush/Makefile.inc b/src/mainboard/google/guybrush/variants/guybrush/Makefile.inc index 88e75bd..ba8514c 100644 --- a/src/mainboard/google/guybrush/variants/guybrush/Makefile.inc +++ b/src/mainboard/google/guybrush/variants/guybrush/Makefile.inc @@ -1,3 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later
+ramstage-y += gpio.c + subdirs-y += ./memory diff --git a/src/mainboard/google/guybrush/variants/guybrush/gpio.c b/src/mainboard/google/guybrush/variants/guybrush/gpio.c new file mode 100644 index 0000000..64afa60 --- /dev/null +++ b/src/mainboard/google/guybrush/variants/guybrush/gpio.c @@ -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; +}