aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/tigerlake/fsp_params.c
diff options
context:
space:
mode:
authorShaunak Saha <shaunak.saha@intel.com>2020-06-08 18:59:47 -0700
committerPatrick Georgi <pgeorgi@google.com>2020-07-15 08:40:25 +0000
commit1a8949c0c430f6caf7ab67b0ccbca6d3ead0d486 (patch)
tree8886155185bd62ba2c0d9c4c4bcf37758ad70577 /src/soc/intel/tigerlake/fsp_params.c
parent742abd3daf6be57de2df5002b8985ad36884c959 (diff)
soc/intel/tigerlake: Hook up SATA Port Enable DITO UPDs
SataPortsEnableDitoConfig Enable DEVSLP Idle Timeout settings DmVal and DitoVal. SataPortsDmVal and SataPortsDitoVal helps to determine when to enter Device Sleep. Device Sleep enables the host bus adapter (HBA) to assert the DEVSLP signal as soon as there are no commands outstanding to the device and the port specific Device Sleep idle timer has expired. Device Sleep Idle Timeout values (PxDEVSLP.DITO and PxDEVSLP.DM) are port specific timeout values used by the HBA for determining when to assert the DEVSLP signal. They provides a mechanism for the HBA to apply a programmable amount of hysteresis so as to prevent the HBA from asserting the DEVSLP signal too quickly which may result in undesirable latencies. This patch is created based on Intel Tiger Lake Processor PCH Datasheet with Document number:575857 and Chapter number:12. * PxDEVSLP.DM -> SataPortsDmVal: Enable SATA Port DmVal DITO multiplier. Default is 15. * PxDEVSLP.DITO -> SataPortsDitoVal: Enable SATA Port DmVal DEVSLP Idle Timeout (DITO), Default is 625ms. BUG=b:151163106 BRANCH=None TEST=Build and boot volteer and TGL RVP. Signed-off-by: Shaunak Saha <shaunak.saha@intel.com> Change-Id: I6a824524738a9e0609f54bea9d892b4a42a1d3db Reviewed-on: https://review.coreboot.org/c/coreboot/+/42214 Reviewed-by: Wonkyu Kim <wonkyu.kim@intel.com> Reviewed-by: Caveh Jalali <caveh@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/tigerlake/fsp_params.c')
-rw-r--r--src/soc/intel/tigerlake/fsp_params.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/soc/intel/tigerlake/fsp_params.c b/src/soc/intel/tigerlake/fsp_params.c
index 3187a33eaf..798c16a425 100644
--- a/src/soc/intel/tigerlake/fsp_params.c
+++ b/src/soc/intel/tigerlake/fsp_params.c
@@ -24,6 +24,10 @@
#define THC_0 1
#define THC_1 2
+/* SATA DEVSLP idle timeout default values */
+#define DEF_DMVAL 15
+#define DEF_DITOVAL 625
+
/*
* Chip config parameter PcieRpL1Substates uses (UPD value + 1)
* because UPD value of 0 for PcieRpL1Substates means disabled for FSP.
@@ -212,6 +216,26 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd)
params->PchPwrOptEnable = !(config->DmiPwrOptimizeDisable);
params->SataPwrOptEnable = !(config->SataPwrOptimizeDisable);
+ /*
+ * Enable DEVSLP Idle Timeout settings DmVal and DitoVal.
+ * SataPortsDmVal is the DITO multiplier. Default is 15.
+ * SataPortsDitoVal is the DEVSLP Idle Timeout (DITO), Default is 625ms.
+ * The default values can be changed from devicetree.
+ */
+ for (i = 0; i < ARRAY_SIZE(config->SataPortsEnableDitoConfig); i++) {
+ if (config->SataPortsEnableDitoConfig[i]) {
+ if (config->SataPortsDmVal[i])
+ params->SataPortsDmVal[i] = config->SataPortsDmVal[i];
+ else
+ params->SataPortsDmVal[i] = DEF_DMVAL;
+
+ if (config->SataPortsDitoVal[i])
+ params->SataPortsDitoVal[i] = config->SataPortsDitoVal[i];
+ else
+ params->SataPortsDitoVal[i] = DEF_DITOVAL;
+ }
+ }
+
/* Enable TCPU for processor thermal control */
params->Device4Enable = config->Device4Enable;