OpenCores
URL https://opencores.org/ocsvn/test_project/test_project/trunk

Subversion Repositories test_project

[/] [test_project/] [trunk/] [linux_sd_driver/] [Documentation/] [hwmon/] [w83781d] - Blame information for rev 65

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.