Maulik V Vaghela has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/62629 )
Change subject: soc/intel/alder lake: Allow mainboard to configure C state auto-demotion ......................................................................
soc/intel/alder lake: Allow mainboard to configure C state auto-demotion
FSP has parameter to enable/disable C1 state autodemotion feature. Boards/Baseboard can choose to use this feature as per requirement.
This patch enables mainboard to configure the feature from devicetree
BUG=b:221876248 BRANCH=firmware-brya-14505.B TEST=Check code compiles and correct value has been passed to FSP.
Change-Id: I2d7839d8fecd7b5403f52f3926d1d0bc06728ed9 Signed-off-by: MAULIK V VAGHELA maulik.v.vaghela@intel.com --- M src/soc/intel/alderlake/chip.h M src/soc/intel/alderlake/fsp_params.c 2 files changed, 9 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/29/62629/1
diff --git a/src/soc/intel/alderlake/chip.h b/src/soc/intel/alderlake/chip.h index aad45df..dc10b31 100644 --- a/src/soc/intel/alderlake/chip.h +++ b/src/soc/intel/alderlake/chip.h @@ -564,6 +564,12 @@ * Default 0. Setting this to 1 enable CNVi DDR RFIM. */ bool CnviDdrRfim; + + /* + * Enable or Disable C1 Cstate Demotion. + * Default 0. Set this to 1 in order to disable C state demotion. + */ + bool DisableC1StateAutoDemotion; };
typedef struct soc_intel_alderlake_config config_t; diff --git a/src/soc/intel/alderlake/fsp_params.c b/src/soc/intel/alderlake/fsp_params.c index dac3693..3e5af3f 100644 --- a/src/soc/intel/alderlake/fsp_params.c +++ b/src/soc/intel/alderlake/fsp_params.c @@ -717,6 +717,9 @@ /* PsysPmax is in unit of 1/8 Watt */ s_cfg->PsysPmax = config->PsysPmax * 8; } + + /* Program C state auto-demotion */ + s_cfg->C1StateAutoDemotion = !config->DisableC1StateAutoDemotion; }
static void fill_fsps_irq_params(FSP_S_CONFIG *s_cfg,