Michael has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/44165 )
Change subject: superio/ite: configure EC for fans to full at thermal limit ......................................................................
superio/ite: configure EC for fans to full at thermal limit
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 michael.buechler@posteo.net Change-Id: Ie74102ac0d54be33558c161c9c84594d121772b1 --- M src/mainboard/asus/f2a85-m/devicetree_f2a85-m.cb M src/mainboard/asus/f2a85-m/devicetree_f2a85-m_le.cb M src/mainboard/foxconn/g41s-k/devicetree.cb M src/mainboard/gigabyte/ga-945gcm-s2l/devicetree.cb M src/mainboard/gigabyte/ga-g41m-es2l/devicetree.cb M src/mainboard/libretrend/lt1000/devicetree.cb M src/mainboard/roda/rv11/variants/rw11/devicetree.cb M src/superio/ite/common/env_ctrl.c M src/superio/ite/common/env_ctrl.h M src/superio/ite/common/env_ctrl_chip.h 10 files changed, 16 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/65/44165/1
diff --git a/src/mainboard/asus/f2a85-m/devicetree_f2a85-m.cb b/src/mainboard/asus/f2a85-m/devicetree_f2a85-m.cb index 08a74e8..11c4186 100644 --- a/src/mainboard/asus/f2a85-m/devicetree_f2a85-m.cb +++ b/src/mainboard/asus/f2a85-m/devicetree_f2a85-m.cb @@ -49,6 +49,7 @@ register "FAN1.smart.tmp_start" = "20" register "FAN1.smart.tmp_full" = "70" register "FAN1.smart.tmp_delta" = "0" + register "FAN1.smart.full_lmt" = "0" register "FAN1.smart.smoothing" = "1" register "FAN1.smart.pwm_start" = "20" register "FAN1.smart.slope" = "32" diff --git a/src/mainboard/asus/f2a85-m/devicetree_f2a85-m_le.cb b/src/mainboard/asus/f2a85-m/devicetree_f2a85-m_le.cb index bc0dc42..a1b1917 100644 --- a/src/mainboard/asus/f2a85-m/devicetree_f2a85-m_le.cb +++ b/src/mainboard/asus/f2a85-m/devicetree_f2a85-m_le.cb @@ -49,6 +49,7 @@ register "FAN1.smart.tmp_start" = "20" register "FAN1.smart.tmp_full" = "70" register "FAN1.smart.tmp_delta" = "0" + register "FAN1.smart.full_lmt" = "0" register "FAN1.smart.smoothing" = "1" register "FAN1.smart.pwm_start" = "20" register "FAN1.smart.slope" = "32" diff --git a/src/mainboard/foxconn/g41s-k/devicetree.cb b/src/mainboard/foxconn/g41s-k/devicetree.cb index 9bde4b2..89a801c 100644 --- a/src/mainboard/foxconn/g41s-k/devicetree.cb +++ b/src/mainboard/foxconn/g41s-k/devicetree.cb @@ -65,6 +65,7 @@ register "FAN1.smart.tmp_start" = "30" register "FAN1.smart.tmp_full" = "65" register "FAN1.smart.tmp_delta" = "3" + register "FAN1.smart.full_lmt" = "0" register "FAN1.smart.smoothing" = "1" register "FAN1.smart.pwm_start" = "20" register "FAN1.smart.slope" = "10" @@ -74,6 +75,7 @@ register "FAN2.smart.tmp_start" = "30" register "FAN2.smart.tmp_full" = "65" register "FAN2.smart.tmp_delta" = "3" + register "FAN2.smart.full_lmt" = "0" register "FAN2.smart.smoothing" = "1" register "FAN2.smart.pwm_start" = "20" register "FAN2.smart.slope" = "10" diff --git a/src/mainboard/gigabyte/ga-945gcm-s2l/devicetree.cb b/src/mainboard/gigabyte/ga-945gcm-s2l/devicetree.cb index c0f198f..f80c02d 100644 --- a/src/mainboard/gigabyte/ga-945gcm-s2l/devicetree.cb +++ b/src/mainboard/gigabyte/ga-945gcm-s2l/devicetree.cb @@ -111,6 +111,7 @@ register "FAN1.smart.tmp_start" = "35" register "FAN1.smart.tmp_full" = "75" register "FAN1.smart.tmp_delta" = "3" + register "FAN1.smart.full_lmt" = "0" register "FAN1.smart.smoothing" = "1" register "FAN1.smart.pwm_start" = "0" register "FAN1.smart.slope" = "10" @@ -121,6 +122,7 @@ register "FAN2.smart.tmp_start" = "35" register "FAN2.smart.tmp_full" = "75" register "FAN2.smart.tmp_delta" = "3" + register "FAN2.smart.full_lmt" = "0" register "FAN2.smart.smoothing" = "1" register "FAN2.smart.pwm_start" = "0" register "FAN2.smart.slope" = "10" diff --git a/src/mainboard/gigabyte/ga-g41m-es2l/devicetree.cb b/src/mainboard/gigabyte/ga-g41m-es2l/devicetree.cb index 6328bc6..d61342c 100644 --- a/src/mainboard/gigabyte/ga-g41m-es2l/devicetree.cb +++ b/src/mainboard/gigabyte/ga-g41m-es2l/devicetree.cb @@ -81,6 +81,7 @@ register "FAN1.smart.tmp_start" = "30" register "FAN1.smart.tmp_full" = "65" register "FAN1.smart.tmp_delta" = "3" + register "FAN1.smart.full_lmt" = "0" register "FAN1.smart.smoothing" = "1" register "FAN1.smart.pwm_start" = "0" register "FAN1.smart.slope" = "10" @@ -91,6 +92,7 @@ register "FAN2.smart.tmp_start" = "30" register "FAN2.smart.tmp_full" = "65" register "FAN2.smart.tmp_delta" = "3" + register "FAN2.smart.full_lmt" = "0" register "FAN2.smart.smoothing" = "1" register "FAN2.smart.pwm_start" = "0" register "FAN2.smart.slope" = "10" diff --git a/src/mainboard/libretrend/lt1000/devicetree.cb b/src/mainboard/libretrend/lt1000/devicetree.cb index a58e169..7fa941a 100644 --- a/src/mainboard/libretrend/lt1000/devicetree.cb +++ b/src/mainboard/libretrend/lt1000/devicetree.cb @@ -220,6 +220,7 @@ register "FAN1.smart.tmp_start" = "60" register "FAN1.smart.tmp_full" = "85" register "FAN1.smart.tmp_delta" = " 2" + register "FAN1.smart.full_lmt" = " 0" register "FAN1.smart.pwm_start" = "20" register "FAN1.smart.slope" = "24" # FAN2 is system fan (4 pin connector populated) diff --git a/src/mainboard/roda/rv11/variants/rw11/devicetree.cb b/src/mainboard/roda/rv11/variants/rw11/devicetree.cb index 988c2a6..3e28ba8 100644 --- a/src/mainboard/roda/rv11/variants/rw11/devicetree.cb +++ b/src/mainboard/roda/rv11/variants/rw11/devicetree.cb @@ -105,6 +105,7 @@ register "FAN1.smart.tmp_off" = "60" register "FAN1.smart.tmp_start" = "64" register "FAN1.smart.tmp_delta" = " 2" + register "FAN1.smart.full_lmt" = " 0" register "FAN1.smart.pwm_start" = "30" register "FAN1.smart.slope" = "64" register "FAN2.mode" = "FAN_SMART_AUTOMATIC" @@ -112,6 +113,7 @@ register "FAN2.smart.tmp_off" = "60" register "FAN2.smart.tmp_start" = "64" register "FAN2.smart.tmp_delta" = " 2" + register "FAN2.smart.full_lmt" = " 0" register "FAN2.smart.pwm_start" = "30" register "FAN2.smart.slope" = "64" register "FAN3.mode" = "FAN_MODE_OFF" diff --git a/src/superio/ite/common/env_ctrl.c b/src/superio/ite/common/env_ctrl.c index f63bfd3..52981ec 100644 --- a/src/superio/ite/common/env_ctrl.c +++ b/src/superio/ite/common/env_ctrl.c @@ -147,6 +147,8 @@ conf->tmp_full ? conf->tmp_full : 127); pnp_write_hwm5_index(base, ITE_EC_FAN_CTL_DELTA_TEMP(fan), ITE_EC_FAN_CTL_DELTA_TEMP_INTRVL(conf->tmp_delta)); + pnp_write_hwm5_index(base, ITE_EC_FAN_CTL_DELTA_TEMP(fan), + ITE_EC_FAN_CTL_FULL_AT_THRML_LMT(conf->full_lmt)); }
pnp_write_hwm5_index(base, ITE_EC_FAN_CTL_PWM_CONTROL(fan), pwm_ctrl); diff --git a/src/superio/ite/common/env_ctrl.h b/src/superio/ite/common/env_ctrl.h index e8fb1f5..7bce809 100644 --- a/src/superio/ite/common/env_ctrl.h +++ b/src/superio/ite/common/env_ctrl.h @@ -185,6 +185,7 @@
/* Common for ITE_EC_FAN_CTL_DELTA_TEMP */ #define ITE_EC_FAN_CTL_DELTA_TEMP_INTRVL(c) ((c) & 0x1f) +#define ITE_EC_FAN_CTL_FULL_AT_THRML_LMT(x) (((x) & 0x1) << 6) #define ITE_EC_FAN_CTL_TARGET_ZONE(x) (0x66 + ((x)-1) * 8) #define ITE_EC_FAN_CTL_TARGET_ZONE_MASK 0x0f
diff --git a/src/superio/ite/common/env_ctrl_chip.h b/src/superio/ite/common/env_ctrl_chip.h index 6a027b9..5f824be 100644 --- a/src/superio/ite/common/env_ctrl_chip.h +++ b/src/superio/ite/common/env_ctrl_chip.h @@ -56,6 +56,8 @@ u8 tmp_full; /* 100% duty cycle above (°C) */ u8 tmp_delta; /* adapt fan speed when temperature changed by at least `tmp_delta`°C */ + u8 full_lmt; /* force fan to full PWM at thermal + limit */ u8 smoothing; /* enable smoothing */ u8 pwm_start; /* start at this duty cycle (%) */ u8 slope; /* increase duty cycle by `slope`%/°C */