dptf: Add support for one more temperature sensor
Some boards may use more than 4 temperature sensors for DPTF thermal control, so this patch adds support for one more temperature sensor. BUG=b:207585491 Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Change-Id: Ibf9666bade23b9bb4f740c6c4df6ecf5227cfb45 Reviewed-on: https://review.coreboot.org/c/coreboot/+/59632 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
This commit is contained in:
committed by
Felix Held
parent
02cef7a4a8
commit
40713aaa43
@@ -70,6 +70,8 @@ static const char *namestring_of(enum dptf_participant participant)
|
|||||||
return "TSR2";
|
return "TSR2";
|
||||||
case DPTF_TEMP_SENSOR_3:
|
case DPTF_TEMP_SENSOR_3:
|
||||||
return "TSR3";
|
return "TSR3";
|
||||||
|
case DPTF_TEMP_SENSOR_4:
|
||||||
|
return "TSR4";
|
||||||
case DPTF_TPCH:
|
case DPTF_TPCH:
|
||||||
return "TPCH";
|
return "TPCH";
|
||||||
default:
|
default:
|
||||||
|
@@ -192,7 +192,7 @@ static void write_generic_devices(const struct drivers_intel_dptf_config *config
|
|||||||
get_STA_value(config, DPTF_CHARGER),
|
get_STA_value(config, DPTF_CHARGER),
|
||||||
platform_info);
|
platform_info);
|
||||||
|
|
||||||
for (i = 0, participant = DPTF_TEMP_SENSOR_0; i < 4; ++i, ++participant) {
|
for (i = 0, participant = DPTF_TEMP_SENSOR_0; i < DPTF_MAX_TSR; ++i, ++participant) {
|
||||||
snprintf(name, sizeof(name), "TSR%1d", i);
|
snprintf(name, sizeof(name), "TSR%1d", i);
|
||||||
dptf_write_generic_participant(name, DPTF_GENERIC_PARTICIPANT_TYPE_TSR,
|
dptf_write_generic_participant(name, DPTF_GENERIC_PARTICIPANT_TYPE_TSR,
|
||||||
NULL, get_STA_value(config, participant),
|
NULL, get_STA_value(config, participant),
|
||||||
@@ -449,7 +449,7 @@ static void write_options(const struct drivers_intel_dptf_config *config)
|
|||||||
acpigen_pop_len(); /* Scope */
|
acpigen_pop_len(); /* Scope */
|
||||||
|
|
||||||
/* TSR options */
|
/* TSR options */
|
||||||
for (p = DPTF_TEMP_SENSOR_0, i = 0; p <= DPTF_TEMP_SENSOR_3; ++p, ++i) {
|
for (p = DPTF_TEMP_SENSOR_0, i = 0; p <= DPTF_TEMP_SENSOR_4; ++p, ++i) {
|
||||||
if (is_participant_used(config, p) && (config->options.tsr[i].hysteresis ||
|
if (is_participant_used(config, p) && (config->options.tsr[i].hysteresis ||
|
||||||
config->options.tsr[i].desc)) {
|
config->options.tsr[i].desc)) {
|
||||||
dptf_write_scope(p);
|
dptf_write_scope(p);
|
||||||
|
@@ -24,6 +24,7 @@ enum dptf_participant {
|
|||||||
DPTF_TEMP_SENSOR_1,
|
DPTF_TEMP_SENSOR_1,
|
||||||
DPTF_TEMP_SENSOR_2,
|
DPTF_TEMP_SENSOR_2,
|
||||||
DPTF_TEMP_SENSOR_3,
|
DPTF_TEMP_SENSOR_3,
|
||||||
|
DPTF_TEMP_SENSOR_4,
|
||||||
DPTF_TPCH,
|
DPTF_TPCH,
|
||||||
DPTF_PARTICIPANT_COUNT,
|
DPTF_PARTICIPANT_COUNT,
|
||||||
};
|
};
|
||||||
@@ -44,7 +45,7 @@ enum {
|
|||||||
DPTF_FIELD_UNUSED = 0xFFFFFFFFull,
|
DPTF_FIELD_UNUSED = 0xFFFFFFFFull,
|
||||||
|
|
||||||
/* Max supported by DPTF */
|
/* Max supported by DPTF */
|
||||||
DPTF_MAX_TSR = 4,
|
DPTF_MAX_TSR = 5,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Active Policy */
|
/* Active Policy */
|
||||||
|
Reference in New Issue
Block a user