summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2017-03-14 16:40:06 -0700
committerDuncan Laurie <dlaurie@chromium.org>2017-03-15 19:45:55 +0100
commit86db46987176b6e78852d62042046e4af458e71a (patch)
tree997918d0a0efd51d82ef969e5eed2b14dcc7f474
parent4fa8a6f4fefe04eaa1579c03d36abf0fbc9a27f7 (diff)
intel/skylake: Support for setting AC/DC loadline
Add options to set the AC and DC loadline values for each supported VR type so these can be tuned on a per-board basis in devicetree.cb. BUG=b:36228330 BRANCH=none TEST=Build and boot on Eve and check debug FSP output to ensure that it is applying the provided loadline values Change-Id: I2a5533d2c9fd86351c86584e3738e80ac4c1f915 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://review.coreboot.org/18819 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins)
-rw-r--r--src/soc/intel/skylake/include/soc/vr_config.h4
-rw-r--r--src/soc/intel/skylake/vr_config.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/src/soc/intel/skylake/include/soc/vr_config.h b/src/soc/intel/skylake/include/soc/vr_config.h
index 27d84b2629..66b4a01ad4 100644
--- a/src/soc/intel/skylake/include/soc/vr_config.h
+++ b/src/soc/intel/skylake/include/soc/vr_config.h
@@ -61,6 +61,10 @@ struct vr_config {
/* VR Voltage Limit. Range is 0-7999mV */
int voltage_limit;
+
+ /* AC and DC Loadline in 1/100 mOhms. Range is 0-6249 */
+ int ac_loadline;
+ int dc_loadline;
};
#define VR_CFG_AMP(i) ((i) * 4)
diff --git a/src/soc/intel/skylake/vr_config.c b/src/soc/intel/skylake/vr_config.c
index 36c2f1f403..cfbd796584 100644
--- a/src/soc/intel/skylake/vr_config.c
+++ b/src/soc/intel/skylake/vr_config.c
@@ -109,4 +109,9 @@ void fill_vr_domain_config(void *params,
vr_params->ImonOffset[domain] = cfg->imon_offset;
vr_params->IccMax[domain] = cfg->icc_max;
vr_params->VrVoltageLimit[domain] = cfg->voltage_limit;
+
+#if IS_ENABLED(CONFIG_PLATFORM_USES_FSP2_0)
+ vr_params->AcLoadline[domain] = cfg->ac_loadline;
+ vr_params->DcLoadline[domain] = cfg->dc_loadline;
+#endif
}