diff --git a/src/soc/amd/mendocino/root_complex.c b/src/soc/amd/mendocino/root_complex.c index 6217246802..53a245b609 100644 --- a/src/soc/amd/mendocino/root_complex.c +++ b/src/soc/amd/mendocino/root_complex.c @@ -12,11 +12,13 @@ #include #include #include +#include #include #include #include #include "chip.h" +#define TDP_15W 15 #define DPTC_TOTAL_UPDATE_PARAMS 13 struct dptc_input { @@ -367,7 +369,18 @@ static void acipgen_dptci(void) static void root_complex_fill_ssdt(const struct device *device) { + uint32_t tdp = 0; + acpi_fill_root_complex_tom(device); + + if (get_amd_smu_reported_tdp(&tdp) != CB_SUCCESS) { + /* Unknown TDP, so return rather than setting invalid values. */ + return; + } + /* TODO(b/249359574): Add support for 6W DPTC values. */ + if (tdp != TDP_15W) + return; + if (CONFIG(SOC_AMD_COMMON_BLOCK_ACPI_DPTC)) acipgen_dptci(); }