summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKevin Chiu <Kevin.Chiu@quantatw.com>2020-09-18 17:30:30 +0800
committerFurquan Shaikh <furquan@google.com>2020-09-20 17:24:40 +0000
commitcdd9f5cb72a7b119a384d0a1455c34e94efa89d2 (patch)
treedba61903e4e0673955980122211fc53feb51b76d /src
parente0d749c23b604dd6dfb94d95a59e5db30900d0e7 (diff)
downloadcoreboot-cdd9f5cb72a7b119a384d0a1455c34e94efa89d2.tar.xz
soc/amd/picasso: Add THERMCTL_LIMIT DPTC parameter support
Add THERMCTL_LIMIT (die temperature limit) DPTC parameter for clamshell/tablet mode. BUG=b:157943445 BRANCH=zork TEST=build Change-Id: Id193a74210c92d1e45ed4824ee9c0fc9ceaa5e3a Signed-off-by: Kevin Chiu <kevin.chiu@quantatw.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/45519 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/soc/amd/picasso/chip.h1
-rw-r--r--src/soc/amd/picasso/root_complex.c13
2 files changed, 11 insertions, 3 deletions
diff --git a/src/soc/amd/picasso/chip.h b/src/soc/amd/picasso/chip.h
index 11675097cf..9c9ae7f7cd 100644
--- a/src/soc/amd/picasso/chip.h
+++ b/src/soc/amd/picasso/chip.h
@@ -111,6 +111,7 @@ struct soc_amd_picasso_config {
/* Lower die temperature limit */
uint32_t thermctl_limit;
+ uint32_t thermctl_limit_tablet_mode;
/* FP5 Processor Voltage Supply PSI Currents. 0 indicates use SOC default */
uint32_t psi0_current_limit;
diff --git a/src/soc/amd/picasso/root_complex.c b/src/soc/amd/picasso/root_complex.c
index 6c721e17c8..174cddc487 100644
--- a/src/soc/amd/picasso/root_complex.c
+++ b/src/soc/amd/picasso/root_complex.c
@@ -17,10 +17,11 @@
enum {
ALIB_DPTCI_FUNCTION_ID = 0xc,
+ THERMAL_CONTROL_LIMIT_ID = 0x3,
SUSTAINED_POWER_LIMIT_PARAM_ID = 0x5,
FAST_PPT_LIMIT_PARAM_ID = 0x6,
SLOW_PPT_LIMIT_PARAM_ID = 0x7,
- DPTC_TOTAL_UPDATE_PARAMS = 3,
+ DPTC_TOTAL_UPDATE_PARAMS = 4,
};
struct dptc_param {
@@ -33,11 +34,15 @@ struct dptc_input {
struct dptc_param params[DPTC_TOTAL_UPDATE_PARAMS];
} __packed;
-#define DPTC_INPUTS(_sustained, _fast, _slow) \
+#define DPTC_INPUTS(_thermctllmit, _sustained, _fast, _slow) \
{ \
.size = sizeof(struct dptc_input), \
.params = { \
{ \
+ .id = THERMAL_CONTROL_LIMIT_ID, \
+ .value = _thermctllmit, \
+ }, \
+ { \
.id = SUSTAINED_POWER_LIMIT_PARAM_ID, \
.value = _sustained, \
}, \
@@ -195,10 +200,12 @@ static void acipgen_dptci(void)
if (!config->dptc_enable)
return;
- struct dptc_input default_input = DPTC_INPUTS(config->sustained_power_limit,
+ struct dptc_input default_input = DPTC_INPUTS(config->thermctl_limit,
+ config->sustained_power_limit,
config->fast_ppt_limit,
config->slow_ppt_limit);
struct dptc_input tablet_mode_input = DPTC_INPUTS(
+ config->thermctl_limit_tablet_mode,
config->sustained_power_limit_tablet_mode,
config->fast_ppt_limit_tablet_mode,
config->slow_ppt_limit_tablet_mode);