summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2019-12-09 08:56:39 +0100
committerPatrick Rudolph <siro@das-labor.org>2019-12-25 09:40:00 +0000
commitb824f7dbae82f9dba336b2f29f2f9ed9b3e617aa (patch)
tree46aff7c255e875718fc2451046a8fa5a2e4ba957
parentd33b02e7f3323e94bc093edebf0bb430c9676de6 (diff)
downloadcoreboot-b824f7dbae82f9dba336b2f29f2f9ed9b3e617aa.tar.xz
soc/intel/skylake/vr_config: Use lookup table by default
If the board doesn't provide VRconfig in devicetree make sure to use the lookup table for IccMax instead of defaults for some mobile SoC. Also use decimal values instead of hex. Change-Id: If31063f9b483a3bbd6cc90df1c1b76b4efc66445 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37598 Reviewed-by: Maxim Polyakov <max.senia.poliak@gmail.com> Reviewed-by: Michael Niewöhner Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--src/soc/intel/skylake/vr_config.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/soc/intel/skylake/vr_config.c b/src/soc/intel/skylake/vr_config.c
index 54dfd31ebe..9a4ddd899a 100644
--- a/src/soc/intel/skylake/vr_config.c
+++ b/src/soc/intel/skylake/vr_config.c
@@ -31,9 +31,9 @@ static const struct vr_config default_configs[NUM_VR_DOMAINS] = {
.psi3threshold = VR_CFG_AMP(1),
.psi3enable = 0,
.psi4enable = 0,
- .imon_slope = 0x0,
- .imon_offset = 0x0,
- .icc_max = VR_CFG_AMP(7),
+ .imon_slope = 0,
+ .imon_offset = 0,
+ .icc_max = 0,
.voltage_limit = 1520,
},
[VR_IA_CORE] = {
@@ -43,9 +43,9 @@ static const struct vr_config default_configs[NUM_VR_DOMAINS] = {
.psi3threshold = VR_CFG_AMP(1),
.psi3enable = 0,
.psi4enable = 0,
- .imon_slope = 0x0,
- .imon_offset = 0x0,
- .icc_max = VR_CFG_AMP(34),
+ .imon_slope = 0,
+ .imon_offset = 0,
+ .icc_max = 0,
.voltage_limit = 1520,
},
[VR_GT_UNSLICED] = {
@@ -55,9 +55,9 @@ static const struct vr_config default_configs[NUM_VR_DOMAINS] = {
.psi3threshold = VR_CFG_AMP(1),
.psi3enable = 0,
.psi4enable = 0,
- .imon_slope = 0x0,
- .imon_offset = 0x0,
- .icc_max = VR_CFG_AMP(35),
+ .imon_slope = 0,
+ .imon_offset = 0,
+ .icc_max = 0,
.voltage_limit = 1520,
},
[VR_GT_SLICED] = {
@@ -67,9 +67,9 @@ static const struct vr_config default_configs[NUM_VR_DOMAINS] = {
.psi3threshold = VR_CFG_AMP(1),
.psi3enable = 0,
.psi4enable = 0,
- .imon_slope = 0x0,
- .imon_offset = 0x0,
- .icc_max = VR_CFG_AMP(35),
+ .imon_slope = 0,
+ .imon_offset = 0,
+ .icc_max = 0,
.voltage_limit = 1520,
},
};
@@ -334,6 +334,7 @@ void fill_vr_domain_config(void *params,
vr_params->Psi4Enable[domain] = cfg->psi4enable;
vr_params->ImonSlope[domain] = cfg->imon_slope;
vr_params->ImonOffset[domain] = cfg->imon_offset;
+
/* If board provided non-zero value, use it. */
if (cfg->icc_max)
vr_params->IccMax[domain] = cfg->icc_max;