[coreboot-gerrit] Change in coreboot[master]: asus/f2a85-m*: Enable automatic fancontrol

Tobias Diedrich (Code Review) gerrit at coreboot.org
Sat Apr 15 16:11:36 CEST 2017


Tobias Diedrich has uploaded a new change for review. ( https://review.coreboot.org/19319 )

Change subject: asus/f2a85-m*: Enable automatic fancontrol
......................................................................

asus/f2a85-m*: Enable automatic fancontrol

Enable automatic fancontrol for the F2A85-M and F2A85-M LE with the ASUS
'normal' register settings.

Only the main CPU fan can be speed controlled on this board.

The three asus presets only differ in the start and full speed
temperatures (in degrees celsius):
normal: start @20, full @70
silent: start @30, full @70
turbo:  start @10, full @60

Before this change the fan speed is stuck at a default value of 50%
PWM duty cycle.

In particular the following fan control registers are involved:

reg 0x0b (0x40, default 0x00)
Fan PWM Smoothing Step Frequency Selection Register
bits 7-6 control sampling rate, this changes the sampling rate from 1Hz (Default) to 16Hz (ASUS).

reg 0x15 (0x80, default 0x00)
FAN_CTL1 PWM Control Register
bit7 enables automatic control

reg 0x60 (0x80, default 0x7f)
FAN_CTL1 SmartGuardian Automatic Mode Temperature Limit of OFF Register
With the default value of 0x7f the fan is never turned on in auto mode, with 0x80 (-128) it is never turned off.

reg 0x61 (0x14, default 0x7f)
FAN_CTL1 SmartGuardian Automatic Mode Temperature Limit of Fan Start Register
Minimum PWM reached at 20 degrees (vs default of 127 degrees)

reg 0x62 (0x46, default 0x7f)
FAN_CTL1 SmartGuardian Automatic Mode Temperature Limit of Full Speed Register
100% threshold at 70 degress (vs default of 127 degrees)

reg 0x64 (0xa0, default 0x00)
FAN_CTL1 SmartGuardian Automatic Mode Control Register
bit7 enables data smoothing
bit6-0 set the slope of the control curve (32)

reg 0x65 (0x40, default 0x00)
FAN_CTL1 SmartGuardian Automatic Mode △-Temperature Registers
bit6 enable full duty cycle if any thermal limit is reached

Change-Id: I24c2d88bc54234bb7286ec2c0255549cdf3fb911
Signed-off-by: Tobias Diedrich <ranma+coreboot at tdiedrich.de>
---
M src/mainboard/asus/f2a85-m/devicetree_f2a85-m.cb
M src/mainboard/asus/f2a85-m/devicetree_f2a85-m_le.cb
2 files changed, 35 insertions(+), 3 deletions(-)


  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/19/19319/1

diff --git a/src/mainboard/asus/f2a85-m/devicetree_f2a85-m.cb b/src/mainboard/asus/f2a85-m/devicetree_f2a85-m.cb
index d942445..5bd5271 100644
--- a/src/mainboard/asus/f2a85-m/devicetree_f2a85-m.cb
+++ b/src/mainboard/asus/f2a85-m/devicetree_f2a85-m.cb
@@ -61,9 +61,25 @@
 						register hwm_ctl_register = "0xc0"
 						register hwm_main_ctl_register = "0x33"
 						register hwm_adc_temp_chan_en_reg = "0x38"
-						register hwm_fan1_ctl_pwm = "0x00"
+						register hwm_fan_pwm_smoothing = "0x40"
+						register hwm_fan1_ctl_pwm = "0x80"
+						register hwm_fan1_temp_off = "0x80" # never off
+						register hwm_fan1_temp_start = "20"
+						register hwm_fan1_temp_full = "70"
+						register hwm_fan1_auto_ctl = "0xa0"
+						register hwm_fan1_delta_temp = "0x40"
 						register hwm_fan2_ctl_pwm = "0x00"
+						register hwm_fan2_temp_off = "0x80"
+						register hwm_fan2_temp_start = "20"
+						register hwm_fan2_temp_full = "70"
+						register hwm_fan2_auto_ctl = "0xa0"
+						register hwm_fan2_delta_temp = "0x40"
 						register hwm_fan3_ctl_pwm = "0x00"
+						register hwm_fan3_temp_off = "0x7f"
+						register hwm_fan3_temp_start = "0x7f"
+						register hwm_fan3_temp_full = "0x7f"
+						register hwm_fan3_auto_ctl = "0x00"
+						register hwm_fan3_delta_temp = "0x00"
 
 						device pnp 2e.0 off #  Floppy
 							io 0x60 = 0x3f0
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 d83f466..2106f28 100644
--- a/src/mainboard/asus/f2a85-m/devicetree_f2a85-m_le.cb
+++ b/src/mainboard/asus/f2a85-m/devicetree_f2a85-m_le.cb
@@ -59,11 +59,27 @@
 				device pci 14.3 on      # LPC	0x439d
 					chip superio/ite/it8728f
 						register hwm_ctl_register = "0xc0"
-						register hwm_main_ctl_register = "0x33"
+						register hwm_main_ctl_register = "0x31"
 						register hwm_adc_temp_chan_en_reg = "0x38"
-						register hwm_fan1_ctl_pwm = "0x00"
+						register hwm_fan_pwm_smoothing = "0x40"
+						register hwm_fan1_ctl_pwm = "0x80"
+						register hwm_fan1_temp_off = "0x80" # never off
+						register hwm_fan1_temp_start = "20"
+						register hwm_fan1_temp_full = "70"
+						register hwm_fan1_auto_ctl = "0xa0"
+						register hwm_fan1_delta_temp = "0x40"
 						register hwm_fan2_ctl_pwm = "0x00"
+						register hwm_fan2_temp_off = "0x80"
+						register hwm_fan2_temp_start = "0x7f"
+						register hwm_fan2_temp_full = "0x7f"
+						register hwm_fan2_auto_ctl = "0x00"
+						register hwm_fan2_delta_temp = "0x00"
 						register hwm_fan3_ctl_pwm = "0x00"
+						register hwm_fan3_temp_off = "0x7f"
+						register hwm_fan3_temp_start = "0x7f"
+						register hwm_fan3_temp_full = "0x7f"
+						register hwm_fan3_auto_ctl = "0x00"
+						register hwm_fan3_delta_temp = "0x00"
 
 						device pnp 2e.0 off #  Floppy
 							io 0x60 = 0x3f0

-- 
To view, visit https://review.coreboot.org/19319
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I24c2d88bc54234bb7286ec2c0255549cdf3fb911
Gerrit-PatchSet: 1
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Tobias Diedrich <ranma+coreboot at tdiedrich.de>



More information about the coreboot-gerrit mailing list