From c54658d20067f4cbe5149b39ceda9010bc0c4cd7 Mon Sep 17 00:00:00 2001 From: Jeremy Compostella Date: Tue, 10 Jun 2025 18:00:55 -0700 Subject: [PATCH] soc/intel/pantherlake: Add ICC Max configuration support Add configuration for Maximum Integrated Circuit Current (ICC) for various SKUs and VR domains. The ICC values, defined in 1/4A increments, specify the maximum allowable current for a given SKU and VR domain configuration. This update enhances power management by allowing tailored ICC settings. Change-Id: I2c4712521da7b89cd4b2a6c499e11245b8eeb719 Signed-off-by: Jeremy Compostella Reviewed-on: https://review.coreboot.org/c/coreboot/+/88044 Reviewed-by: Bora Guvendik Reviewed-by: Subrata Banik Tested-by: build bot (Jenkins) --- src/soc/intel/pantherlake/chip.h | 12 ++++++++++++ src/soc/intel/pantherlake/romstage/fsp_params.c | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/src/soc/intel/pantherlake/chip.h b/src/soc/intel/pantherlake/chip.h index d9da2d1b26..a6e794d08c 100644 --- a/src/soc/intel/pantherlake/chip.h +++ b/src/soc/intel/pantherlake/chip.h @@ -190,6 +190,7 @@ enum vr_domain { VR_DOMAIN_IA, VR_DOMAIN_GT, VR_DOMAIN_SA, + VR_DOMAIN_ATOM, NUM_VR_DOMAINS, }; @@ -416,6 +417,17 @@ struct soc_intel_pantherlake_config { */ uint16_t thermal_design_current[MAX_PTL_SKUS][NUM_VR_DOMAINS]; + /* + * Maximum Integrated Current Capability (ICC) settings for various SKUs. + * + * ICC values represent the maximum allowable current for a given SKU + * and VR domain configuration. + * + * ICC unit is defined in 1/4A increments. For example, a value of 400 + * corresponds to 100A. + */ + uint16_t icc_max[MAX_PTL_SKUS][NUM_VR_DOMAINS]; + /* * SerialIO device mode selection: * PchSerialIoDisabled, diff --git a/src/soc/intel/pantherlake/romstage/fsp_params.c b/src/soc/intel/pantherlake/romstage/fsp_params.c index 2a30bd3599..2498bec4e2 100644 --- a/src/soc/intel/pantherlake/romstage/fsp_params.c +++ b/src/soc/intel/pantherlake/romstage/fsp_params.c @@ -346,6 +346,12 @@ static void fill_fspm_vr_config_params(FSP_M_CONFIG *m_cfg, m_cfg->TdcEnable[i] = 1; m_cfg->TdcCurrentLimit[i] = config->thermal_design_current[map->sku][i]; } + + for (size_t i = 0; i < ARRAY_SIZE(config->icc_max[0]); i++) { + if (!config->icc_max[map->sku][i]) + continue; + m_cfg->IccMax[i] = config->icc_max[map->sku][i]; + } } #if CONFIG(PLATFORM_HAS_EARLY_LOW_BATTERY_INDICATOR)