diff options
author | Nick Vaccaro <nvaccaro@google.com> | 2023-11-17 10:36:49 -0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-11-20 14:34:15 +0000 |
commit | 6615c60fd5ac5bb8a3ad9f86bbb1431332978a5d (patch) | |
tree | a58d270c37cb019f3426d15f1543069a4ca8135a /src/mainboard/google/brya | |
parent | f6113ececc56d748328243f94da08d1253df810d (diff) |
mb/goog/brya/var/brya0/skolas: Disable LTE GPIOs if LTE_ABSENT
Check FW_CONFIG and disable gpios for LTE if LTE_ABSENT for skolas
and brya0 variants.
BUG=b:311459627
BRANCH=firmware-brya-14505.B
TEST=`emerge-brya coreboot chromeos-bootimage`, flash and boot skolas
to kernel and verify LTE gpios are disabled via "cbmem -c | grep LTE".
Change-Id: I3f3bc2b536babf71cc484cce02f96f47707f729c
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79122
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/brya')
-rw-r--r-- | src/mainboard/google/brya/variants/brya0/fw_config.c | 28 | ||||
-rw-r--r-- | src/mainboard/google/brya/variants/skolas/fw_config.c | 28 |
2 files changed, 56 insertions, 0 deletions
diff --git a/src/mainboard/google/brya/variants/brya0/fw_config.c b/src/mainboard/google/brya/variants/brya0/fw_config.c index 9ff34818b1..e50c5e4159 100644 --- a/src/mainboard/google/brya/variants/brya0/fw_config.c +++ b/src/mainboard/google/brya/variants/brya0/fw_config.c @@ -100,6 +100,29 @@ static const struct pad_config bt_i2s_disable_pads[] = { PAD_NC(GPP_VGPIO_37, NONE), }; +static const struct pad_config lte_disable_pads[] = { + /* A7 : WWAN_PCIE_WAKE_ODL */ + PAD_NC(GPP_A7, NONE), + /* A8 : WWAN_RF_DISABLE_ODL */ + PAD_NC(GPP_A8, NONE), + /* D5 : SRCCLKREQ0# ==> WWAN_DPR_SAR_ODL */ + PAD_NC(GPP_D5, NONE), + /* E0 : SATAXPCIE0 ==> WWAN_PERST_L */ + PAD_NC(GPP_E0, NONE), + /* E10 : THC0_SPI1_CS# ==> WWAN_CONFIG0 */ + PAD_NC_LOCK(GPP_E10, NONE, LOCK_CONFIG), + /* E16 : WWAN_RST_L */ + PAD_NC(GPP_E16, NONE), + /* E17 : THC0_SPI1_INT# ==> WWAN_CONFIG3 */ + PAD_NC_LOCK(GPP_E17, NONE, LOCK_CONFIG), + /* F21 : EXT_PWR_GATE2# ==> WWAN_FCPO_L */ + PAD_NC(GPP_F21, NONE), + /* H23 : SRCCLKREQ5# ==> WWAN_CLKREQ_ODL */ + PAD_NC(GPP_H23, NONE), + /* GPD11 : LANPHYC ==> WWAN_CONFIG1 */ + PAD_NC(GPD11, NONE), +}; + static void enable_i2s(void) { gpio_configure_pads(dmic_enable_pads, ARRAY_SIZE(dmic_enable_pads)); @@ -155,5 +178,10 @@ static void fw_config_handle(void *unused) if (fw_config_probe(FW_CONFIG(AUDIO, NAU8318_NAU88L25B_I2S))) gpio_configure_pads(nau8318_enable_pads, ARRAY_SIZE(nau8318_enable_pads)); } + + if (fw_config_probe(FW_CONFIG(DB_LTE, LTE_ABSENT))) { + printk(BIOS_INFO, "Disable LTE related GPIO pins.\n"); + gpio_configure_pads(lte_disable_pads, ARRAY_SIZE(lte_disable_pads)); + } } BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL); diff --git a/src/mainboard/google/brya/variants/skolas/fw_config.c b/src/mainboard/google/brya/variants/skolas/fw_config.c index 9ff34818b1..e50c5e4159 100644 --- a/src/mainboard/google/brya/variants/skolas/fw_config.c +++ b/src/mainboard/google/brya/variants/skolas/fw_config.c @@ -100,6 +100,29 @@ static const struct pad_config bt_i2s_disable_pads[] = { PAD_NC(GPP_VGPIO_37, NONE), }; +static const struct pad_config lte_disable_pads[] = { + /* A7 : WWAN_PCIE_WAKE_ODL */ + PAD_NC(GPP_A7, NONE), + /* A8 : WWAN_RF_DISABLE_ODL */ + PAD_NC(GPP_A8, NONE), + /* D5 : SRCCLKREQ0# ==> WWAN_DPR_SAR_ODL */ + PAD_NC(GPP_D5, NONE), + /* E0 : SATAXPCIE0 ==> WWAN_PERST_L */ + PAD_NC(GPP_E0, NONE), + /* E10 : THC0_SPI1_CS# ==> WWAN_CONFIG0 */ + PAD_NC_LOCK(GPP_E10, NONE, LOCK_CONFIG), + /* E16 : WWAN_RST_L */ + PAD_NC(GPP_E16, NONE), + /* E17 : THC0_SPI1_INT# ==> WWAN_CONFIG3 */ + PAD_NC_LOCK(GPP_E17, NONE, LOCK_CONFIG), + /* F21 : EXT_PWR_GATE2# ==> WWAN_FCPO_L */ + PAD_NC(GPP_F21, NONE), + /* H23 : SRCCLKREQ5# ==> WWAN_CLKREQ_ODL */ + PAD_NC(GPP_H23, NONE), + /* GPD11 : LANPHYC ==> WWAN_CONFIG1 */ + PAD_NC(GPD11, NONE), +}; + static void enable_i2s(void) { gpio_configure_pads(dmic_enable_pads, ARRAY_SIZE(dmic_enable_pads)); @@ -155,5 +178,10 @@ static void fw_config_handle(void *unused) if (fw_config_probe(FW_CONFIG(AUDIO, NAU8318_NAU88L25B_I2S))) gpio_configure_pads(nau8318_enable_pads, ARRAY_SIZE(nau8318_enable_pads)); } + + if (fw_config_probe(FW_CONFIG(DB_LTE, LTE_ABSENT))) { + printk(BIOS_INFO, "Disable LTE related GPIO pins.\n"); + gpio_configure_pads(lte_disable_pads, ARRAY_SIZE(lte_disable_pads)); + } } BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL); |