aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/hwmon/w83781d
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2005-07-02 12:52:48 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-07-11 17:47:41 -0400
commitede7fbdf526c314850c9f32dd8da1753bf8d0ad5 (patch)
tree2f1fefa6f6df58f5c27bf98bd7df0908e97e44ef /Documentation/hwmon/w83781d
parent8d5d45fb14680326f833295f2316a4ec5e357220 (diff)
[PATCH] I2C: Move hwmon drivers (3/3)
Part 3: Move the drivers documentation, plus two general documentation files. Note that the patch "adds trailing whitespace", because it does move the files as-is, and some files happen to have trailing whitespace. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'Documentation/hwmon/w83781d')
-rw-r--r--Documentation/hwmon/w83781d402
1 files changed, 402 insertions, 0 deletions
diff --git a/Documentation/hwmon/w83781d b/Documentation/hwmon/w83781d
new file mode 100644
index 000000000000..e5459333ba68
--- /dev/null
+++ b/Documentation/hwmon/w83781d
@@ -0,0 +1,402 @@
1Kernel driver w83781d
2=====================
3
4Supported chips:
5 * Winbond W83781D
6 Prefix: 'w83781d'
7 Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports)
8 Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/w83781d.pdf
9 * Winbond W83782D
10 Prefix: 'w83782d'
11 Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports)
12 Datasheet: http://www.winbond.com/PDF/sheet/w83782d.pdf
13 * Winbond W83783S
14 Prefix: 'w83783s'
15 Addresses scanned: I2C 0x2d
16 Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/w83783s.pdf
17 * Winbond W83627HF
18 Prefix: 'w83627hf'
19 Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports)
20 Datasheet: http://www.winbond.com/PDF/sheet/w83627hf.pdf
21 * Asus AS99127F
22 Prefix: 'as99127f'
23 Addresses scanned: I2C 0x28 - 0x2f
24 Datasheet: Unavailable from Asus
25
26Authors:
27 Frodo Looijaard <frodol@dds.nl>,
28 Philip Edelbrock <phil@netroedge.com>,
29 Mark Studebaker <mdsxyz123@yahoo.com>
30
31Module parameters
32-----------------
33
34* init int
35 (default 1)
36 Use 'init=0' to bypass initializing the chip.
37 Try this if your computer crashes when you load the module.
38
39force_subclients=bus,caddr,saddr,saddr
40 This is used to force the i2c addresses for subclients of
41 a certain chip. Typical usage is `force_subclients=0,0x2d,0x4a,0x4b'
42 to force the subclients of chip 0x2d on bus 0 to i2c addresses
43 0x4a and 0x4b. This parameter is useful for certain Tyan boards.
44
45Description
46-----------
47
48This driver implements support for the Winbond W83781D, W83782D, W83783S,
49W83627HF chips, and the Asus AS99127F chips. We will refer to them
50collectively as W8378* chips.
51
52There is quite some difference between these chips, but they are similar
53enough that it was sensible to put them together in one driver.
54The W83627HF chip is assumed to be identical to the ISA W83782D.
55The Asus chips are similar to an I2C-only W83782D.
56
57Chip #vin #fanin #pwm #temp wchipid vendid i2c ISA
58as99127f 7 3 0 3 0x31 0x12c3 yes no
59as99127f rev.2 (type_name = as99127f) 0x31 0x5ca3 yes no
60w83781d 7 3 0 3 0x10-1 0x5ca3 yes yes
61w83627hf 9 3 2 3 0x21 0x5ca3 yes yes(LPC)
62w83782d 9 3 2-4 3 0x30 0x5ca3 yes yes
63w83783s 5-6 3 2 1-2 0x40 0x5ca3 yes no
64
65Detection of these chips can sometimes be foiled because they can be in
66an internal state that allows no clean access. If you know the address
67of the chip, use a 'force' parameter; this will put them into a more
68well-behaved state first.
69
70The W8378* implements temperature sensors (three on the W83781D and W83782D,
71two on the W83783S), three fan rotation speed sensors, voltage sensors
72(seven on the W83781D, nine on the W83782D and six on the W83783S), VID
73lines, alarms with beep warnings, and some miscellaneous stuff.
74
75Temperatures are measured in degrees Celsius. There is always one main
76temperature sensor, and one (W83783S) or two (W83781D and W83782D) other
77sensors. An alarm is triggered for the main sensor once when the
78Overtemperature Shutdown limit is crossed; it is triggered again as soon as
79it drops below the Hysteresis value. A more useful behavior
80can be found by setting the Hysteresis value to +127 degrees Celsius; in
81this case, alarms are issued during all the time when the actual temperature
82is above the Overtemperature Shutdown value. The driver sets the
83hysteresis value for temp1 to 127 at initialization.
84
85For the other temperature sensor(s), an alarm is triggered when the
86temperature gets higher then the Overtemperature Shutdown value; it stays
87on until the temperature falls below the Hysteresis value. But on the
88W83781D, there is only one alarm that functions for both other sensors!
89Temperatures are guaranteed within a range of -55 to +125 degrees. The
90main temperature sensors has a resolution of 1 degree; the other sensor(s)
91of 0.5 degree.
92
93Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
94triggered if the rotation speed has dropped below a programmable limit. Fan
95readings can be divided by a programmable divider (1, 2, 4 or 8 for the
96W83781D; 1, 2, 4, 8, 16, 32, 64 or 128 for the others) to give
97the readings more range or accuracy. Not all RPM values can accurately
98be represented, so some rounding is done. With a divider of 2, the lowest
99representable value is around 2600 RPM.
100
101Voltage sensors (also known as IN sensors) report their values in volts.
102An alarm is triggered if the voltage has crossed a programmable minimum
103or maximum limit. Note that minimum in this case always means 'closest to
104zero'; this is important for negative voltage measurements. All voltage
105inputs can measure voltages between 0 and 4.08 volts, with a resolution
106of 0.016 volt.
107
108The VID lines encode the core voltage value: the voltage level your processor
109should work with. This is hardcoded by the mainboard and/or processor itself.
110It is a value in volts. When it is unconnected, you will often find the
111value 3.50 V here.
112
113The W83782D and W83783S temperature conversion machine understands about
114several kinds of temperature probes. You can program the so-called
115beta value in the sensor files. '1' is the PII/Celeron diode, '2' is the
116TN3904 transistor, and 3435 the default thermistor value. Other values
117are (not yet) supported.
118
119In addition to the alarms described above, there is a CHAS alarm on the
120chips which triggers if your computer case is open.
121
122When an alarm goes off, you can be warned by a beeping signal through
123your computer speaker. It is possible to enable all beeping globally,
124or only the beeping for some alarms.
125
126If an alarm triggers, it will remain triggered until the hardware register
127is read at least once. This means that the cause for the alarm may
128already have disappeared! Note that in the current implementation, all
129hardware registers are read whenever any data is read (unless it is less
130than 1.5 seconds since the last update). This means that you can easily
131miss once-only alarms.
132
133The chips only update values each 1.5 seconds; reading them more often
134will do no harm, but will return 'old' values.
135
136AS99127F PROBLEMS
137-----------------
138The as99127f support was developed without the benefit of a datasheet.
139In most cases it is treated as a w83781d (although revision 2 of the
140AS99127F looks more like a w83782d).
141This support will be BETA until a datasheet is released.
142One user has reported problems with fans stopping
143occasionally.
144
145Note that the individual beep bits are inverted from the other chips.
146The driver now takes care of this so that user-space applications
147don't have to know about it.
148
149Known problems:
150 - Problems with diode/thermistor settings (supported?)
151 - One user reports fans stopping under high server load.
152 - Revision 2 seems to have 2 PWM registers but we don't know
153 how to handle them. More details below.
154
155These will not be fixed unless we get a datasheet.
156If you have problems, please lobby Asus to release a datasheet.
157Unfortunately several others have without success.
158Please do not send mail to us asking for better as99127f support.
159We have done the best we can without a datasheet.
160Please do not send mail to the author or the sensors group asking for
161a datasheet or ideas on how to convince Asus. We can't help.
162
163
164NOTES:
165-----
166 783s has no in1 so that in[2-6] are compatible with the 781d/782d.
167
168 783s pin is programmable for -5V or temp1; defaults to -5V,
169 no control in driver so temp1 doesn't work.
170
171 782d and 783s datasheets differ on which is pwm1 and which is pwm2.
172 We chose to follow 782d.
173
174 782d and 783s pin is programmable for fan3 input or pwm2 output;
175 defaults to fan3 input.
176 If pwm2 is enabled (with echo 255 1 > pwm2), then
177 fan3 will report 0.
178
179 782d has pwm1-2 for ISA, pwm1-4 for i2c. (pwm3-4 share pins with
180 the ISA pins)
181
182Data sheet updates:
183------------------
184 - PWM clock registers:
185
186 000: master / 512
187 001: master / 1024
188 010: master / 2048
189 011: master / 4096
190 100: master / 8192
191
192
193Answers from Winbond tech support
194---------------------------------
195>
196> 1) In the W83781D data sheet section 7.2 last paragraph, it talks about
197> reprogramming the R-T table if the Beta of the thermistor is not
198> 3435K. The R-T table is described briefly in section 8.20.
199> What formulas do I use to program a new R-T table for a given Beta?
200>
201 We are sorry that the calculation for R-T table value is
202confidential. If you have another Beta value of thermistor, we can help
203to calculate the R-T table for you. But you should give us real R-T
204Table which can be gotten by thermistor vendor. Therefore we will calculate
205them and obtain 32-byte data, and you can fill the 32-byte data to the
206register in Bank0.CR51 of W83781D.
207
208
209> 2) In the W83782D data sheet, it mentions that pins 38, 39, and 40 are
210> programmable to be either thermistor or Pentium II diode inputs.
211> How do I program them for diode inputs? I can't find any register
212> to program these to be diode inputs.
213 --> You may program Bank0 CR[5Dh] and CR[59h] registers.
214
215 CR[5Dh] bit 1(VTIN1) bit 2(VTIN2) bit 3(VTIN3)
216
217 thermistor 0 0 0
218 diode 1 1 1
219
220
221(error) CR[59h] bit 4(VTIN1) bit 2(VTIN2) bit 3(VTIN3)
222(right) CR[59h] bit 4(VTIN1) bit 5(VTIN2) bit 6(VTIN3)
223
224 PII thermal diode 1 1 1
225 2N3904 diode 0 0 0
226
227
228Asus Clones
229-----------
230
231We have no datasheets for the Asus clones (AS99127F and ASB100 Bach).
232Here are some very useful information that were given to us by Alex Van
233Kaam about how to detect these chips, and how to read their values. He
234also gives advice for another Asus chipset, the Mozart-2 (which we
235don't support yet). Thanks Alex!
236I reworded some parts and added personal comments.
237
238# Detection:
239
240AS99127F rev.1, AS99127F rev.2 and ASB100:
241- I2C address range: 0x29 - 0x2F
242- If register 0x58 holds 0x31 then we have an Asus (either ASB100 or
243 AS99127F)
244- Which one depends on register 0x4F (manufacturer ID):
245 0x06 or 0x94: ASB100
246 0x12 or 0xC3: AS99127F rev.1
247 0x5C or 0xA3: AS99127F rev.2
248 Note that 0x5CA3 is Winbond's ID (WEC), which let us think Asus get their
249 AS99127F rev.2 direct from Winbond. The other codes mean ATT and DVC,
250 respectively. ATT could stand for Asustek something (although it would be
251 very badly chosen IMHO), I don't know what DVC could stand for. Maybe
252 these codes simply aren't meant to be decoded that way.
253
254Mozart-2:
255- I2C address: 0x77
256- If register 0x58 holds 0x56 or 0x10 then we have a Mozart-2
257- Of the Mozart there are 3 types:
258 0x58=0x56, 0x4E=0x94, 0x4F=0x36: Asus ASM58 Mozart-2
259 0x58=0x56, 0x4E=0x94, 0x4F=0x06: Asus AS2K129R Mozart-2
260 0x58=0x10, 0x4E=0x5C, 0x4F=0xA3: Asus ??? Mozart-2
261 You can handle all 3 the exact same way :)
262
263# Temperature sensors:
264
265ASB100:
266- sensor 1: register 0x27
267- sensor 2 & 3 are the 2 LM75's on the SMBus
268- sensor 4: register 0x17
269Remark: I noticed that on Intel boards sensor 2 is used for the CPU
270 and 4 is ignored/stuck, on AMD boards sensor 4 is the CPU and sensor 2 is
271 either ignored or a socket temperature.
272
273AS99127F (rev.1 and 2 alike):
274- sensor 1: register 0x27
275- sensor 2 & 3 are the 2 LM75's on the SMBus
276Remark: Register 0x5b is suspected to be temperature type selector. Bit 1
277 would control temp1, bit 3 temp2 and bit 5 temp3.
278
279Mozart-2:
280- sensor 1: register 0x27
281- sensor 2: register 0x13
282
283# Fan sensors:
284
285ASB100, AS99127F (rev.1 and 2 alike):
286- 3 fans, identical to the W83781D
287
288Mozart-2:
289- 2 fans only, 1350000/RPM/div
290- fan 1: register 0x28, divisor on register 0xA1 (bits 4-5)
291- fan 2: register 0x29, divisor on register 0xA1 (bits 6-7)
292
293# Voltages:
294
295This is where there is a difference between AS99127F rev.1 and 2.
296Remark: The difference is similar to the difference between
297 W83781D and W83782D.
298
299ASB100:
300in0=r(0x20)*0.016
301in1=r(0x21)*0.016
302in2=r(0x22)*0.016
303in3=r(0x23)*0.016*1.68
304in4=r(0x24)*0.016*3.8
305in5=r(0x25)*(-0.016)*3.97
306in6=r(0x26)*(-0.016)*1.666
307
308AS99127F rev.1:
309in0=r(0x20)*0.016
310in1=r(0x21)*0.016
311in2=r(0x22)*0.016
312in3=r(0x23)*0.016*1.68
313in4=r(0x24)*0.016*3.8
314in5=r(0x25)*(-0.016)*3.97
315in6=r(0x26)*(-0.016)*1.503
316
317AS99127F rev.2:
318in0=r(0x20)*0.016
319in1=r(0x21)*0.016
320in2=r(0x22)*0.016
321in3=r(0x23)*0.016*1.68
322in4=r(0x24)*0.016*3.8
323in5=(r(0x25)*0.016-3.6)*5.14+3.6
324in6=(r(0x26)*0.016-3.6)*3.14+3.6
325
326Mozart-2:
327in0=r(0x20)*0.016
328in1=255
329in2=r(0x22)*0.016
330in3=r(0x23)*0.016*1.68
331in4=r(0x24)*0.016*4
332in5=255
333in6=255
334
335
336# PWM
337
338Additional info about PWM on the AS99127F (may apply to other Asus
339chips as well) by Jean Delvare as of 2004-04-09:
340
341AS99127F revision 2 seems to have two PWM registers at 0x59 and 0x5A,
342and a temperature sensor type selector at 0x5B (which basically means
343that they swapped registers 0x59 and 0x5B when you compare with Winbond
344chips).
345Revision 1 of the chip also has the temperature sensor type selector at
3460x5B, but PWM registers have no effect.
347
348We don't know exactly how the temperature sensor type selection works.
349Looks like bits 1-0 are for temp1, bits 3-2 for temp2 and bits 5-4 for
350temp3, although it is possible that only the most significant bit matters
351each time. So far, values other than 0 always broke the readings.
352
353PWM registers seem to be split in two parts: bit 7 is a mode selector,
354while the other bits seem to define a value or threshold.
355
356When bit 7 is clear, bits 6-0 seem to hold a threshold value. If the value
357is below a given limit, the fan runs at low speed. If the value is above
358the limit, the fan runs at full speed. We have no clue as to what the limit
359represents. Note that there seem to be some inertia in this mode, speed
360changes may need some time to trigger. Also, an hysteresis mechanism is
361suspected since walking through all the values increasingly and then
362decreasingly led to slightly different limits.
363
364When bit 7 is set, bits 3-0 seem to hold a threshold value, while bits 6-4
365would not be significant. If the value is below a given limit, the fan runs
366at full speed, while if it is above the limit it runs at low speed (so this
367is the contrary of the other mode, in a way). Here again, we don't know
368what the limit is supposed to represent.
369
370One remarkable thing is that the fans would only have two or three
371different speeds (transitional states left apart), not a whole range as
372you usually get with PWM.
373
374As a conclusion, you can write 0x00 or 0x8F to the PWM registers to make
375fans run at low speed, and 0x7F or 0x80 to make them run at full speed.
376
377Please contact us if you can figure out how it is supposed to work. As
378long as we don't know more, the w83781d driver doesn't handle PWM on
379AS99127F chips at all.
380
381Additional info about PWM on the AS99127F rev.1 by Hector Martin:
382
383I've been fiddling around with the (in)famous 0x59 register and
384found out the following values do work as a form of coarse pwm:
385
3860x80 - seems to turn fans off after some time(1-2 minutes)... might be
387some form of auto-fan-control based on temp? hmm (Qfan? this mobo is an
388old ASUS, it isn't marketed as Qfan. Maybe some beta pre-attemp at Qfan
389that was dropped at the BIOS)
3900x81 - off
3910x82 - slightly "on-ner" than off, but my fans do not get to move. I can
392hear the high-pitched PWM sound that motors give off at too-low-pwm.
3930x83 - now they do move. Estimate about 70% speed or so.
3940x84-0x8f - full on
395
396Changing the high nibble doesn't seem to do much except the high bit
397(0x80) must be set for PWM to work, else the current pwm doesn't seem to
398change.
399
400My mobo is an ASUS A7V266-E. This behavior is similar to what I got
401with speedfan under Windows, where 0-15% would be off, 15-2x% (can't
402remember the exact value) would be 70% and higher would be full on.