mb/trulo/var/uldrenite: Fix boot time caused by WWAN initialization

The previous approach would increase the delay time by 50 ms. So move
WWAN power sequence to GPIO control to reduce boot time caused by WWAN
initialization. Additionally, add a 150ms delay to T0_OFF_MS before powering off the WWAN. This ensures that the WWAN Power OFF Sequence operates correctly during a reboot.

BUG=b:383212261
BRANCH=firmware-trulo-15217.771.B
TEST=Confirm the measured WWAN power sequence

Change-Id: Ie01019eca7eaa4bbb34dd80aeb65b9b6b08587fd
Signed-off-by: John Su <john_su@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86514
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
This commit is contained in:
John Su 2025-02-19 23:17:25 +08:00 committed by Matt DeVillier
commit f1fbcf7647
4 changed files with 10 additions and 36 deletions

View file

@ -232,9 +232,9 @@ static const struct pad_config gpio_table[] = {
/* F11 : NC */
PAD_NC_LOCK(GPP_F11, NONE, LOCK_CONFIG),
/* F12 : NC ==> WWAN_RST_L */
PAD_CFG_GPO(GPP_F12, 0, DEEP),
PAD_CFG_GPO(GPP_F12, 1, DEEP),
/* F13 : NC ==> PLTRST_WWAN# */
PAD_CFG_GPO(GPP_F13, 0, DEEP),
PAD_CFG_GPO(GPP_F13, 1, DEEP),
/* F14 : NC */
PAD_NC(GPP_F14, NONE),
/* F15 : NC */
@ -303,7 +303,7 @@ static const struct pad_config gpio_table[] = {
/* H22 : NC */
PAD_NC(GPP_H22, NONE),
/* H23 : LTE_PWR_OFF_EN */
PAD_CFG_GPO(GPP_H23, 0, DEEP),
PAD_CFG_GPO(GPP_H23, 1, DEEP),
/* R0 : HDA_BCLK ==> HDA_BIT_CLK */
PAD_CFG_NF(GPP_R0, NONE, DEEP, NF1),
@ -435,7 +435,7 @@ static const struct pad_config early_gpio_table[] = {
/* H11 : UART0_TXD ==> UART_SOC_TX_DBG_RX */
PAD_CFG_NF(GPP_H11, NONE, DEEP, NF2),
/* H23 : LTE_PWR_OFF_EN */
PAD_CFG_GPO(GPP_H23, 0, DEEP),
PAD_CFG_GPO(GPP_H23, 1, DEEP),
};
/* Fill romstage gpio configuration */
@ -445,6 +445,8 @@ static const struct pad_config romstage_gpio_table[] = {
PAD_CFG_GPO(GPP_E17, 1, DEEP),
/* D15 : GPP_D15 ==> SOC_TS_I2C_RST# */
PAD_CFG_GPO(GPP_D15, 0, DEEP),
/* F12 : NC ==> WWAN_RST_L */
PAD_CFG_GPO(GPP_F12, 1, DEEP),
};
const struct pad_config *variant_gpio_table(size_t *num)

View file

@ -10,5 +10,6 @@
#define WWAN_PERST GPP_F13
#define T1_OFF_MS 20
#define T2_OFF_MS 10
#define T0_OFF_MS 150
#endif

View file

@ -7,27 +7,11 @@
#include <fw_config.h>
#include <sar.h>
#define RW350R_RST_DELAY_MS 20
#define RW350R_PERST_DELAY_MS 30
const char *get_wifi_sar_cbfs_filename(void)
{
return "wifi_sar_0.hex";
}
static const struct pad_config rw350r_en_pad[] = {
/* H23 : LTE_PWR_OFF_EN */
PAD_CFG_GPO(GPP_H23, 1, DEEP),
};
static const struct pad_config rw350r_rst_pad[] = {
/* F12 : WWAN_RST_L */
PAD_CFG_GPO_LOCK(GPP_F12, 1, LOCK_CONFIG),
};
static const struct pad_config rw350r_perst_pad[] = {
/* F13 : PLTRST_WWAN# */
PAD_CFG_GPO(GPP_F13, 1, DEEP),
};
static const struct pad_config touchscreen_disable_pads[] = {
/* A21 : TCHSCR_REPORT_EN */
PAD_NC(GPP_A21, NONE),
@ -68,22 +52,6 @@ void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
}
}
void variant_init(void)
{
if (fw_config_probe(FW_CONFIG(DB_CELLULAR, CELLULAR_ABSENT)))
return;
/*
* RW350R power on seuqence:
* De-assert WWAN_EN -> 20ms -> de-assert WWAN_RST -> 30ms ->
* de-assert WWAN_PERST
*/
gpio_configure_pads(rw350r_en_pad, ARRAY_SIZE(rw350r_en_pad));
mdelay(RW350R_RST_DELAY_MS);
gpio_configure_pads(rw350r_rst_pad, ARRAY_SIZE(rw350r_rst_pad));
mdelay(RW350R_PERST_DELAY_MS);
gpio_configure_pads(rw350r_perst_pad, ARRAY_SIZE(rw350r_perst_pad));
}
void variant_update_soc_chip_config(struct soc_intel_alderlake_config *config)
{
if (fw_config_probe(FW_CONFIG(EXT_VR, EXT_VR_PRESENT))) {

View file

@ -11,4 +11,7 @@ Method (MPTS, 1)
\_SB.PCI0.CTXS(WWAN_RST);
Sleep(T2_OFF_MS)
\_SB.PCI0.CTXS(WWAN_FCPO);
#if CONFIG(BOARD_GOOGLE_ULDRENITE)
Sleep(T0_OFF_MS)
#endif
}