mb/google/nissa/var/nivviks: Update GPIOs to support nirwen
Nirwen is an additional nissa reference board which is almost identical
to nivviks, so is reusing the nivviks coreboot variant. However, there
are two GPIO changes, so update the GPIO tables to handle these based on
board_id.
nivviks:
GPP_D6 -> WWAN_EN
GPP_E13 -> NC
nirwen:
GPP_D6 -> SSD_CLKREQ_ODL
GPP_E13 -> WWAN_EN
BUG=b:218929856
TEST=Boot to OS on nivviks
Change-Id: I494ed127714069a8f36d16d11ca4e8a1f3d37827
Signed-off-by: Reka Norman <rekanorman@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64210
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
diff --git a/src/mainboard/google/brya/variants/nivviks/fw_config.c b/src/mainboard/google/brya/variants/nivviks/fw_config.c
index d899750..6d8bab3 100644
--- a/src/mainboard/google/brya/variants/nivviks/fw_config.c
+++ b/src/mainboard/google/brya/variants/nivviks/fw_config.c
@@ -1,11 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <baseboard/gpio.h>
+#include <boardid.h>
#include <bootstate.h>
#include <console/console.h>
#include <fw_config.h>
-static const struct pad_config lte_disable_pads[] = {
+static const struct pad_config lte_disable_pads_nivviks[] = {
/* A8 : WWAN_RF_DISABLE_ODL */
PAD_NC(GPP_A8, NONE),
/* D6 : WWAN_EN */
@@ -18,6 +19,19 @@
PAD_NC(GPP_H23, NONE),
};
+static const struct pad_config lte_disable_pads_nirwen[] = {
+ /* A8 : WWAN_RF_DISABLE_ODL */
+ PAD_NC(GPP_A8, NONE),
+ /* E13 : WWAN_EN */
+ PAD_NC(GPP_E13, NONE),
+ /* F12 : WWAN_RST_L */
+ PAD_NC(GPP_F12, NONE),
+ /* H19 : SOC_I2C_SUB_INT_ODL */
+ PAD_NC(GPP_H19, NONE),
+ /* H23 : WWAN_SAR_DETECT_ODL */
+ PAD_NC(GPP_H23, NONE),
+};
+
static const struct pad_config sd_disable_pads[] = {
/* D8 : SD_CLKREQ_ODL */
PAD_NC(GPP_D8, NONE),
@@ -45,8 +59,19 @@
static void fw_config_handle(void *unused)
{
if (!fw_config_probe(FW_CONFIG(DB_USB, DB_1C_LTE))) {
- printk(BIOS_INFO, "Disable LTE-related GPIO pins.\n");
- gpio_configure_pads(lte_disable_pads, ARRAY_SIZE(lte_disable_pads));
+ if (board_id() == 2) {
+ printk(BIOS_INFO, "Disable LTE-related GPIO pins on nirwen.\n");
+ gpio_configure_pads(
+ lte_disable_pads_nirwen,
+ ARRAY_SIZE(lte_disable_pads_nirwen)
+ );
+ } else {
+ printk(BIOS_INFO, "Disable LTE-related GPIO pins on nivviks.\n");
+ gpio_configure_pads(
+ lte_disable_pads_nivviks,
+ ARRAY_SIZE(lte_disable_pads_nivviks)
+ );
+ }
}
if (fw_config_probe(FW_CONFIG(SD_CARD, SD_ABSENT))) {