642 lines · plain
1Kernel driver lm902==================3 4Supported chips:5 6 * National Semiconductor LM847 8 Prefix: 'lm84'9 10 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e11 12 Datasheet: Publicly available at the National Semiconductor website13 14 * National Semiconductor LM9015 16 Prefix: 'lm90'17 18 Addresses scanned: I2C 0x4c19 20 Datasheet: Publicly available at the National Semiconductor website21 22 http://www.national.com/pf/LM/LM90.html23 24 * National Semiconductor LM8925 26 Prefix: 'lm89' (no auto-detection)27 28 Addresses scanned: I2C 0x4c and 0x4d29 30 Datasheet: Publicly available at the National Semiconductor website31 32 http://www.national.com/mpf/LM/LM89.html33 34 * National Semiconductor LM9935 36 Prefix: 'lm99'37 38 Addresses scanned: I2C 0x4c and 0x4d39 40 Datasheet: Publicly available at the National Semiconductor website41 42 http://www.national.com/pf/LM/LM99.html43 44 * National Semiconductor LM8645 46 Prefix: 'lm86'47 48 Addresses scanned: I2C 0x4c49 50 Datasheet: Publicly available at the National Semiconductor website51 52 http://www.national.com/mpf/LM/LM86.html53 54 * Analog Devices ADM102055 56 Prefix: 'adm1020'57 58 Addresses scanned: I2C 0x4c - 0x4e59 60 Datasheet: Publicly available at the Analog Devices website61 62 * Analog Devices ADM102163 64 Prefix: 'adm1021'65 66 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e67 68 Datasheet: Publicly available at the Analog Devices website69 70 * Analog Devices ADM1021A/ADM102371 72 Prefix: 'adm1023'73 74 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e75 76 Datasheet: Publicly available at the Analog Devices website77 78 * Analog Devices ADM103279 80 Prefix: 'adm1032'81 82 Addresses scanned: I2C 0x4c and 0x4d83 84 Datasheet: Publicly available at the ON Semiconductor website85 86 https://www.onsemi.com/PowerSolutions/product.do?id=ADM103287 88 * Analog Devices ADT746189 90 Prefix: 'adt7461'91 92 Addresses scanned: I2C 0x4c and 0x4d93 94 Datasheet: Publicly available at the ON Semiconductor website95 96 https://www.onsemi.com/PowerSolutions/product.do?id=ADT746197 98 * Analog Devices ADT7461A99 100 Prefix: 'adt7461a'101 102 Addresses scanned: I2C 0x4c and 0x4d103 104 Datasheet: Publicly available at the ON Semiconductor website105 106 https://www.onsemi.com/PowerSolutions/product.do?id=ADT7461A107 108 * Analog Devices ADT7481109 110 Prefix: 'adt7481'111 112 Addresses scanned: I2C 0x4b and 0x4c113 114 Datasheet: Publicly available at the ON Semiconductor website115 116 https://www.onsemi.com/PowerSolutions/product.do?id=ADT7481117 118 * Analog Devices ADT7482119 120 Prefix: 'adt7482'121 122 Addresses scanned: I2C 0x4c123 124 Datasheet: Publicly available at the ON Semiconductor website125 126 https://www.onsemi.com/PowerSolutions/product.do?id=ADT7482127 128 * Analog Devices ADT7483A129 130 Prefix: 'adt7483a'131 132 Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, 0x4c, 0x4d, 0x4e133 134 Datasheet: Publicly available at the ON Semiconductor website135 136 https://www.onsemi.com/PowerSolutions/product.do?id=ADT7483A137 138 * ON Semiconductor NCT1008139 140 Prefix: 'nct1008'141 142 Addresses scanned: I2C 0x4c and 0x4d143 144 Datasheet: Publicly available at the ON Semiconductor website145 146 https://www.onsemi.com/PowerSolutions/product.do?id=NCT1008147 148 * ON Semiconductor NCT210149 150 Prefix: 'adm1021'151 152 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e153 154 Datasheet: Publicly available at the ON Semiconductor website155 156 https://www.onsemi.com/PowerSolutions/product.do?id=NCT210157 158 * ON Semiconductor NCT214159 160 Prefix: 'nct214'161 162 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e163 164 Datasheet: Publicly available at the ON Semiconductor website165 166 https://www.onsemi.com/PowerSolutions/product.do?id=NCT214167 168 * ON Semiconductor NCT218169 170 Prefix: 'nct218'171 172 Addresses scanned: I2C 0x4c - 0x4d173 174 Datasheet: Publicly available at the ON Semiconductor website175 176 https://www.onsemi.com/PowerSolutions/product.do?id=NCT218177 178 * ON Semiconductor NCT72179 180 Prefix: 'nct72'181 182 Addresses scanned: I2C 0x4c - 0x4d183 184 Datasheet: Publicly available at the ON Semiconductor website185 186 https://www.onsemi.com/PowerSolutions/product.do?id=NCT72187 188 * Maxim MAX1617189 190 Prefix: 'max1617'191 192 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e193 194 Datasheet: Publicly available at the Maxim website195 196 * Maxim MAX1617A197 198 Prefix: 'max1617a'199 200 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e201 202 Datasheet: Publicly available at the Maxim website203 204 * Maxim MAX6642205 206 Prefix: 'max6642'207 208 Addresses scanned: I2C 0x48-0x4f209 210 Datasheet: Publicly available at the Maxim website211 212 http://datasheets.maxim-ic.com/en/ds/MAX6642.pdf213 214 * Maxim MAX6646215 216 Prefix: 'max6646'217 218 Addresses scanned: I2C 0x4d219 220 Datasheet: Publicly available at the Maxim website221 222 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497223 224 * Maxim MAX6647225 226 Prefix: 'max6646'227 228 Addresses scanned: I2C 0x4e229 230 Datasheet: Publicly available at the Maxim website231 232 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497233 234 * Maxim MAX6648235 236 Prefix: 'max6648'237 238 Addresses scanned: I2C 0x4c239 240 Datasheet: Publicly available at the Maxim website241 242 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3500243 244 * Maxim MAX6649245 246 Prefix: 'max6646'247 248 Addresses scanned: I2C 0x4c249 250 Datasheet: Publicly available at the Maxim website251 252 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497253 254 * Maxim MAX6654255 256 Prefix: 'max6654'257 258 Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,259 260 0x4c, 0x4d and 0x4e261 262 Datasheet: Publicly available at the Maxim website263 264 https://www.maximintegrated.com/en/products/sensors/MAX6654.html265 266 * Maxim MAX6657267 268 Prefix: 'max6657'269 270 Addresses scanned: I2C 0x4c271 272 Datasheet: Publicly available at the Maxim website273 274 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578275 276 * Maxim MAX6658277 278 Prefix: 'max6657'279 280 Addresses scanned: I2C 0x4c281 282 Datasheet: Publicly available at the Maxim website283 284 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578285 286 * Maxim MAX6659287 288 Prefix: 'max6659'289 290 Addresses scanned: I2C 0x4c, 0x4d, 0x4e291 292 Datasheet: Publicly available at the Maxim website293 294 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578295 296 * Maxim MAX6680297 298 Prefix: 'max6680'299 300 Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,301 302 0x4c, 0x4d and 0x4e303 304 Datasheet: Publicly available at the Maxim website305 306 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3370307 308 * Maxim MAX6681309 310 Prefix: 'max6680'311 312 Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,313 314 0x4c, 0x4d and 0x4e315 316 Datasheet: Publicly available at the Maxim website317 318 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3370319 320 * Maxim MAX6692321 322 Prefix: 'max6648'323 324 Addresses scanned: I2C 0x4c325 326 Datasheet: Publicly available at the Maxim website327 328 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3500329 330 * Maxim MAX6695331 332 Prefix: 'max6695'333 334 Addresses scanned: I2C 0x18335 336 Datasheet: Publicly available at the Maxim website337 338 http://www.maxim-ic.com/datasheet/index.mvp/id/4199339 340 * Maxim MAX6696341 342 Prefix: 'max6695'343 344 Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,345 346 0x4c, 0x4d and 0x4e347 348 Datasheet: Publicly available at the Maxim website349 350 http://www.maxim-ic.com/datasheet/index.mvp/id/4199351 352 * Winbond/Nuvoton W83L771W/G353 354 Prefix: 'w83l771'355 356 Addresses scanned: I2C 0x4c357 358 Datasheet: No longer available359 360 * Winbond/Nuvoton W83L771AWG/ASG361 362 Prefix: 'w83l771'363 364 Addresses scanned: I2C 0x4c365 366 Datasheet: Not publicly available, can be requested from Nuvoton367 368 * Philips/NXP SA56004X369 370 Prefix: 'sa56004'371 372 Addresses scanned: I2C 0x48 through 0x4F373 374 Datasheet: Publicly available at NXP website375 376 http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf377 378 * GMT G781379 380 Prefix: 'g781'381 382 Addresses scanned: I2C 0x4c, 0x4d383 384 Datasheet: Not publicly available from GMT385 386 * Texas Instruments TMP451387 388 Prefix: 'tmp451'389 390 Addresses scanned: I2C 0x4c391 392 Datasheet: Publicly available at TI website393 394 https://www.ti.com/litv/pdf/sbos686395 396 * Texas Instruments TMP461397 398 Prefix: 'tmp461'399 400 Addresses scanned: I2C 0x48 through 0x4F401 402 Datasheet: Publicly available at TI website403 404 https://www.ti.com/lit/gpn/tmp461405 406 * Philips NE1617, NE1617A407 408 Prefix: 'max1617' (probably detected as a max1617)409 410 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e411 412 Datasheets: Publicly available at the Philips website413 414 * Philips NE1618415 416 Prefix: 'ne1618'417 418 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e419 420 Datasheets: Publicly available at the Philips website421 422 * Genesys Logic GL523SM423 424 Prefix: 'gl523sm'425 426 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e427 428 Datasheet:429 430 * TI THMC10431 432 Prefix: 'thmc10'433 434 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e435 436 Datasheet: Publicly available at the TI website437 438 * Onsemi MC1066439 440 Prefix: 'mc1066'441 442 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e443 444 Datasheet: Publicly available at the Onsemi website445 446Author: Jean Delvare <jdelvare@suse.de>447 448 449Description450-----------451 452The LM90 is a digital temperature sensor. It senses its own temperature as453well as the temperature of up to one external diode. It is compatible454with 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 remote458temperature sensor with 8 bit accuracy. Later chips provide improved accuracy459and other additional features such as hysteresis and temperature offset460registers.461 462Note that there is no easy way to differentiate between the MAX6657,463MAX6658 and MAX6659 variants. The extra features of the MAX6659 are only464supported 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 obviously467can't (and don't need to) be distinguished.468 469The different chipsets of the family are not strictly identical, although470very similar. For reference, here comes a non-exhaustive list of specific471features:472 473LM84:474 * 8 bit sensor resolution475 476ADM1020, ADM1021, GL523SM, MAX1617, NE1617, NE1617A, THMC10:477 * 8 bit sensor resolution478 * Low temperature limits479 480NCT210, NE1618:481 * 11 bit sensor resolution for remote temperature sensor482 * Low temperature limits483 484ADM1021A, ADM1023:485 * Temperature offset register for remote temperature sensor486 * 11 bit resolution for remote temperature sensor487 * Low temperature limits488 489LM90:490 * 11 bit resolution for remote temperature sensor491 * Temperature offset register for remote temperature sensor492 * Low and critical temperature limits493 * Configurable conversion rate494 * Filter and alert configuration register at 0xBF.495 * ALERT is triggered by temperatures over critical limits.496 497LM86 and LM89:498 * Same as LM90499 * Better external channel accuracy500 501LM99:502 * Same as LM89503 * External temperature shifted by 16 degrees down504 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 temperature515 * SMBus PEC support for Write Byte and Receive Byte transactions.516 * 10 bit temperature resolution517 518ADT7481, ADT7482, ADT7483:519 * Temperature offset register520 * SMBus PEC support521 * 10 bit temperature resolution for external sensors522 * Two remote sensors523 * Selectable address (ADT7483)524 525MAX6642:526 * No critical limit register527 * Conversion rate not configurable528 * Better local resolution (10 bit)529 * 10 bit external sensor resolution530 531MAX6646, MAX6647, MAX6649:532 * Better local resolution533 * Extended range unsigned external temperature534 535MAX6648, MAX6692:536 * Better local resolution537 * Unsigned temperature538 539MAX6654, MAX6690:540 * Better local resolution541 * Selectable address542 * Remote sensor type selection543 * Extended temperature range544 * Extended resolution only available when conversion rate <= 1 Hz545 546MAX6657 and MAX6658:547 * Better local resolution548 * Remote sensor type selection549 550MAX6659:551 * Better local resolution552 * Selectable address553 * Second critical temperature limit554 * Remote sensor type selection555 556MAX6680 and MAX6681:557 * Selectable address558 * Remote sensor type selection559 560MAX6695 and MAX6696:561 * Better local resolution562 * Selectable address (max6696)563 * Second critical temperature limit564 * Two remote sensors565 566W83L771W/G567 * The G variant is lead-free, otherwise similar to the W.568 * Filter and alert configuration register at 0xBF569 * Moving average (depending on conversion rate)570 571W83L771AWG/ASG572 * 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 0xE3575 576SA56004X:577 * Better local resolution578 579All temperature values are given in degrees Celsius. Resolution580is 1.0 degree for the local temperature, 0.125 degree for the remote581temperature, except for the MAX6654, MAX6657, MAX6658 and MAX6659 which have582a 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 critical586values. To make life easier to user-space applications, two absolute values587are 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 delta589applies to the remote hysteresis.590 591The lm90 driver will not update its values more frequently than configured with592the update_interval attribute; reading them more often will do no harm, but will593return 'old' values.594 595SMBus Alert Support596-------------------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 ON602Semiconductor chips (NCT1008) do not implement the SMBus alert protocol603properly so additional care is needed: the ALERT output is disabled when604an 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 long606as the alarm is active.607 608PEC Support609-----------610 611The ADM1032 is the only chip of the family which supports PEC. It does612not 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 the615ADM1032 chip. However, in the case of a combined transaction (SMBus Read616Byte), the ADM1032 computes the CRC value over only the second half of617the message rather than its entirety, because it thinks the first half618of the message belongs to a different transaction. As a result, the CRC619value 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 if622the bus supports the SMBus Send Byte and Receive Byte transaction types.623These transactions will be used to read register values, instead of624SMBus 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 the628SMBus Send Byte transaction with PEC is similar to a Write Byte transaction629without PEC), which is not what we want. Thus, PEC is explicitly disabled630on SMBus Send Byte transactions in the lm90 driver.631 632PEC on byte data transactions represents a significant increase in bandwidth633usage (+33% for writes, +25% for reads) in normal conditions. With the need634to use two SMBus transaction for reads, this overhead jumps to +50%. Worse,635two transactions will typically mean twice as much delay waiting for636transaction 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 and640can be enabled through sysfs. Just write 1 to the "pec" file and PEC will be641enabled. Write 0 to that file to disable PEC again.642