summaryrefslogtreecommitdiff
path: root/src/soc/intel/cannonlake/include
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2019-12-04 13:51:00 +0100
committerPhilipp Deppenwiese <zaolin.daisuki@gmail.com>2020-01-06 10:06:37 +0000
commit9b5447b7819ac99ffc3787f2ecb0c4428eea8055 (patch)
tree005e2fe27b223086c470ebaf4e5a1b97864a448f /src/soc/intel/cannonlake/include
parent26e2eeb2767db4ab7a7e197696c7e3e77a4f27c1 (diff)
downloadcoreboot-9b5447b7819ac99ffc3787f2ecb0c4428eea8055.tar.xz
soc/intel/cannonlake: Add VR config for CFL, CNL and WHL
Add VR config IccMax, DC and AC loadline defaults and voltage regulator maximum for all CFL, CNL and WHL. This supports mainboards with replaceable CPUs and provides sane defaults for boards that are missing the devicetree overwrite. Remove the default IccMax to make use of the introduced lookup-table. Also change some hex values to decimal. I couldn't find CML datasheet, so those are left out for now. Used Doc #337344 and #338023 Section 7. Change-Id: I1d2e174157d468830cc0baf2a2d8295ef61a1a63 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37466 Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/cannonlake/include')
-rw-r--r--src/soc/intel/cannonlake/include/soc/vr_config.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/soc/intel/cannonlake/include/soc/vr_config.h b/src/soc/intel/cannonlake/include/soc/vr_config.h
index 8bcf001ea9..1390b174e1 100644
--- a/src/soc/intel/cannonlake/include/soc/vr_config.h
+++ b/src/soc/intel/cannonlake/include/soc/vr_config.h
@@ -55,7 +55,8 @@ struct vr_config {
uint16_t dc_loadline;
};
-#define VR_CFG_AMP(i) ((i) * 4)
+#define VR_CFG_AMP(i) (uint16_t)((i) * 4)
+#define VR_CFG_MOHMS(i) (uint16_t)((i) * 100)
/* VrConfig Settings for 4 domains
* 0 = System Agent, 1 = IA Core,
@@ -68,6 +69,22 @@ enum vr_domain {
NUM_VR_DOMAINS
};
+#define VR_CFG_ALL_DOMAINS_ICC(sa, ia, gt_unsl, gt_sl) \
+ { \
+ [VR_SYSTEM_AGENT] = VR_CFG_AMP(sa), \
+ [VR_IA_CORE] = VR_CFG_AMP(ia), \
+ [VR_GT_UNSLICED] = VR_CFG_AMP(gt_unsl), \
+ [VR_GT_SLICED] = VR_CFG_AMP(gt_sl), \
+ }
+
+#define VR_CFG_ALL_DOMAINS_LOADLINE(sa, ia, gt_unsl, gt_sl) \
+ { \
+ [VR_SYSTEM_AGENT] = VR_CFG_MOHMS(sa), \
+ [VR_IA_CORE] = VR_CFG_MOHMS(ia), \
+ [VR_GT_UNSLICED] = VR_CFG_MOHMS(gt_unsl), \
+ [VR_GT_SLICED] = VR_CFG_MOHMS(gt_sl), \
+ }
+
void fill_vr_domain_config(void *params,
int domain, const struct vr_config *cfg);