blob: 55e1d9cdaaae59477a453e1613e575e2adbfccd5 [file] [log] [blame]
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +00001Kernel driver lm85
2==================
3
4Supported chips:
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -03005
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +00006 * National Semiconductor LM85 (B and C versions)
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -03007
Jeremy Gebben11650cf2019-02-04 13:19:05 -07008 Prefix: 'lm85b' or 'lm85c'
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -03009
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +000010 Addresses scanned: I2C 0x2c, 0x2d, 0x2e
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030011
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +000012 Datasheet: http://www.national.com/pf/LM/LM85.html
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030013
Jeremy Gebben11650cf2019-02-04 13:19:05 -070014 * Texas Instruments LM96000
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030015
Jeremy Gebben11650cf2019-02-04 13:19:05 -070016 Prefix: 'lm9600'
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030017
Jeremy Gebben11650cf2019-02-04 13:19:05 -070018 Addresses scanned: I2C 0x2c, 0x2d, 0x2e
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030019
Alexander A. Klimovad736c12020-07-19 19:55:12 +020020 Datasheet: https://www.ti.com/lit/ds/symlink/lm96000.pdf
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030021
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +000022 * Analog Devices ADM1027
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030023
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +000024 Prefix: 'adm1027'
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030025
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +000026 Addresses scanned: I2C 0x2c, 0x2d, 0x2e
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030027
Alexander A. Klimovad736c12020-07-19 19:55:12 +020028 Datasheet: https://www.onsemi.com/PowerSolutions/product.do?id=ADM1027
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030029
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +000030 * Analog Devices ADT7463
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030031
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +000032 Prefix: 'adt7463'
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030033
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +000034 Addresses scanned: I2C 0x2c, 0x2d, 0x2e
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030035
Alexander A. Klimovad736c12020-07-19 19:55:12 +020036 Datasheet: https://www.onsemi.com/PowerSolutions/product.do?id=ADT7463
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030037
Jean Delvarec36364d2010-10-28 20:31:50 +020038 * Analog Devices ADT7468
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030039
Jean Delvarec36364d2010-10-28 20:31:50 +020040 Prefix: 'adt7468'
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030041
Jean Delvarec36364d2010-10-28 20:31:50 +020042 Addresses scanned: I2C 0x2c, 0x2d, 0x2e
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030043
Alexander A. Klimovad736c12020-07-19 19:55:12 +020044 Datasheet: https://www.onsemi.com/PowerSolutions/product.do?id=ADT7468
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030045
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +000046 * SMSC EMC6D100, SMSC EMC6D101
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030047
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +000048 Prefix: 'emc6d100'
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030049
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +000050 Addresses scanned: I2C 0x2c, 0x2d, 0x2e
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030051
52 Datasheet: http://www.smsc.com/media/Downloads_Public/discontinued/6d100.pdf
53
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +000054 * SMSC EMC6D102
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030055
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +000056 Prefix: 'emc6d102'
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030057
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +000058 Addresses scanned: I2C 0x2c, 0x2d, 0x2e
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030059
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +000060 Datasheet: http://www.smsc.com/main/catalog/emc6d102.html
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030061
Guenter Roeck06923f82011-02-19 08:27:47 -080062 * SMSC EMC6D103
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030063
Guenter Roeck06923f82011-02-19 08:27:47 -080064 Prefix: 'emc6d103'
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030065
Guenter Roeck06923f82011-02-19 08:27:47 -080066 Addresses scanned: I2C 0x2c, 0x2d, 0x2e
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030067
Guenter Roeck06923f82011-02-19 08:27:47 -080068 Datasheet: http://www.smsc.com/main/catalog/emc6d103.html
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030069
Guenter Roeck06923f82011-02-19 08:27:47 -080070 * SMSC EMC6D103S
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030071
Guenter Roeck06923f82011-02-19 08:27:47 -080072 Prefix: 'emc6d103s'
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030073
Guenter Roeck06923f82011-02-19 08:27:47 -080074 Addresses scanned: I2C 0x2c, 0x2d, 0x2e
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030075
Guenter Roeck06923f82011-02-19 08:27:47 -080076 Datasheet: http://www.smsc.com/main/catalog/emc6d103s.html
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +000077
78Authors:
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030079 - Philip Pokorny <ppokorny@penguincomputing.com>,
80 - Frodo Looijaard <frodol@dds.nl>,
81 - Richard Barrington <rich_b_nz@clear.net.nz>,
82 - Margit Schubert-While <margitsw@t-online.de>,
83 - Justin Thiessen <jthiessen@penguincomputing.com>
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +000084
85Description
86-----------
87
88This driver implements support for the National Semiconductor LM85 and
Jean Delvarec36364d2010-10-28 20:31:50 +020089compatible chips including the Analog Devices ADM1027, ADT7463, ADT7468 and
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +000090SMSC EMC6D10x chips family.
91
92The LM85 uses the 2-wire interface compatible with the SMBUS 2.0
93specification. Using an analog to digital converter it measures three (3)
94temperatures and five (5) voltages. It has four (4) 16-bit counters for
95measuring fan speed. Five (5) digital inputs are provided for sampling the
96VID signals from the processor to the VRM. Lastly, there are three (3) PWM
97outputs that can be used to control fan speed.
98
99The voltage inputs have internal scaling resistors so that the following
100voltage can be measured without external resistors:
101
102 2.5V, 3.3V, 5V, 12V, and CPU core voltage (2.25V)
103
104The temperatures measured are one internal diode, and two remote diodes.
105Remote 1 is generally the CPU temperature. These inputs are designed to
106measure a thermal diode like the one in a Pentium 4 processor in a socket
107423 or socket 478 package. They can also measure temperature using a
108transistor like the 2N3904.
109
110A sophisticated control system for the PWM outputs is designed into the
111LM85 that allows fan speed to be adjusted automatically based on any of the
112three temperature sensors. Each PWM output is individually adjustable and
113programmable. Once configured, the LM85 will adjust the PWM outputs in
114response to the measured temperatures without further host intervention.
115This feature can also be disabled for manual control of the PWM's.
116
117Each of the measured inputs (voltage, temperature, fan speed) has
118corresponding high/low limit values. The LM85 will signal an ALARM if any
119measured value exceeds either limit.
120
121The LM85 samples all inputs continuously. The lm85 driver will not read
122the registers more often than once a second. Further, configuration data is
123only read once each 5 minutes. There is twice as much config data as
124measurements, so this would seem to be a worthwhile optimization.
125
126Special Features
127----------------
128
129The LM85 has four fan speed monitoring modes. The ADM1027 has only two.
130Both have special circuitry to compensate for PWM interactions with the
131TACH signal from the fans. The ADM1027 can be configured to measure the
132speed of a two wire fan, but the input conditioning circuitry is different
133for 3-wire and 2-wire mode. For this reason, the 2-wire fan modes are not
134exposed to user control. The BIOS should initialize them to the correct
135mode. If you've designed your own ADM1027, you'll have to modify the
136init_client function and add an insmod parameter to set this up.
137
138To smooth the response of fans to changes in temperature, the LM85 has an
139optional filter for smoothing temperatures. The ADM1027 has the same
140config option but uses it to rate limit the changes to fan speed instead.
141
Jean Delvarec36364d2010-10-28 20:31:50 +0200142The ADM1027, ADT7463 and ADT7468 have a 10-bit ADC and can therefore
143measure temperatures with 0.25 degC resolution. They also provide an offset
144to the temperature readings that is automatically applied during
145measurement. This offset can be used to zero out any errors due to traces
146and placement. The documentation says that the offset is in 0.25 degC
147steps, but in initial testing of the ADM1027 it was 1.00 degC steps. Analog
148Devices has confirmed this "bug". The ADT7463 is reported to work as
149described in the documentation. The current lm85 driver does not show the
150offset register.
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +0000151
Jean Delvaref6c61cf2010-10-28 20:31:50 +0200152The ADT7468 has a high-frequency PWM mode, where all PWM outputs are
153driven by a 22.5 kHz clock. This is a global mode, not per-PWM output,
154which means that setting any PWM frequency above 11.3 kHz will switch
155all 3 PWM outputs to a 22.5 kHz frequency. Conversely, setting any PWM
156frequency below 11.3 kHz will switch all 3 PWM outputs to a frequency
157between 10 and 100 Hz, which can then be tuned separately.
158
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +0000159See the vendor datasheets for more information. There is application note
160from National (AN-1260) with some additional information about the LM85.
161The Analog Devices datasheet is very detailed and describes a procedure for
162determining an optimal configuration for the automatic PWM control.
163
164The SMSC EMC6D100 & EMC6D101 monitor external voltages, temperatures, and
165fan speeds. They use this monitoring capability to alert the system to out
166of limit conditions and can automatically control the speeds of multiple
167fans in a PC or embedded system. The EMC6D101, available in a 24-pin SSOP
168package, and the EMC6D100, available in a 28-pin SSOP package, are designed
169to be register compatible. The EMC6D100 offers all the features of the
170EMC6D101 plus additional voltage monitoring and system control features.
171Unfortunately it is not possible to distinguish between the package
172versions on register level so these additional voltage inputs may read
Guenter Roeck06923f82011-02-19 08:27:47 -0800173zero. EMC6D102 and EMC6D103 feature additional ADC bits thus extending precision
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +0000174of voltage and temperature channels.
175
Guenter Roeck06923f82011-02-19 08:27:47 -0800176SMSC EMC6D103S is similar to EMC6D103, but does not support pwm#_auto_pwm_minctl
177and temp#_auto_temp_off.
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +0000178
Jeremy Gebbene9b95482019-02-04 13:19:06 -0700179The LM96000 supports additional high frequency PWM modes (22.5 kHz, 24 kHz,
18025.7 kHz, 27.7 kHz and 30 kHz), which can be configured on a per-PWM basis.
181
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +0000182Hardware Configurations
183-----------------------
184
185The LM85 can be jumpered for 3 different SMBus addresses. There are
186no other hardware configuration options for the LM85.
187
188The lm85 driver detects both LM85B and LM85C revisions of the chip. See the
189datasheet for a complete description of the differences. Other than
190identifying the chip, the driver behaves no differently with regard to
191these two chips. The LM85B is recommended for new designs.
192
Jean Delvarec36364d2010-10-28 20:31:50 +0200193The ADM1027, ADT7463 and ADT7468 chips have an optional SMBALERT output
194that can be used to signal the chipset in case a limit is exceeded or the
195temperature sensors fail. Individual sensor interrupts can be masked so
196they won't trigger SMBALERT. The SMBALERT output if configured replaces one
197of the other functions (PWM2 or IN0). This functionality is not implemented
198in current driver.
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +0000199
Jean Delvarec36364d2010-10-28 20:31:50 +0200200The ADT7463 and ADT7468 also have an optional THERM output/input which can
201be connected to the processor PROC_HOT output. If available, the autofan
202control dynamic Tmin feature can be enabled to keep the system temperature
203within spec (just?!) with the least possible fan noise.
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +0000204
205Configuration Notes
206-------------------
207
208Besides standard interfaces driver adds following:
209
210* Temperatures and Zones
211
212Each temperature sensor is associated with a Zone. There are three
213sensors and therefore three zones (# 1, 2 and 3). Each zone has the following
214temperature configuration points:
215
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -0300216* temp#_auto_temp_off
217 - temperature below which fans should be off or spinning very low.
218* temp#_auto_temp_min
219 - temperature over which fans start to spin.
220* temp#_auto_temp_max
221 - temperature when fans spin at full speed.
222* temp#_auto_temp_crit
223 - temperature when all fans will run full speed.
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +0000224
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -0300225PWM Control
226^^^^^^^^^^^
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +0000227
228There are three PWM outputs. The LM85 datasheet suggests that the
229pwm3 output control both fan3 and fan4. Each PWM can be individually
Francis Galieguea33f3222010-04-23 00:08:02 +0200230configured and assigned to a zone for its control value. Each PWM can be
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +0000231configured individually according to the following options.
232
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -0300233* pwm#_auto_pwm_min
234 - this specifies the PWM value for temp#_auto_temp_off
235 temperature. (PWM value from 0 to 255)
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +0000236
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -0300237* pwm#_auto_pwm_minctl
238 - this flags selects for temp#_auto_temp_off temperature
239 the behaviour of fans. Write 1 to let fans spinning at
240 pwm#_auto_pwm_min or write 0 to let them off.
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +0000241
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -0300242.. note::
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +0000243
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -0300244 It has been reported that there is a bug in the LM85 that causes
245 the flag to be associated with the zones not the PWMs. This
246 contradicts all the published documentation. Setting pwm#_min_ctl
247 in this case actually affects all PWMs controlled by zone '#'.
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +0000248
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -0300249PWM Controlling Zone selection
250^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
251
252* pwm#_auto_channels
253 - controls zone that is associated with PWM
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +0000254
255Configuration choices:
256
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -0300257========== =============================================
258Value Meaning
259========== =============================================
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +0000260 1 Controlled by Zone 1
261 2 Controlled by Zone 2
262 3 Controlled by Zone 3
263 23 Controlled by higher temp of Zone 2 or 3
264 123 Controlled by highest temp of Zone 1, 2 or 3
265 0 PWM always 0% (off)
266 -1 PWM always 100% (full on)
267 -2 Manual control (write to 'pwm#' to set)
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -0300268========== =============================================
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +0000269
270The National LM85's have two vendor specific configuration
271features. Tach. mode and Spinup Control. For more details on these,
Jean Delvaredd1ac532008-05-01 08:47:33 +0200272see the LM85 datasheet or Application Note AN-1260. These features
273are not currently supported by the lm85 driver.
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +0000274
275The Analog Devices ADM1027 has several vendor specific enhancements.
276The number of pulses-per-rev of the fans can be set, Tach monitoring
277can be optimized for PWM operation, and an offset can be applied to
278the temperatures to compensate for systemic errors in the
Jean Delvaredd1ac532008-05-01 08:47:33 +0200279measurements. These features are not currently supported by the lm85
280driver.
R.Marek@sh.cvut.cz7f15b662005-05-26 12:42:19 +0000281
Jean Delvarec36364d2010-10-28 20:31:50 +0200282In addition to the ADM1027 features, the ADT7463 and ADT7468 also have
283Tmin control and THERM asserted counts. Automatic Tmin control acts to
284adjust the Tmin value to maintain the measured temperature sensor at a
285specified temperature. There isn't much documentation on this feature in
286the ADT7463 data sheet. This is not supported by current driver.