diff options
Diffstat (limited to 'src')
-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 |