summaryrefslogtreecommitdiff
path: root/src/mainboard/google/guybrush
diff options
context:
space:
mode:
authorKarthikeyan Ramasubramanian <kramasub@google.com>2021-04-14 14:25:49 -0600
committerPatrick Georgi <pgeorgi@google.com>2021-04-18 20:42:13 +0000
commit74e2c980305e90ff61b30b7cca37670669c3a57d (patch)
tree8e6e5039116bb810b0cec3890f850afee76cf482 /src/mainboard/google/guybrush
parent63fc23685619864d16e7925329ac2e8cffe6767e (diff)
downloadcoreboot-74e2c980305e90ff61b30b7cca37670669c3a57d.tar.xz
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>
Diffstat (limited to 'src/mainboard/google/guybrush')
-rw-r--r--src/mainboard/google/guybrush/variants/baseboard/gpio.c2
-rw-r--r--src/mainboard/google/guybrush/variants/guybrush/Makefile.inc2
-rw-r--r--src/mainboard/google/guybrush/variants/guybrush/gpio.c26
3 files changed, 29 insertions, 1 deletions
diff --git a/src/mainboard/google/guybrush/variants/baseboard/gpio.c b/src/mainboard/google/guybrush/variants/baseboard/gpio.c
index 4023b2908b..528ace1653 100644
--- a/src/mainboard/google/guybrush/variants/baseboard/gpio.c
+++ b/src/mainboard/google/guybrush/variants/baseboard/gpio.c
@@ -80,7 +80,7 @@ static const struct soc_amd_gpio base_gpio_table[] = {
/* 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 88e75bde52..ba8514c4c2 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 0000000000..64afa60fae
--- /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;
+}