soc/intel/pantherlake: Add ChromeOS board-specific TDP setting

This commit introduces ChromeOS-specific logic to the Panther Lake SoC
TDP selection. It addresses the need to correctly set the CPU TDP to 15
W without having to set the desired_tdp flag in each mainboard device
tree.

BUG=b:465698900

Change-Id: Ibaee530159f7e3b94aac16ab50b749cb161cee10
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90373
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
This commit is contained in:
Jeremy Compostella 2025-12-04 15:28:54 -08:00 committed by Matt DeVillier
commit 3f00ecb05c

View file

@ -7,6 +7,19 @@
enum soc_intel_pantherlake_cpu_tdps soc_get_cpu_tdp(void)
{
if (CONFIG(MAINBOARD_HAS_CHROMEOS)) {
const unsigned int variable_tdp_mch_ids[] = {
PCI_DID_INTEL_PTL_U_ID_1,
PCI_DID_INTEL_PTL_U_ID_2,
PCI_DID_INTEL_PTL_U_ID_3
};
uint16_t mch_id = pci_read_config16(_PCI_DEV(ROOT, 0), PCI_DEVICE_ID);
for (size_t i = 0; i < ARRAY_SIZE(variable_tdp_mch_ids); i++)
if (variable_tdp_mch_ids[i] == mch_id)
return TDP_15W;
}
const struct soc_intel_pantherlake_config *config = config_of_soc();
return config->tdp || get_cpu_tdp();
}