From 4be8d9e80debf56f8ee7998dd4f7f22a65384a04 Mon Sep 17 00:00:00 2001 From: V Sowmya Date: Tue, 5 Jul 2022 20:49:57 +0530 Subject: soc/intel/adl: Add support to configure package c-state demotion This patch adds the support to enable/disable package c-state demotion feature from the devicetree based on mainboard requirement. BUG=b:235005582 TEST=Build and boot to verify that the right value has been passed to the FSP. Signed-off-by: V Sowmya Change-Id: I9e254988bc3d20b9f9e42a605cc0ebd419ab49ad Reviewed-on: https://review.coreboot.org/c/coreboot/+/65663 Tested-by: build bot (Jenkins) Reviewed-by: Varshit B Pandya Reviewed-by: Reka Norman Reviewed-by: Eric Lai Reviewed-by: Kangheui Won Reviewed-by: Subrata Banik --- src/soc/intel/alderlake/chip.h | 7 +++++++ src/soc/intel/alderlake/fsp_params.c | 2 ++ 2 files changed, 9 insertions(+) (limited to 'src/soc') diff --git a/src/soc/intel/alderlake/chip.h b/src/soc/intel/alderlake/chip.h index d01dc73dea..c4de08f75c 100644 --- a/src/soc/intel/alderlake/chip.h +++ b/src/soc/intel/alderlake/chip.h @@ -614,6 +614,13 @@ struct soc_intel_alderlake_config { * Workaround for Intel TA# 723158 to prevent possible display flicker. */ bool usb2_phy_sus_pg_disable; + + /* + * Enable or Disable Package C-state Demotion. + * Default is set to 0. + * Set this to 1 in order to disable Package C-state demotion. + */ + bool disable_package_c_state_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 17d0c763fd..cbc7471115 100644 --- a/src/soc/intel/alderlake/fsp_params.c +++ b/src/soc/intel/alderlake/fsp_params.c @@ -965,6 +965,8 @@ static void fill_fsps_misc_power_params(FSP_S_CONFIG *s_cfg, s_cfg->C1StateAutoDemotion = !config->disable_c1_state_auto_demotion; s_cfg->VrPowerDeliveryDesign = config->vr_power_delivery_design; + + s_cfg->PkgCStateDemotion = !config->disable_package_c_state_demotion; } static void fill_fsps_irq_params(FSP_S_CONFIG *s_cfg, -- cgit v1.2.3