diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/google/brya/variants/pujjo/gpio.c | 4 | ||||
-rw-r--r-- | src/mainboard/google/brya/variants/pujjo/variant.c | 31 |
2 files changed, 33 insertions, 2 deletions
diff --git a/src/mainboard/google/brya/variants/pujjo/gpio.c b/src/mainboard/google/brya/variants/pujjo/gpio.c index 91223c30fe..fd3dca5f90 100644 --- a/src/mainboard/google/brya/variants/pujjo/gpio.c +++ b/src/mainboard/google/brya/variants/pujjo/gpio.c @@ -49,11 +49,11 @@ static const struct pad_config override_5g_gpio_table[] = { /* D17 : NC ==> SD_WAKE_N */ PAD_CFG_GPI_LOCK(GPP_D17, NONE, LOCK_CONFIG), /* F12 : WWAN_RST_L */ - PAD_CFG_GPO_LOCK(GPP_F12, 1, LOCK_CONFIG), + PAD_CFG_GPO(GPP_F12, 0, DEEP), /* H19 : SOC_I2C_SUB_INT_ODL */ PAD_CFG_GPI_APIC(GPP_H19, NONE, PLTRST, LEVEL, NONE), /* H21 : WCAM_MCLK_R ==> WWAN_PERST_L */ - PAD_CFG_GPO(GPP_H21, 1, DEEP), + PAD_CFG_GPO(GPP_H21, 0, DEEP), /* H22 : WCAM_MCLK_R ==> NC */ PAD_NC(GPP_H22, NONE), /* H23 : WWAN_SAR_DETECT_ODL */ diff --git a/src/mainboard/google/brya/variants/pujjo/variant.c b/src/mainboard/google/brya/variants/pujjo/variant.c index 46a167a766..97e7e557d4 100644 --- a/src/mainboard/google/brya/variants/pujjo/variant.c +++ b/src/mainboard/google/brya/variants/pujjo/variant.c @@ -2,7 +2,21 @@ #include <fw_config.h> #include <baseboard/variants.h> +#include <baseboard/gpio.h> #include <sar.h> +#include <delay.h> + +#define FM350_RST_DEALY_MS 20 +#define FM350_PERST_DEALY_MS 30 + +static const struct pad_config fm350_rst_pad[] = { + /* F12 : WWAN_RST_L */ + PAD_CFG_GPO_LOCK(GPP_F12, 1, LOCK_CONFIG), +}; +static const struct pad_config fm350_perst_pad[] = { + /* H21 : WWAN_PERST */ + PAD_CFG_GPO(GPP_H21, 1, DEEP), +}; void variant_update_soc_chip_config(struct soc_intel_alderlake_config *config) { @@ -37,3 +51,20 @@ const char *get_wifi_sar_cbfs_filename(void) { return get_wifi_sar_fw_config_filename(FW_CONFIG_FIELD(WIFI_SAR_ID)); } + +void variant_init(void) +{ + if (fw_config_probe(FW_CONFIG(WWAN_5G, WWAN_5G_PRESENT))) { + /* + * FM350 power on seuqence: + * De-assert WWAN_EN -> 20ms -> de-assert WWAN_RST -> 30ms -> + * de-assert WWAN_PERST + * WWAN_EN is de-asserted in ramstage gpio configuration, de-assert + * WWAN_RST and WWAN_PERST here. + */ + mdelay(FM350_RST_DEALY_MS); + gpio_configure_pads(fm350_rst_pad, ARRAY_SIZE(fm350_rst_pad)); + mdelay(FM350_PERST_DEALY_MS); + gpio_configure_pads(fm350_perst_pad, ARRAY_SIZE(fm350_perst_pad)); + } +} |