diff options
author | Chris.Wang <chris.wang@amd.corp-partner.google.com> | 2022-12-13 14:31:38 +0800 |
---|---|---|
committer | Karthik Ramasubramanian <kramasub@google.com> | 2022-12-20 21:05:47 +0000 |
commit | 9ac0984c5a91b831ac0f0614e604b70b3fa634d0 (patch) | |
tree | f7380fd09566e04390d619c827e1754b55cd4b65 /src/soc/amd/mendocino/root_complex.c | |
parent | 134d740168f602c7c697e5b1975f8a0a591b205d (diff) |
soc/amd/mendocino: add dptc tablet mode support
add dptc support for different power parameter on tablet/clamshell
mode.
BUG=b:257187831
BRANCH=none
TEST=validate the parameter change for each mode by AGT.
Signed-off-by: Chris.Wang <chris.wang@amd.corp-partner.google.com>
Change-Id: I96e04d113d18b42f3457056a5e4fa311ceccffb3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70670
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: John Su <john_su@compal.corp-partner.google.com>
Reviewed-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Reviewed-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
Diffstat (limited to 'src/soc/amd/mendocino/root_complex.c')
-rw-r--r-- | src/soc/amd/mendocino/root_complex.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/soc/amd/mendocino/root_complex.c b/src/soc/amd/mendocino/root_complex.c index 35fc573c71..f239a42d52 100644 --- a/src/soc/amd/mendocino/root_complex.c +++ b/src/soc/amd/mendocino/root_complex.c @@ -255,6 +255,24 @@ static void acipgen_dptci(void) acpigen_write_alib_dptc_no_battery((uint8_t *)&no_battery_input, sizeof(no_battery_input)); +#if (CONFIG(FEATURE_TABLET_MODE_DPTC)) + struct dptc_input tablet_input = DPTC_INPUTS( + config->thermctl_limit_degreeC, + config->sustained_power_limit_mW_tablet, + config->slow_ppt_time_constant_s, + config->fast_ppt_limit_mW, + config->slow_ppt_limit_mW, + config->vrm_current_limit_mA, + config->vrm_maximum_current_limit_mA, + config->vrm_soc_current_limit_mA, + config->stt_min_limit, + config->stt_m1, + config->stt_m2, + config->stt_c_apu, + config->stt_skin_temp_apu); + acpigen_write_alib_dptc_tablet((uint8_t *)&tablet_input, sizeof(tablet_input)); +#endif + #if (CONFIG(FEATURE_DYNAMIC_DPTC)) /* Profile B */ struct dptc_input thermal_B_input = DPTC_INPUTS( |