xref: /openbmc/linux/Documentation/hwmon/lm90.rst (revision bbaf1ff0)
1Kernel driver lm90
2==================
3
4Supported chips:
5
6  * National Semiconductor LM84
7
8    Prefix: 'lm84'
9
10    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
11
12    Datasheet: Publicly available at the National Semiconductor website
13
14  * National Semiconductor LM90
15
16    Prefix: 'lm90'
17
18    Addresses scanned: I2C 0x4c
19
20    Datasheet: Publicly available at the National Semiconductor website
21
22	       http://www.national.com/pf/LM/LM90.html
23
24  * National Semiconductor LM89
25
26    Prefix: 'lm89' (no auto-detection)
27
28    Addresses scanned: I2C 0x4c and 0x4d
29
30    Datasheet: Publicly available at the National Semiconductor website
31
32	       http://www.national.com/mpf/LM/LM89.html
33
34  * National Semiconductor LM99
35
36    Prefix: 'lm99'
37
38    Addresses scanned: I2C 0x4c and 0x4d
39
40    Datasheet: Publicly available at the National Semiconductor website
41
42	       http://www.national.com/pf/LM/LM99.html
43
44  * National Semiconductor LM86
45
46    Prefix: 'lm86'
47
48    Addresses scanned: I2C 0x4c
49
50    Datasheet: Publicly available at the National Semiconductor website
51
52	       http://www.national.com/mpf/LM/LM86.html
53
54  * Analog Devices ADM1020
55
56    Prefix: 'adm1020'
57
58    Addresses scanned: I2C 0x4c - 0x4e
59
60    Datasheet: Publicly available at the Analog Devices website
61
62  * Analog Devices ADM1021
63
64    Prefix: 'adm1021'
65
66    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
67
68    Datasheet: Publicly available at the Analog Devices website
69
70  * Analog Devices ADM1021A/ADM1023
71
72    Prefix: 'adm1023'
73
74    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
75
76    Datasheet: Publicly available at the Analog Devices website
77
78  * Analog Devices ADM1032
79
80    Prefix: 'adm1032'
81
82    Addresses scanned: I2C 0x4c and 0x4d
83
84    Datasheet: Publicly available at the ON Semiconductor website
85
86	       https://www.onsemi.com/PowerSolutions/product.do?id=ADM1032
87
88  * Analog Devices ADT7461
89
90    Prefix: 'adt7461'
91
92    Addresses scanned: I2C 0x4c and 0x4d
93
94    Datasheet: Publicly available at the ON Semiconductor website
95
96	       https://www.onsemi.com/PowerSolutions/product.do?id=ADT7461
97
98  * Analog Devices ADT7461A
99
100    Prefix: 'adt7461a'
101
102    Addresses scanned: I2C 0x4c and 0x4d
103
104    Datasheet: Publicly available at the ON Semiconductor website
105
106	       https://www.onsemi.com/PowerSolutions/product.do?id=ADT7461A
107
108  * Analog Devices ADT7481
109
110    Prefix: 'adt7481'
111
112    Addresses scanned: I2C 0x4b and 0x4c
113
114    Datasheet: Publicly available at the ON Semiconductor website
115
116	       https://www.onsemi.com/PowerSolutions/product.do?id=ADT7481
117
118  * Analog Devices ADT7482
119
120    Prefix: 'adt7482'
121
122    Addresses scanned: I2C 0x4c
123
124    Datasheet: Publicly available at the ON Semiconductor website
125
126	       https://www.onsemi.com/PowerSolutions/product.do?id=ADT7482
127
128  * Analog Devices ADT7483A
129
130    Prefix: 'adt7483a'
131
132    Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, 0x4c, 0x4d, 0x4e
133
134    Datasheet: Publicly available at the ON Semiconductor website
135
136	       https://www.onsemi.com/PowerSolutions/product.do?id=ADT7483A
137
138  * ON Semiconductor NCT1008
139
140    Prefix: 'nct1008'
141
142    Addresses scanned: I2C 0x4c and 0x4d
143
144    Datasheet: Publicly available at the ON Semiconductor website
145
146	       https://www.onsemi.com/PowerSolutions/product.do?id=NCT1008
147
148  * ON Semiconductor NCT210
149
150    Prefix: 'adm1021'
151
152    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
153
154    Datasheet: Publicly available at the ON Semiconductor website
155
156	       https://www.onsemi.com/PowerSolutions/product.do?id=NCT210
157
158  * ON Semiconductor NCT214
159
160    Prefix: 'nct214'
161
162    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
163
164    Datasheet: Publicly available at the ON Semiconductor website
165
166	       https://www.onsemi.com/PowerSolutions/product.do?id=NCT214
167
168  * ON Semiconductor NCT218
169
170    Prefix: 'nct218'
171
172    Addresses scanned: I2C 0x4c - 0x4d
173
174    Datasheet: Publicly available at the ON Semiconductor website
175
176	       https://www.onsemi.com/PowerSolutions/product.do?id=NCT218
177
178  * ON Semiconductor NCT72
179
180    Prefix: 'nct72'
181
182    Addresses scanned: I2C 0x4c - 0x4d
183
184    Datasheet: Publicly available at the ON Semiconductor website
185
186	       https://www.onsemi.com/PowerSolutions/product.do?id=NCT72
187
188  * Maxim MAX1617
189
190    Prefix: 'max1617'
191
192    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
193
194    Datasheet: Publicly available at the Maxim website
195
196  * Maxim MAX1617A
197
198    Prefix: 'max1617a'
199
200    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
201
202    Datasheet: Publicly available at the Maxim website
203
204  * Maxim MAX6642
205
206    Prefix: 'max6642'
207
208    Addresses scanned: I2C 0x48-0x4f
209
210    Datasheet: Publicly available at the Maxim website
211
212	       http://datasheets.maxim-ic.com/en/ds/MAX6642.pdf
213
214  * Maxim MAX6646
215
216    Prefix: 'max6646'
217
218    Addresses scanned: I2C 0x4d
219
220    Datasheet: Publicly available at the Maxim website
221
222	       http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497
223
224  * Maxim MAX6647
225
226    Prefix: 'max6646'
227
228    Addresses scanned: I2C 0x4e
229
230    Datasheet: Publicly available at the Maxim website
231
232	       http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497
233
234  * Maxim MAX6648
235
236    Prefix: 'max6648'
237
238    Addresses scanned: I2C 0x4c
239
240    Datasheet: Publicly available at the Maxim website
241
242	       http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3500
243
244  * Maxim MAX6649
245
246    Prefix: 'max6646'
247
248    Addresses scanned: I2C 0x4c
249
250    Datasheet: Publicly available at the Maxim website
251
252	       http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497
253
254  * Maxim MAX6654
255
256    Prefix: 'max6654'
257
258    Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
259
260			   0x4c, 0x4d and 0x4e
261
262    Datasheet: Publicly available at the Maxim website
263
264	       https://www.maximintegrated.com/en/products/sensors/MAX6654.html
265
266  * Maxim MAX6657
267
268    Prefix: 'max6657'
269
270    Addresses scanned: I2C 0x4c
271
272    Datasheet: Publicly available at the Maxim website
273
274	       http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578
275
276  * Maxim MAX6658
277
278    Prefix: 'max6657'
279
280    Addresses scanned: I2C 0x4c
281
282    Datasheet: Publicly available at the Maxim website
283
284	       http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578
285
286  * Maxim MAX6659
287
288    Prefix: 'max6659'
289
290    Addresses scanned: I2C 0x4c, 0x4d, 0x4e
291
292    Datasheet: Publicly available at the Maxim website
293
294	       http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578
295
296  * Maxim MAX6680
297
298    Prefix: 'max6680'
299
300    Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
301
302			   0x4c, 0x4d and 0x4e
303
304    Datasheet: Publicly available at the Maxim website
305
306	       http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3370
307
308  * Maxim MAX6681
309
310    Prefix: 'max6680'
311
312    Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
313
314			   0x4c, 0x4d and 0x4e
315
316    Datasheet: Publicly available at the Maxim website
317
318	       http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3370
319
320  * Maxim MAX6692
321
322    Prefix: 'max6648'
323
324    Addresses scanned: I2C 0x4c
325
326    Datasheet: Publicly available at the Maxim website
327
328	       http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3500
329
330  * Maxim MAX6695
331
332    Prefix: 'max6695'
333
334    Addresses scanned: I2C 0x18
335
336    Datasheet: Publicly available at the Maxim website
337
338	       http://www.maxim-ic.com/datasheet/index.mvp/id/4199
339
340  * Maxim MAX6696
341
342    Prefix: 'max6695'
343
344    Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
345
346			   0x4c, 0x4d and 0x4e
347
348    Datasheet: Publicly available at the Maxim website
349
350	       http://www.maxim-ic.com/datasheet/index.mvp/id/4199
351
352  * Winbond/Nuvoton W83L771W/G
353
354    Prefix: 'w83l771'
355
356    Addresses scanned: I2C 0x4c
357
358    Datasheet: No longer available
359
360  * Winbond/Nuvoton W83L771AWG/ASG
361
362    Prefix: 'w83l771'
363
364    Addresses scanned: I2C 0x4c
365
366    Datasheet: Not publicly available, can be requested from Nuvoton
367
368  * Philips/NXP SA56004X
369
370    Prefix: 'sa56004'
371
372    Addresses scanned: I2C 0x48 through 0x4F
373
374    Datasheet: Publicly available at NXP website
375
376	       http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf
377
378  * GMT G781
379
380    Prefix: 'g781'
381
382    Addresses scanned: I2C 0x4c, 0x4d
383
384    Datasheet: Not publicly available from GMT
385
386  * Texas Instruments TMP451
387
388    Prefix: 'tmp451'
389
390    Addresses scanned: I2C 0x4c
391
392    Datasheet: Publicly available at TI website
393
394	       https://www.ti.com/litv/pdf/sbos686
395
396  * Texas Instruments TMP461
397
398    Prefix: 'tmp461'
399
400    Addresses scanned: I2C 0x48 through 0x4F
401
402    Datasheet: Publicly available at TI website
403
404	       https://www.ti.com/lit/gpn/tmp461
405
406  * Philips NE1617, NE1617A
407
408    Prefix: 'max1617' (probably detected as a max1617)
409
410    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
411
412    Datasheets: Publicly available at the Philips website
413
414  * Philips NE1618
415
416    Prefix: 'ne1618'
417
418    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
419
420    Datasheets: Publicly available at the Philips website
421
422  * Genesys Logic GL523SM
423
424    Prefix: 'gl523sm'
425
426    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
427
428    Datasheet:
429
430  * TI THMC10
431
432    Prefix: 'thmc10'
433
434    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
435
436    Datasheet: Publicly available at the TI website
437
438  * Onsemi MC1066
439
440    Prefix: 'mc1066'
441
442    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
443
444    Datasheet: Publicly available at the Onsemi website
445
446Author: Jean Delvare <jdelvare@suse.de>
447
448
449Description
450-----------
451
452The LM90 is a digital temperature sensor. It senses its own temperature as
453well as the temperature of up to one external diode. It is compatible
454with many other devices, many of which are supported by this driver.
455
456The family of chips supported by this driver is derived from MAX1617.
457This chip as well as various compatible chips support a local and a remote
458temperature sensor with 8 bit accuracy. Later chips provide improved accuracy
459and other additional features such as hysteresis and temperature offset
460registers.
461
462Note that there is no easy way to differentiate between the MAX6657,
463MAX6658 and MAX6659 variants. The extra features of the MAX6659 are only
464supported by this driver if the chip is located at address 0x4d or 0x4e,
465or if the chip type is explicitly selected as max6659.
466The MAX6680 and MAX6681 only differ in their pinout, therefore they obviously
467can't (and don't need to) be distinguished.
468
469The different chipsets of the family are not strictly identical, although
470very similar. For reference, here comes a non-exhaustive list of specific
471features:
472
473LM84:
474  * 8 bit sensor resolution
475
476ADM1020, ADM1021, GL523SM, MAX1617, NE1617, NE1617A, THMC10:
477  * 8 bit sensor resolution
478  * Low temperature limits
479
480NCT210, NE1618:
481  * 11 bit sensor resolution for remote temperature sensor
482  * Low temperature limits
483
484ADM1021A, ADM1023:
485  * Temperature offset register for remote temperature sensor
486  * 11 bit resolution for remote temperature sensor
487  * Low temperature limits
488
489LM90:
490  * 11 bit resolution for remote temperature sensor
491  * Temperature offset register for remote temperature sensor
492  * Low and critical temperature limits
493  * Configurable conversion rate
494  * Filter and alert configuration register at 0xBF.
495  * ALERT is triggered by temperatures over critical limits.
496
497LM86 and LM89:
498  * Same as LM90
499  * Better external channel accuracy
500
501LM99:
502  * Same as LM89
503  * External temperature shifted by 16 degrees down
504
505ADM1032:
506  * Consecutive alert register at 0x22.
507  * Conversion averaging.
508  * Up to 64 conversions/s.
509  * ALERT is triggered by open remote sensor.
510  * SMBus PEC support for Write Byte and Receive Byte transactions.
511
512ADT7461, ADT7461A, NCT1008:
513  * Extended temperature range (breaks compatibility)
514  * Lower resolution for remote temperature
515  * SMBus PEC support for Write Byte and Receive Byte transactions.
516  * 10 bit temperature resolution
517
518ADT7481, ADT7482, ADT7483:
519  * Temperature offset register
520  * SMBus PEC support
521  * 10 bit temperature resolution for external sensors
522  * Two remote sensors
523  * Selectable address (ADT7483)
524
525MAX6642:
526  * No critical limit register
527  * Conversion rate not configurable
528  * Better local resolution (10 bit)
529  * 10 bit external sensor resolution
530
531MAX6646, MAX6647, MAX6649:
532  * Better local resolution
533  * Extended range unsigned external temperature
534
535MAX6648, MAX6692:
536  * Better local resolution
537  * Unsigned temperature
538
539MAX6654, MAX6690:
540  * Better local resolution
541  * Selectable address
542  * Remote sensor type selection
543  * Extended temperature range
544  * Extended resolution only available when conversion rate <= 1 Hz
545
546MAX6657 and MAX6658:
547  * Better local resolution
548  * Remote sensor type selection
549
550MAX6659:
551  * Better local resolution
552  * Selectable address
553  * Second critical temperature limit
554  * Remote sensor type selection
555
556MAX6680 and MAX6681:
557  * Selectable address
558  * Remote sensor type selection
559
560MAX6695 and MAX6696:
561  * Better local resolution
562  * Selectable address (max6696)
563  * Second critical temperature limit
564  * Two remote sensors
565
566W83L771W/G
567  * The G variant is lead-free, otherwise similar to the W.
568  * Filter and alert configuration register at 0xBF
569  * Moving average (depending on conversion rate)
570
571W83L771AWG/ASG
572  * Successor of the W83L771W/G, same features.
573  * The AWG and ASG variants only differ in package format.
574  * Diode ideality factor configuration (remote sensor) at 0xE3
575
576SA56004X:
577  * Better local resolution
578
579All temperature values are given in degrees Celsius. Resolution
580is 1.0 degree for the local temperature, 0.125 degree for the remote
581temperature, except for the MAX6654, MAX6657, MAX6658 and MAX6659 which have
582a resolution of 0.125 degree for both temperatures.
583
584Each sensor has its own high and low limits, plus a critical limit.
585Additionally, there is a relative hysteresis value common to both critical
586values. To make life easier to user-space applications, two absolute values
587are exported, one for each channel, but these values are of course linked.
588Only the local hysteresis can be set from user-space, and the same delta
589applies to the remote hysteresis.
590
591The lm90 driver will not update its values more frequently than configured with
592the update_interval attribute; reading them more often will do no harm, but will
593return 'old' values.
594
595SMBus Alert Support
596-------------------
597
598This driver has basic support for SMBus alert. When an alert is received,
599the status register is read and the faulty temperature channel is logged.
600
601The Analog Devices chips (ADM1032, ADT7461 and ADT7461A) and ON
602Semiconductor chips (NCT1008) do not implement the SMBus alert protocol
603properly so additional care is needed: the ALERT output is disabled when
604an alert is received, and is re-enabled only when the alarm is gone.
605Otherwise the chip would block alerts from other chips in the bus as long
606as the alarm is active.
607
608PEC Support
609-----------
610
611The ADM1032 is the only chip of the family which supports PEC. It does
612not support PEC on all transactions though, so some care must be taken.
613
614When reading a register value, the PEC byte is computed and sent by the
615ADM1032 chip. However, in the case of a combined transaction (SMBus Read
616Byte), the ADM1032 computes the CRC value over only the second half of
617the message rather than its entirety, because it thinks the first half
618of the message belongs to a different transaction. As a result, the CRC
619value differs from what the SMBus master expects, and all reads fail.
620
621For this reason, the lm90 driver will enable PEC for the ADM1032 only if
622the bus supports the SMBus Send Byte and Receive Byte transaction types.
623These transactions will be used to read register values, instead of
624SMBus Read Byte, and PEC will work properly.
625
626Additionally, the ADM1032 doesn't support SMBus Send Byte with PEC.
627Instead, it will try to write the PEC value to the register (because the
628SMBus Send Byte transaction with PEC is similar to a Write Byte transaction
629without PEC), which is not what we want. Thus, PEC is explicitly disabled
630on SMBus Send Byte transactions in the lm90 driver.
631
632PEC on byte data transactions represents a significant increase in bandwidth
633usage (+33% for writes, +25% for reads) in normal conditions. With the need
634to use two SMBus transaction for reads, this overhead jumps to +50%. Worse,
635two transactions will typically mean twice as much delay waiting for
636transaction completion, effectively doubling the register cache refresh time.
637I guess reliability comes at a price, but it's quite expensive this time.
638
639So, as not everyone might enjoy the slowdown, PEC is disabled by default and
640can be enabled through sysfs. Just write 1 to the "pec" file and PEC will be
641enabled. Write 0 to that file to disable PEC again.
642