blob: 3adaed39b157b861d84f2e15d6b034d48fa106e9 [file] [log] [blame]
Charles Spirakis98739642006-04-25 14:21:03 +02001Kernel driver w83791d
2=====================
3
4Supported chips:
Mauro Carvalho Chehabce09cfb2019-04-17 06:46:16 -03005
Charles Spirakis98739642006-04-25 14:21:03 +02006 * Winbond W83791D
Mauro Carvalho Chehabce09cfb2019-04-17 06:46:16 -03007
Charles Spirakis98739642006-04-25 14:21:03 +02008 Prefix: 'w83791d'
Mauro Carvalho Chehabce09cfb2019-04-17 06:46:16 -03009
Charles Spirakis98739642006-04-25 14:21:03 +020010 Addresses scanned: I2C 0x2c - 0x2f
Mauro Carvalho Chehabce09cfb2019-04-17 06:46:16 -030011
Charles Spirakis125751cb2006-09-24 20:53:04 +020012 Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83791D_W83791Gb.pdf
Charles Spirakis98739642006-04-25 14:21:03 +020013
14Author: Charles Spirakis <bezaur@gmail.com>
15
16This driver was derived from the w83781d.c and w83792d.c source files.
17
18Credits:
Mauro Carvalho Chehabce09cfb2019-04-17 06:46:16 -030019
Charles Spirakis98739642006-04-25 14:21:03 +020020 w83781d.c:
Mauro Carvalho Chehabce09cfb2019-04-17 06:46:16 -030021
22 - Frodo Looijaard <frodol@dds.nl>,
23 - Philip Edelbrock <phil@netroedge.com>,
24 - Mark Studebaker <mdsxyz123@yahoo.com>
25
Charles Spirakis98739642006-04-25 14:21:03 +020026 w83792d.c:
Mauro Carvalho Chehabce09cfb2019-04-17 06:46:16 -030027
28 - Shane Huang (Winbond),
29 - Rudolf Marek <r.marek@assembler.cz>
Charles Spirakis98739642006-04-25 14:21:03 +020030
Charles Spirakis125751cb2006-09-24 20:53:04 +020031Additional contributors:
Mauro Carvalho Chehabce09cfb2019-04-17 06:46:16 -030032
33 - Sven Anders <anders@anduras.de>
34 - Marc Hulsman <m.hulsman@tudelft.nl>
Charles Spirakis125751cb2006-09-24 20:53:04 +020035
Charles Spirakis98739642006-04-25 14:21:03 +020036Module Parameters
37-----------------
38
39* init boolean
Mauro Carvalho Chehabce09cfb2019-04-17 06:46:16 -030040 (default 0)
41
42 Use 'init=1' to have the driver do extra software initializations.
43 The default behavior is to do the minimum initialization possible
44 and depend on the BIOS to properly setup the chip. If you know you
45 have a w83791d and you're having problems, try init=1 before trying
46 reset=1.
Charles Spirakis98739642006-04-25 14:21:03 +020047
48* reset boolean
Mauro Carvalho Chehabce09cfb2019-04-17 06:46:16 -030049 (default 0)
50
51 Use 'reset=1' to reset the chip (via index 0x40, bit 7). The default
52 behavior is no chip reset to preserve BIOS settings.
Charles Spirakis98739642006-04-25 14:21:03 +020053
54* force_subclients=bus,caddr,saddr,saddr
Mauro Carvalho Chehabce09cfb2019-04-17 06:46:16 -030055 This is used to force the i2c addresses for subclients of
56 a certain chip. Example usage is `force_subclients=0,0x2f,0x4a,0x4b`
57 to force the subclients of chip 0x2f on bus 0 to i2c addresses
58 0x4a and 0x4b.
Charles Spirakis98739642006-04-25 14:21:03 +020059
60
61Description
62-----------
63
Charles Spirakis125751cb2006-09-24 20:53:04 +020064This driver implements support for the Winbond W83791D chip. The W83791G
65chip appears to be the same as the W83791D but is lead free.
Charles Spirakis98739642006-04-25 14:21:03 +020066
67Detection of the chip can sometimes be foiled because it can be in an
68internal state that allows no clean access (Bank with ID register is not
69currently selected). If you know the address of the chip, use a 'force'
70parameter; this will put it into a more well-behaved state first.
71
Marc Hulsman6495ce12008-10-17 17:51:17 +020072The driver implements three temperature sensors, ten voltage sensors,
73five fan rotation speed sensors and manual PWM control of each fan.
Charles Spirakis98739642006-04-25 14:21:03 +020074
75Temperatures are measured in degrees Celsius and measurement resolution is 1
76degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when
77the temperature gets higher than the Overtemperature Shutdown value; it stays
78on until the temperature falls below the Hysteresis value.
79
Marc Hulsman6495ce12008-10-17 17:51:17 +020080Voltage sensors (also known as IN sensors) report their values in millivolts.
81An alarm is triggered if the voltage has crossed a programmable minimum
82or maximum limit.
83
Charles Spirakis98739642006-04-25 14:21:03 +020084Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
85triggered if the rotation speed has dropped below a programmable limit. Fan
Marc Hulsmanad02ad82008-08-06 22:41:04 +020086readings can be divided by a programmable divider (1, 2, 4, 8, 16,
8732, 64 or 128 for all fans) to give the readings more range or accuracy.
Charles Spirakis98739642006-04-25 14:21:03 +020088
Marc Hulsman6495ce12008-10-17 17:51:17 +020089Each fan controlled is controlled by PWM. The PWM duty cycle can be read and
90set for each fan separately. Valid values range from 0 (stop) to 255 (full).
Marc Hulsmana5a45982008-10-17 17:51:17 +020091PWM 1-3 support Thermal Cruise mode, in which the PWMs are automatically
92regulated to keep respectively temp 1-3 at a certain target temperature.
93See below for the description of the sysfs-interface.
Charles Spirakis98739642006-04-25 14:21:03 +020094
Charles Spirakis64383122007-09-04 13:31:56 -070095The w83791d has a global bit used to enable beeping from the speaker when an
96alarm is triggered as well as a bitmask to enable or disable the beep for
97specific alarms. You need both the global beep enable bit and the
98corresponding beep bit to be on for a triggered alarm to sound a beep.
Charles Spirakis98739642006-04-25 14:21:03 +020099
Marc Hulsman6495ce12008-10-17 17:51:17 +0200100The sysfs interface to the global enable is via the sysfs beep_enable file.
Charles Spirakis64383122007-09-04 13:31:56 -0700101This file is used for both legacy and new code.
Charles Spirakis125751cb2006-09-24 20:53:04 +0200102
Charles Spirakis64383122007-09-04 13:31:56 -0700103The sysfs interface to the beep bitmask has migrated from the original legacy
104method of a single sysfs beep_mask file to a newer method using multiple
Mauro Carvalho Chehab7ebd8b662019-04-17 06:46:29 -0300105`*_beep` files as described in `Documentation/hwmon/sysfs-interface.rst`.
Charles Spirakis98739642006-04-25 14:21:03 +0200106
Lucas De Marchi25985ed2011-03-30 22:57:33 -0300107A similar change has occurred for the bitmap corresponding to the alarms. The
Charles Spirakis64383122007-09-04 13:31:56 -0700108original legacy method used a single sysfs alarms file containing a bitmap
Mauro Carvalho Chehabce09cfb2019-04-17 06:46:16 -0300109of triggered alarms. The newer method uses multiple sysfs `*_alarm` files
Charles Spirakis64383122007-09-04 13:31:56 -0700110(again following the pattern described in sysfs-interface).
Charles Spirakis98739642006-04-25 14:21:03 +0200111
Charles Spirakis64383122007-09-04 13:31:56 -0700112Since both methods read and write the underlying hardware, they can be used
113interchangeably and changes in one will automatically be reflected by
114the other. If you use the legacy bitmask method, your user-space code is
115responsible for handling the fact that the alarms and beep_mask bitmaps
116are not the same (see the table below).
117
118NOTE: All new code should be written to use the newer sysfs-interface
119specification as that avoids bitmap problems and is the preferred interface
120going forward.
121
122The driver reads the hardware chip values at most once every three seconds.
123User mode code requesting values more often will receive cached values.
124
Marc Hulsmanb5938f82008-10-17 17:51:17 +0200125/sys files
126----------
127The sysfs-interface is documented in the 'sysfs-interface' file. Only
128chip-specific options are documented here.
129
Mauro Carvalho Chehabce09cfb2019-04-17 06:46:16 -0300130======================= =======================================================
131pwm[1-3]_enable this file controls mode of fan/temperature control for
Marc Hulsmanb5938f82008-10-17 17:51:17 +0200132 fan 1-3. Fan/PWM 4-5 only support manual mode.
Marc Hulsmanb5938f82008-10-17 17:51:17 +0200133
Mauro Carvalho Chehabce09cfb2019-04-17 06:46:16 -0300134 * 1 Manual mode
135 * 2 Thermal Cruise mode
136 * 3 Fan Speed Cruise mode (no further support)
137
138temp[1-3]_target defines the target temperature for Thermal Cruise mode.
Marc Hulsmana5a45982008-10-17 17:51:17 +0200139 Unit: millidegree Celsius
140 RW
141
Mauro Carvalho Chehabce09cfb2019-04-17 06:46:16 -0300142temp[1-3]_tolerance temperature tolerance for Thermal Cruise mode.
Marc Hulsmana5a45982008-10-17 17:51:17 +0200143 Specifies an interval around the target temperature
144 in which the fan speed is not changed.
145 Unit: millidegree Celsius
146 RW
Mauro Carvalho Chehabce09cfb2019-04-17 06:46:16 -0300147======================= =======================================================
Marc Hulsmana5a45982008-10-17 17:51:17 +0200148
Charles Spirakis64383122007-09-04 13:31:56 -0700149Alarms bitmap vs. beep_mask bitmask
Mauro Carvalho Chehabce09cfb2019-04-17 06:46:16 -0300150-----------------------------------
151
Charles Spirakis64383122007-09-04 13:31:56 -0700152For legacy code using the alarms and beep_mask files:
153
Mauro Carvalho Chehabce09cfb2019-04-17 06:46:16 -0300154============= ======== ========= ==========================
155Signal Alarms beep_mask Obs
156============= ======== ========= ==========================
157in0 (VCORE) 0x000001 0x000001
158in1 (VINR0) 0x000002 0x002000 <== mismatch
159in2 (+3.3VIN) 0x000004 0x000004
160in3 (5VDD) 0x000008 0x000008
161in4 (+12VIN) 0x000100 0x000100
162in5 (-12VIN) 0x000200 0x000200
163in6 (-5VIN) 0x000400 0x000400
164in7 (VSB) 0x080000 0x010000 <== mismatch
165in8 (VBAT) 0x100000 0x020000 <== mismatch
166in9 (VINR1) 0x004000 0x004000
167temp1 0x000010 0x000010
168temp2 0x000020 0x000020
169temp3 0x002000 0x000002 <== mismatch
170fan1 0x000040 0x000040
171fan2 0x000080 0x000080
172fan3 0x000800 0x000800
173fan4 0x200000 0x200000
174fan5 0x400000 0x400000
175tart1 0x010000 0x040000 <== mismatch
176tart2 0x020000 0x080000 <== mismatch
177tart3 0x040000 0x100000 <== mismatch
178case_open 0x001000 0x001000
179global_enable - 0x800000 (modified via beep_enable)
180============= ======== ========= ==========================