diff options
author | Leo Chou <leo.chou@lcfc.corp-partner.google.com> | 2023-07-11 14:43:13 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-07-13 13:16:17 +0000 |
commit | a5935c6307fd65b031adf459b6be3823d8a0c298 (patch) | |
tree | b1abcf6c043ac2bd5eabd61e6c5e9a5894b0aa67 /src/mainboard/google/brya | |
parent | dd792f2dc546e6eec0048b0749767d997dabb110 (diff) |
mb/google/nissa/var/pujjo: Add WWAN EM060 power on sequence
Pujjo support WWAN EM060 device, use FW_CONFIG to handle the
power on sequence.
BUG=b:290709711
TEST=Build and check WWAN EM060 power on sequence.
Signed-off-by: Leo Chou <leo.chou@lcfc.corp-partner.google.com>
Change-Id: I66800c75274e8e1e55d4314c82b7fcdf2a4477bd
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76403
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/brya')
-rw-r--r-- | src/mainboard/google/brya/variants/pujjo/fw_config.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/brya/variants/pujjo/gpio.c | 45 | ||||
-rw-r--r-- | src/mainboard/google/brya/variants/pujjo/overridetree.cb | 7 |
3 files changed, 51 insertions, 3 deletions
diff --git a/src/mainboard/google/brya/variants/pujjo/fw_config.c b/src/mainboard/google/brya/variants/pujjo/fw_config.c index 318a218cc3..500d1c349e 100644 --- a/src/mainboard/google/brya/variants/pujjo/fw_config.c +++ b/src/mainboard/google/brya/variants/pujjo/fw_config.c @@ -45,7 +45,7 @@ static const struct pad_config stylus_disable_pads[] = { void fw_config_gpio_padbased_override(struct pad_config *padbased_table) { if (fw_config_probe(FW_CONFIG(LTE, LTE_ABSENT)) && fw_config_probe(FW_CONFIG(WWAN_5G, WWAN_5G_ABSENT)) - ) { + && fw_config_probe(FW_CONFIG(LTE_EM060, LTE_EM060_ABSENT))) { printk(BIOS_INFO, "Disable LTE-related GPIO pins.\n"); gpio_padbased_override(padbased_table, lte_disable_pads, ARRAY_SIZE(lte_disable_pads)); diff --git a/src/mainboard/google/brya/variants/pujjo/gpio.c b/src/mainboard/google/brya/variants/pujjo/gpio.c index e8e4fbe698..97a273e8fe 100644 --- a/src/mainboard/google/brya/variants/pujjo/gpio.c +++ b/src/mainboard/google/brya/variants/pujjo/gpio.c @@ -60,6 +60,30 @@ static const struct pad_config override_5g_gpio_table[] = { PAD_NC_LOCK(GPP_H23, NONE, LOCK_CONFIG), }; +/* Pad configuration in ramstage for Pujjo LTE EM060 */ +static const struct pad_config override_em060_gpio_table[] = { + /* A8 : WWAN_RF_DISABLE_ODL */ + PAD_CFG_GPO(GPP_A8, 1, DEEP), + /* D3 : WCAM_RST_L ==> NC */ + PAD_NC_LOCK(GPP_D3, NONE, LOCK_CONFIG), + /* D6 : SRCCLKREQ1# ==> WWAN_EN */ + PAD_CFG_GPO(GPP_D6, 1, DEEP), + /* D15 : EN_PP2800_WCAM_X ==> NC */ + PAD_NC_LOCK(GPP_D15, NONE, LOCK_CONFIG), + /* D16 : EN_PP1800_PP1200_WCAM_X ==> NC */ + PAD_NC_LOCK(GPP_D16, NONE, LOCK_CONFIG), + /* D17 : NC ==> SD_WAKE_N */ + PAD_CFG_GPI_LOCK(GPP_D17, NONE, LOCK_CONFIG), + /* F12 : WWAN_RST_L */ + PAD_CFG_GPO(GPP_F12, 1, DEEP), + /* H19 : SOC_I2C_SUB_INT_ODL */ + PAD_CFG_GPI_APIC(GPP_H19, NONE, PLTRST, LEVEL, NONE), + /* H22 : WCAM_MCLK_R ==> NC */ + PAD_NC(GPP_H22, NONE), + /* H23 : WWAN_SAR_DETECT_ODL ==> NC */ + PAD_NC_LOCK(GPP_H23, NONE, LOCK_CONFIG), +}; + /* Early pad configuration in bootblock */ static const struct pad_config early_gpio_table[] = { /* A13 : GPP_A13 ==> GSC_SOC_INT_ODL */ @@ -127,16 +151,28 @@ static const struct pad_config early_5g_gpio_table[] = { PAD_CFG_GPO(GPP_H21, 0, DEEP), }; +/* Pad configuration in romstage for Pujjo */ static const struct pad_config romstage_gpio_table[] = { /* H12 : UART0_RTS# ==> SD_PERST_L */ PAD_CFG_GPO(GPP_H12, 1, DEEP), }; +/* Pad configuration in romstage for Pujjo WWAN EM060 */ +static const struct pad_config romstage_em060_gpio_table[] = { + /* H12 : UART0_RTS# ==> SD_PERST_L */ + PAD_CFG_GPO(GPP_H12, 1, DEEP), + /* F12 : WWAN_RST_L */ + PAD_CFG_GPO(GPP_F12, 1, DEEP), +}; + const struct pad_config *variant_gpio_override_table(size_t *num) { if (fw_config_probe(FW_CONFIG(WWAN_5G, WWAN_5G_PRESENT))) { *num = ARRAY_SIZE(override_5g_gpio_table); return override_5g_gpio_table; + } else if (fw_config_probe(FW_CONFIG(LTE_EM060, LTE_EM060_PRESENT))) { + *num = ARRAY_SIZE(override_em060_gpio_table); + return override_em060_gpio_table; } else { *num = ARRAY_SIZE(override_gpio_table); return override_gpio_table; @@ -156,6 +192,11 @@ const struct pad_config *variant_early_gpio_table(size_t *num) const struct pad_config *variant_romstage_gpio_table(size_t *num) { - *num = ARRAY_SIZE(romstage_gpio_table); - return romstage_gpio_table; + if (fw_config_probe(FW_CONFIG(LTE_EM060, LTE_EM060_PRESENT))) { + *num = ARRAY_SIZE(romstage_em060_gpio_table); + return romstage_em060_gpio_table; + } else { + *num = ARRAY_SIZE(romstage_gpio_table); + return romstage_gpio_table; + } } diff --git a/src/mainboard/google/brya/variants/pujjo/overridetree.cb b/src/mainboard/google/brya/variants/pujjo/overridetree.cb index 6601247ef6..b31fa2c6a1 100644 --- a/src/mainboard/google/brya/variants/pujjo/overridetree.cb +++ b/src/mainboard/google/brya/variants/pujjo/overridetree.cb @@ -39,6 +39,10 @@ fw_config option WWAN_5G_ABSENT 0 option WWAN_5G_PRESENT 1 end + field LTE_EM060 20 + option LTE_EM060_ABSENT 0 + option LTE_EM060_PRESENT 1 + end end @@ -458,6 +462,7 @@ chip soc/intel/alderlake register "input_analog_gain" = "1" device i2c 28 on probe LTE LTE_PRESENT + probe LTE_EM060 LTE_EM060_PRESENT end end chip drivers/i2c/sx9324 @@ -708,6 +713,7 @@ chip soc/intel/alderlake register "type" = "UPC_TYPE_INTERNAL" device ref usb2_port2 on probe LTE LTE_PRESENT + probe LTE_EM060 LTE_EM060_PRESENT end end chip drivers/usb/acpi @@ -769,6 +775,7 @@ chip soc/intel/alderlake register "type" = "UPC_TYPE_INTERNAL" device ref usb3_port3 on probe LTE LTE_PRESENT + probe LTE_EM060 LTE_EM060_PRESENT end end end |