1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <baseboard/variants.h>
4 #include <console/console.h>
5 #include <device/device.h>
6 #include <device/pci.h>
7 #include <drivers/intel/dptf/chip.h>
9 #include <soc/bootblock.h>
13 WEAK_DEV_PTR(dptf_policy
);
15 static void update_oem_variables(void)
17 const struct device
*policy_dev
= DEV_PTR(dptf_policy
);
18 struct drivers_intel_dptf_config
*config
= policy_dev
->chip_info
;
20 if (fw_config_probe(FW_CONFIG(THERMAL
, THERMAL_FANLESS
))) {
21 config
->oem_data
.oem_variables
[0] = 0;
22 config
->oem_data
.oem_variables
[1] = 1;
23 printk(BIOS_INFO
, "Set OEM Variable [0] to 0.\n");
24 printk(BIOS_INFO
, "Set OEM Variable [1] to 1.\n");
27 if (fw_config_probe(FW_CONFIG(THERMAL
, THERMAL_FAN
))) {
28 config
->oem_data
.oem_variables
[0] = 1;
29 config
->oem_data
.oem_variables
[1] = 0;
30 printk(BIOS_INFO
, "Set OEM Variable [0] to 1.\n");
31 printk(BIOS_INFO
, "Set OEM Variable [1] to 0.\n");
35 const char *get_wifi_sar_cbfs_filename(void)
37 return get_wifi_sar_fw_config_filename(FW_CONFIG_FIELD(WIFI_SAR_ID
));
40 void variant_devtree_update(void)
42 struct device
*emmc
= DEV_PTR(emmc
);
43 struct device
*ufs
= DEV_PTR(ufs
);
44 struct device
*ish
= DEV_PTR(ish
);
46 update_oem_variables();
48 if (!fw_config_is_provisioned()) {
49 printk(BIOS_INFO
, "fw_config unprovisioned so enable all storage devices\n");
53 if (!fw_config_probe(FW_CONFIG(STORAGE
, STORAGE_EMMC
))) {
54 printk(BIOS_INFO
, "eMMC disabled by fw_config\n");
58 if (!fw_config_probe(FW_CONFIG(STORAGE
, STORAGE_UFS
))) {
59 printk(BIOS_INFO
, "UFS disabled by fw_config\n");