Matt DeVillier has submitted this change. ( https://review.coreboot.org/c/coreboot/+/86514?usp=email )
Change subject: mb/trulo/var/uldrenite: Fix boot time caused by WWAN initialization ......................................................................
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 --- M src/mainboard/google/brya/variants/uldrenite/gpio.c M src/mainboard/google/brya/variants/uldrenite/include/variant/gpio.h M src/mainboard/google/brya/variants/uldrenite/variant.c M src/mainboard/google/brya/wwan_power.asl 4 files changed, 10 insertions(+), 36 deletions(-)
Approvals: build bot (Jenkins): Verified Eric Lai: Looks good to me, approved Kapil Porwal: Looks good to me, approved Subrata Banik: Looks good to me, approved
diff --git a/src/mainboard/google/brya/variants/uldrenite/gpio.c b/src/mainboard/google/brya/variants/uldrenite/gpio.c index 3e11b48..e8355d3 100644 --- a/src/mainboard/google/brya/variants/uldrenite/gpio.c +++ b/src/mainboard/google/brya/variants/uldrenite/gpio.c @@ -232,9 +232,9 @@ /* 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 @@ /* 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 @@ /* 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 @@ 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) diff --git a/src/mainboard/google/brya/variants/uldrenite/include/variant/gpio.h b/src/mainboard/google/brya/variants/uldrenite/include/variant/gpio.h index 612ea2a..e752456 100644 --- a/src/mainboard/google/brya/variants/uldrenite/include/variant/gpio.h +++ b/src/mainboard/google/brya/variants/uldrenite/include/variant/gpio.h @@ -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 diff --git a/src/mainboard/google/brya/variants/uldrenite/variant.c b/src/mainboard/google/brya/variants/uldrenite/variant.c index 3620c3a..4217996 100644 --- a/src/mainboard/google/brya/variants/uldrenite/variant.c +++ b/src/mainboard/google/brya/variants/uldrenite/variant.c @@ -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 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))) { diff --git a/src/mainboard/google/brya/wwan_power.asl b/src/mainboard/google/brya/wwan_power.asl index f19a5ef..4f9b788 100644 --- a/src/mainboard/google/brya/wwan_power.asl +++ b/src/mainboard/google/brya/wwan_power.asl @@ -11,4 +11,7 @@ _SB.PCI0.CTXS(WWAN_RST); Sleep(T2_OFF_MS) _SB.PCI0.CTXS(WWAN_FCPO); +#if CONFIG(BOARD_GOOGLE_ULDRENITE) + Sleep(T0_OFF_MS) +#endif }