From e693b1d549621acfd20aaad876d4d5888ad5ca99 Mon Sep 17 00:00:00 2001 From: Michael Büchler Date: Mon, 1 Jun 2020 23:22:10 +0200 Subject: superio/ite: configure EC for fans to full at thermal limit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This applies to the automatic fan control mode of the environment controller (EC). Previously the affected bit was always cleared while the default value is 1 according to datasheets. Add a variable that can be set per mainboard in devicetree.cb. In the IT8783E datasheet that bit is marked as reserved. Signed-off-by: Michael Büchler Change-Id: Ie74102ac0d54be33558c161c9c84594d121772b1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/44165 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held --- src/superio/ite/common/env_ctrl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/superio/ite/common/env_ctrl.c') diff --git a/src/superio/ite/common/env_ctrl.c b/src/superio/ite/common/env_ctrl.c index f63bfd3eea..fbf74468b0 100644 --- a/src/superio/ite/common/env_ctrl.c +++ b/src/superio/ite/common/env_ctrl.c @@ -113,6 +113,7 @@ static void fan_smartconfig(const u16 base, const u8 fan, u8 pwm_ctrl; u8 pwm_start = 0; u8 pwm_auto = 0; + u8 delta_temp; if (mode == FAN_SMART_SOFTWARE) { pwm_ctrl = ITE_EC_FAN_CTL_PWM_MODE_SOFTWARE; @@ -145,8 +146,11 @@ static void fan_smartconfig(const u16 base, const u8 fan, /* Full speed above 127°C by default */ pnp_write_hwm5_index(base, ITE_EC_FAN_CTL_TEMP_LIMIT_FULL(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); pnp_write_hwm5_index(base, ITE_EC_FAN_CTL_DELTA_TEMP(fan), - ITE_EC_FAN_CTL_DELTA_TEMP_INTRVL(conf->tmp_delta)); + delta_temp); } pnp_write_hwm5_index(base, ITE_EC_FAN_CTL_PWM_CONTROL(fan), pwm_ctrl); -- cgit v1.2.3