From bfadc78bd719196e2fa78c23a8a0bb27dff65fd6 Mon Sep 17 00:00:00 2001 From: Jakub Czapiga Date: Fri, 28 Jul 2023 14:28:50 +0000 Subject: soc/intel/meteorlake: Add PsysPmax configuration psys_pmax_watts is configured in SoC node of devicetree. Value represents Watts the PSU provides. Zero means automatic/default configuration (not optimal). BUG=b:289853442 TEST=Build google/rex/ovis4es target board Change-Id: I69afa06110254f6384352c062891c0c9c0b23070 Signed-off-by: Jakub Czapiga Reviewed-on: https://review.coreboot.org/c/coreboot/+/76796 Reviewed-by: Martin L Roth Tested-by: build bot (Jenkins) --- src/soc/intel/meteorlake/chip.h | 3 +++ src/soc/intel/meteorlake/romstage/fsp_params.c | 5 +++++ 2 files changed, 8 insertions(+) (limited to 'src/soc/intel') diff --git a/src/soc/intel/meteorlake/chip.h b/src/soc/intel/meteorlake/chip.h index 6210406fc9..1e75019eab 100644 --- a/src/soc/intel/meteorlake/chip.h +++ b/src/soc/intel/meteorlake/chip.h @@ -448,6 +448,9 @@ struct soc_intel_meteorlake_config { * Set this to 1 in order to reduce BasicMemoryTest size */ bool lower_basic_mem_test_size; + + /* Platform Power Pmax in Watts. Zero means automatic. */ + uint16_t psys_pmax_watts; }; 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 d53a0d4da0..2d8a6c77a0 100644 --- a/src/soc/intel/meteorlake/romstage/fsp_params.c +++ b/src/soc/intel/meteorlake/romstage/fsp_params.c @@ -257,6 +257,11 @@ static void fill_fspm_misc_params(FSP_M_CONFIG *m_cfg, m_cfg->SkipMbpHob = !CONFIG(FSP_PUBLISH_MBP_HOB); m_cfg->SkipExtGfxScan = config->skip_ext_gfx_scan; + + /* Set PsysPmax if it is available in DT. + PsysPmax is in unit of 1/8 Watt */ + if (config->psys_pmax_watts) + m_cfg->PsysPmax = config->psys_pmax_watts * 8; } static void fill_fspm_audio_params(FSP_M_CONFIG *m_cfg, -- cgit v1.2.3