summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Roth <martinroth@chromium.org>2021-05-13 14:27:47 -0600
committerMartin Roth <martinroth@google.com>2021-06-29 18:06:30 +0000
commitbdba51208ad5b3a3cde9f137df0ea042ac0e7d25 (patch)
tree24fa94b2325d038cc64016c3f39999f1582947c7 /src
parent33608626872c5acca9a353d4b12b8fe8c8d2e8c7 (diff)
mb/google/guybrush: Initialize WWAN for USB if requested
To set the Fibocom 850-GL module to USB mode, it needs to be disabled when PCIe training happens, or it will automatically switch to PCIe mode. This patch makes sure it's shut down when training happens in FSP-M. It will be brought up in ramstage and will be available for USB enumeration later. BUG=b:187316460 TEST=Run lsusb from the OS and see that the Fibocom module is present on USB. Signed-off-by: Martin Roth <martinroth@chromium.org> Change-Id: I153eb6cd7c3a0e2cc3b71c99f76db3e565173cfe Reviewed-on: https://review.coreboot.org/c/coreboot/+/54743 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/guybrush/variants/baseboard/gpio.c2
-rw-r--r--src/mainboard/google/guybrush/variants/guybrush/gpio.c18
2 files changed, 20 insertions, 0 deletions
diff --git a/src/mainboard/google/guybrush/variants/baseboard/gpio.c b/src/mainboard/google/guybrush/variants/baseboard/gpio.c
index 0b418d8b58..c73ec188fc 100644
--- a/src/mainboard/google/guybrush/variants/baseboard/gpio.c
+++ b/src/mainboard/google/guybrush/variants/baseboard/gpio.c
@@ -240,6 +240,8 @@ static const struct soc_amd_gpio early_gpio_table[] = {
static const struct soc_amd_gpio bootblock_gpio_table[] = {
/* Enable WWAN & WLAN */
+ /* EN_PWR_WWAN_X */
+ PAD_GPO(GPIO_8, HIGH),
/* WWAN_RST_L */
PAD_GPO(GPIO_24, HIGH),
/* WWAN_DISABLE */
diff --git a/src/mainboard/google/guybrush/variants/guybrush/gpio.c b/src/mainboard/google/guybrush/variants/guybrush/gpio.c
index dca9c8edc7..ff8403ba7c 100644
--- a/src/mainboard/google/guybrush/variants/guybrush/gpio.c
+++ b/src/mainboard/google/guybrush/variants/guybrush/gpio.c
@@ -5,6 +5,7 @@
#include <boardid.h>
#include <gpio.h>
#include <soc/gpio.h>
+#include <baseboard/variants.h>
/* This table is used by guybrush variant with board version < 2. */
static const struct soc_amd_gpio bid1_gpio_table[] = {
@@ -31,6 +32,14 @@ static const struct soc_amd_gpio bid1_pcie_gpio_table[] = {
PAD_GPO(GPIO_70, HIGH),
};
+/* WWAN on USB or no WWAN - Disable the WWAN power line */
+static const struct soc_amd_gpio bootblock_gpio_table_pcie_wwan[] = {
+ /* EN_PWR_WWAN_X */
+ PAD_GPO(GPIO_8, LOW),
+ /* WLAN_DISABLE */
+ PAD_GPO(GPIO_130, LOW),
+};
+
const struct soc_amd_gpio *variant_override_gpio_table(size_t *size)
{
uint32_t board_version = board_id();
@@ -69,3 +78,12 @@ const struct soc_amd_gpio *variant_pcie_override_gpio_table(size_t *size)
return NULL;
}
+const struct soc_amd_gpio *variant_bootblock_override_gpio_table(size_t *size)
+{
+ if (variant_has_pcie_wwan()) {
+ *size = ARRAY_SIZE(bootblock_gpio_table_pcie_wwan);
+ return bootblock_gpio_table_pcie_wwan;
+ }
+
+ return NULL;
+}