diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-28 19:23:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-28 19:23:27 -0400 |
commit | 2ff712585a5026a021859233fce145068292584d (patch) | |
tree | 1dda6f9fa831be1267cafe260932f0abfccc4583 /Documentation | |
parent | 6174d0fd35f486f59b743630bdf088a9f9792d4d (diff) | |
parent | 3379ceeefde923a05c2c77ed2d84ba26c2fe9e81 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/hwmon-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/hwmon-2.6: (39 commits)
hwmon: Remove Yuan Mu's address
hwmon: Fix unchecked return status, SMSC chips
hwmon: Fix unchecked return status, batch 6
w83792d: Fix unchecked return status
w83l785ts: Fix unchecked return status
w83781d: Fix unchecked return status
vt8231: Fix unchecked return status
Fix unchecked return status, batch 5
hwmon: Fix unchecked return status, batch 4
hwmon: Fix unchecked return status, batch 3
hwmon: Fix unchecked return status, batch 2
w83627ehf: Fix unchecked return status
pc87360: Check for error on sysfs files creation
pc87360: Delete sysfs files on device deletion
pc87360: Move some code around
hwmon: Fix unchecked return status, batch 1
vt1211: Document module parameters
vt1211: Add documentation
hwmon: New driver for the VIA VT1211
w83791d: Documentation update
...
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/hwmon/it87 | 61 | ||||
-rw-r--r-- | Documentation/hwmon/k8temp | 52 | ||||
-rw-r--r-- | Documentation/hwmon/vt1211 | 206 | ||||
-rw-r--r-- | Documentation/hwmon/w83627ehf | 85 | ||||
-rw-r--r-- | Documentation/hwmon/w83791d | 69 |
5 files changed, 428 insertions, 45 deletions
diff --git a/Documentation/hwmon/it87 b/Documentation/hwmon/it87 index 9555be1ed999..e783fd62e308 100644 --- a/Documentation/hwmon/it87 +++ b/Documentation/hwmon/it87 | |||
@@ -13,12 +13,25 @@ Supported chips: | |||
13 | from Super I/O config space (8 I/O ports) | 13 | from Super I/O config space (8 I/O ports) |
14 | Datasheet: Publicly available at the ITE website | 14 | Datasheet: Publicly available at the ITE website |
15 | http://www.ite.com.tw/ | 15 | http://www.ite.com.tw/ |
16 | * IT8716F | ||
17 | Prefix: 'it8716' | ||
18 | Addresses scanned: from Super I/O config space (8 I/O ports) | ||
19 | Datasheet: Publicly available at the ITE website | ||
20 | http://www.ite.com.tw/product_info/file/pc/IT8716F_V0.3.ZIP | ||
21 | * IT8718F | ||
22 | Prefix: 'it8718' | ||
23 | Addresses scanned: from Super I/O config space (8 I/O ports) | ||
24 | Datasheet: Publicly available at the ITE website | ||
25 | http://www.ite.com.tw/product_info/file/pc/IT8718F_V0.2.zip | ||
26 | http://www.ite.com.tw/product_info/file/pc/IT8718F_V0%203_(for%20C%20version).zip | ||
16 | * SiS950 [clone of IT8705F] | 27 | * SiS950 [clone of IT8705F] |
17 | Prefix: 'it87' | 28 | Prefix: 'it87' |
18 | Addresses scanned: from Super I/O config space (8 I/O ports) | 29 | Addresses scanned: from Super I/O config space (8 I/O ports) |
19 | Datasheet: No longer be available | 30 | Datasheet: No longer be available |
20 | 31 | ||
21 | Author: Christophe Gauthron <chrisg@0-in.com> | 32 | Authors: |
33 | Christophe Gauthron <chrisg@0-in.com> | ||
34 | Jean Delvare <khali@linux-fr.org> | ||
22 | 35 | ||
23 | 36 | ||
24 | Module Parameters | 37 | Module Parameters |
@@ -43,26 +56,46 @@ Module Parameters | |||
43 | Description | 56 | Description |
44 | ----------- | 57 | ----------- |
45 | 58 | ||
46 | This driver implements support for the IT8705F, IT8712F and SiS950 chips. | 59 | This driver implements support for the IT8705F, IT8712F, IT8716F, |
47 | 60 | IT8718F and SiS950 chips. | |
48 | This driver also supports IT8712F, which adds SMBus access, and a VID | ||
49 | input, used to report the Vcore voltage of the Pentium processor. | ||
50 | The IT8712F additionally features VID inputs. | ||
51 | 61 | ||
52 | These chips are 'Super I/O chips', supporting floppy disks, infrared ports, | 62 | These chips are 'Super I/O chips', supporting floppy disks, infrared ports, |
53 | joysticks and other miscellaneous stuff. For hardware monitoring, they | 63 | joysticks and other miscellaneous stuff. For hardware monitoring, they |
54 | include an 'environment controller' with 3 temperature sensors, 3 fan | 64 | include an 'environment controller' with 3 temperature sensors, 3 fan |
55 | rotation speed sensors, 8 voltage sensors, and associated alarms. | 65 | rotation speed sensors, 8 voltage sensors, and associated alarms. |
56 | 66 | ||
67 | The IT8712F and IT8716F additionally feature VID inputs, used to report | ||
68 | the Vcore voltage of the processor. The early IT8712F have 5 VID pins, | ||
69 | the IT8716F and late IT8712F have 6. They are shared with other functions | ||
70 | though, so the functionality may not be available on a given system. | ||
71 | The driver dumbly assume it is there. | ||
72 | |||
73 | The IT8718F also features VID inputs (up to 8 pins) but the value is | ||
74 | stored in the Super-I/O configuration space. Due to technical limitations, | ||
75 | this value can currently only be read once at initialization time, so | ||
76 | the driver won't notice and report changes in the VID value. The two | ||
77 | upper VID bits share their pins with voltage inputs (in5 and in6) so you | ||
78 | can't have both on a given board. | ||
79 | |||
80 | The IT8716F, IT8718F and later IT8712F revisions have support for | ||
81 | 2 additional fans. They are not yet supported by the driver. | ||
82 | |||
83 | The IT8716F and IT8718F, and late IT8712F and IT8705F also have optional | ||
84 | 16-bit tachometer counters for fans 1 to 3. This is better (no more fan | ||
85 | clock divider mess) but not compatible with the older chips and | ||
86 | revisions. For now, the driver only uses the 16-bit mode on the | ||
87 | IT8716F and IT8718F. | ||
88 | |||
57 | Temperatures are measured in degrees Celsius. An alarm is triggered once | 89 | Temperatures are measured in degrees Celsius. An alarm is triggered once |
58 | when the Overtemperature Shutdown limit is crossed. | 90 | when the Overtemperature Shutdown limit is crossed. |
59 | 91 | ||
60 | Fan rotation speeds are reported in RPM (rotations per minute). An alarm is | 92 | Fan rotation speeds are reported in RPM (rotations per minute). An alarm is |
61 | triggered if the rotation speed has dropped below a programmable limit. Fan | 93 | triggered if the rotation speed has dropped below a programmable limit. When |
62 | readings can be divided by a programmable divider (1, 2, 4 or 8) to give the | 94 | 16-bit tachometer counters aren't used, fan readings can be divided by |
63 | readings more range or accuracy. Not all RPM values can accurately be | 95 | a programmable divider (1, 2, 4 or 8) to give the readings more range or |
64 | represented, so some rounding is done. With a divider of 2, the lowest | 96 | accuracy. With a divider of 2, the lowest representable value is around |
65 | representable value is around 2600 RPM. | 97 | 2600 RPM. Not all RPM values can accurately be represented, so some rounding |
98 | is done. | ||
66 | 99 | ||
67 | Voltage sensors (also known as IN sensors) report their values in volts. An | 100 | Voltage sensors (also known as IN sensors) report their values in volts. An |
68 | alarm is triggered if the voltage has crossed a programmable minimum or | 101 | alarm is triggered if the voltage has crossed a programmable minimum or |
@@ -71,9 +104,9 @@ zero'; this is important for negative voltage measurements. All voltage | |||
71 | inputs can measure voltages between 0 and 4.08 volts, with a resolution of | 104 | inputs can measure voltages between 0 and 4.08 volts, with a resolution of |
72 | 0.016 volt. The battery voltage in8 does not have limit registers. | 105 | 0.016 volt. The battery voltage in8 does not have limit registers. |
73 | 106 | ||
74 | The VID lines (IT8712F only) encode the core voltage value: the voltage | 107 | The VID lines (IT8712F/IT8716F/IT8718F) encode the core voltage value: |
75 | level your processor should work with. This is hardcoded by the mainboard | 108 | the voltage level your processor should work with. This is hardcoded by |
76 | and/or processor itself. It is a value in volts. | 109 | the mainboard and/or processor itself. It is a value in volts. |
77 | 110 | ||
78 | If an alarm triggers, it will remain triggered until the hardware register | 111 | If an alarm triggers, it will remain triggered until the hardware register |
79 | is read at least once. This means that the cause for the alarm may already | 112 | is read at least once. This means that the cause for the alarm may already |
diff --git a/Documentation/hwmon/k8temp b/Documentation/hwmon/k8temp new file mode 100644 index 000000000000..bab445ab0f52 --- /dev/null +++ b/Documentation/hwmon/k8temp | |||
@@ -0,0 +1,52 @@ | |||
1 | Kernel driver k8temp | ||
2 | ==================== | ||
3 | |||
4 | Supported chips: | ||
5 | * AMD K8 CPU | ||
6 | Prefix: 'k8temp' | ||
7 | Addresses scanned: PCI space | ||
8 | Datasheet: http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/32559.pdf | ||
9 | |||
10 | Author: Rudolf Marek | ||
11 | Contact: Rudolf Marek <r.marek@sh.cvut.cz> | ||
12 | |||
13 | Description | ||
14 | ----------- | ||
15 | |||
16 | This driver permits reading temperature sensor(s) embedded inside AMD K8 CPUs. | ||
17 | Official documentation says that it works from revision F of K8 core, but | ||
18 | in fact it seems to be implemented for all revisions of K8 except the first | ||
19 | two revisions (SH-B0 and SH-B3). | ||
20 | |||
21 | There can be up to four temperature sensors inside single CPU. The driver | ||
22 | will auto-detect the sensors and will display only temperatures from | ||
23 | implemented sensors. | ||
24 | |||
25 | Mapping of /sys files is as follows: | ||
26 | |||
27 | temp1_input - temperature of Core 0 and "place" 0 | ||
28 | temp2_input - temperature of Core 0 and "place" 1 | ||
29 | temp3_input - temperature of Core 1 and "place" 0 | ||
30 | temp4_input - temperature of Core 1 and "place" 1 | ||
31 | |||
32 | Temperatures are measured in degrees Celsius and measurement resolution is | ||
33 | 1 degree C. It is expected that future CPU will have better resolution. The | ||
34 | temperature is updated once a second. Valid temperatures are from -49 to | ||
35 | 206 degrees C. | ||
36 | |||
37 | Temperature known as TCaseMax was specified for processors up to revision E. | ||
38 | This temperature is defined as temperature between heat-spreader and CPU | ||
39 | case, so the internal CPU temperature supplied by this driver can be higher. | ||
40 | There is no easy way how to measure the temperature which will correlate | ||
41 | with TCaseMax temperature. | ||
42 | |||
43 | For newer revisions of CPU (rev F, socket AM2) there is a mathematically | ||
44 | computed temperature called TControl, which must be lower than TControlMax. | ||
45 | |||
46 | The relationship is following: | ||
47 | |||
48 | temp1_input - TjOffset*2 < TControlMax, | ||
49 | |||
50 | TjOffset is not yet exported by the driver, TControlMax is usually | ||
51 | 70 degrees C. The rule of the thumb -> CPU temperature should not cross | ||
52 | 60 degrees C too much. | ||
diff --git a/Documentation/hwmon/vt1211 b/Documentation/hwmon/vt1211 new file mode 100644 index 000000000000..77fa633b97a8 --- /dev/null +++ b/Documentation/hwmon/vt1211 | |||
@@ -0,0 +1,206 @@ | |||
1 | Kernel driver vt1211 | ||
2 | ==================== | ||
3 | |||
4 | Supported chips: | ||
5 | * VIA VT1211 | ||
6 | Prefix: 'vt1211' | ||
7 | Addresses scanned: none, address read from Super-I/O config space | ||
8 | Datasheet: Provided by VIA upon request and under NDA | ||
9 | |||
10 | Authors: Juerg Haefliger <juergh@gmail.com> | ||
11 | |||
12 | This driver is based on the driver for kernel 2.4 by Mark D. Studebaker and | ||
13 | its port to kernel 2.6 by Lars Ekman. | ||
14 | |||
15 | Thanks to Joseph Chan and Fiona Gatt from VIA for providing documentation and | ||
16 | technical support. | ||
17 | |||
18 | |||
19 | Module Parameters | ||
20 | ----------------- | ||
21 | |||
22 | * uch_config: int Override the BIOS default universal channel (UCH) | ||
23 | configuration for channels 1-5. | ||
24 | Legal values are in the range of 0-31. Bit 0 maps to | ||
25 | UCH1, bit 1 maps to UCH2 and so on. Setting a bit to 1 | ||
26 | enables the thermal input of that particular UCH and | ||
27 | setting a bit to 0 enables the voltage input. | ||
28 | |||
29 | * int_mode: int Override the BIOS default temperature interrupt mode. | ||
30 | The only possible value is 0 which forces interrupt | ||
31 | mode 0. In this mode, any pending interrupt is cleared | ||
32 | when the status register is read but is regenerated as | ||
33 | long as the temperature stays above the hysteresis | ||
34 | limit. | ||
35 | |||
36 | Be aware that overriding BIOS defaults might cause some unwanted side effects! | ||
37 | |||
38 | |||
39 | Description | ||
40 | ----------- | ||
41 | |||
42 | The VIA VT1211 Super-I/O chip includes complete hardware monitoring | ||
43 | capabilities. It monitors 2 dedicated temperature sensor inputs (temp1 and | ||
44 | temp2), 1 dedicated voltage (in5) and 2 fans. Additionally, the chip | ||
45 | implements 5 universal input channels (UCH1-5) that can be individually | ||
46 | programmed to either monitor a voltage or a temperature. | ||
47 | |||
48 | This chip also provides manual and automatic control of fan speeds (according | ||
49 | to the datasheet). The driver only supports automatic control since the manual | ||
50 | mode doesn't seem to work as advertised in the datasheet. In fact I couldn't | ||
51 | get manual mode to work at all! Be aware that automatic mode hasn't been | ||
52 | tested very well (due to the fact that my EPIA M10000 doesn't have the fans | ||
53 | connected to the PWM outputs of the VT1211 :-(). | ||
54 | |||
55 | The following table shows the relationship between the vt1211 inputs and the | ||
56 | sysfs nodes. | ||
57 | |||
58 | Sensor Voltage Mode Temp Mode Default Use (from the datasheet) | ||
59 | ------ ------------ --------- -------------------------------- | ||
60 | Reading 1 temp1 Intel thermal diode | ||
61 | Reading 3 temp2 Internal thermal diode | ||
62 | UCH1/Reading2 in0 temp3 NTC type thermistor | ||
63 | UCH2 in1 temp4 +2.5V | ||
64 | UCH3 in2 temp5 VccP (processor core) | ||
65 | UCH4 in3 temp6 +5V | ||
66 | UCH5 in4 temp7 +12V | ||
67 | +3.3V in5 Internal VCC (+3.3V) | ||
68 | |||
69 | |||
70 | Voltage Monitoring | ||
71 | ------------------ | ||
72 | |||
73 | Voltages are sampled by an 8-bit ADC with a LSB of ~10mV. The supported input | ||
74 | range is thus from 0 to 2.60V. Voltage values outside of this range need | ||
75 | external scaling resistors. This external scaling needs to be compensated for | ||
76 | via compute lines in sensors.conf, like: | ||
77 | |||
78 | compute inx @*(1+R1/R2), @/(1+R1/R2) | ||
79 | |||
80 | The board level scaling resistors according to VIA's recommendation are as | ||
81 | follows. And this is of course totally dependent on the actual board | ||
82 | implementation :-) You will have to find documentation for your own | ||
83 | motherboard and edit sensors.conf accordingly. | ||
84 | |||
85 | Expected | ||
86 | Voltage R1 R2 Divider Raw Value | ||
87 | ----------------------------------------------- | ||
88 | +2.5V 2K 10K 1.2 2083 mV | ||
89 | VccP --- --- 1.0 1400 mV (1) | ||
90 | +5V 14K 10K 2.4 2083 mV | ||
91 | +12V 47K 10K 5.7 2105 mV | ||
92 | +3.3V (int) 2K 3.4K 1.588 3300 mV (2) | ||
93 | +3.3V (ext) 6.8K 10K 1.68 1964 mV | ||
94 | |||
95 | (1) Depending on the CPU (1.4V is for a VIA C3 Nehemiah). | ||
96 | (2) R1 and R2 for 3.3V (int) are internal to the VT1211 chip and the driver | ||
97 | performs the scaling and returns the properly scaled voltage value. | ||
98 | |||
99 | Each measured voltage has an associated low and high limit which triggers an | ||
100 | alarm when crossed. | ||
101 | |||
102 | |||
103 | Temperature Monitoring | ||
104 | ---------------------- | ||
105 | |||
106 | Temperatures are reported in millidegree Celsius. Each measured temperature | ||
107 | has a high limit which triggers an alarm if crossed. There is an associated | ||
108 | hysteresis value with each temperature below which the temperature has to drop | ||
109 | before the alarm is cleared (this is only true for interrupt mode 0). The | ||
110 | interrupt mode can be forced to 0 in case the BIOS doesn't do it | ||
111 | automatically. See the 'Module Parameters' section for details. | ||
112 | |||
113 | All temperature channels except temp2 are external. Temp2 is the VT1211 | ||
114 | internal thermal diode and the driver does all the scaling for temp2 and | ||
115 | returns the temperature in millidegree Celsius. For the external channels | ||
116 | temp1 and temp3-temp7, scaling depends on the board implementation and needs | ||
117 | to be performed in userspace via sensors.conf. | ||
118 | |||
119 | Temp1 is an Intel-type thermal diode which requires the following formula to | ||
120 | convert between sysfs readings and real temperatures: | ||
121 | |||
122 | compute temp1 (@-Offset)/Gain, (@*Gain)+Offset | ||
123 | |||
124 | According to the VIA VT1211 BIOS porting guide, the following gain and offset | ||
125 | values should be used: | ||
126 | |||
127 | Diode Type Offset Gain | ||
128 | ---------- ------ ---- | ||
129 | Intel CPU 88.638 0.9528 | ||
130 | 65.000 0.9686 *) | ||
131 | VIA C3 Ezra 83.869 0.9528 | ||
132 | VIA C3 Ezra-T 73.869 0.9528 | ||
133 | |||
134 | *) This is the formula from the lm_sensors 2.10.0 sensors.conf file. I don't | ||
135 | know where it comes from or how it was derived, it's just listed here for | ||
136 | completeness. | ||
137 | |||
138 | Temp3-temp7 support NTC thermistors. For these channels, the driver returns | ||
139 | the voltages as seen at the individual pins of UCH1-UCH5. The voltage at the | ||
140 | pin (Vpin) is formed by a voltage divider made of the thermistor (Rth) and a | ||
141 | scaling resistor (Rs): | ||
142 | |||
143 | Vpin = 2200 * Rth / (Rs + Rth) (2200 is the ADC max limit of 2200 mV) | ||
144 | |||
145 | The equation for the thermistor is as follows (google it if you want to know | ||
146 | more about it): | ||
147 | |||
148 | Rth = Ro * exp(B * (1 / T - 1 / To)) (To is 298.15K (25C) and Ro is the | ||
149 | nominal resistance at 25C) | ||
150 | |||
151 | Mingling the above two equations and assuming Rs = Ro and B = 3435 yields the | ||
152 | following formula for sensors.conf: | ||
153 | |||
154 | compute tempx 1 / (1 / 298.15 - (` (2200 / @ - 1)) / 3435) - 273.15, | ||
155 | 2200 / (1 + (^ (3435 / 298.15 - 3435 / (273.15 + @)))) | ||
156 | |||
157 | |||
158 | Fan Speed Control | ||
159 | ----------------- | ||
160 | |||
161 | The VT1211 provides 2 programmable PWM outputs to control the speeds of 2 | ||
162 | fans. Writing a 2 to any of the two pwm[1-2]_enable sysfs nodes will put the | ||
163 | PWM controller in automatic mode. There is only a single controller that | ||
164 | controls both PWM outputs but each PWM output can be individually enabled and | ||
165 | disabled. | ||
166 | |||
167 | Each PWM has 4 associated distinct output duty-cycles: full, high, low and | ||
168 | off. Full and off are internally hard-wired to 255 (100%) and 0 (0%), | ||
169 | respectively. High and low can be programmed via | ||
170 | pwm[1-2]_auto_point[2-3]_pwm. Each PWM output can be associated with a | ||
171 | different thermal input but - and here's the weird part - only one set of | ||
172 | thermal thresholds exist that controls both PWMs output duty-cycles. The | ||
173 | thermal thresholds are accessible via pwm[1-2]_auto_point[1-4]_temp. Note | ||
174 | that even though there are 2 sets of 4 auto points each, they map to the same | ||
175 | registers in the VT1211 and programming one set is sufficient (actually only | ||
176 | the first set pwm1_auto_point[1-4]_temp is writable, the second set is | ||
177 | read-only). | ||
178 | |||
179 | PWM Auto Point PWM Output Duty-Cycle | ||
180 | ------------------------------------------------ | ||
181 | pwm[1-2]_auto_point4_pwm full speed duty-cycle (hard-wired to 255) | ||
182 | pwm[1-2]_auto_point3_pwm high speed duty-cycle | ||
183 | pwm[1-2]_auto_point2_pwm low speed duty-cycle | ||
184 | pwm[1-2]_auto_point1_pwm off duty-cycle (hard-wired to 0) | ||
185 | |||
186 | Temp Auto Point Thermal Threshold | ||
187 | --------------------------------------------- | ||
188 | pwm[1-2]_auto_point4_temp full speed temp | ||
189 | pwm[1-2]_auto_point3_temp high speed temp | ||
190 | pwm[1-2]_auto_point2_temp low speed temp | ||
191 | pwm[1-2]_auto_point1_temp off temp | ||
192 | |||
193 | Long story short, the controller implements the following algorithm to set the | ||
194 | PWM output duty-cycle based on the input temperature: | ||
195 | |||
196 | Thermal Threshold Output Duty-Cycle | ||
197 | (Rising Temp) (Falling Temp) | ||
198 | ---------------------------------------------------------- | ||
199 | full speed duty-cycle full speed duty-cycle | ||
200 | full speed temp | ||
201 | high speed duty-cycle full speed duty-cycle | ||
202 | high speed temp | ||
203 | low speed duty-cycle high speed duty-cycle | ||
204 | low speed temp | ||
205 | off duty-cycle low speed duty-cycle | ||
206 | off temp | ||
diff --git a/Documentation/hwmon/w83627ehf b/Documentation/hwmon/w83627ehf new file mode 100644 index 000000000000..fae3b781d82d --- /dev/null +++ b/Documentation/hwmon/w83627ehf | |||
@@ -0,0 +1,85 @@ | |||
1 | Kernel driver w83627ehf | ||
2 | ======================= | ||
3 | |||
4 | Supported chips: | ||
5 | * Winbond W83627EHF/EHG (ISA access ONLY) | ||
6 | Prefix: 'w83627ehf' | ||
7 | Addresses scanned: ISA address retrieved from Super I/O registers | ||
8 | Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83627EHF_%20W83627EHGb.pdf | ||
9 | |||
10 | Authors: | ||
11 | Jean Delvare <khali@linux-fr.org> | ||
12 | Yuan Mu (Winbond) | ||
13 | Rudolf Marek <r.marek@sh.cvut.cz> | ||
14 | |||
15 | Description | ||
16 | ----------- | ||
17 | |||
18 | This driver implements support for the Winbond W83627EHF and W83627EHG | ||
19 | super I/O chips. We will refer to them collectively as Winbond chips. | ||
20 | |||
21 | The chips implement three temperature sensors, five fan rotation | ||
22 | speed sensors, ten analog voltage sensors, alarms with beep warnings (control | ||
23 | unimplemented), and some automatic fan regulation strategies (plus manual | ||
24 | fan control mode). | ||
25 | |||
26 | Temperatures are measured in degrees Celsius and measurement resolution is 1 | ||
27 | degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when | ||
28 | the temperature gets higher than high limit; it stays on until the temperature | ||
29 | falls below the Hysteresis value. | ||
30 | |||
31 | Fan rotation speeds are reported in RPM (rotations per minute). An alarm is | ||
32 | triggered if the rotation speed has dropped below a programmable limit. Fan | ||
33 | readings can be divided by a programmable divider (1, 2, 4, 8, 16, 32, 64 or | ||
34 | 128) to give the readings more range or accuracy. The driver sets the most | ||
35 | suitable fan divisor itself. Some fans might not be present because they | ||
36 | share pins with other functions. | ||
37 | |||
38 | Voltage sensors (also known as IN sensors) report their values in millivolts. | ||
39 | An alarm is triggered if the voltage has crossed a programmable minimum | ||
40 | or maximum limit. | ||
41 | |||
42 | The driver supports automatic fan control mode known as Thermal Cruise. | ||
43 | In this mode, the chip attempts to keep the measured temperature in a | ||
44 | predefined temperature range. If the temperature goes out of range, fan | ||
45 | is driven slower/faster to reach the predefined range again. | ||
46 | |||
47 | The mode works for fan1-fan4. Mapping of temperatures to pwm outputs is as | ||
48 | follows: | ||
49 | |||
50 | temp1 -> pwm1 | ||
51 | temp2 -> pwm2 | ||
52 | temp3 -> pwm3 | ||
53 | prog -> pwm4 (the programmable setting is not supported by the driver) | ||
54 | |||
55 | /sys files | ||
56 | ---------- | ||
57 | |||
58 | pwm[1-4] - this file stores PWM duty cycle or DC value (fan speed) in range: | ||
59 | 0 (stop) to 255 (full) | ||
60 | |||
61 | pwm[1-4]_enable - this file controls mode of fan/temperature control: | ||
62 | * 1 Manual Mode, write to pwm file any value 0-255 (full speed) | ||
63 | * 2 Thermal Cruise | ||
64 | |||
65 | Thermal Cruise mode | ||
66 | ------------------- | ||
67 | |||
68 | If the temperature is in the range defined by: | ||
69 | |||
70 | pwm[1-4]_target - set target temperature, unit millidegree Celcius | ||
71 | (range 0 - 127000) | ||
72 | pwm[1-4]_tolerance - tolerance, unit millidegree Celcius (range 0 - 15000) | ||
73 | |||
74 | there are no changes to fan speed. Once the temperature leaves the interval, | ||
75 | fan speed increases (temp is higher) or decreases if lower than desired. | ||
76 | There are defined steps and times, but not exported by the driver yet. | ||
77 | |||
78 | pwm[1-4]_min_output - minimum fan speed (range 1 - 255), when the temperature | ||
79 | is below defined range. | ||
80 | pwm[1-4]_stop_time - how many milliseconds [ms] must elapse to switch | ||
81 | corresponding fan off. (when the temperature was below | ||
82 | defined range). | ||
83 | |||
84 | Note: last two functions are influenced by other control bits, not yet exported | ||
85 | by the driver, so a change might not have any effect. | ||
diff --git a/Documentation/hwmon/w83791d b/Documentation/hwmon/w83791d index 83a3836289c2..19b2ed739fa1 100644 --- a/Documentation/hwmon/w83791d +++ b/Documentation/hwmon/w83791d | |||
@@ -5,7 +5,7 @@ Supported chips: | |||
5 | * Winbond W83791D | 5 | * Winbond W83791D |
6 | Prefix: 'w83791d' | 6 | Prefix: 'w83791d' |
7 | Addresses scanned: I2C 0x2c - 0x2f | 7 | Addresses scanned: I2C 0x2c - 0x2f |
8 | Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83791Da.pdf | 8 | Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83791D_W83791Gb.pdf |
9 | 9 | ||
10 | Author: Charles Spirakis <bezaur@gmail.com> | 10 | Author: Charles Spirakis <bezaur@gmail.com> |
11 | 11 | ||
@@ -20,6 +20,9 @@ Credits: | |||
20 | Chunhao Huang <DZShen@Winbond.com.tw>, | 20 | Chunhao Huang <DZShen@Winbond.com.tw>, |
21 | Rudolf Marek <r.marek@sh.cvut.cz> | 21 | Rudolf Marek <r.marek@sh.cvut.cz> |
22 | 22 | ||
23 | Additional contributors: | ||
24 | Sven Anders <anders@anduras.de> | ||
25 | |||
23 | Module Parameters | 26 | Module Parameters |
24 | ----------------- | 27 | ----------------- |
25 | 28 | ||
@@ -46,7 +49,8 @@ Module Parameters | |||
46 | Description | 49 | Description |
47 | ----------- | 50 | ----------- |
48 | 51 | ||
49 | This driver implements support for the Winbond W83791D chip. | 52 | This driver implements support for the Winbond W83791D chip. The W83791G |
53 | chip appears to be the same as the W83791D but is lead free. | ||
50 | 54 | ||
51 | Detection of the chip can sometimes be foiled because it can be in an | 55 | Detection of the chip can sometimes be foiled because it can be in an |
52 | internal state that allows no clean access (Bank with ID register is not | 56 | internal state that allows no clean access (Bank with ID register is not |
@@ -71,34 +75,36 @@ Voltage sensors (also known as IN sensors) report their values in millivolts. | |||
71 | An alarm is triggered if the voltage has crossed a programmable minimum | 75 | An alarm is triggered if the voltage has crossed a programmable minimum |
72 | or maximum limit. | 76 | or maximum limit. |
73 | 77 | ||
74 | Alarms are provided as output from a "realtime status register". The | 78 | The bit ordering for the alarm "realtime status register" and the |
75 | following bits are defined: | 79 | "beep enable registers" are different. |
76 | 80 | ||
77 | bit - alarm on: | 81 | in0 (VCORE) : alarms: 0x000001 beep_enable: 0x000001 |
78 | 0 - Vcore | 82 | in1 (VINR0) : alarms: 0x000002 beep_enable: 0x002000 <== mismatch |
79 | 1 - VINR0 | 83 | in2 (+3.3VIN): alarms: 0x000004 beep_enable: 0x000004 |
80 | 2 - +3.3VIN | 84 | in3 (5VDD) : alarms: 0x000008 beep_enable: 0x000008 |
81 | 3 - 5VDD | 85 | in4 (+12VIN) : alarms: 0x000100 beep_enable: 0x000100 |
82 | 4 - temp1 | 86 | in5 (-12VIN) : alarms: 0x000200 beep_enable: 0x000200 |
83 | 5 - temp2 | 87 | in6 (-5VIN) : alarms: 0x000400 beep_enable: 0x000400 |
84 | 6 - fan1 | 88 | in7 (VSB) : alarms: 0x080000 beep_enable: 0x010000 <== mismatch |
85 | 7 - fan2 | 89 | in8 (VBAT) : alarms: 0x100000 beep_enable: 0x020000 <== mismatch |
86 | 8 - +12VIN | 90 | in9 (VINR1) : alarms: 0x004000 beep_enable: 0x004000 |
87 | 9 - -12VIN | 91 | temp1 : alarms: 0x000010 beep_enable: 0x000010 |
88 | 10 - -5VIN | 92 | temp2 : alarms: 0x000020 beep_enable: 0x000020 |
89 | 11 - fan3 | 93 | temp3 : alarms: 0x002000 beep_enable: 0x000002 <== mismatch |
90 | 12 - chassis | 94 | fan1 : alarms: 0x000040 beep_enable: 0x000040 |
91 | 13 - temp3 | 95 | fan2 : alarms: 0x000080 beep_enable: 0x000080 |
92 | 14 - VINR1 | 96 | fan3 : alarms: 0x000800 beep_enable: 0x000800 |
93 | 15 - reserved | 97 | fan4 : alarms: 0x200000 beep_enable: 0x200000 |
94 | 16 - tart1 | 98 | fan5 : alarms: 0x400000 beep_enable: 0x400000 |
95 | 17 - tart2 | 99 | tart1 : alarms: 0x010000 beep_enable: 0x040000 <== mismatch |
96 | 18 - tart3 | 100 | tart2 : alarms: 0x020000 beep_enable: 0x080000 <== mismatch |
97 | 19 - VSB | 101 | tart3 : alarms: 0x040000 beep_enable: 0x100000 <== mismatch |
98 | 20 - VBAT | 102 | case_open : alarms: 0x001000 beep_enable: 0x001000 |
99 | 21 - fan4 | 103 | user_enable : alarms: -------- beep_enable: 0x800000 |
100 | 22 - fan5 | 104 | |
101 | 23 - reserved | 105 | *** NOTE: It is the responsibility of user-space code to handle the fact |
106 | that the beep enable and alarm bits are in different positions when using that | ||
107 | feature of the chip. | ||
102 | 108 | ||
103 | When an alarm goes off, you can be warned by a beeping signal through your | 109 | When an alarm goes off, you can be warned by a beeping signal through your |
104 | computer speaker. It is possible to enable all beeping globally, or only | 110 | computer speaker. It is possible to enable all beeping globally, or only |
@@ -109,5 +115,6 @@ often will do no harm, but will return 'old' values. | |||
109 | 115 | ||
110 | W83791D TODO: | 116 | W83791D TODO: |
111 | --------------- | 117 | --------------- |
112 | Provide a patch for per-file alarms as discussed on the mailing list | 118 | Provide a patch for per-file alarms and beep enables as defined in the hwmon |
119 | documentation (Documentation/hwmon/sysfs-interface) | ||
113 | Provide a patch for smart-fan control (still need appropriate motherboard/fans) | 120 | Provide a patch for smart-fan control (still need appropriate motherboard/fans) |