From 8fcefd3f6f4991f3b6037f389e0252895a3ec03f Mon Sep 17 00:00:00 2001 From: Casper Chang Date: Wed, 22 Sep 2021 22:35:54 -0400 Subject: [PATCH] soc/intel/alderlake: add MaxDramSpeed config This change add MaxDramSpeed for variants usage to config dram speed. Signed-off-by: Casper Chang Change-Id: Iba0fae0ab4ff0121dc63af792458492eeb21ec2b Reviewed-on: https://review.coreboot.org/c/coreboot/+/57866 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak --- src/soc/intel/alderlake/chip.h | 2 ++ src/soc/intel/alderlake/romstage/fsp_params.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/soc/intel/alderlake/chip.h b/src/soc/intel/alderlake/chip.h index 5f556c8e96..b9be02bf1d 100644 --- a/src/soc/intel/alderlake/chip.h +++ b/src/soc/intel/alderlake/chip.h @@ -436,6 +436,8 @@ struct soc_intel_alderlake_config { * 0 = VR_DOMAIN_IA Core 1 = VR_DOMAIN_GT. */ struct vr_config domain_vr_config[NUM_VR_DOMAINS]; + + uint16_t MaxDramSpeed; }; typedef struct soc_intel_alderlake_config config_t; diff --git a/src/soc/intel/alderlake/romstage/fsp_params.c b/src/soc/intel/alderlake/romstage/fsp_params.c index 2d0f6daef4..698cff67ce 100644 --- a/src/soc/intel/alderlake/romstage/fsp_params.c +++ b/src/soc/intel/alderlake/romstage/fsp_params.c @@ -136,6 +136,8 @@ static void fill_fspm_mrc_params(FSP_M_CONFIG *m_cfg, { m_cfg->SaGv = config->SaGv; m_cfg->RMT = config->RMT; + if (config->MaxDramSpeed) + m_cfg->DdrFreqLimit = config->MaxDramSpeed; } static void fill_fspm_cpu_params(FSP_M_CONFIG *m_cfg,