From f6f1258673d4c2382e3014904563380c13f4eeec Mon Sep 17 00:00:00 2001 From: Bora Guvendik Date: Thu, 2 Sep 2021 13:23:03 -0700 Subject: soc/intel/alderlake: Allow devicetree override to leave some VR settings as default Allow devicetree override to leave ac_loadline, dc_loadline and icc_max as default. Test=Boot to OS Signed-off-by: Bora Guvendik Change-Id: I715345d5ea83aed9ee929b2a4e13921c9d8895b1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58807 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak --- src/soc/intel/alderlake/vr_config.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/soc') diff --git a/src/soc/intel/alderlake/vr_config.c b/src/soc/intel/alderlake/vr_config.c index 2180fc5c8f..99caacbc41 100644 --- a/src/soc/intel/alderlake/vr_config.c +++ b/src/soc/intel/alderlake/vr_config.c @@ -87,9 +87,12 @@ void fill_vr_domain_config(FSP_S_CONFIG *s_cfg, if (chip_cfg->vr_config_enable) { cfg = chip_cfg; - s_cfg->AcLoadline[domain] = cfg->ac_loadline; - s_cfg->DcLoadline[domain] = cfg->dc_loadline; - s_cfg->IccMax[domain] = cfg->icc_max; + if (cfg->ac_loadline) + s_cfg->AcLoadline[domain] = cfg->ac_loadline; + if (cfg->dc_loadline) + s_cfg->DcLoadline[domain] = cfg->dc_loadline; + if (cfg->icc_max) + s_cfg->IccMax[domain] = cfg->icc_max; s_cfg->TdcTimeWindow[domain] = cfg->tdc_timewindow; s_cfg->TdcCurrentLimit[domain] = cfg->tdc_currentlimit; } else { -- cgit v1.2.3