Subrata Banik has submitted this change. ( https://review.coreboot.org/c/coreboot/+/85537?usp=email )
Change subject: mb/google/brya/uldrenite: Add WWAN RW350R-GL power on sequence ......................................................................
mb/google/brya/uldrenite: Add WWAN RW350R-GL power on sequence
Uldrenite supports the WWAN 5G device and uses variant.c to handle the power-on sequence according to the Rolling Wireless_RW350R-GL_Hardware Guide_Generic_V1.1. Due to no hardware access, the boot time is estimated to increase by 50 ms.
At this stage, we do not yet have the board or key parts for verification. However, I still need to merge the CL to ensure that the WWAN functionality works. Once the motherboard is available, I will make adjustments to optimize and reduce the boot time.
BUG=b:381393809, b:383212261 BRANCH=None TEST=emerge-nissa coreboot
Change-Id: If8695920c2b3d2a27da62afcbe75e70d1ea09792 Signed-off-by: John Su john_su@compal.corp-partner.google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/85537 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Eric Lai ericllai@google.com Reviewed-by: Dinesh Gehlot digehlot@google.com Reviewed-by: Kapil Porwal kapilporwal@google.com Reviewed-by: Dtrain Hsu dtrain_hsu@compal.corp-partner.google.com --- M src/mainboard/google/brya/variants/uldrenite/Makefile.mk A src/mainboard/google/brya/variants/uldrenite/variant.c 2 files changed, 37 insertions(+), 0 deletions(-)
Approvals: Kapil Porwal: Looks good to me, approved Eric Lai: Looks good to me, approved Dtrain Hsu: Looks good to me, approved build bot (Jenkins): Verified Dinesh Gehlot: Looks good to me, approved
diff --git a/src/mainboard/google/brya/variants/uldrenite/Makefile.mk b/src/mainboard/google/brya/variants/uldrenite/Makefile.mk index 87f515a..c31fa30 100644 --- a/src/mainboard/google/brya/variants/uldrenite/Makefile.mk +++ b/src/mainboard/google/brya/variants/uldrenite/Makefile.mk @@ -5,4 +5,5 @@ romstage-y += memory.c ramstage-y += gpio.c
+ramstage-$(CONFIG_FW_CONFIG) += variant.c ramstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_HDA_VERB) += hda_verb.c diff --git a/src/mainboard/google/brya/variants/uldrenite/variant.c b/src/mainboard/google/brya/variants/uldrenite/variant.c new file mode 100644 index 0000000..753abb6 --- /dev/null +++ b/src/mainboard/google/brya/variants/uldrenite/variant.c @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <baseboard/gpio.h> +#include <baseboard/variants.h> +#include <console/console.h> +#include <delay.h> + +#define RW350R_RST_DELAY_MS 20 +#define RW350R_PERST_DELAY_MS 30 + +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), +}; + +void variant_init(void) +{ + /* + * 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)); +}