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 * Nuvoton NCT7716 369 370 Prefix: 'nct7716' 371 372 Addresses scanned: I2C 0x48, 0x49 373 374 Datasheet: Not publicly available, can be requested from Nuvoton 375 376 * Nuvoton NCT7717 377 378 Prefix: 'nct7717' 379 380 Addresses scanned: I2C 0x48 381 382 Datasheet: Publicly available at Nuvoton website 383 384 https://www.nuvoton.com/resource-files/Nuvoton_NCT7717U_Datasheet_V111.pdf 385 386 * Nuvoton NCT7718 387 388 Prefix: 'nct7718' 389 390 Addresses scanned: I2C 0x4c 391 392 Datasheet: Publicly available at Nuvoton website 393 394 https://www.nuvoton.com/resource-files/Nuvoton_NCT7718W_Datasheet_V11.pdf 395 396 * Philips/NXP SA56004X 397 398 Prefix: 'sa56004' 399 400 Addresses scanned: I2C 0x48 through 0x4F 401 402 Datasheet: Publicly available at NXP website 403 404 http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf 405 406 * GMT G781 407 408 Prefix: 'g781' 409 410 Addresses scanned: I2C 0x4c, 0x4d 411 412 Datasheet: Not publicly available from GMT 413 414 * Texas Instruments TMP451 415 416 Prefix: 'tmp451' 417 418 Addresses scanned: I2C 0x4c 419 420 Datasheet: Publicly available at TI website 421 422 https://www.ti.com/litv/pdf/sbos686 423 424 * Texas Instruments TMP461 425 426 Prefix: 'tmp461' 427 428 Addresses scanned: I2C 0x48 through 0x4F 429 430 Datasheet: Publicly available at TI website 431 432 https://www.ti.com/lit/gpn/tmp461 433 434 * Philips NE1617, NE1617A 435 436 Prefix: 'max1617' (probably detected as a max1617) 437 438 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e 439 440 Datasheets: Publicly available at the Philips website 441 442 * Philips NE1618 443 444 Prefix: 'ne1618' 445 446 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e 447 448 Datasheets: Publicly available at the Philips website 449 450 * Genesys Logic GL523SM 451 452 Prefix: 'gl523sm' 453 454 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e 455 456 Datasheet: 457 458 * TI THMC10 459 460 Prefix: 'thmc10' 461 462 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e 463 464 Datasheet: Publicly available at the TI website 465 466 * Onsemi MC1066 467 468 Prefix: 'mc1066' 469 470 Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e 471 472 Datasheet: Publicly available at the Onsemi website 473 474Author: Jean Delvare <jdelvare@suse.de> 475 476 477Description 478----------- 479 480The LM90 is a digital temperature sensor. It senses its own temperature as 481well as the temperature of up to one external diode. It is compatible 482with many other devices, many of which are supported by this driver. 483 484The family of chips supported by this driver is derived from MAX1617. 485This chip as well as various compatible chips support a local and a remote 486temperature sensor with 8 bit accuracy. Later chips provide improved accuracy 487and other additional features such as hysteresis and temperature offset 488registers. 489 490Note that there is no easy way to differentiate between the MAX6657, 491MAX6658 and MAX6659 variants. The extra features of the MAX6659 are only 492supported by this driver if the chip is located at address 0x4d or 0x4e, 493or if the chip type is explicitly selected as max6659. 494The MAX6680 and MAX6681 only differ in their pinout, therefore they obviously 495can't (and don't need to) be distinguished. 496 497The different chipsets of the family are not strictly identical, although 498very similar. For reference, here comes a non-exhaustive list of specific 499features: 500 501LM84: 502 * 8 bit sensor resolution 503 504ADM1020, ADM1021, GL523SM, MAX1617, NE1617, NE1617A, THMC10: 505 * 8 bit sensor resolution 506 * Low temperature limits 507 508NCT210, NE1618: 509 * 11 bit sensor resolution for remote temperature sensor 510 * Low temperature limits 511 512ADM1021A, ADM1023: 513 * Temperature offset register for remote temperature sensor 514 * 11 bit resolution for remote temperature sensor 515 * Low temperature limits 516 517LM90: 518 * 11 bit resolution for remote temperature sensor 519 * Temperature offset register for remote temperature sensor 520 * Low and critical temperature limits 521 * Configurable conversion rate 522 * Filter and alert configuration register at 0xBF. 523 * ALERT is triggered by temperatures over critical limits. 524 525LM86 and LM89: 526 * Same as LM90 527 * Better external channel accuracy 528 529LM99: 530 * Same as LM89 531 * External temperature shifted by 16 degrees down 532 533ADM1032: 534 * Consecutive alert register at 0x22. 535 * Conversion averaging. 536 * Up to 64 conversions/s. 537 * ALERT is triggered by open remote sensor. 538 * SMBus PEC support for Write Byte and Receive Byte transactions. 539 540ADT7461, ADT7461A, NCT1008: 541 * Extended temperature range (breaks compatibility) 542 * Lower resolution for remote temperature 543 * SMBus PEC support for Write Byte and Receive Byte transactions. 544 * 10 bit temperature resolution 545 546ADT7481, ADT7482, ADT7483: 547 * Temperature offset register 548 * SMBus PEC support 549 * 10 bit temperature resolution for external sensors 550 * Two remote sensors 551 * Selectable address (ADT7483) 552 553MAX6642: 554 * No critical limit register 555 * Conversion rate not configurable 556 * Better local resolution (10 bit) 557 * 10 bit external sensor resolution 558 559MAX6646, MAX6647, MAX6649: 560 * Better local resolution 561 * Extended range unsigned external temperature 562 563MAX6648, MAX6692: 564 * Better local resolution 565 * Unsigned temperature 566 567MAX6654, MAX6690: 568 * Better local resolution 569 * Selectable address 570 * Remote sensor type selection 571 * Extended temperature range 572 * Extended resolution only available when conversion rate <= 1 Hz 573 574MAX6657 and MAX6658: 575 * Better local resolution 576 * Remote sensor type selection 577 578MAX6659: 579 * Better local resolution 580 * Selectable address 581 * Second critical temperature limit 582 * Remote sensor type selection 583 584MAX6680 and MAX6681: 585 * Selectable address 586 * Remote sensor type selection 587 588MAX6695 and MAX6696: 589 * Better local resolution 590 * Selectable address (max6696) 591 * Second critical temperature limit 592 * Two remote sensors 593 594W83L771W/G 595 * The G variant is lead-free, otherwise similar to the W. 596 * Filter and alert configuration register at 0xBF 597 * Moving average (depending on conversion rate) 598 599W83L771AWG/ASG 600 * Successor of the W83L771W/G, same features. 601 * The AWG and ASG variants only differ in package format. 602 * Diode ideality factor configuration (remote sensor) at 0xE3 603 604NCT7716: 605 * 8 bit sensor resolution 606 * Selectable address 607 * Configurable conversion rate 608 609NCT7717: 610 * 8 bit sensor resolution 611 * Configurable conversion rate 612 613NCT7718: 614 * Temperature offset register for remote temperature sensor 615 * 11 bit resolution for remote temperature sensor 616 * Low temperature limits 617 * Configurable conversion rate 618 619SA56004X: 620 * Better local resolution 621 622All temperature values are given in degrees Celsius. Resolution 623is 1.0 degree for the local temperature, 0.125 degree for the remote 624temperature, except for the MAX6654, MAX6657, MAX6658 and MAX6659 which have 625a resolution of 0.125 degree for both temperatures. 626 627Each sensor has its own high and low limits, plus a critical limit. 628Additionally, there is a relative hysteresis value common to both critical 629values. To make life easier to user-space applications, two absolute values 630are exported, one for each channel, but these values are of course linked. 631Only the local hysteresis can be set from user-space, and the same delta 632applies to the remote hysteresis. 633 634The lm90 driver will not update its values more frequently than configured with 635the update_interval attribute; reading them more often will do no harm, but will 636return 'old' values. 637 638SMBus Alert Support 639------------------- 640 641This driver has basic support for SMBus alert. When an alert is received, 642the status register is read and the faulty temperature channel is logged. 643 644The Analog Devices chips (ADM1032, ADT7461 and ADT7461A) and ON 645Semiconductor chips (NCT1008) do not implement the SMBus alert protocol 646properly so additional care is needed: the ALERT output is disabled when 647an alert is received, and is re-enabled only when the alarm is gone. 648Otherwise the chip would block alerts from other chips in the bus as long 649as the alarm is active. 650 651PEC Support 652----------- 653 654The ADM1032 is the only chip of the family which supports PEC. It does 655not support PEC on all transactions though, so some care must be taken. 656 657When reading a register value, the PEC byte is computed and sent by the 658ADM1032 chip. However, in the case of a combined transaction (SMBus Read 659Byte), the ADM1032 computes the CRC value over only the second half of 660the message rather than its entirety, because it thinks the first half 661of the message belongs to a different transaction. As a result, the CRC 662value differs from what the SMBus master expects, and all reads fail. 663 664For this reason, the lm90 driver will enable PEC for the ADM1032 only if 665the bus supports the SMBus Send Byte and Receive Byte transaction types. 666These transactions will be used to read register values, instead of 667SMBus Read Byte, and PEC will work properly. 668 669Additionally, the ADM1032 doesn't support SMBus Send Byte with PEC. 670Instead, it will try to write the PEC value to the register (because the 671SMBus Send Byte transaction with PEC is similar to a Write Byte transaction 672without PEC), which is not what we want. Thus, PEC is explicitly disabled 673on SMBus Send Byte transactions in the lm90 driver. 674 675PEC on byte data transactions represents a significant increase in bandwidth 676usage (+33% for writes, +25% for reads) in normal conditions. With the need 677to use two SMBus transaction for reads, this overhead jumps to +50%. Worse, 678two transactions will typically mean twice as much delay waiting for 679transaction completion, effectively doubling the register cache refresh time. 680I guess reliability comes at a price, but it's quite expensive this time. 681 682So, as not everyone might enjoy the slowdown, PEC is disabled by default and 683can be enabled through sysfs. Just write 1 to the "pec" file and PEC will be 684enabled. Write 0 to that file to disable PEC again. 685