xref: /linux/Documentation/hwmon/nct6775.rst (revision 3a2c4d55e32ad65efebdb6de44eef3bfa08bb49d)
1Kernel driver NCT6775
2=====================
3
4.. note::
5
6    This driver supersedes the NCT6775F and NCT6776F support in the W83627EHF
7    driver.
8
9Supported chips:
10
11  * Nuvoton NCT6102D/NCT6104D/NCT6106D
12
13    Prefix: 'nct6106'
14
15    Addresses scanned: ISA address retrieved from Super I/O registers
16
17    Datasheet: Available from the Nuvoton web site
18
19  * Nuvoton NCT5572D/NCT6771F/NCT6772F/NCT6775F/W83677HG-I
20
21    Prefix: 'nct6775'
22
23    Addresses scanned: ISA address retrieved from Super I/O registers
24
25    Datasheet: Available from Nuvoton upon request
26
27  * Nuvoton NCT5573D/NCT5577D/NCT6776D/NCT6776F
28
29    Prefix: 'nct6776'
30
31    Addresses scanned: ISA address retrieved from Super I/O registers
32
33    Datasheet: Available from Nuvoton upon request
34
35  * Nuvoton NCT5532D/NCT6779D
36
37    Prefix: 'nct6779'
38
39    Addresses scanned: ISA address retrieved from Super I/O registers
40
41    Datasheet: Available from Nuvoton upon request
42
43  * Nuvoton NCT6791D
44
45    Prefix: 'nct6791'
46
47    Addresses scanned: ISA address retrieved from Super I/O registers
48
49    Datasheet: Available from Nuvoton upon request
50
51  * Nuvoton NCT6792D
52
53    Prefix: 'nct6792'
54
55    Addresses scanned: ISA address retrieved from Super I/O registers
56
57    Datasheet: Available from Nuvoton upon request
58
59  * Nuvoton NCT6793D
60
61    Prefix: 'nct6793'
62
63    Addresses scanned: ISA address retrieved from Super I/O registers
64
65    Datasheet: Available from Nuvoton upon request
66
67  * Nuvoton NCT6795D
68
69    Prefix: 'nct6795'
70
71    Addresses scanned: ISA address retrieved from Super I/O registers
72
73    Datasheet: Available from Nuvoton upon request
74
75  * Nuvoton NCT6796D
76
77    Prefix: 'nct6796'
78
79    Addresses scanned: ISA address retrieved from Super I/O registers
80
81    Datasheet: Available from Nuvoton upon request
82
83  * Nuvoton NCT6797D
84
85    Prefix: 'nct6797'
86
87    Addresses scanned: ISA address retrieved from Super I/O registers
88
89    Datasheet: Available from Nuvoton upon request
90
91  * Nuvoton NCT6798D
92
93    Prefix: 'nct6798'
94
95    Addresses scanned: ISA address retrieved from Super I/O registers
96
97    Datasheet: Available from Nuvoton upon request
98
99  * Nuvoton NCT5585D (compatible to NCT6798D)
100
101    Prefix: 'nct6798'
102
103    Addresses scanned: ISA address retrieved from Super I/O registers
104
105    Datasheet: Not available
106
107  * Nuvoton NCT6796D-S/NCT6799D-R
108
109    Prefix: 'nct6799'
110
111    Addresses scanned: ISA address retrieved from Super I/O registers
112
113    Datasheet: Available from Nuvoton upon request
114
115Authors:
116
117	Guenter Roeck <linux@roeck-us.net>
118
119Description
120-----------
121
122This driver implements support for the Nuvoton NCT6775F, NCT6776F, and NCT6779D
123and compatible super I/O chips.
124
125The chips support up to 25 temperature monitoring sources. Up to 6 of those are
126direct temperature sensor inputs, the others are special sources such as PECI,
127PCH, and SMBUS. Depending on the chip type, 2 to 6 of the temperature sources
128can be monitored and compared against minimum, maximum, and critical
129temperatures. The driver reports up to 10 of the temperatures to the user.
130There are 4 to 5 fan rotation speed sensors, 8 to 15 analog voltage sensors,
131one VID, alarms with beep warnings (control unimplemented), and some automatic
132fan regulation strategies (plus manual fan control mode).
133
134The temperature sensor sources on all chips are configurable. The configured
135source for each of the temperature sensors is provided in tempX_label.
136
137Temperatures are measured in degrees Celsius and measurement resolution is
138either 1 degC or 0.5 degC, depending on the temperature source and
139configuration. An alarm is triggered when the temperature gets higher than
140the high limit; it stays on until the temperature falls below the hysteresis
141value. Alarms are only supported for temp1 to temp6, depending on the chip type.
142
143Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
144triggered if the rotation speed has dropped below a programmable limit. On
145NCT6775F, fan readings can be divided by a programmable divider (1, 2, 4, 8,
14616, 32, 64 or 128) to give the readings more range or accuracy; the other chips
147do not have a fan speed divider. The driver sets the most suitable fan divisor
148itself; specifically, it increases the divider value each time a fan speed
149reading returns an invalid value, and it reduces it if the fan speed reading
150is lower than optimal. Some fans might not be present because they share pins
151with other functions.
152
153Voltage sensors (also known as IN sensors) report their values in millivolts.
154An alarm is triggered if the voltage has crossed a programmable minimum
155or maximum limit.
156
157The driver supports automatic fan control mode known as Thermal Cruise.
158In this mode, the chip attempts to keep the measured temperature in a
159predefined temperature range. If the temperature goes out of range, fan
160is driven slower/faster to reach the predefined range again.
161
162The mode works for fan1-fan5.
163
164sysfs attributes
165----------------
166
167pwm[1-7]
168    - this file stores PWM duty cycle or DC value (fan speed) in range:
169
170	   0 (lowest speed) to 255 (full)
171
172pwm[1-7]_enable
173    - this file controls mode of fan/temperature control:
174
175	* 0 Fan control disabled (fans set to maximum speed)
176	* 1 Manual mode, write to pwm[0-5] any value 0-255
177	* 2 "Thermal Cruise" mode
178	* 3 "Fan Speed Cruise" mode
179	* 4 "Smart Fan III" mode (NCT6775F only)
180	* 5 "Smart Fan IV" mode
181
182pwm[1-7]_mode
183    - controls if output is PWM or DC level
184
185	* 0 DC output
186	* 1 PWM output
187
188Common fan control attributes
189-----------------------------
190
191pwm[1-7]_temp_sel
192			Temperature source. Value is temperature sensor index.
193			For example, select '1' for temp1_input.
194
195pwm[1-7]_weight_temp_sel
196			Secondary temperature source. Value is temperature
197			sensor index. For example, select '1' for temp1_input.
198			Set to 0 to disable secondary temperature control.
199
200If secondary temperature functionality is enabled, it is controlled with the
201following attributes.
202
203pwm[1-7]_weight_duty_step
204			Duty step size.
205
206pwm[1-7]_weight_temp_step
207			Temperature step size. With each step over
208			temp_step_base, the value of weight_duty_step is added
209			to the current pwm value.
210
211pwm[1-7]_weight_temp_step_base
212			Temperature at which secondary temperature control kicks
213			in.
214
215pwm[1-7]_weight_temp_step_tol
216			Temperature step tolerance.
217
218Thermal Cruise mode (2)
219-----------------------
220
221If the temperature is in the range defined by:
222
223pwm[1-7]_target_temp
224			Target temperature, unit millidegree Celsius
225			(range 0 - 127000)
226
227pwm[1-7]_temp_tolerance
228			Target temperature tolerance, unit millidegree Celsius
229
230There are no changes to fan speed. Once the temperature leaves the interval, fan
231speed increases (if temperature is higher that desired) or decreases (if
232temperature is lower than desired), using the following limits and time
233intervals.
234
235pwm[1-7]_start
236			fan pwm start value (range 1 - 255), to start fan
237			when the temperature is above defined range.
238
239pwm[1-7]_floor
240			lowest fan pwm (range 0 - 255) if temperature is below
241			the defined range. If set to 0, the fan is expected to
242			stop if the temperature is below the defined range.
243
244pwm[1-7]_step_up_time
245			milliseconds before fan speed is increased
246
247pwm[1-7]_step_down_time
248			milliseconds before fan speed is decreased
249
250pwm[1-7]_stop_time
251			how many milliseconds must elapse to switch
252			corresponding fan off (when the temperature was below
253			defined range).
254
255Speed Cruise mode (3)
256---------------------
257
258This modes tries to keep the fan speed constant.
259
260fan[1-7]_target
261			Target fan speed
262
263fan[1-7]_tolerance
264			Target speed tolerance
265
266
267Untested; use at your own risk.
268
269Smart Fan IV mode (5)
270---------------------
271
272This mode offers multiple slopes to control the fan speed. The slopes can be
273controlled by setting the pwm and temperature attributes. When the temperature
274rises, the chip will calculate the DC/PWM output based on the current slope.
275There are up to seven data points depending on the chip type. Subsequent data
276points should be set to higher temperatures and higher pwm values to achieve
277higher fan speeds with increasing temperature. The last data point reflects
278critical temperature mode, in which the fans should run at full speed.
279
280pwm[1-7]_auto_point[1-7]_pwm
281			pwm value to be set if temperature reaches matching
282			temperature range.
283
284pwm[1-7]_auto_point[1-7]_temp
285			Temperature over which the matching pwm is enabled.
286
287pwm[1-7]_temp_tolerance
288			Temperature tolerance, unit millidegree Celsius
289
290pwm[1-7]_crit_temp_tolerance
291			Temperature tolerance for critical temperature,
292			unit millidegree Celsius
293
294pwm[1-7]_step_up_time
295			milliseconds before fan speed is increased
296
297pwm[1-7]_step_down_time
298			milliseconds before fan speed is decreased
299
300Usage Notes
301-----------
302
303On various ASUS boards with NCT6776F, it appears that CPUTIN is not really
304connected to anything and floats, or that it is connected to some non-standard
305temperature measurement device. As a result, the temperature reported on CPUTIN
306will not reflect a usable value. It often reports unreasonably high
307temperatures, and in some cases the reported temperature declines if the actual
308temperature increases (similar to the raw PECI temperature value - see PECI
309specification for details). CPUTIN should therefore be ignored on ASUS
310boards. The CPU temperature on ASUS boards is reported from PECI 0 or TSI 0.
311
312NCT6796D-S and NCT6799D-R chips are very similar and their chip_id indicates
313they are different versions. This driver treats them the same way.
314