1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <baseboard/variants.h>
5 #include <console/console.h>
6 #include <device/device.h>
7 #include <drivers/intel/gma/opregion.h>
12 const char *get_wifi_sar_cbfs_filename(void)
14 if (fw_config_probe(FW_CONFIG(WIFI_SAR_ID
, SAR_ID_0
)))
15 return "wifi_sar_0.hex";
16 if (fw_config_probe(FW_CONFIG(WIFI_SAR_ID
, SAR_ID_2
)))
17 return "wifi_sar_2.hex";
22 const char *mainboard_vbt_filename(void)
24 if (fw_config_probe(FW_CONFIG(MB_HDMI
, HDMI_PRESENT
))) {
25 printk(BIOS_INFO
, "Use vbt-yavilla.bin\n");
26 return "vbt-yavilla.bin";
28 printk(BIOS_INFO
, "Use vbt.bin\n");
32 void variant_update_soc_chip_config(struct soc_intel_alderlake_config
*config
)
34 const uint32_t id
= board_id();
35 if (id
== BOARD_ID_UNKNOWN
|| id
< 4) { // proto, EVT
36 config
->ext_fivr_settings
.configure_ext_fivr
= 1;
38 config
->ext_fivr_settings
.v1p05_enable_bitmap
=
39 FIVR_ENABLE_ALL_SX
& ~FIVR_ENABLE_S0
;
40 config
->ext_fivr_settings
.vnn_enable_bitmap
=
42 config
->ext_fivr_settings
.vnn_sx_enable_bitmap
=
44 config
->ext_fivr_settings
.v1p05_supported_voltage_bitmap
=
46 config
->ext_fivr_settings
.vnn_supported_voltage_bitmap
=
47 FIVR_VOLTAGE_MIN_ACTIVE
;
48 config
->ext_fivr_settings
.v1p05_voltage_mv
= 1050;
49 config
->ext_fivr_settings
.vnn_voltage_mv
= 780;
50 config
->ext_fivr_settings
.vnn_sx_voltage_mv
= 1050;
51 config
->ext_fivr_settings
.v1p05_icc_max_ma
= 500;
52 config
->ext_fivr_settings
.vnn_icc_max_ma
= 500;
53 printk(BIOS_INFO
, "Configured External FIVR\n");
57 void variant_devtree_update(void)
59 struct device
*emmc
= DEV_PTR(emmc
);
60 struct device
*ufs
= DEV_PTR(ufs
);
61 struct device
*ish
= DEV_PTR(ish
);
63 if (!fw_config_is_provisioned()) {
64 printk(BIOS_INFO
, "fw_config unprovisioned so enable all storage devices\n");
68 if (!fw_config_probe(FW_CONFIG(STORAGE
, STORAGE_EMMC
))) {
69 printk(BIOS_INFO
, "eMMC disabled by fw_config\n");
73 if (!fw_config_probe(FW_CONFIG(STORAGE
, STORAGE_UFS
))) {
74 printk(BIOS_INFO
, "UFS disabled by fw_config\n");