summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
authorGaggery Tsai <gaggery.tsai@intel.com>2022-09-08 13:42:08 -0700
committerMartin Roth <martin.roth@amd.corp-partner.google.com>2022-09-20 08:00:18 +0000
commit517c5a8c547b4ea330d40e16edc3fe6e849505a0 (patch)
tree4b02a3b6b812a92899ba2faafe91ee07e0ab812b /src/soc/intel
parent7125318ac454b5e60cfadbe375ce6b8e97706b20 (diff)
soc/intel/alderlake: Add power state thresholds
This patch adds power state 1/2/3 threshold setting interfaces and pass the settings to FSP. BUG=b:229803757 BRANCH=None TEST=Add psi1threshold and psi2threshold to overridetree.cb and enable FSP log to ensure the settings are incorrect. Signed-off-by: Gaggery Tsai <gaggery.tsai@intel.com> Change-Id: I0330ede4394ebc2d3d32e4b78297c3cb328660d6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/67463 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/alderlake/include/soc/vr_config.h6
-rw-r--r--src/soc/intel/alderlake/vr_config.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/src/soc/intel/alderlake/include/soc/vr_config.h b/src/soc/intel/alderlake/include/soc/vr_config.h
index 3bf3c4adca..316abc0dd2 100644
--- a/src/soc/intel/alderlake/include/soc/vr_config.h
+++ b/src/soc/intel/alderlake/include/soc/vr_config.h
@@ -28,6 +28,12 @@ struct vr_config {
/* Thermal Design Current current limit.
Defined in 1/8A units and range is 0-4095. 1000 = 125A. */
uint16_t tdc_currentlimit;
+
+ /* Power State 1/2/3 Threshold Current.
+ Defined in 1/4A units and range is 0-128A */
+ uint16_t psi1threshold;
+ uint16_t psi2threshold;
+ uint16_t psi3threshold;
};
#define VR_CFG_AMP(i) (uint16_t)((i) * 4)
diff --git a/src/soc/intel/alderlake/vr_config.c b/src/soc/intel/alderlake/vr_config.c
index 1a6c6bd4ff..159f4514bd 100644
--- a/src/soc/intel/alderlake/vr_config.c
+++ b/src/soc/intel/alderlake/vr_config.c
@@ -272,6 +272,12 @@ void fill_vr_domain_config(FSP_S_CONFIG *s_cfg,
s_cfg->DcLoadline[domain] = cfg->dc_loadline;
if (cfg->icc_max)
s_cfg->IccMax[domain] = cfg->icc_max;
+ if (cfg->psi1threshold)
+ s_cfg->Psi1Threshold[domain] = cfg->psi1threshold;
+ if (cfg->psi2threshold)
+ s_cfg->Psi2Threshold[domain] = cfg->psi2threshold;
+ if (cfg->psi3threshold)
+ s_cfg->Psi3Threshold[domain] = cfg->psi3threshold;
s_cfg->TdcTimeWindow[domain] = cfg->tdc_timewindow;
s_cfg->TdcCurrentLimit[domain] = cfg->tdc_currentlimit;
} else {