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>
This commit is contained in:
@@ -45,7 +45,7 @@ static const struct pad_config stylus_disable_pads[] = {
|
|||||||
void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
|
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))
|
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");
|
printk(BIOS_INFO, "Disable LTE-related GPIO pins.\n");
|
||||||
gpio_padbased_override(padbased_table, lte_disable_pads,
|
gpio_padbased_override(padbased_table, lte_disable_pads,
|
||||||
ARRAY_SIZE(lte_disable_pads));
|
ARRAY_SIZE(lte_disable_pads));
|
||||||
|
@@ -60,6 +60,30 @@ static const struct pad_config override_5g_gpio_table[] = {
|
|||||||
PAD_NC_LOCK(GPP_H23, NONE, LOCK_CONFIG),
|
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 */
|
/* Early pad configuration in bootblock */
|
||||||
static const struct pad_config early_gpio_table[] = {
|
static const struct pad_config early_gpio_table[] = {
|
||||||
/* A13 : GPP_A13 ==> GSC_SOC_INT_ODL */
|
/* 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_CFG_GPO(GPP_H21, 0, DEEP),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Pad configuration in romstage for Pujjo */
|
||||||
static const struct pad_config romstage_gpio_table[] = {
|
static const struct pad_config romstage_gpio_table[] = {
|
||||||
/* H12 : UART0_RTS# ==> SD_PERST_L */
|
/* H12 : UART0_RTS# ==> SD_PERST_L */
|
||||||
PAD_CFG_GPO(GPP_H12, 1, DEEP),
|
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)
|
const struct pad_config *variant_gpio_override_table(size_t *num)
|
||||||
{
|
{
|
||||||
if (fw_config_probe(FW_CONFIG(WWAN_5G, WWAN_5G_PRESENT))) {
|
if (fw_config_probe(FW_CONFIG(WWAN_5G, WWAN_5G_PRESENT))) {
|
||||||
*num = ARRAY_SIZE(override_5g_gpio_table);
|
*num = ARRAY_SIZE(override_5g_gpio_table);
|
||||||
return 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 {
|
} else {
|
||||||
*num = ARRAY_SIZE(override_gpio_table);
|
*num = ARRAY_SIZE(override_gpio_table);
|
||||||
return 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)
|
const struct pad_config *variant_romstage_gpio_table(size_t *num)
|
||||||
{
|
{
|
||||||
|
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);
|
*num = ARRAY_SIZE(romstage_gpio_table);
|
||||||
return romstage_gpio_table;
|
return romstage_gpio_table;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@@ -39,6 +39,10 @@ fw_config
|
|||||||
option WWAN_5G_ABSENT 0
|
option WWAN_5G_ABSENT 0
|
||||||
option WWAN_5G_PRESENT 1
|
option WWAN_5G_PRESENT 1
|
||||||
end
|
end
|
||||||
|
field LTE_EM060 20
|
||||||
|
option LTE_EM060_ABSENT 0
|
||||||
|
option LTE_EM060_PRESENT 1
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -458,6 +462,7 @@ chip soc/intel/alderlake
|
|||||||
register "input_analog_gain" = "1"
|
register "input_analog_gain" = "1"
|
||||||
device i2c 28 on
|
device i2c 28 on
|
||||||
probe LTE LTE_PRESENT
|
probe LTE LTE_PRESENT
|
||||||
|
probe LTE_EM060 LTE_EM060_PRESENT
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
chip drivers/i2c/sx9324
|
chip drivers/i2c/sx9324
|
||||||
@@ -708,6 +713,7 @@ chip soc/intel/alderlake
|
|||||||
register "type" = "UPC_TYPE_INTERNAL"
|
register "type" = "UPC_TYPE_INTERNAL"
|
||||||
device ref usb2_port2 on
|
device ref usb2_port2 on
|
||||||
probe LTE LTE_PRESENT
|
probe LTE LTE_PRESENT
|
||||||
|
probe LTE_EM060 LTE_EM060_PRESENT
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
chip drivers/usb/acpi
|
chip drivers/usb/acpi
|
||||||
@@ -769,6 +775,7 @@ chip soc/intel/alderlake
|
|||||||
register "type" = "UPC_TYPE_INTERNAL"
|
register "type" = "UPC_TYPE_INTERNAL"
|
||||||
device ref usb3_port3 on
|
device ref usb3_port3 on
|
||||||
probe LTE LTE_PRESENT
|
probe LTE LTE_PRESENT
|
||||||
|
probe LTE_EM060 LTE_EM060_PRESENT
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user