cpu/x86/smm/pci_resource_store: Store DEV/VEN ID
[coreboot2.git] / src / mainboard / google / brya / variants / pujjo / variant.c
blob695f0439788da6cfd304f4d461c55e0ce98e4b81
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <fw_config.h>
4 #include <baseboard/variants.h>
5 #include <baseboard/gpio.h>
6 #include <console/console.h>
7 #include <drivers/intel/gma/opregion.h>
8 #include <sar.h>
9 #include <delay.h>
11 #define FM350_RST_DEALY_MS 20
12 #define FM350_PERST_DEALY_MS 30
14 static const struct pad_config fm350_rst_pad[] = {
15 /* F12 : WWAN_RST_L */
16 PAD_CFG_GPO_LOCK(GPP_F12, 1, LOCK_CONFIG),
18 static const struct pad_config fm350_perst_pad[] = {
19 /* H21 : WWAN_PERST */
20 PAD_CFG_GPO(GPP_H21, 1, DEEP),
23 void variant_update_soc_chip_config(struct soc_intel_alderlake_config *config)
25 // Configure external V1P05/Vnn/VnnSx Rails for Pujjo, Pujjoflex
26 if (fw_config_probe(FW_CONFIG(EXT_VR, EXT_VR_PRESENT))) {
27 config->ext_fivr_settings.configure_ext_fivr = 1;
29 config->ext_fivr_settings.v1p05_enable_bitmap =
30 FIVR_ENABLE_ALL_SX & ~FIVR_ENABLE_S0;
32 config->ext_fivr_settings.vnn_enable_bitmap =
33 FIVR_ENABLE_ALL_SX;
35 config->ext_fivr_settings.vnn_sx_enable_bitmap =
36 FIVR_ENABLE_ALL_SX;
38 config->ext_fivr_settings.v1p05_supported_voltage_bitmap =
39 FIVR_VOLTAGE_NORMAL;
41 config->ext_fivr_settings.vnn_supported_voltage_bitmap =
42 FIVR_VOLTAGE_MIN_ACTIVE;
44 config->ext_fivr_settings.v1p05_voltage_mv = 1050;
45 config->ext_fivr_settings.vnn_voltage_mv = 780;
46 config->ext_fivr_settings.vnn_sx_voltage_mv = 1050;
47 config->ext_fivr_settings.v1p05_icc_max_ma = 500;
48 config->ext_fivr_settings.vnn_icc_max_ma = 500;
52 const char *get_wifi_sar_cbfs_filename(void)
54 return get_wifi_sar_fw_config_filename(FW_CONFIG_FIELD(WIFI_SAR_ID));
57 void variant_init(void)
59 if (fw_config_probe(FW_CONFIG(WWAN_5G, WWAN_5G_PRESENT))) {
61 * FM350 power on seuqence:
62 * De-assert WWAN_EN -> 20ms -> de-assert WWAN_RST -> 30ms ->
63 * de-assert WWAN_PERST
64 * WWAN_EN is de-asserted in ramstage gpio configuration, de-assert
65 * WWAN_RST and WWAN_PERST here.
67 mdelay(FM350_RST_DEALY_MS);
68 gpio_configure_pads(fm350_rst_pad, ARRAY_SIZE(fm350_rst_pad));
69 mdelay(FM350_PERST_DEALY_MS);
70 gpio_configure_pads(fm350_perst_pad, ARRAY_SIZE(fm350_perst_pad));
74 const char *mainboard_vbt_filename(void)
76 if (fw_config_probe(FW_CONFIG(PANEL_IVO_BOE, IVO_BOE_PRESENT))) {
77 printk(BIOS_INFO, "Use vbt-pujjo1e.bin\n");
78 return "vbt-pujjo1e.bin";
80 printk(BIOS_INFO, "Use vbt.bin\n");
81 return "vbt.bin";