From 3f00ecb05c3aabacc89b860bf63fc2356f2c6711 Mon Sep 17 00:00:00 2001 From: Jeremy Compostella Date: Thu, 4 Dec 2025 15:28:54 -0800 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/90373 Tested-by: build bot (Jenkins) Reviewed-by: Subrata Banik --- src/soc/intel/pantherlake/tdp.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/soc/intel/pantherlake/tdp.c b/src/soc/intel/pantherlake/tdp.c index e73370a69f..63b3072499 100644 --- a/src/soc/intel/pantherlake/tdp.c +++ b/src/soc/intel/pantherlake/tdp.c @@ -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(); }