PageRenderTime 39ms CodeModel.GetById 19ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 0ms

#! | 174 lines | 140 code | 34 blank | 0 comment | 0 complexity | 19c45599aa932615114c23c071f69680 MD5 | raw file
Possible License(s): CC-BY-SA-3.0, GPL-2.0, LGPL-2.0, AGPL-1.0
  1Kernel driver w83792d
  4Supported chips:
  5  * Winbond W83792D
  6    Prefix: 'w83792d'
  7    Addresses scanned: I2C 0x2c - 0x2f
  8    Datasheet:
 10Author: Chunhao Huang
 11Contact: DZShen <>
 14Module Parameters
 17* init int
 18  (default 1)
 19  Use 'init=0' to bypass initializing the chip.
 20  Try this if your computer crashes when you load the module.
 22* force_subclients=bus,caddr,saddr,saddr
 23  This is used to force the i2c addresses for subclients of
 24  a certain chip. Example usage is `force_subclients=0,0x2f,0x4a,0x4b'
 25  to force the subclients of chip 0x2f on bus 0 to i2c addresses
 26  0x4a and 0x4b.
 32This driver implements support for the Winbond W83792AD/D.
 34Detection of the chip can sometimes be foiled because it can be in an
 35internal state that allows no clean access (Bank with ID register is not
 36currently selected). If you know the address of the chip, use a 'force'
 37parameter; this will put it into a more well-behaved state first.
 39The driver implements three temperature sensors, seven fan rotation speed
 40sensors, nine voltage sensors, and two automatic fan regulation
 41strategies called: Smart Fan I (Thermal Cruise mode) and Smart Fan II.
 42Automatic fan control mode is possible only for fan1-fan3. Fan4-fan7 can run
 43synchronized with selected fan (fan1-fan3). This functionality and manual PWM
 44control for fan4-fan7 is not yet implemented.
 46Temperatures are measured in degrees Celsius and measurement resolution is 1
 47degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when
 48the temperature gets higher than the Overtemperature Shutdown value; it stays
 49on until the temperature falls below the Hysteresis value.
 51Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
 52triggered if the rotation speed has dropped below a programmable limit. Fan
 53readings can be divided by a programmable divider (1, 2, 4, 8, 16, 32, 64 or
 54128) to give the readings more range or accuracy.
 56Voltage sensors (also known as IN sensors) report their values in millivolts.
 57An alarm is triggered if the voltage has crossed a programmable minimum
 58or maximum limit.
 60Alarms are provided as output from "realtime status register". Following bits
 61are defined:
 63bit - alarm on:
 640  - in0
 651  - in1
 662  - temp1
 673  - temp2
 684  - temp3
 695  - fan1
 706  - fan2
 717  - fan3
 728  - in2
 739  - in3
 7410 - in4
 7511 - in5
 7612 - in6
 7713 - VID change
 7814 - chassis
 7915 - fan7
 8016 - tart1
 8117 - tart2
 8218 - tart3
 8319 - in7
 8420 - in8
 8521 - fan4
 8622 - fan5
 8723 - fan6
 89Tart will be asserted while target temperature cannot be achieved after 3 minutes
 90of full speed rotation of corresponding fan.
 92In addition to the alarms described above, there is a CHAS alarm on the chips
 93which triggers if your computer case is open (This one is latched, contrary
 94to realtime alarms).
 96The chips only update values each 3 seconds; reading them more often will
 97do no harm, but will return 'old' values.
102Known problems:
103	- This driver is only for Winbond W83792D C version device, there
104	  are also some motherboards with B version W83792D device. The
105	  calculation method to in6-in7(measured value, limits) is a little
106	  different between C and B version. C or B version can be identified
107	  by CR[0x49h].
108	- The function of vid and vrm has not been finished, because I'm NOT
109	  very familiar with them. Adding support is welcome.
110 	- The function of chassis open detection needs more tests.
111	- If you have ASUS server board and chip was not found: Then you will
112	  need to upgrade to latest (or beta) BIOS. If it does not help please
113	  contact us.
115Fan control
118Manual mode
121Works as expected. You just need to specify desired PWM/DC value (fan speed)
122in appropriate pwm# file.
124Thermal cruise
127In this mode, W83792D provides the Smart Fan system to automatically control
128fan speed to keep the temperatures of CPU and the system within specific
129range. At first a wanted temperature and interval must be set. This is done
130via thermal_cruise# file. The tolerance# file serves to create T +- tolerance
131interval. The fan speed will be lowered as long as the current temperature
132remains below the thermal_cruise# +- tolerance# value. Once the temperature
133exceeds the high limit (T+tolerance), the fan will be turned on with a
134specific speed set by pwm# and automatically controlled its PWM duty cycle
135with the temperature varying. Three conditions may occur:
137(1) If the temperature still exceeds the high limit, PWM duty
138cycle will increase slowly.
140(2) If the temperature goes below the high limit, but still above the low
141limit (T-tolerance), the fan speed will be fixed at the current speed because
142the temperature is in the target range.
144(3) If the temperature goes below the low limit, PWM duty cycle will decrease
145slowly to 0 or a preset stop value until the temperature exceeds the low
146limit. (The preset stop value handling is not yet implemented in driver)
148Smart Fan II
151W83792D also provides a special mode for fan. Four temperature points are
152available. When related temperature sensors detects the temperature in preset
153temperature region (sf2_point@_fan# +- tolerance#) it will cause fans to run
154on programmed value from sf2_level@_fan#. You need to set four temperatures
155for each fan.
158/sys files
161pwm[1-3] - this file stores PWM duty cycle or DC value (fan speed) in range:
162	0 (stop) to 255 (full)
163pwm[1-3]_enable - this file controls mode of fan/temperature control:
164            * 0 Disabled
165            * 1 Manual mode
166            * 2 Smart Fan II
167            * 3 Thermal Cruise
168pwm[1-3]_mode - Select PWM of DC mode
169            * 0 DC
170            * 1 PWM
171thermal_cruise[1-3] - Selects the desired temperature for cruise (degC)
172tolerance[1-3] - Value in degrees of Celsius (degC) for +- T
173sf2_point[1-4]_fan[1-3] - four temperature points for each fan for Smart Fan II
174sf2_level[1-3]_fan[1-3] - three PWM/DC levels for each fan for Smart Fan II