diff options
Diffstat (limited to 'src/soc/amd/picasso')
-rw-r--r-- | src/soc/amd/picasso/acpi/soc.asl | 2 | ||||
-rw-r--r-- | src/soc/amd/picasso/chip.h | 6 | ||||
-rw-r--r-- | src/soc/amd/picasso/root_complex.c | 11 |
3 files changed, 12 insertions, 7 deletions
diff --git a/src/soc/amd/picasso/acpi/soc.asl b/src/soc/amd/picasso/acpi/soc.asl index e8c78e1d19..d9d40c7f65 100644 --- a/src/soc/amd/picasso/acpi/soc.asl +++ b/src/soc/amd/picasso/acpi/soc.asl @@ -16,3 +16,5 @@ Device(PCI0) { /* Add GPIO library */ #include <soc/amd/common/acpi/gpio_bank_lib.asl> + +#include <soc/amd/common/acpi/dptc.asl> diff --git a/src/soc/amd/picasso/chip.h b/src/soc/amd/picasso/chip.h index dbf0339a11..7ff36fcde2 100644 --- a/src/soc/amd/picasso/chip.h +++ b/src/soc/amd/picasso/chip.h @@ -117,10 +117,10 @@ struct soc_amd_picasso_config { uint32_t stapm_time_constant_s; uint32_t sustained_power_limit_mW; - /* Enable dptc for tablet mode */ - bool dptc_enable; + /* Enable dptc tablet mode */ + bool dptc_tablet_mode_enable; - /* STAPM Configuration for tablet mode (need enable dptc_enable first) */ + /* STAPM Configuration for tablet mode */ uint32_t fast_ppt_limit_tablet_mode_mW; uint32_t slow_ppt_limit_tablet_mode_mW; uint32_t sustained_power_limit_tablet_mode_mW; diff --git a/src/soc/amd/picasso/root_complex.c b/src/soc/amd/picasso/root_complex.c index ccf1c45fcd..afa8565515 100644 --- a/src/soc/amd/picasso/root_complex.c +++ b/src/soc/amd/picasso/root_complex.c @@ -184,21 +184,24 @@ static void acipgen_dptci(void) { const struct soc_amd_picasso_config *config = config_of_soc(); - if (!config->dptc_enable) + if (!config->dptc_tablet_mode_enable) return; + /* DPTC is enabled. Always fill out the default DPTC values. */ struct dptc_input default_input = DPTC_INPUTS(config->thermctl_limit_degreeC, config->sustained_power_limit_mW, config->fast_ppt_limit_mW, config->slow_ppt_limit_mW); + acpigen_write_alib_dptc_default((uint8_t *)&default_input, sizeof(default_input)); + + /* Tablet Mode */ struct dptc_input tablet_mode_input = DPTC_INPUTS( config->thermctl_limit_tablet_mode_degreeC, config->sustained_power_limit_tablet_mode_mW, config->fast_ppt_limit_tablet_mode_mW, config->slow_ppt_limit_tablet_mode_mW); - - acpigen_write_alib_dptc((uint8_t *)&default_input, sizeof(default_input), - (uint8_t *)&tablet_mode_input, sizeof(tablet_mode_input)); + acpigen_write_alib_dptc_tablet((uint8_t *)&tablet_mode_input, + sizeof(tablet_mode_input)); } static void root_complex_fill_ssdt(const struct device *device) |