skylake,kabylake: Add support to set eMMC tuning param from dev tree

Add support to set eMMC tuning params from the device tree so that it
can be configured per board.

BUG=b:112718426,b:112690628
BRANCH=none
TEST=Build nocturne image and checked values passed in dev tree is set
by FSP.

Change-Id: Ic71934dce9a1c380a057e579ca3fda41983b9385
Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com>
Reviewed-on: https://review.coreboot.org/28274
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
This commit is contained in:
Pratik Prajapati 2018-08-22 18:58:38 -07:00 committed by Duncan Laurie
parent a5fbd140d0
commit e072247e6e
2 changed files with 12 additions and 0 deletions

View File

@ -291,6 +291,9 @@ struct soc_intel_skylake_config {
u8 ScsEmmcEnabled; u8 ScsEmmcEnabled;
u8 ScsEmmcHs400Enabled; u8 ScsEmmcHs400Enabled;
u8 ScsSdCardEnabled; u8 ScsSdCardEnabled;
u8 EmmcHs400DllNeed;
u8 ScsEmmcHs400RxStrobeDll1;
u8 ScsEmmcHs400TxDataDll;
u8 PttSwitch; u8 PttSwitch;
u8 HeciTimeouts; u8 HeciTimeouts;

View File

@ -336,6 +336,15 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd)
params->ScsEmmcHs400Enabled = config->ScsEmmcHs400Enabled; params->ScsEmmcHs400Enabled = config->ScsEmmcHs400Enabled;
params->ScsSdCardEnabled = config->ScsSdCardEnabled; params->ScsSdCardEnabled = config->ScsSdCardEnabled;
if (!!params->ScsEmmcHs400Enabled && !!config->EmmcHs400DllNeed) {
params->PchScsEmmcHs400DllDataValid =
!!config->EmmcHs400DllNeed;
params->PchScsEmmcHs400RxStrobeDll1 =
config->ScsEmmcHs400RxStrobeDll1;
params->PchScsEmmcHs400TxDataDll =
config->ScsEmmcHs400TxDataDll;
}
/* If ISH is enabled, enable ISH elements */ /* If ISH is enabled, enable ISH elements */
dev = dev_find_slot(0, PCH_DEVFN_ISH); dev = dev_find_slot(0, PCH_DEVFN_ISH);
if (dev) if (dev)