lm90.rst 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641
  1. Kernel driver lm90
  2. ==================
  3. Supported chips:
  4. * National Semiconductor LM84
  5. Prefix: 'lm84'
  6. Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
  7. Datasheet: Publicly available at the National Semiconductor website
  8. * National Semiconductor LM90
  9. Prefix: 'lm90'
  10. Addresses scanned: I2C 0x4c
  11. Datasheet: Publicly available at the National Semiconductor website
  12. http://www.national.com/pf/LM/LM90.html
  13. * National Semiconductor LM89
  14. Prefix: 'lm89' (no auto-detection)
  15. Addresses scanned: I2C 0x4c and 0x4d
  16. Datasheet: Publicly available at the National Semiconductor website
  17. http://www.national.com/mpf/LM/LM89.html
  18. * National Semiconductor LM99
  19. Prefix: 'lm99'
  20. Addresses scanned: I2C 0x4c and 0x4d
  21. Datasheet: Publicly available at the National Semiconductor website
  22. http://www.national.com/pf/LM/LM99.html
  23. * National Semiconductor LM86
  24. Prefix: 'lm86'
  25. Addresses scanned: I2C 0x4c
  26. Datasheet: Publicly available at the National Semiconductor website
  27. http://www.national.com/mpf/LM/LM86.html
  28. * Analog Devices ADM1020
  29. Prefix: 'adm1020'
  30. Addresses scanned: I2C 0x4c - 0x4e
  31. Datasheet: Publicly available at the Analog Devices website
  32. * Analog Devices ADM1021
  33. Prefix: 'adm1021'
  34. Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
  35. Datasheet: Publicly available at the Analog Devices website
  36. * Analog Devices ADM1021A/ADM1023
  37. Prefix: 'adm1023'
  38. Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
  39. Datasheet: Publicly available at the Analog Devices website
  40. * Analog Devices ADM1032
  41. Prefix: 'adm1032'
  42. Addresses scanned: I2C 0x4c and 0x4d
  43. Datasheet: Publicly available at the ON Semiconductor website
  44. https://www.onsemi.com/PowerSolutions/product.do?id=ADM1032
  45. * Analog Devices ADT7461
  46. Prefix: 'adt7461'
  47. Addresses scanned: I2C 0x4c and 0x4d
  48. Datasheet: Publicly available at the ON Semiconductor website
  49. https://www.onsemi.com/PowerSolutions/product.do?id=ADT7461
  50. * Analog Devices ADT7461A
  51. Prefix: 'adt7461a'
  52. Addresses scanned: I2C 0x4c and 0x4d
  53. Datasheet: Publicly available at the ON Semiconductor website
  54. https://www.onsemi.com/PowerSolutions/product.do?id=ADT7461A
  55. * Analog Devices ADT7481
  56. Prefix: 'adt7481'
  57. Addresses scanned: I2C 0x4b and 0x4c
  58. Datasheet: Publicly available at the ON Semiconductor website
  59. https://www.onsemi.com/PowerSolutions/product.do?id=ADT7481
  60. * Analog Devices ADT7482
  61. Prefix: 'adt7482'
  62. Addresses scanned: I2C 0x4c
  63. Datasheet: Publicly available at the ON Semiconductor website
  64. https://www.onsemi.com/PowerSolutions/product.do?id=ADT7482
  65. * Analog Devices ADT7483A
  66. Prefix: 'adt7483a'
  67. Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, 0x4c, 0x4d, 0x4e
  68. Datasheet: Publicly available at the ON Semiconductor website
  69. https://www.onsemi.com/PowerSolutions/product.do?id=ADT7483A
  70. * ON Semiconductor NCT1008
  71. Prefix: 'nct1008'
  72. Addresses scanned: I2C 0x4c and 0x4d
  73. Datasheet: Publicly available at the ON Semiconductor website
  74. https://www.onsemi.com/PowerSolutions/product.do?id=NCT1008
  75. * ON Semiconductor NCT210
  76. Prefix: 'adm1021'
  77. Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
  78. Datasheet: Publicly available at the ON Semiconductor website
  79. https://www.onsemi.com/PowerSolutions/product.do?id=NCT210
  80. * ON Semiconductor NCT214
  81. Prefix: 'nct214'
  82. Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
  83. Datasheet: Publicly available at the ON Semiconductor website
  84. https://www.onsemi.com/PowerSolutions/product.do?id=NCT214
  85. * ON Semiconductor NCT218
  86. Prefix: 'nct218'
  87. Addresses scanned: I2C 0x4c - 0x4d
  88. Datasheet: Publicly available at the ON Semiconductor website
  89. https://www.onsemi.com/PowerSolutions/product.do?id=NCT218
  90. * ON Semiconductor NCT72
  91. Prefix: 'nct72'
  92. Addresses scanned: I2C 0x4c - 0x4d
  93. Datasheet: Publicly available at the ON Semiconductor website
  94. https://www.onsemi.com/PowerSolutions/product.do?id=NCT72
  95. * Maxim MAX1617
  96. Prefix: 'max1617'
  97. Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
  98. Datasheet: Publicly available at the Maxim website
  99. * Maxim MAX1617A
  100. Prefix: 'max1617a'
  101. Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
  102. Datasheet: Publicly available at the Maxim website
  103. * Maxim MAX6642
  104. Prefix: 'max6642'
  105. Addresses scanned: I2C 0x48-0x4f
  106. Datasheet: Publicly available at the Maxim website
  107. http://datasheets.maxim-ic.com/en/ds/MAX6642.pdf
  108. * Maxim MAX6646
  109. Prefix: 'max6646'
  110. Addresses scanned: I2C 0x4d
  111. Datasheet: Publicly available at the Maxim website
  112. http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497
  113. * Maxim MAX6647
  114. Prefix: 'max6646'
  115. Addresses scanned: I2C 0x4e
  116. Datasheet: Publicly available at the Maxim website
  117. http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497
  118. * Maxim MAX6648
  119. Prefix: 'max6648'
  120. Addresses scanned: I2C 0x4c
  121. Datasheet: Publicly available at the Maxim website
  122. http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3500
  123. * Maxim MAX6649
  124. Prefix: 'max6646'
  125. Addresses scanned: I2C 0x4c
  126. Datasheet: Publicly available at the Maxim website
  127. http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497
  128. * Maxim MAX6654
  129. Prefix: 'max6654'
  130. Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
  131. 0x4c, 0x4d and 0x4e
  132. Datasheet: Publicly available at the Maxim website
  133. https://www.maximintegrated.com/en/products/sensors/MAX6654.html
  134. * Maxim MAX6657
  135. Prefix: 'max6657'
  136. Addresses scanned: I2C 0x4c
  137. Datasheet: Publicly available at the Maxim website
  138. http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578
  139. * Maxim MAX6658
  140. Prefix: 'max6657'
  141. Addresses scanned: I2C 0x4c
  142. Datasheet: Publicly available at the Maxim website
  143. http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578
  144. * Maxim MAX6659
  145. Prefix: 'max6659'
  146. Addresses scanned: I2C 0x4c, 0x4d, 0x4e
  147. Datasheet: Publicly available at the Maxim website
  148. http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578
  149. * Maxim MAX6680
  150. Prefix: 'max6680'
  151. Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
  152. 0x4c, 0x4d and 0x4e
  153. Datasheet: Publicly available at the Maxim website
  154. http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3370
  155. * Maxim MAX6681
  156. Prefix: 'max6680'
  157. Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
  158. 0x4c, 0x4d and 0x4e
  159. Datasheet: Publicly available at the Maxim website
  160. http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3370
  161. * Maxim MAX6692
  162. Prefix: 'max6648'
  163. Addresses scanned: I2C 0x4c
  164. Datasheet: Publicly available at the Maxim website
  165. http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3500
  166. * Maxim MAX6695
  167. Prefix: 'max6695'
  168. Addresses scanned: I2C 0x18
  169. Datasheet: Publicly available at the Maxim website
  170. http://www.maxim-ic.com/datasheet/index.mvp/id/4199
  171. * Maxim MAX6696
  172. Prefix: 'max6695'
  173. Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
  174. 0x4c, 0x4d and 0x4e
  175. Datasheet: Publicly available at the Maxim website
  176. http://www.maxim-ic.com/datasheet/index.mvp/id/4199
  177. * Winbond/Nuvoton W83L771W/G
  178. Prefix: 'w83l771'
  179. Addresses scanned: I2C 0x4c
  180. Datasheet: No longer available
  181. * Winbond/Nuvoton W83L771AWG/ASG
  182. Prefix: 'w83l771'
  183. Addresses scanned: I2C 0x4c
  184. Datasheet: Not publicly available, can be requested from Nuvoton
  185. * Philips/NXP SA56004X
  186. Prefix: 'sa56004'
  187. Addresses scanned: I2C 0x48 through 0x4F
  188. Datasheet: Publicly available at NXP website
  189. http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf
  190. * GMT G781
  191. Prefix: 'g781'
  192. Addresses scanned: I2C 0x4c, 0x4d
  193. Datasheet: Not publicly available from GMT
  194. * Texas Instruments TMP451
  195. Prefix: 'tmp451'
  196. Addresses scanned: I2C 0x4c
  197. Datasheet: Publicly available at TI website
  198. https://www.ti.com/litv/pdf/sbos686
  199. * Texas Instruments TMP461
  200. Prefix: 'tmp461'
  201. Addresses scanned: I2C 0x48 through 0x4F
  202. Datasheet: Publicly available at TI website
  203. https://www.ti.com/lit/gpn/tmp461
  204. * Philips NE1617, NE1617A
  205. Prefix: 'max1617' (probably detected as a max1617)
  206. Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
  207. Datasheets: Publicly available at the Philips website
  208. * Philips NE1618
  209. Prefix: 'ne1618'
  210. Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
  211. Datasheets: Publicly available at the Philips website
  212. * Genesys Logic GL523SM
  213. Prefix: 'gl523sm'
  214. Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
  215. Datasheet:
  216. * TI THMC10
  217. Prefix: 'thmc10'
  218. Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
  219. Datasheet: Publicly available at the TI website
  220. * Onsemi MC1066
  221. Prefix: 'mc1066'
  222. Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
  223. Datasheet: Publicly available at the Onsemi website
  224. Author: Jean Delvare <jdelvare@suse.de>
  225. Description
  226. -----------
  227. The LM90 is a digital temperature sensor. It senses its own temperature as
  228. well as the temperature of up to one external diode. It is compatible
  229. with many other devices, many of which are supported by this driver.
  230. The family of chips supported by this driver is derived from MAX1617.
  231. This chip as well as various compatible chips support a local and a remote
  232. temperature sensor with 8 bit accuracy. Later chips provide improved accuracy
  233. and other additional features such as hysteresis and temperature offset
  234. registers.
  235. Note that there is no easy way to differentiate between the MAX6657,
  236. MAX6658 and MAX6659 variants. The extra features of the MAX6659 are only
  237. supported by this driver if the chip is located at address 0x4d or 0x4e,
  238. or if the chip type is explicitly selected as max6659.
  239. The MAX6680 and MAX6681 only differ in their pinout, therefore they obviously
  240. can't (and don't need to) be distinguished.
  241. The different chipsets of the family are not strictly identical, although
  242. very similar. For reference, here comes a non-exhaustive list of specific
  243. features:
  244. LM84:
  245. * 8 bit sensor resolution
  246. ADM1020, ADM1021, GL523SM, MAX1617, NE1617, NE1617A, THMC10:
  247. * 8 bit sensor resolution
  248. * Low temperature limits
  249. NCT210, NE1618:
  250. * 11 bit sensor resolution for remote temperature sensor
  251. * Low temperature limits
  252. ADM1021A, ADM1023:
  253. * Temperature offset register for remote temperature sensor
  254. * 11 bit resolution for remote temperature sensor
  255. * Low temperature limits
  256. LM90:
  257. * 11 bit resolution for remote temperature sensor
  258. * Temperature offset register for remote temperature sensor
  259. * Low and critical temperature limits
  260. * Configurable conversion rate
  261. * Filter and alert configuration register at 0xBF.
  262. * ALERT is triggered by temperatures over critical limits.
  263. LM86 and LM89:
  264. * Same as LM90
  265. * Better external channel accuracy
  266. LM99:
  267. * Same as LM89
  268. * External temperature shifted by 16 degrees down
  269. ADM1032:
  270. * Consecutive alert register at 0x22.
  271. * Conversion averaging.
  272. * Up to 64 conversions/s.
  273. * ALERT is triggered by open remote sensor.
  274. * SMBus PEC support for Write Byte and Receive Byte transactions.
  275. ADT7461, ADT7461A, NCT1008:
  276. * Extended temperature range (breaks compatibility)
  277. * Lower resolution for remote temperature
  278. * SMBus PEC support for Write Byte and Receive Byte transactions.
  279. * 10 bit temperature resolution
  280. ADT7481, ADT7482, ADT7483:
  281. * Temperature offset register
  282. * SMBus PEC support
  283. * 10 bit temperature resolution for external sensors
  284. * Two remote sensors
  285. * Selectable address (ADT7483)
  286. MAX6642:
  287. * No critical limit register
  288. * Conversion rate not configurable
  289. * Better local resolution (10 bit)
  290. * 10 bit external sensor resolution
  291. MAX6646, MAX6647, MAX6649:
  292. * Better local resolution
  293. * Extended range unsigned external temperature
  294. MAX6648, MAX6692:
  295. * Better local resolution
  296. * Unsigned temperature
  297. MAX6654, MAX6690:
  298. * Better local resolution
  299. * Selectable address
  300. * Remote sensor type selection
  301. * Extended temperature range
  302. * Extended resolution only available when conversion rate <= 1 Hz
  303. MAX6657 and MAX6658:
  304. * Better local resolution
  305. * Remote sensor type selection
  306. MAX6659:
  307. * Better local resolution
  308. * Selectable address
  309. * Second critical temperature limit
  310. * Remote sensor type selection
  311. MAX6680 and MAX6681:
  312. * Selectable address
  313. * Remote sensor type selection
  314. MAX6695 and MAX6696:
  315. * Better local resolution
  316. * Selectable address (max6696)
  317. * Second critical temperature limit
  318. * Two remote sensors
  319. W83L771W/G
  320. * The G variant is lead-free, otherwise similar to the W.
  321. * Filter and alert configuration register at 0xBF
  322. * Moving average (depending on conversion rate)
  323. W83L771AWG/ASG
  324. * Successor of the W83L771W/G, same features.
  325. * The AWG and ASG variants only differ in package format.
  326. * Diode ideality factor configuration (remote sensor) at 0xE3
  327. SA56004X:
  328. * Better local resolution
  329. All temperature values are given in degrees Celsius. Resolution
  330. is 1.0 degree for the local temperature, 0.125 degree for the remote
  331. temperature, except for the MAX6654, MAX6657, MAX6658 and MAX6659 which have
  332. a resolution of 0.125 degree for both temperatures.
  333. Each sensor has its own high and low limits, plus a critical limit.
  334. Additionally, there is a relative hysteresis value common to both critical
  335. values. To make life easier to user-space applications, two absolute values
  336. are exported, one for each channel, but these values are of course linked.
  337. Only the local hysteresis can be set from user-space, and the same delta
  338. applies to the remote hysteresis.
  339. The lm90 driver will not update its values more frequently than configured with
  340. the update_interval attribute; reading them more often will do no harm, but will
  341. return 'old' values.
  342. SMBus Alert Support
  343. -------------------
  344. This driver has basic support for SMBus alert. When an alert is received,
  345. the status register is read and the faulty temperature channel is logged.
  346. The Analog Devices chips (ADM1032, ADT7461 and ADT7461A) and ON
  347. Semiconductor chips (NCT1008) do not implement the SMBus alert protocol
  348. properly so additional care is needed: the ALERT output is disabled when
  349. an alert is received, and is re-enabled only when the alarm is gone.
  350. Otherwise the chip would block alerts from other chips in the bus as long
  351. as the alarm is active.
  352. PEC Support
  353. -----------
  354. The ADM1032 is the only chip of the family which supports PEC. It does
  355. not support PEC on all transactions though, so some care must be taken.
  356. When reading a register value, the PEC byte is computed and sent by the
  357. ADM1032 chip. However, in the case of a combined transaction (SMBus Read
  358. Byte), the ADM1032 computes the CRC value over only the second half of
  359. the message rather than its entirety, because it thinks the first half
  360. of the message belongs to a different transaction. As a result, the CRC
  361. value differs from what the SMBus master expects, and all reads fail.
  362. For this reason, the lm90 driver will enable PEC for the ADM1032 only if
  363. the bus supports the SMBus Send Byte and Receive Byte transaction types.
  364. These transactions will be used to read register values, instead of
  365. SMBus Read Byte, and PEC will work properly.
  366. Additionally, the ADM1032 doesn't support SMBus Send Byte with PEC.
  367. Instead, it will try to write the PEC value to the register (because the
  368. SMBus Send Byte transaction with PEC is similar to a Write Byte transaction
  369. without PEC), which is not what we want. Thus, PEC is explicitly disabled
  370. on SMBus Send Byte transactions in the lm90 driver.
  371. PEC on byte data transactions represents a significant increase in bandwidth
  372. usage (+33% for writes, +25% for reads) in normal conditions. With the need
  373. to use two SMBus transaction for reads, this overhead jumps to +50%. Worse,
  374. two transactions will typically mean twice as much delay waiting for
  375. transaction completion, effectively doubling the register cache refresh time.
  376. I guess reliability comes at a price, but it's quite expensive this time.
  377. So, as not everyone might enjoy the slowdown, PEC is disabled by default and
  378. can be enabled through sysfs. Just write 1 to the "pec" file and PEC will be
  379. enabled. Write 0 to that file to disable PEC again.