Rudolf Marek | 563daaf | 2006-07-05 18:15:31 +0200 | [diff] [blame] | 1 | Kernel driver w83627ehf |
| 2 | ======================= |
| 3 | |
| 4 | Supported chips: |
Gong Jun | 237c8d2 | 2009-03-30 21:46:42 +0200 | [diff] [blame] | 5 | * Winbond W83627EHF/EHG (ISA access ONLY) |
Rudolf Marek | 563daaf | 2006-07-05 18:15:31 +0200 | [diff] [blame] | 6 | Prefix: 'w83627ehf' |
| 7 | Addresses scanned: ISA address retrieved from Super I/O registers |
Guenter Roeck | 96d1eac | 2011-02-11 08:10:53 -0800 | [diff] [blame] | 8 | Datasheet: not available |
Gong Jun | 237c8d2 | 2009-03-30 21:46:42 +0200 | [diff] [blame] | 9 | * Winbond W83627DHG |
| 10 | Prefix: 'w83627dhg' |
| 11 | Addresses scanned: ISA address retrieved from Super I/O registers |
Guenter Roeck | 96d1eac | 2011-02-11 08:10:53 -0800 | [diff] [blame] | 12 | Datasheet: not available |
Jean Delvare | c1e48dc | 2009-06-15 18:39:50 +0200 | [diff] [blame] | 13 | * Winbond W83627DHG-P |
| 14 | Prefix: 'w83627dhg' |
| 15 | Addresses scanned: ISA address retrieved from Super I/O registers |
| 16 | Datasheet: not available |
Jean Delvare | eff7687 | 2011-11-04 12:00:48 +0100 | [diff] [blame] | 17 | * Winbond W83627UHG |
| 18 | Prefix: 'w83627uhg' |
| 19 | Addresses scanned: ISA address retrieved from Super I/O registers |
| 20 | Datasheet: available from www.nuvoton.com |
Gong Jun | 237c8d2 | 2009-03-30 21:46:42 +0200 | [diff] [blame] | 21 | * Winbond W83667HG |
| 22 | Prefix: 'w83667hg' |
| 23 | Addresses scanned: ISA address retrieved from Super I/O registers |
| 24 | Datasheet: not available |
Guenter Roeck | c39aeda | 2010-08-14 21:08:55 +0200 | [diff] [blame] | 25 | * Winbond W83667HG-B |
| 26 | Prefix: 'w83667hg' |
| 27 | Addresses scanned: ISA address retrieved from Super I/O registers |
| 28 | Datasheet: Available from Nuvoton upon request |
Guenter Roeck | ec3e5a1 | 2011-02-02 08:46:49 -0800 | [diff] [blame] | 29 | * Nuvoton NCT6775F/W83667HG-I |
| 30 | Prefix: 'nct6775' |
| 31 | Addresses scanned: ISA address retrieved from Super I/O registers |
| 32 | Datasheet: Available from Nuvoton upon request |
| 33 | * Nuvoton NCT6776F |
| 34 | Prefix: 'nct6776' |
| 35 | Addresses scanned: ISA address retrieved from Super I/O registers |
| 36 | Datasheet: Available from Nuvoton upon request |
Rudolf Marek | 563daaf | 2006-07-05 18:15:31 +0200 | [diff] [blame] | 37 | |
| 38 | Authors: |
| 39 | Jean Delvare <khali@linux-fr.org> |
Jean Delvare | 3379cee | 2006-09-24 21:25:52 +0200 | [diff] [blame] | 40 | Yuan Mu (Winbond) |
Jean Delvare | 7188cc6 | 2006-12-12 18:18:30 +0100 | [diff] [blame] | 41 | Rudolf Marek <r.marek@assembler.cz> |
David Hubbard | 657c93b | 2007-02-14 21:15:04 +0100 | [diff] [blame] | 42 | David Hubbard <david.c.hubbard@gmail.com> |
Gong Jun | 237c8d2 | 2009-03-30 21:46:42 +0200 | [diff] [blame] | 43 | Gong Jun <JGong@nuvoton.com> |
Rudolf Marek | 563daaf | 2006-07-05 18:15:31 +0200 | [diff] [blame] | 44 | |
| 45 | Description |
| 46 | ----------- |
| 47 | |
Gong Jun | 237c8d2 | 2009-03-30 21:46:42 +0200 | [diff] [blame] | 48 | This driver implements support for the Winbond W83627EHF, W83627EHG, |
Jean Delvare | eff7687 | 2011-11-04 12:00:48 +0100 | [diff] [blame] | 49 | W83627DHG, W83627DHG-P, W83627UHG, W83667HG, W83667HG-B, W83667HG-I |
| 50 | (NCT6775F), and NCT6776F super I/O chips. We will refer to them collectively |
| 51 | as Winbond chips. |
Rudolf Marek | 563daaf | 2006-07-05 18:15:31 +0200 | [diff] [blame] | 52 | |
Jean Delvare | eff7687 | 2011-11-04 12:00:48 +0100 | [diff] [blame] | 53 | The chips implement 2 to 4 temperature sensors (9 for NCT6775F and NCT6776F), |
| 54 | 2 to 5 fan rotation speed sensors, 8 to 10 analog voltage sensors, one VID |
| 55 | (except for 627UHG), alarms with beep warnings (control unimplemented), |
Guenter Roeck | ec3e5a1 | 2011-02-02 08:46:49 -0800 | [diff] [blame] | 56 | and some automatic fan regulation strategies (plus manual fan control mode). |
Rudolf Marek | 563daaf | 2006-07-05 18:15:31 +0200 | [diff] [blame] | 57 | |
Guenter Roeck | ec3e5a1 | 2011-02-02 08:46:49 -0800 | [diff] [blame] | 58 | The temperature sensor sources on W82677HG-B, NCT6775F, and NCT6776F are |
| 59 | configurable. temp4 and higher attributes are only reported if its temperature |
| 60 | source differs from the temperature sources of the already reported temperature |
| 61 | sensors. The configured source for each of the temperature sensors is provided |
| 62 | in tempX_label. |
Guenter Roeck | d36cf32 | 2011-02-07 15:08:54 -0800 | [diff] [blame] | 63 | |
Rudolf Marek | 563daaf | 2006-07-05 18:15:31 +0200 | [diff] [blame] | 64 | Temperatures are measured in degrees Celsius and measurement resolution is 1 |
Guenter Roeck | ec3e5a1 | 2011-02-02 08:46:49 -0800 | [diff] [blame] | 65 | degC for temp1 and and 0.5 degC for temp2 and temp3. For temp4 and higher, |
| 66 | resolution is 1 degC for W83667HG-B and 0.0 degC for NCT6775F and NCT6776F. |
| 67 | An alarm is triggered when the temperature gets higher than high limit; |
| 68 | it stays on until the temperature falls below the hysteresis value. |
| 69 | Alarms are only supported for temp1, temp2, and temp3. |
Rudolf Marek | 563daaf | 2006-07-05 18:15:31 +0200 | [diff] [blame] | 70 | |
| 71 | Fan rotation speeds are reported in RPM (rotations per minute). An alarm is |
| 72 | triggered if the rotation speed has dropped below a programmable limit. Fan |
| 73 | readings can be divided by a programmable divider (1, 2, 4, 8, 16, 32, 64 or |
| 74 | 128) to give the readings more range or accuracy. The driver sets the most |
| 75 | suitable fan divisor itself. Some fans might not be present because they |
| 76 | share pins with other functions. |
| 77 | |
| 78 | Voltage sensors (also known as IN sensors) report their values in millivolts. |
| 79 | An alarm is triggered if the voltage has crossed a programmable minimum |
| 80 | or maximum limit. |
| 81 | |
| 82 | The driver supports automatic fan control mode known as Thermal Cruise. |
| 83 | In this mode, the chip attempts to keep the measured temperature in a |
| 84 | predefined temperature range. If the temperature goes out of range, fan |
| 85 | is driven slower/faster to reach the predefined range again. |
| 86 | |
| 87 | The mode works for fan1-fan4. Mapping of temperatures to pwm outputs is as |
| 88 | follows: |
| 89 | |
| 90 | temp1 -> pwm1 |
| 91 | temp2 -> pwm2 |
Jean Delvare | eff7687 | 2011-11-04 12:00:48 +0100 | [diff] [blame] | 92 | temp3 -> pwm3 (not on 627UHG) |
Guenter Roeck | c39aeda | 2010-08-14 21:08:55 +0200 | [diff] [blame] | 93 | prog -> pwm4 (not on 667HG and 667HG-B; the programmable setting is not |
| 94 | supported by the driver) |
Rudolf Marek | 563daaf | 2006-07-05 18:15:31 +0200 | [diff] [blame] | 95 | |
| 96 | /sys files |
| 97 | ---------- |
| 98 | |
Jean Delvare | eff7687 | 2011-11-04 12:00:48 +0100 | [diff] [blame] | 99 | name - this is a standard hwmon device entry, it contains the name of |
| 100 | the device (see the prefix in the list of supported devices at |
| 101 | the top of this file) |
David Hubbard | 657c93b | 2007-02-14 21:15:04 +0100 | [diff] [blame] | 102 | |
Rudolf Marek | 563daaf | 2006-07-05 18:15:31 +0200 | [diff] [blame] | 103 | pwm[1-4] - this file stores PWM duty cycle or DC value (fan speed) in range: |
| 104 | 0 (stop) to 255 (full) |
| 105 | |
| 106 | pwm[1-4]_enable - this file controls mode of fan/temperature control: |
Daniel J Blueman | 41e9a06 | 2009-12-14 18:01:37 -0800 | [diff] [blame] | 107 | * 1 Manual mode, write to pwm file any value 0-255 (full speed) |
| 108 | * 2 "Thermal Cruise" mode |
| 109 | * 3 "Fan Speed Cruise" mode |
| 110 | * 4 "Smart Fan III" mode |
Guenter Roeck | ec3e5a1 | 2011-02-02 08:46:49 -0800 | [diff] [blame] | 111 | * 5 "Smart Fan IV" mode |
| 112 | |
| 113 | SmartFan III mode is not supported on NCT6776F. |
| 114 | |
| 115 | SmartFan IV mode is configurable only if it was configured at system |
| 116 | startup, and is only supported for W83677HG-B, NCT6775F, and NCT6776F. |
| 117 | SmartFan IV operational parameters can not be configured at this time, |
| 118 | and the various pwm attributes are not used in SmartFan IV mode. |
| 119 | The attributes can be written to, which is useful if you plan to |
| 120 | configure the system for a different pwm mode. However, the information |
| 121 | returned when reading pwm attributes is unrelated to SmartFan IV |
| 122 | operation. |
Daniel J Blueman | 41e9a06 | 2009-12-14 18:01:37 -0800 | [diff] [blame] | 123 | |
| 124 | pwm[1-4]_mode - controls if output is PWM or DC level |
| 125 | * 0 DC output (0 - 12v) |
| 126 | * 1 PWM output |
Rudolf Marek | 563daaf | 2006-07-05 18:15:31 +0200 | [diff] [blame] | 127 | |
| 128 | Thermal Cruise mode |
| 129 | ------------------- |
| 130 | |
| 131 | If the temperature is in the range defined by: |
| 132 | |
Jean Delvare | 15fe25c | 2006-10-08 21:59:54 +0200 | [diff] [blame] | 133 | pwm[1-4]_target - set target temperature, unit millidegree Celsius |
Rudolf Marek | 563daaf | 2006-07-05 18:15:31 +0200 | [diff] [blame] | 134 | (range 0 - 127000) |
Jean Delvare | 15fe25c | 2006-10-08 21:59:54 +0200 | [diff] [blame] | 135 | pwm[1-4]_tolerance - tolerance, unit millidegree Celsius (range 0 - 15000) |
Rudolf Marek | 563daaf | 2006-07-05 18:15:31 +0200 | [diff] [blame] | 136 | |
| 137 | there are no changes to fan speed. Once the temperature leaves the interval, |
| 138 | fan speed increases (temp is higher) or decreases if lower than desired. |
| 139 | There are defined steps and times, but not exported by the driver yet. |
| 140 | |
| 141 | pwm[1-4]_min_output - minimum fan speed (range 1 - 255), when the temperature |
| 142 | is below defined range. |
| 143 | pwm[1-4]_stop_time - how many milliseconds [ms] must elapse to switch |
| 144 | corresponding fan off. (when the temperature was below |
| 145 | defined range). |
| 146 | |
| 147 | Note: last two functions are influenced by other control bits, not yet exported |
| 148 | by the driver, so a change might not have any effect. |
David Hubbard | 657c93b | 2007-02-14 21:15:04 +0100 | [diff] [blame] | 149 | |
| 150 | Implementation Details |
| 151 | ---------------------- |
| 152 | |
| 153 | Future driver development should bear in mind that the following registers have |
| 154 | different functions on the 627EHF and the 627DHG. Some registers also have |
| 155 | different power-on default values, but BIOS should already be loading |
| 156 | appropriate defaults. Note that bank selection must be performed as is currently |
| 157 | done in the driver for all register addresses. |
| 158 | |
| 159 | 0x49: only on DHG, selects temperature source for AUX fan, CPU fan0 |
| 160 | 0x4a: not completely documented for the EHF and the DHG documentation assigns |
| 161 | different behavior to bits 7 and 6, including extending the temperature |
| 162 | input selection to SmartFan I, not just SmartFan III. Testing on the EHF |
| 163 | will reveal whether they are compatible or not. |
| 164 | |
| 165 | 0x58: Chip ID: 0xa1=EHF 0xc1=DHG |
| 166 | 0x5e: only on DHG, has bits to enable "current mode" temperature detection and |
| 167 | critical temperature protection |
| 168 | 0x45b: only on EHF, bit 3, vin4 alarm (EHF supports 10 inputs, only 9 on DHG) |
| 169 | 0x552: only on EHF, vin4 |
| 170 | 0x558: only on EHF, vin4 high limit |
| 171 | 0x559: only on EHF, vin4 low limit |
| 172 | 0x6b: only on DHG, SYS fan critical temperature |
| 173 | 0x6c: only on DHG, CPU fan0 critical temperature |
| 174 | 0x6d: only on DHG, AUX fan critical temperature |
| 175 | 0x6e: only on DHG, CPU fan1 critical temperature |
| 176 | |
| 177 | 0x50-0x55 and 0x650-0x657 are marked "Test Register" for the EHF, but "Reserved |
| 178 | Register" for the DHG |
| 179 | |
| 180 | The DHG also supports PECI, where the DHG queries Intel CPU temperatures, and |
| 181 | the ICH8 southbridge gets that data via PECI from the DHG, so that the |
| 182 | southbridge drives the fans. And the DHG supports SST, a one-wire serial bus. |
Jean Delvare | c1e48dc | 2009-06-15 18:39:50 +0200 | [diff] [blame] | 183 | |
| 184 | The DHG-P has an additional automatic fan speed control mode named Smart Fan |
| 185 | (TM) III+. This mode is not yet supported by the driver. |