Merge tag 'hsi-for-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi
[linux-2.6-block.git] / Documentation / hwmon / lm90.rst
CommitLineData
7f15b664
M
1Kernel driver lm90
2==================
3
4Supported chips:
b04f2f7d 5
7f15b664 6 * National Semiconductor LM90
b04f2f7d 7
7f15b664 8 Prefix: 'lm90'
b04f2f7d 9
7f15b664 10 Addresses scanned: I2C 0x4c
b04f2f7d 11
7f15b664 12 Datasheet: Publicly available at the National Semiconductor website
b04f2f7d
MCC
13
14 http://www.national.com/pf/LM/LM90.html
15
7f15b664 16 * National Semiconductor LM89
b04f2f7d 17
97ae60bb 18 Prefix: 'lm89' (no auto-detection)
b04f2f7d 19
7f15b664 20 Addresses scanned: I2C 0x4c and 0x4d
b04f2f7d 21
7f15b664 22 Datasheet: Publicly available at the National Semiconductor website
b04f2f7d
MCC
23
24 http://www.national.com/mpf/LM/LM89.html
25
7f15b664 26 * National Semiconductor LM99
b04f2f7d 27
7f15b664 28 Prefix: 'lm99'
b04f2f7d 29
7f15b664 30 Addresses scanned: I2C 0x4c and 0x4d
b04f2f7d 31
7f15b664 32 Datasheet: Publicly available at the National Semiconductor website
b04f2f7d
MCC
33
34 http://www.national.com/pf/LM/LM99.html
35
7f15b664 36 * National Semiconductor LM86
b04f2f7d 37
7f15b664 38 Prefix: 'lm86'
b04f2f7d 39
7f15b664 40 Addresses scanned: I2C 0x4c
b04f2f7d 41
7f15b664 42 Datasheet: Publicly available at the National Semiconductor website
b04f2f7d
MCC
43
44 http://www.national.com/mpf/LM/LM86.html
45
7f15b664 46 * Analog Devices ADM1032
b04f2f7d 47
7f15b664 48 Prefix: 'adm1032'
b04f2f7d 49
90209b42 50 Addresses scanned: I2C 0x4c and 0x4d
b04f2f7d 51
a874a10c 52 Datasheet: Publicly available at the ON Semiconductor website
b04f2f7d
MCC
53
54 http://www.onsemi.com/PowerSolutions/product.do?id=ADM1032
55
7f15b664 56 * Analog Devices ADT7461
b04f2f7d 57
7f15b664 58 Prefix: 'adt7461'
b04f2f7d 59
90209b42 60 Addresses scanned: I2C 0x4c and 0x4d
b04f2f7d 61
a874a10c 62 Datasheet: Publicly available at the ON Semiconductor website
b04f2f7d
MCC
63
64 http://www.onsemi.com/PowerSolutions/product.do?id=ADT7461
65
5a4e5e6a 66 * Analog Devices ADT7461A
b04f2f7d 67
5a4e5e6a 68 Prefix: 'adt7461a'
b04f2f7d 69
5a4e5e6a 70 Addresses scanned: I2C 0x4c and 0x4d
b04f2f7d 71
5a4e5e6a 72 Datasheet: Publicly available at the ON Semiconductor website
b04f2f7d
MCC
73
74 http://www.onsemi.com/PowerSolutions/product.do?id=ADT7461A
75
5a4e5e6a 76 * ON Semiconductor NCT1008
b04f2f7d 77
5a4e5e6a 78 Prefix: 'nct1008'
b04f2f7d 79
5a4e5e6a 80 Addresses scanned: I2C 0x4c and 0x4d
b04f2f7d 81
5a4e5e6a 82 Datasheet: Publicly available at the ON Semiconductor website
b04f2f7d
MCC
83
84 http://www.onsemi.com/PowerSolutions/product.do?id=NCT1008
85
271dabf5 86 * Maxim MAX6646
b04f2f7d 87
271dabf5 88 Prefix: 'max6646'
b04f2f7d 89
271dabf5 90 Addresses scanned: I2C 0x4d
b04f2f7d 91
271dabf5 92 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
93
94 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497
95
271dabf5 96 * Maxim MAX6647
b04f2f7d 97
271dabf5 98 Prefix: 'max6646'
b04f2f7d 99
271dabf5 100 Addresses scanned: I2C 0x4e
b04f2f7d 101
271dabf5 102 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
103
104 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497
105
1a51e068 106 * Maxim MAX6648
b04f2f7d 107
1a51e068 108 Prefix: 'max6646'
b04f2f7d 109
1a51e068 110 Addresses scanned: I2C 0x4c
b04f2f7d 111
1a51e068 112 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
113
114 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3500
115
271dabf5 116 * Maxim MAX6649
b04f2f7d 117
271dabf5 118 Prefix: 'max6646'
b04f2f7d 119
271dabf5 120 Addresses scanned: I2C 0x4c
b04f2f7d 121
271dabf5 122 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
123
124 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497
125
7f15b664 126 * Maxim MAX6657
b04f2f7d 127
7f15b664 128 Prefix: 'max6657'
b04f2f7d 129
7f15b664 130 Addresses scanned: I2C 0x4c
b04f2f7d 131
7f15b664 132 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
133
134 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578
135
7f15b664 136 * Maxim MAX6658
b04f2f7d 137
7f15b664 138 Prefix: 'max6657'
b04f2f7d 139
7f15b664 140 Addresses scanned: I2C 0x4c
b04f2f7d 141
7f15b664 142 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
143
144 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578
145
7f15b664 146 * Maxim MAX6659
b04f2f7d 147
13c84951 148 Prefix: 'max6659'
b04f2f7d 149
13c84951 150 Addresses scanned: I2C 0x4c, 0x4d, 0x4e
b04f2f7d 151
7f15b664 152 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
153
154 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578
155
32c82a93 156 * Maxim MAX6680
b04f2f7d 157
32c82a93 158 Prefix: 'max6680'
b04f2f7d 159
32c82a93 160 Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
b04f2f7d
MCC
161
162 0x4c, 0x4d and 0x4e
163
32c82a93 164 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
165
166 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3370
167
32c82a93 168 * Maxim MAX6681
b04f2f7d 169
32c82a93 170 Prefix: 'max6680'
b04f2f7d 171
32c82a93 172 Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
b04f2f7d
MCC
173
174 0x4c, 0x4d and 0x4e
175
32c82a93 176 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
177
178 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3370
179
1a51e068 180 * Maxim MAX6692
b04f2f7d 181
1a51e068 182 Prefix: 'max6646'
b04f2f7d 183
1a51e068 184 Addresses scanned: I2C 0x4c
b04f2f7d 185
1a51e068 186 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
187
188 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3500
189
06e1c0a2 190 * Maxim MAX6695
b04f2f7d 191
06e1c0a2 192 Prefix: 'max6695'
b04f2f7d 193
06e1c0a2 194 Addresses scanned: I2C 0x18
b04f2f7d 195
06e1c0a2 196 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
197
198 http://www.maxim-ic.com/datasheet/index.mvp/id/4199
199
06e1c0a2 200 * Maxim MAX6696
b04f2f7d 201
06e1c0a2 202 Prefix: 'max6695'
b04f2f7d 203
06e1c0a2 204 Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
b04f2f7d
MCC
205
206 0x4c, 0x4d and 0x4e
207
06e1c0a2 208 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
209
210 http://www.maxim-ic.com/datasheet/index.mvp/id/4199
211
c4f99a2b 212 * Winbond/Nuvoton W83L771W/G
b04f2f7d 213
c4f99a2b 214 Prefix: 'w83l771'
b04f2f7d 215
c4f99a2b 216 Addresses scanned: I2C 0x4c
b04f2f7d 217
c4f99a2b 218 Datasheet: No longer available
b04f2f7d 219
6771ea1f 220 * Winbond/Nuvoton W83L771AWG/ASG
b04f2f7d 221
6771ea1f 222 Prefix: 'w83l771'
b04f2f7d 223
6771ea1f 224 Addresses scanned: I2C 0x4c
b04f2f7d 225
6771ea1f 226 Datasheet: Not publicly available, can be requested from Nuvoton
b04f2f7d 227
2ef01793 228 * Philips/NXP SA56004X
b04f2f7d 229
2ef01793 230 Prefix: 'sa56004'
b04f2f7d 231
2ef01793 232 Addresses scanned: I2C 0x48 through 0x4F
b04f2f7d 233
2ef01793 234 Datasheet: Publicly available at NXP website
b04f2f7d
MCC
235
236 http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf
237
ae544f64 238 * GMT G781
b04f2f7d 239
ae544f64 240 Prefix: 'g781'
b04f2f7d 241
ae544f64 242 Addresses scanned: I2C 0x4c, 0x4d
b04f2f7d 243
ae544f64 244 Datasheet: Not publicly available from GMT
b04f2f7d 245
1daaceb2 246 * Texas Instruments TMP451
b04f2f7d 247
1daaceb2 248 Prefix: 'tmp451'
b04f2f7d 249
1daaceb2 250 Addresses scanned: I2C 0x4c
b04f2f7d 251
1daaceb2 252 Datasheet: Publicly available at TI website
1daaceb2 253
b04f2f7d 254 http://www.ti.com/litv/pdf/sbos686
7f15b664 255
7c81c60f 256Author: Jean Delvare <jdelvare@suse.de>
7f15b664
M
257
258
259Description
260-----------
261
262The LM90 is a digital temperature sensor. It senses its own temperature as
263well as the temperature of up to one external diode. It is compatible
23b2d477 264with many other devices, many of which are supported by this driver.
32c82a93
RB
265
266Note that there is no easy way to differentiate between the MAX6657,
6948708d
GR
267MAX6658 and MAX6659 variants. The extra features of the MAX6659 are only
268supported by this driver if the chip is located at address 0x4d or 0x4e,
269or if the chip type is explicitly selected as max6659.
270The MAX6680 and MAX6681 only differ in their pinout, therefore they obviously
271can't (and don't need to) be distinguished.
7f15b664
M
272
273The specificity of this family of chipsets over the ADM1021/LM84
274family is that it features critical limits with hysteresis, and an
275increased resolution of the remote temperature measurement.
276
277The different chipsets of the family are not strictly identical, although
f65e1708
JD
278very similar. For reference, here comes a non-exhaustive list of specific
279features:
7f15b664
M
280
281LM90:
282 * Filter and alert configuration register at 0xBF.
283 * ALERT is triggered by temperatures over critical limits.
284
285LM86 and LM89:
286 * Same as LM90
287 * Better external channel accuracy
288
289LM99:
290 * Same as LM89
291 * External temperature shifted by 16 degrees down
292
293ADM1032:
294 * Consecutive alert register at 0x22.
295 * Conversion averaging.
296 * Up to 64 conversions/s.
297 * ALERT is triggered by open remote sensor.
c3df5806 298 * SMBus PEC support for Write Byte and Receive Byte transactions.
7f15b664 299
5a4e5e6a 300ADT7461, ADT7461A, NCT1008:
7f15b664
M
301 * Extended temperature range (breaks compatibility)
302 * Lower resolution for remote temperature
303
304MAX6657 and MAX6658:
f65e1708 305 * Better local resolution
7f15b664
M
306 * Remote sensor type selection
307
32c82a93 308MAX6659:
f65e1708 309 * Better local resolution
7f15b664
M
310 * Selectable address
311 * Second critical temperature limit
312 * Remote sensor type selection
313
32c82a93
RB
314MAX6680 and MAX6681:
315 * Selectable address
316 * Remote sensor type selection
317
06e1c0a2
GR
318MAX6695 and MAX6696:
319 * Better local resolution
320 * Selectable address (max6696)
321 * Second critical temperature limit
322 * Two remote sensors
323
c4f99a2b
JD
324W83L771W/G
325 * The G variant is lead-free, otherwise similar to the W.
326 * Filter and alert configuration register at 0xBF
327 * Moving average (depending on conversion rate)
328
6771ea1f 329W83L771AWG/ASG
c4f99a2b 330 * Successor of the W83L771W/G, same features.
6771ea1f 331 * The AWG and ASG variants only differ in package format.
6771ea1f 332 * Diode ideality factor configuration (remote sensor) at 0xE3
6771ea1f 333
2ef01793
SD
334SA56004X:
335 * Better local resolution
336
7f15b664
M
337All temperature values are given in degrees Celsius. Resolution
338is 1.0 degree for the local temperature, 0.125 degree for the remote
f65e1708
JD
339temperature, except for the MAX6657, MAX6658 and MAX6659 which have a
340resolution of 0.125 degree for both temperatures.
7f15b664
M
341
342Each sensor has its own high and low limits, plus a critical limit.
343Additionally, there is a relative hysteresis value common to both critical
344values. To make life easier to user-space applications, two absolute values
345are exported, one for each channel, but these values are of course linked.
346Only the local hysteresis can be set from user-space, and the same delta
347applies to the remote hysteresis.
348
177e7592
GR
349The lm90 driver will not update its values more frequently than configured with
350the update_interval attribute; reading them more often will do no harm, but will
351return 'old' values.
7f15b664 352
53de3342
JD
353SMBus Alert Support
354-------------------
355
356This driver has basic support for SMBus alert. When an alert is received,
357the status register is read and the faulty temperature channel is logged.
358
5a4e5e6a
GR
359The Analog Devices chips (ADM1032, ADT7461 and ADT7461A) and ON
360Semiconductor chips (NCT1008) do not implement the SMBus alert protocol
361properly so additional care is needed: the ALERT output is disabled when
362an alert is received, and is re-enabled only when the alarm is gone.
363Otherwise the chip would block alerts from other chips in the bus as long
364as the alarm is active.
53de3342 365
c3df5806
JD
366PEC Support
367-----------
368
369The ADM1032 is the only chip of the family which supports PEC. It does
370not support PEC on all transactions though, so some care must be taken.
371
372When reading a register value, the PEC byte is computed and sent by the
373ADM1032 chip. However, in the case of a combined transaction (SMBus Read
374Byte), the ADM1032 computes the CRC value over only the second half of
375the message rather than its entirety, because it thinks the first half
376of the message belongs to a different transaction. As a result, the CRC
377value differs from what the SMBus master expects, and all reads fail.
378
379For this reason, the lm90 driver will enable PEC for the ADM1032 only if
380the bus supports the SMBus Send Byte and Receive Byte transaction types.
381These transactions will be used to read register values, instead of
382SMBus Read Byte, and PEC will work properly.
383
384Additionally, the ADM1032 doesn't support SMBus Send Byte with PEC.
385Instead, it will try to write the PEC value to the register (because the
386SMBus Send Byte transaction with PEC is similar to a Write Byte transaction
0966415d 387without PEC), which is not what we want. Thus, PEC is explicitly disabled
c3df5806
JD
388on SMBus Send Byte transactions in the lm90 driver.
389
390PEC on byte data transactions represents a significant increase in bandwidth
391usage (+33% for writes, +25% for reads) in normal conditions. With the need
392to use two SMBus transaction for reads, this overhead jumps to +50%. Worse,
393two transactions will typically mean twice as much delay waiting for
394transaction completion, effectively doubling the register cache refresh time.
395I guess reliability comes at a price, but it's quite expensive this time.
396
397So, as not everyone might enjoy the slowdown, PEC can be disabled through
398sysfs. Just write 0 to the "pec" file and PEC will be disabled. Write 1
399to that file to enable PEC again.