diff options
Diffstat (limited to 'src/mainboard/google/brya')
-rw-r--r-- | src/mainboard/google/brya/variants/joxer/overridetree.cb | 24 | ||||
-rw-r--r-- | src/mainboard/google/brya/variants/joxer/variant.c | 26 |
2 files changed, 42 insertions, 8 deletions
diff --git a/src/mainboard/google/brya/variants/joxer/overridetree.cb b/src/mainboard/google/brya/variants/joxer/overridetree.cb index bab93f6434..f5118b7e6e 100644 --- a/src/mainboard/google/brya/variants/joxer/overridetree.cb +++ b/src/mainboard/google/brya/variants/joxer/overridetree.cb @@ -1,4 +1,8 @@ fw_config + field THERMAL 2 2 + option THERMAL_FANLESS 0 + option THERMAL_FAN 1 + end field WIFI_SAR_ID 6 6 option WIFI_GFP2_SAR_ID_0 0 option WIFI_GFP2_SAR_ID_1 1 @@ -88,22 +92,22 @@ chip soc/intel/alderlake ## Passive Policy register "policies.passive" = "{ [0] = DPTF_PASSIVE(CPU, CPU, 95, 5000), - [1] = DPTF_PASSIVE(CPU, TEMP_SENSOR_0, 75, 5000), - [2] = DPTF_PASSIVE(CHARGER, TEMP_SENSOR_1, 75, 5000), - [3] = DPTF_PASSIVE(CPU, TEMP_SENSOR_2, 75, 5000), + [1] = DPTF_PASSIVE(CPU, TEMP_SENSOR_0, 65, 5000), + [2] = DPTF_PASSIVE(CHARGER, TEMP_SENSOR_1, 65, 5000), + [3] = DPTF_PASSIVE(CPU, TEMP_SENSOR_2, 65, 5000), }" ## Critical Policy register "policies.critical" = "{ [0] = DPTF_CRITICAL(CPU, 105, SHUTDOWN), - [1] = DPTF_CRITICAL(TEMP_SENSOR_0, 85, SHUTDOWN), - [2] = DPTF_CRITICAL(TEMP_SENSOR_1, 85, SHUTDOWN), - [3] = DPTF_CRITICAL(TEMP_SENSOR_2, 85, SHUTDOWN), + [1] = DPTF_CRITICAL(TEMP_SENSOR_0, 75, SHUTDOWN), + [2] = DPTF_CRITICAL(TEMP_SENSOR_1, 75, SHUTDOWN), + [3] = DPTF_CRITICAL(TEMP_SENSOR_2, 75, SHUTDOWN), }" register "controls.power_limits" = "{ .pl1 = { - .min_power = 3000, + .min_power = 6000, .max_power = 6000, .time_window_min = 28 * MSECS_PER_SEC, .time_window_max = 32 * MSECS_PER_SEC, @@ -126,7 +130,11 @@ chip soc/intel/alderlake [3] = { 8, 500 } }" - device generic 0 on end + register "oem_data.oem_variables" = "{ + [1] = 0x1 + }" + + device generic 0 alias dptf_policy on end end end device ref i2c1 on diff --git a/src/mainboard/google/brya/variants/joxer/variant.c b/src/mainboard/google/brya/variants/joxer/variant.c index 3c23dd1ab6..e371ada63d 100644 --- a/src/mainboard/google/brya/variants/joxer/variant.c +++ b/src/mainboard/google/brya/variants/joxer/variant.c @@ -3,10 +3,34 @@ #include <baseboard/variants.h> #include <console/console.h> #include <device/device.h> +#include <device/pci.h> +#include <drivers/intel/dptf/chip.h> #include <fw_config.h> #include <soc/bootblock.h> #include <sar.h> +WEAK_DEV_PTR(dptf_policy); + +static void update_oem_variables(void) +{ + const struct device *policy_dev = DEV_PTR(dptf_policy); + struct drivers_intel_dptf_config *config = policy_dev->chip_info; + + if (fw_config_probe(FW_CONFIG(THERMAL, THERMAL_FANLESS))) { + config->oem_data.oem_variables[0] = 0; + config->oem_data.oem_variables[1] = 1; + printk(BIOS_INFO, "Set OEM Variable [0] to 0.\n"); + printk(BIOS_INFO, "Set OEM Variable [1] to 1.\n"); + } + + if (fw_config_probe(FW_CONFIG(THERMAL, THERMAL_FAN))) { + config->oem_data.oem_variables[0] = 1; + config->oem_data.oem_variables[1] = 0; + printk(BIOS_INFO, "Set OEM Variable [0] to 1.\n"); + printk(BIOS_INFO, "Set OEM Variable [1] to 0.\n"); + } +} + const char *get_wifi_sar_cbfs_filename(void) { return get_wifi_sar_fw_config_filename(FW_CONFIG_FIELD(WIFI_SAR_ID)); @@ -18,6 +42,8 @@ void variant_devtree_update(void) struct device *ufs = DEV_PTR(ufs); struct device *ish = DEV_PTR(ish); + update_oem_variables(); + if (!fw_config_is_provisioned()) { printk(BIOS_INFO, "fw_config unprovisioned so enable all storage devices\n"); return; |