Commit | Line | Data |
---|---|---|
7f15b664 M |
1 | Kernel driver lm90 |
2 | ================== | |
3 | ||
4 | Supported 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 | 53 | |
6c7b66be | 54 | https://www.onsemi.com/PowerSolutions/product.do?id=ADM1032 |
b04f2f7d | 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 | 63 | |
6c7b66be | 64 | https://www.onsemi.com/PowerSolutions/product.do?id=ADT7461 |
b04f2f7d | 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 | 73 | |
6c7b66be | 74 | https://www.onsemi.com/PowerSolutions/product.do?id=ADT7461A |
b04f2f7d | 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 | 83 | |
6c7b66be | 84 | https://www.onsemi.com/PowerSolutions/product.do?id=NCT1008 |
b04f2f7d | 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 | ||
229d495d JL |
126 | * Maxim MAX6654 |
127 | ||
128 | Prefix: 'max6654' | |
129 | ||
130 | Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, | |
131 | ||
132 | 0x4c, 0x4d and 0x4e | |
133 | ||
134 | Datasheet: Publicly available at the Maxim website | |
135 | ||
136 | https://www.maximintegrated.com/en/products/sensors/MAX6654.html | |
137 | ||
7f15b664 | 138 | * Maxim MAX6657 |
b04f2f7d | 139 | |
7f15b664 | 140 | Prefix: 'max6657' |
b04f2f7d | 141 | |
7f15b664 | 142 | Addresses scanned: I2C 0x4c |
b04f2f7d | 143 | |
7f15b664 | 144 | Datasheet: Publicly available at the Maxim website |
b04f2f7d MCC |
145 | |
146 | http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578 | |
147 | ||
7f15b664 | 148 | * Maxim MAX6658 |
b04f2f7d | 149 | |
7f15b664 | 150 | Prefix: 'max6657' |
b04f2f7d | 151 | |
7f15b664 | 152 | Addresses scanned: I2C 0x4c |
b04f2f7d | 153 | |
7f15b664 | 154 | Datasheet: Publicly available at the Maxim website |
b04f2f7d MCC |
155 | |
156 | http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578 | |
157 | ||
7f15b664 | 158 | * Maxim MAX6659 |
b04f2f7d | 159 | |
13c84951 | 160 | Prefix: 'max6659' |
b04f2f7d | 161 | |
13c84951 | 162 | Addresses scanned: I2C 0x4c, 0x4d, 0x4e |
b04f2f7d | 163 | |
7f15b664 | 164 | Datasheet: Publicly available at the Maxim website |
b04f2f7d MCC |
165 | |
166 | http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578 | |
167 | ||
32c82a93 | 168 | * Maxim MAX6680 |
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 | ||
32c82a93 | 180 | * Maxim MAX6681 |
b04f2f7d | 181 | |
32c82a93 | 182 | Prefix: 'max6680' |
b04f2f7d | 183 | |
32c82a93 | 184 | Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, |
b04f2f7d MCC |
185 | |
186 | 0x4c, 0x4d and 0x4e | |
187 | ||
32c82a93 | 188 | Datasheet: Publicly available at the Maxim website |
b04f2f7d MCC |
189 | |
190 | http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3370 | |
191 | ||
1a51e068 | 192 | * Maxim MAX6692 |
b04f2f7d | 193 | |
1a51e068 | 194 | Prefix: 'max6646' |
b04f2f7d | 195 | |
1a51e068 | 196 | Addresses scanned: I2C 0x4c |
b04f2f7d | 197 | |
1a51e068 | 198 | Datasheet: Publicly available at the Maxim website |
b04f2f7d MCC |
199 | |
200 | http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3500 | |
201 | ||
06e1c0a2 | 202 | * Maxim MAX6695 |
b04f2f7d | 203 | |
06e1c0a2 | 204 | Prefix: 'max6695' |
b04f2f7d | 205 | |
06e1c0a2 | 206 | Addresses scanned: I2C 0x18 |
b04f2f7d | 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 | ||
06e1c0a2 | 212 | * Maxim MAX6696 |
b04f2f7d | 213 | |
06e1c0a2 | 214 | Prefix: 'max6695' |
b04f2f7d | 215 | |
06e1c0a2 | 216 | Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, |
b04f2f7d MCC |
217 | |
218 | 0x4c, 0x4d and 0x4e | |
219 | ||
06e1c0a2 | 220 | Datasheet: Publicly available at the Maxim website |
b04f2f7d MCC |
221 | |
222 | http://www.maxim-ic.com/datasheet/index.mvp/id/4199 | |
223 | ||
c4f99a2b | 224 | * Winbond/Nuvoton W83L771W/G |
b04f2f7d | 225 | |
c4f99a2b | 226 | Prefix: 'w83l771' |
b04f2f7d | 227 | |
c4f99a2b | 228 | Addresses scanned: I2C 0x4c |
b04f2f7d | 229 | |
c4f99a2b | 230 | Datasheet: No longer available |
b04f2f7d | 231 | |
6771ea1f | 232 | * Winbond/Nuvoton W83L771AWG/ASG |
b04f2f7d | 233 | |
6771ea1f | 234 | Prefix: 'w83l771' |
b04f2f7d | 235 | |
6771ea1f | 236 | Addresses scanned: I2C 0x4c |
b04f2f7d | 237 | |
6771ea1f | 238 | Datasheet: Not publicly available, can be requested from Nuvoton |
b04f2f7d | 239 | |
2ef01793 | 240 | * Philips/NXP SA56004X |
b04f2f7d | 241 | |
2ef01793 | 242 | Prefix: 'sa56004' |
b04f2f7d | 243 | |
2ef01793 | 244 | Addresses scanned: I2C 0x48 through 0x4F |
b04f2f7d | 245 | |
2ef01793 | 246 | Datasheet: Publicly available at NXP website |
b04f2f7d MCC |
247 | |
248 | http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf | |
249 | ||
ae544f64 | 250 | * GMT G781 |
b04f2f7d | 251 | |
ae544f64 | 252 | Prefix: 'g781' |
b04f2f7d | 253 | |
ae544f64 | 254 | Addresses scanned: I2C 0x4c, 0x4d |
b04f2f7d | 255 | |
ae544f64 | 256 | Datasheet: Not publicly available from GMT |
b04f2f7d | 257 | |
1daaceb2 | 258 | * Texas Instruments TMP451 |
b04f2f7d | 259 | |
1daaceb2 | 260 | Prefix: 'tmp451' |
b04f2f7d | 261 | |
1daaceb2 | 262 | Addresses scanned: I2C 0x4c |
b04f2f7d | 263 | |
1daaceb2 | 264 | Datasheet: Publicly available at TI website |
1daaceb2 | 265 | |
6c7b66be | 266 | https://www.ti.com/litv/pdf/sbos686 |
7f15b664 | 267 | |
f8344f76 GR |
268 | * Texas Instruments TMP461 |
269 | ||
270 | Prefix: 'tmp461' | |
271 | ||
272 | Addresses scanned: I2C 0x48 through 0x4F | |
273 | ||
274 | Datasheet: Publicly available at TI website | |
275 | ||
276 | https://www.ti.com/lit/gpn/tmp461 | |
277 | ||
7c81c60f | 278 | Author: Jean Delvare <jdelvare@suse.de> |
7f15b664 M |
279 | |
280 | ||
281 | Description | |
282 | ----------- | |
283 | ||
284 | The LM90 is a digital temperature sensor. It senses its own temperature as | |
285 | well as the temperature of up to one external diode. It is compatible | |
23b2d477 | 286 | with many other devices, many of which are supported by this driver. |
32c82a93 RB |
287 | |
288 | Note that there is no easy way to differentiate between the MAX6657, | |
6948708d GR |
289 | MAX6658 and MAX6659 variants. The extra features of the MAX6659 are only |
290 | supported by this driver if the chip is located at address 0x4d or 0x4e, | |
291 | or if the chip type is explicitly selected as max6659. | |
292 | The MAX6680 and MAX6681 only differ in their pinout, therefore they obviously | |
293 | can't (and don't need to) be distinguished. | |
7f15b664 M |
294 | |
295 | The specificity of this family of chipsets over the ADM1021/LM84 | |
296 | family is that it features critical limits with hysteresis, and an | |
297 | increased resolution of the remote temperature measurement. | |
298 | ||
299 | The different chipsets of the family are not strictly identical, although | |
f65e1708 JD |
300 | very similar. For reference, here comes a non-exhaustive list of specific |
301 | features: | |
7f15b664 M |
302 | |
303 | LM90: | |
304 | * Filter and alert configuration register at 0xBF. | |
305 | * ALERT is triggered by temperatures over critical limits. | |
306 | ||
307 | LM86 and LM89: | |
308 | * Same as LM90 | |
309 | * Better external channel accuracy | |
310 | ||
311 | LM99: | |
312 | * Same as LM89 | |
313 | * External temperature shifted by 16 degrees down | |
314 | ||
315 | ADM1032: | |
316 | * Consecutive alert register at 0x22. | |
317 | * Conversion averaging. | |
318 | * Up to 64 conversions/s. | |
319 | * ALERT is triggered by open remote sensor. | |
c3df5806 | 320 | * SMBus PEC support for Write Byte and Receive Byte transactions. |
7f15b664 | 321 | |
5a4e5e6a | 322 | ADT7461, ADT7461A, NCT1008: |
7f15b664 M |
323 | * Extended temperature range (breaks compatibility) |
324 | * Lower resolution for remote temperature | |
425f5b5d | 325 | * SMBus PEC support for Write Byte and Receive Byte transactions. |
7f15b664 | 326 | |
229d495d JL |
327 | MAX6654: |
328 | * Better local resolution | |
329 | * Selectable address | |
330 | * Remote sensor type selection | |
331 | * Extended temperature range | |
332 | * Extended resolution only available when conversion rate <= 1 Hz | |
333 | ||
7f15b664 | 334 | MAX6657 and MAX6658: |
f65e1708 | 335 | * Better local resolution |
7f15b664 M |
336 | * Remote sensor type selection |
337 | ||
32c82a93 | 338 | MAX6659: |
f65e1708 | 339 | * Better local resolution |
7f15b664 M |
340 | * Selectable address |
341 | * Second critical temperature limit | |
342 | * Remote sensor type selection | |
343 | ||
32c82a93 RB |
344 | MAX6680 and MAX6681: |
345 | * Selectable address | |
346 | * Remote sensor type selection | |
347 | ||
06e1c0a2 GR |
348 | MAX6695 and MAX6696: |
349 | * Better local resolution | |
350 | * Selectable address (max6696) | |
351 | * Second critical temperature limit | |
352 | * Two remote sensors | |
353 | ||
c4f99a2b JD |
354 | W83L771W/G |
355 | * The G variant is lead-free, otherwise similar to the W. | |
356 | * Filter and alert configuration register at 0xBF | |
357 | * Moving average (depending on conversion rate) | |
358 | ||
6771ea1f | 359 | W83L771AWG/ASG |
c4f99a2b | 360 | * Successor of the W83L771W/G, same features. |
6771ea1f | 361 | * The AWG and ASG variants only differ in package format. |
6771ea1f | 362 | * Diode ideality factor configuration (remote sensor) at 0xE3 |
6771ea1f | 363 | |
2ef01793 SD |
364 | SA56004X: |
365 | * Better local resolution | |
366 | ||
7f15b664 M |
367 | All temperature values are given in degrees Celsius. Resolution |
368 | is 1.0 degree for the local temperature, 0.125 degree for the remote | |
229d495d JL |
369 | temperature, except for the MAX6654, MAX6657, MAX6658 and MAX6659 which have |
370 | a resolution of 0.125 degree for both temperatures. | |
7f15b664 M |
371 | |
372 | Each sensor has its own high and low limits, plus a critical limit. | |
373 | Additionally, there is a relative hysteresis value common to both critical | |
374 | values. To make life easier to user-space applications, two absolute values | |
375 | are exported, one for each channel, but these values are of course linked. | |
376 | Only the local hysteresis can be set from user-space, and the same delta | |
377 | applies to the remote hysteresis. | |
378 | ||
177e7592 GR |
379 | The lm90 driver will not update its values more frequently than configured with |
380 | the update_interval attribute; reading them more often will do no harm, but will | |
381 | return 'old' values. | |
7f15b664 | 382 | |
53de3342 JD |
383 | SMBus Alert Support |
384 | ------------------- | |
385 | ||
386 | This driver has basic support for SMBus alert. When an alert is received, | |
387 | the status register is read and the faulty temperature channel is logged. | |
388 | ||
5a4e5e6a GR |
389 | The Analog Devices chips (ADM1032, ADT7461 and ADT7461A) and ON |
390 | Semiconductor chips (NCT1008) do not implement the SMBus alert protocol | |
391 | properly so additional care is needed: the ALERT output is disabled when | |
392 | an alert is received, and is re-enabled only when the alarm is gone. | |
393 | Otherwise the chip would block alerts from other chips in the bus as long | |
394 | as the alarm is active. | |
53de3342 | 395 | |
c3df5806 JD |
396 | PEC Support |
397 | ----------- | |
398 | ||
399 | The ADM1032 is the only chip of the family which supports PEC. It does | |
400 | not support PEC on all transactions though, so some care must be taken. | |
401 | ||
402 | When reading a register value, the PEC byte is computed and sent by the | |
403 | ADM1032 chip. However, in the case of a combined transaction (SMBus Read | |
404 | Byte), the ADM1032 computes the CRC value over only the second half of | |
405 | the message rather than its entirety, because it thinks the first half | |
406 | of the message belongs to a different transaction. As a result, the CRC | |
407 | value differs from what the SMBus master expects, and all reads fail. | |
408 | ||
409 | For this reason, the lm90 driver will enable PEC for the ADM1032 only if | |
410 | the bus supports the SMBus Send Byte and Receive Byte transaction types. | |
411 | These transactions will be used to read register values, instead of | |
412 | SMBus Read Byte, and PEC will work properly. | |
413 | ||
414 | Additionally, the ADM1032 doesn't support SMBus Send Byte with PEC. | |
415 | Instead, it will try to write the PEC value to the register (because the | |
416 | SMBus Send Byte transaction with PEC is similar to a Write Byte transaction | |
0966415d | 417 | without PEC), which is not what we want. Thus, PEC is explicitly disabled |
c3df5806 JD |
418 | on SMBus Send Byte transactions in the lm90 driver. |
419 | ||
420 | PEC on byte data transactions represents a significant increase in bandwidth | |
421 | usage (+33% for writes, +25% for reads) in normal conditions. With the need | |
422 | to use two SMBus transaction for reads, this overhead jumps to +50%. Worse, | |
423 | two transactions will typically mean twice as much delay waiting for | |
424 | transaction completion, effectively doubling the register cache refresh time. | |
425 | I guess reliability comes at a price, but it's quite expensive this time. | |
426 | ||
3b0982ff GR |
427 | So, as not everyone might enjoy the slowdown, PEC is disabled by default and |
428 | can be enabled through sysfs. Just write 1 to the "pec" file and PEC will be | |
429 | enabled. Write 0 to that file to disable PEC again. |