Nick Vaccaro has submitted this change. ( https://review.coreboot.org/c/coreboot/+/62629 )
Change subject: soc/intel/alderlake: Allow mainboard to configure c1-state auto-demotion ......................................................................
soc/intel/alderlake: Allow mainboard to configure c1-state auto-demotion
FSP has a parameter to enable/disable c1-state autodemotion feature. Boards/Baseboard can choose to use this feature as per requirement.
This patch hooks up this parameter to 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62629 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Nick Vaccaro nvaccaro@google.com --- M src/soc/intel/alderlake/chip.h M src/soc/intel/alderlake/fsp_params.c 2 files changed, 8 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Nick Vaccaro: Looks good to me, approved
diff --git a/src/soc/intel/alderlake/chip.h b/src/soc/intel/alderlake/chip.h index e7e2f20..a69e645 100644 --- a/src/soc/intel/alderlake/chip.h +++ b/src/soc/intel/alderlake/chip.h @@ -560,6 +560,12 @@ /* Energy-Performance Preference (HWP feature) */ bool enable_energy_perf_pref; uint8_t energy_perf_pref_value; + + /* + * Enable or Disable C1 Cstate Demotion. + * Default 0. Set this to 1 in order to disable C state demotion. + */ + bool disable_c1_state_auto_demotion; };
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 90ecf86..f0e0ac2 100644 --- a/src/soc/intel/alderlake/fsp_params.c +++ b/src/soc/intel/alderlake/fsp_params.c @@ -717,6 +717,8 @@ /* PsysPmax is in unit of 1/8 Watt */ s_cfg->PsysPmax = config->platform_pmax * 8; } + + s_cfg->C1StateAutoDemotion = !config->disable_c1_state_auto_demotion; }
static void fill_fsps_irq_params(FSP_S_CONFIG *s_cfg,