From f7e456748f90bdf2798c09bfaa23b5e17de43d0d Mon Sep 17 00:00:00 2001 From: Joel Linn Date: Fri, 29 Mar 2024 14:03:44 +0100 Subject: superio/ite: Add full-speed config option Add Kconfig option for full-speed setting. Some variants do not support the full-speed at limit configuration (IT8772F). Keep it enabled for all current variants that use the common EC code as it was previously enabled unconditionally - datasheets weren't revisited individually. Change-Id: Icf24ea1c4f41771a18803957456f0aeba0e51b13 Signed-off-by: Joel Linn Reviewed-on: https://review.coreboot.org/c/coreboot/+/81525 Reviewed-by: Paul Menzel Reviewed-by: Nico Huber Reviewed-by: Matt DeVillier Tested-by: build bot (Jenkins) --- src/superio/ite/common/Kconfig | 6 ++++++ src/superio/ite/common/env_ctrl.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/superio/ite/common/Kconfig b/src/superio/ite/common/Kconfig index 36c1496db0..6fde3c883f 100644 --- a/src/superio/ite/common/Kconfig +++ b/src/superio/ite/common/Kconfig @@ -48,4 +48,10 @@ config SUPERIO_ITE_ENV_CTRL_EXT_ANY_TMPIN Temperature can be read to any TMPIN from an external sensor via SST/PECI (instead of TMPIN3 only). +config SUPERIO_ITE_ENV_CTRL_NO_FULLSPEED_SETTING + bool + help + Fan controller does not support running at full speed when limit + temperature is reached. + endif diff --git a/src/superio/ite/common/env_ctrl.c b/src/superio/ite/common/env_ctrl.c index d624a9233e..112401985c 100644 --- a/src/superio/ite/common/env_ctrl.c +++ b/src/superio/ite/common/env_ctrl.c @@ -182,7 +182,8 @@ static void fan_smartconfig(const u16 base, const u8 fan, conf->tmp_full ? conf->tmp_full : 127); delta_temp = ITE_EC_FAN_CTL_DELTA_TEMP_INTRVL(conf->tmp_delta); - delta_temp |= ITE_EC_FAN_CTL_FULL_AT_THRML_LMT(conf->full_lmt); + if (!CONFIG(SUPERIO_ITE_ENV_CTRL_NO_FULLSPEED_SETTING)) + delta_temp |= ITE_EC_FAN_CTL_FULL_AT_THRML_LMT(conf->full_lmt); pnp_write_hwm5_index(base, ITE_EC_FAN_CTL_DELTA_TEMP(fan), delta_temp); } -- cgit v1.2.3