From e93bce937e860d4a2eb207574ff03acf94d79a18 Mon Sep 17 00:00:00 2001 From: Eric Lai Date: Tue, 15 Mar 2022 16:16:29 +0800 Subject: 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 Change-Id: I91dc2c9c8811d403c60a4b4f3a7c5ed8de4e527e Reviewed-on: https://review.coreboot.org/c/coreboot/+/62806 Tested-by: build bot (Jenkins) Reviewed-by: Kangheui Won --- src/mainboard/google/brya/variants/nivviks/gpio.c | 13 ++++++++++--- 1 file 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 #include +#include #include #include /* 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) -- cgit v1.2.3