Skip to content

Commit

Permalink
mb/goog/brya/var/brya0/skolas: Disable LTE GPIOs if LTE_ABSENT
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
NickVaccaro authored and felixheld committed Nov 20, 2023
1 parent f6113ec commit 6615c60
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/mainboard/google/brya/variants/brya0/fw_config.c
Expand Up @@ -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));
Expand Down Expand Up @@ -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);
28 changes: 28 additions & 0 deletions src/mainboard/google/brya/variants/skolas/fw_config.c
Expand Up @@ -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));
Expand Down Expand Up @@ -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);

0 comments on commit 6615c60

Please sign in to comment.