summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMAULIK V VAGHELA <maulik.v.vaghela@intel.com>2022-03-03 13:07:57 +0530
committerNick Vaccaro <nvaccaro@google.com>2022-03-15 18:11:16 +0000
commit99356386a6e4f976c0070723611fd9f7a286ba3e (patch)
treec2b064f534ce66054a178b019578b9a67bf7ea97 /src
parent215a97ee1c4cd87b266d63e32bf0b379e18fe849 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/soc/intel/alderlake/chip.h6
-rw-r--r--src/soc/intel/alderlake/fsp_params.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/soc/intel/alderlake/chip.h b/src/soc/intel/alderlake/chip.h
index e7e2f20805..a69e6455ee 100644
--- a/src/soc/intel/alderlake/chip.h
+++ b/src/soc/intel/alderlake/chip.h
@@ -560,6 +560,12 @@ struct soc_intel_alderlake_config {
/* 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 90ecf86d05..f0e0ac2c6f 100644
--- a/src/soc/intel/alderlake/fsp_params.c
+++ b/src/soc/intel/alderlake/fsp_params.c
@@ -717,6 +717,8 @@ static void fill_fsps_misc_power_params(FSP_S_CONFIG *s_cfg,
/* 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,