summaryrefslogtreecommitdiff
path: root/src/mainboard/google/brya/variants/nivviks
diff options
context:
space:
mode:
authorEric Lai <eric_lai@quanta.corp-partner.google.com>2022-03-15 16:16:29 +0800
committerFelix Held <felix-coreboot@felixheld.de>2022-03-17 14:35:48 +0000
commite93bce937e860d4a2eb207574ff03acf94d79a18 (patch)
tree36fac6cb51c1d806595a81caff8e0a9ea373ff44 /src/mainboard/google/brya/variants/nivviks
parent23be41880c1ff0b1485fc6fe1b92d990c3decf8a (diff)
mb/google/nissa/var/nivviks: Set gpio override to board_0
Follow the latest schematic change, gpio will match the baseboard. Return the current table as override. BUG=b:223677877 TEST=audio is functional on board_0. Signed-off-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Change-Id: I91dc2c9c8811d403c60a4b4f3a7c5ed8de4e527e Reviewed-on: https://review.coreboot.org/c/coreboot/+/62806 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kangheui Won <khwon@chromium.org>
Diffstat (limited to 'src/mainboard/google/brya/variants/nivviks')
-rw-r--r--src/mainboard/google/brya/variants/nivviks/gpio.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mainboard/google/brya/variants/nivviks/gpio.c b/src/mainboard/google/brya/variants/nivviks/gpio.c
index a5f9cb8d24..db3b9e36f2 100644
--- a/src/mainboard/google/brya/variants/nivviks/gpio.c
+++ b/src/mainboard/google/brya/variants/nivviks/gpio.c
@@ -2,11 +2,12 @@
#include <baseboard/gpio.h>
#include <baseboard/variants.h>
+#include <boardid.h>
#include <commonlib/helpers.h>
#include <soc/gpio.h>
/* Pad configuration in ramstage */
-static const struct pad_config override_gpio_table[] = {
+static const struct pad_config board_id0_overrides[] = {
/* R4 : I2S2_SCLK ==> I2S_SPK_BCLK_R */
PAD_CFG_NF(GPP_R4, NONE, DEEP, NF2),
/* R5 : I2S2_SFRM ==> I2S_SPK_LRCK_R */
@@ -58,8 +59,14 @@ static const struct pad_config romstage_gpio_table[] = {
const struct pad_config *variant_gpio_override_table(size_t *num)
{
- *num = ARRAY_SIZE(override_gpio_table);
- return override_gpio_table;
+ const uint32_t id = board_id();
+ if (id == BOARD_ID_UNKNOWN || id == 0) {
+ *num = ARRAY_SIZE(board_id0_overrides);
+ return board_id0_overrides;
+ }
+
+ *num = 0;
+ return NULL;
}
const struct pad_config *variant_early_gpio_table(size_t *num)