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:
parent
1dfa80f02c
commit
3f00ecb05c
1 changed files with 13 additions and 0 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue