adm9240.rst 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. Kernel driver adm9240
  2. =====================
  3. Supported chips:
  4. * Analog Devices ADM9240
  5. Prefix: 'adm9240'
  6. Addresses scanned: I2C 0x2c - 0x2f
  7. Datasheet: Publicly available at the Analog Devices website
  8. http://www.analog.com/UploadedFiles/Data_Sheets/79857778ADM9240_0.pdf
  9. * Dallas Semiconductor DS1780
  10. Prefix: 'ds1780'
  11. Addresses scanned: I2C 0x2c - 0x2f
  12. Datasheet: Publicly available at the Dallas Semiconductor (Maxim) website
  13. http://pdfserv.maxim-ic.com/en/ds/DS1780.pdf
  14. * National Semiconductor LM81
  15. Prefix: 'lm81'
  16. Addresses scanned: I2C 0x2c - 0x2f
  17. Datasheet: Publicly available at the National Semiconductor website
  18. http://www.national.com/ds.cgi/LM/LM81.pdf
  19. Authors:
  20. - Frodo Looijaard <frodol@dds.nl>,
  21. - Philip Edelbrock <phil@netroedge.com>,
  22. - Michiel Rook <michiel@grendelproject.nl>,
  23. - Grant Coady <gcoady.lk@gmail.com> with guidance
  24. from Jean Delvare <jdelvare@suse.de>
  25. Interface
  26. ---------
  27. The I2C addresses listed above assume BIOS has not changed the
  28. chip MSB 5-bit address. Each chip reports a unique manufacturer
  29. identification code as well as the chip revision/stepping level.
  30. Description
  31. -----------
  32. [From ADM9240] The ADM9240 is a complete system hardware monitor for
  33. microprocessor-based systems, providing measurement and limit comparison
  34. of up to four power supplies and two processor core voltages, plus
  35. temperature, two fan speeds and chassis intrusion. Measured values can
  36. be read out via an I2C-compatible serial System Management Bus, and values
  37. for limit comparisons can be programmed in over the same serial bus. The
  38. high speed successive approximation ADC allows frequent sampling of all
  39. analog channels to ensure a fast interrupt response to any out-of-limit
  40. measurement.
  41. The ADM9240, DS1780 and LM81 are register compatible, the following
  42. details are common to the three chips. Chip differences are described
  43. after this section.
  44. Measurements
  45. ------------
  46. The measurement cycle
  47. The adm9240 driver will take a measurement reading no faster than once
  48. each two seconds. User-space may read sysfs interface faster than the
  49. measurement update rate and will receive cached data from the most
  50. recent measurement.
  51. ADM9240 has a very fast 320us temperature and voltage measurement cycle
  52. with independent fan speed measurement cycles counting alternating rising
  53. edges of the fan tacho inputs.
  54. DS1780 measurement cycle is about once per second including fan speed.
  55. LM81 measurement cycle is about once per 400ms including fan speed.
  56. The LM81 12-bit extended temperature measurement mode is not supported.
  57. Temperature
  58. -----------
  59. On chip temperature is reported as degrees Celsius as 9-bit signed data
  60. with resolution of 0.5 degrees Celsius. High and low temperature limits
  61. are 8-bit signed data with resolution of one degree Celsius.
  62. Temperature alarm is asserted once the temperature exceeds the high limit,
  63. and is cleared when the temperature falls below the temp1_max_hyst value.
  64. Fan Speed
  65. ---------
  66. Two fan tacho inputs are provided, the ADM9240 gates an internal 22.5kHz
  67. clock via a divider to an 8-bit counter. Fan speed (rpm) is calculated by:
  68. rpm = (22500 * 60) / (count * divider)
  69. Automatic fan clock divider
  70. * User sets 0 to fan_min limit
  71. - low speed alarm is disabled
  72. - fan clock divider not changed
  73. - auto fan clock adjuster enabled for valid fan speed reading
  74. * User sets fan_min limit too low
  75. - low speed alarm is enabled
  76. - fan clock divider set to max
  77. - fan_min set to register value 254 which corresponds
  78. to 664 rpm on adm9240
  79. - low speed alarm will be asserted if fan speed is
  80. less than minimum measurable speed
  81. - auto fan clock adjuster disabled
  82. * User sets reasonable fan speed
  83. - low speed alarm is enabled
  84. - fan clock divider set to suit fan_min
  85. - auto fan clock adjuster enabled: adjusts fan_min
  86. * User sets unreasonably high low fan speed limit
  87. - resolution of the low speed limit may be reduced
  88. - alarm will be asserted
  89. - auto fan clock adjuster enabled: adjusts fan_min
  90. * fan speed may be displayed as zero until the auto fan clock divider
  91. adjuster brings fan speed clock divider back into chip measurement
  92. range, this will occur within a few measurement cycles.
  93. Analog Output
  94. -------------
  95. An analog output provides a 0 to 1.25 volt signal intended for an external
  96. fan speed amplifier circuit. The analog output is set to maximum value on
  97. power up or reset. This doesn't do much on the test Intel SE440BX-2.
  98. Voltage Monitor
  99. ^^^^^^^^^^^^^^^
  100. Voltage (IN) measurement is internally scaled:
  101. === =========== =========== ========= ==========
  102. nr label nominal maximum resolution
  103. mV mV mV
  104. === =========== =========== ========= ==========
  105. 0 +2.5V 2500 3320 13.0
  106. 1 Vccp1 2700 3600 14.1
  107. 2 +3.3V 3300 4380 17.2
  108. 3 +5V 5000 6640 26.0
  109. 4 +12V 12000 15940 62.5
  110. 5 Vccp2 2700 3600 14.1
  111. === =========== =========== ========= ==========
  112. The reading is an unsigned 8-bit value, nominal voltage measurement is
  113. represented by a reading of 192, being 3/4 of the measurement range.
  114. An alarm is asserted for any voltage going below or above the set limits.
  115. The driver reports and accepts voltage limits scaled to the above table.
  116. VID Monitor
  117. -----------
  118. The chip has five inputs to read the 5-bit VID and reports the mV value
  119. based on detected CPU type.
  120. Chassis Intrusion
  121. -----------------
  122. An alarm is asserted when the CI pin goes active high. The ADM9240
  123. Datasheet has an example of an external temperature sensor driving
  124. this pin. On an Intel SE440BX-2 the Chassis Intrusion header is
  125. connected to a normally open switch.
  126. The ADM9240 provides an internal open drain on this line, and may output
  127. a 20 ms active low pulse to reset an external Chassis Intrusion latch.
  128. Clear the CI latch by writing value 0 to the sysfs intrusion0_alarm file.
  129. Alarm flags reported as 16-bit word
  130. === ============= ==========================
  131. bit label comment
  132. === ============= ==========================
  133. 0 +2.5 V_Error high or low limit exceeded
  134. 1 VCCP_Error high or low limit exceeded
  135. 2 +3.3 V_Error high or low limit exceeded
  136. 3 +5 V_Error high or low limit exceeded
  137. 4 Temp_Error temperature error
  138. 6 FAN1_Error fan low limit exceeded
  139. 7 FAN2_Error fan low limit exceeded
  140. 8 +12 V_Error high or low limit exceeded
  141. 9 VCCP2_Error high or low limit exceeded
  142. 12 Chassis_Error CI pin went high
  143. === ============= ==========================
  144. Remaining bits are reserved and thus undefined. It is important to note
  145. that alarm bits may be cleared on read, user-space may latch alarms and
  146. provide the end-user with a method to clear alarm memory.