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