diff options
author | Subrata Banik <subratabanik@google.com> | 2023-11-28 20:36:45 +0530 |
---|---|---|
committer | Subrata Banik <subratabanik@google.com> | 2023-12-20 04:25:18 +0000 |
commit | 26fdb062a7fb38a64fbbbb68a002abd3fda617e2 (patch) | |
tree | d991bd1e31f55165d56d6063944168a4acbda702 /src/soc/intel/meteorlake | |
parent | 93902072e5fd0a0d925f04c79e1546ddedce2bc8 (diff) |
soc/intel/meteorlake: Add Acoustic Noise Mitigation UPDs
This patch allows to override acoustic noise mitigation FSP UPDs:
- AcousticNoiseMitigation
- FastPkgCRampDisable
- SlowSlewRate
BUG=b:312405633
TEST=Able to override the acoustic noise UPDs.
Change-Id: I5295e6571121c92f363e6fd4bcb3c8335c4fedee
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79302
Reviewed-by: YH Lin <yueherngl@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Diffstat (limited to 'src/soc/intel/meteorlake')
-rw-r--r-- | src/soc/intel/meteorlake/chip.h | 26 | ||||
-rw-r--r-- | src/soc/intel/meteorlake/romstage/fsp_params.c | 15 |
2 files changed, 41 insertions, 0 deletions
diff --git a/src/soc/intel/meteorlake/chip.h b/src/soc/intel/meteorlake/chip.h index 59b6a8b8a2..cfef3c1b51 100644 --- a/src/soc/intel/meteorlake/chip.h +++ b/src/soc/intel/meteorlake/chip.h @@ -129,6 +129,22 @@ enum vr_domain { NUM_VR_DOMAINS }; +/* + * Slew Rate configuration for Deep Package C States for VR domain. + * They are fast time divided by 2. + * 0 - Fast/2 + * 1 - Fast/4 + * 2 - Fast/8 + * 3 - Fast/16 + */ +enum slew_rate { + SLEW_FAST_2, + SLEW_FAST_4, + SLEW_FAST_8, + SLEW_FAST_16, + SLEW_IGNORE = 0xff, +}; + struct soc_intel_meteorlake_config { /* Common struct containing soc config data required by common code */ @@ -499,6 +515,16 @@ struct soc_intel_meteorlake_config { /* Platform Power Pmax in Watts. Zero means automatic. */ uint16_t psys_pmax_watts; + + /* Enable or Disable Acoustic Noise Mitigation feature */ + uint8_t enable_acoustic_noise_mitigation; + /* Disable Fast Slew Rate for Deep Package C States for VR domains */ + uint8_t disable_fast_pkgc_ramp[NUM_VR_DOMAINS]; + /* + * Slew Rate configuration for Deep Package C States for VR domains + * as per `enum slew_rate` data type. + */ + uint8_t slow_slew_rate_config[NUM_VR_DOMAINS]; }; typedef struct soc_intel_meteorlake_config config_t; diff --git a/src/soc/intel/meteorlake/romstage/fsp_params.c b/src/soc/intel/meteorlake/romstage/fsp_params.c index a45f23f46b..4842c191bb 100644 --- a/src/soc/intel/meteorlake/romstage/fsp_params.c +++ b/src/soc/intel/meteorlake/romstage/fsp_params.c @@ -395,6 +395,20 @@ static void fill_fspm_ibecc_params(FSP_M_CONFIG *m_cfg, } } +static void fill_fsps_acoustic_params(FSP_M_CONFIG *m_cfg, + const struct soc_intel_meteorlake_config *config) +{ + if (!config->enable_acoustic_noise_mitigation) + return; + + m_cfg->AcousticNoiseMitigation = config->enable_acoustic_noise_mitigation; + + for (int i = 0; i < NUM_VR_DOMAINS; i++) { + m_cfg->FastPkgCRampDisable[i] = config->disable_fast_pkgc_ramp[i]; + m_cfg->SlowSlewRate[i] = config->slow_slew_rate_config[i]; + } +} + static void soc_memory_init_params(FSP_M_CONFIG *m_cfg, const struct soc_intel_meteorlake_config *config) { @@ -418,6 +432,7 @@ static void soc_memory_init_params(FSP_M_CONFIG *m_cfg, fill_fspm_trace_params, fill_fspm_vr_config_params, fill_fspm_ibecc_params, + fill_fsps_acoustic_params, }; for (size_t i = 0; i < ARRAY_SIZE(fill_fspm_params); i++) |