pc87360 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. Kernel driver pc87360
  2. =====================
  3. Supported chips:
  4. * National Semiconductor PC87360, PC87363, PC87364, PC87365 and PC87366
  5. Prefixes: 'pc87360', 'pc87363', 'pc87364', 'pc87365', 'pc87366'
  6. Addresses scanned: none, address read from Super I/O config space
  7. Datasheets: No longer available
  8. Authors: Jean Delvare <jdelvare@suse.de>
  9. Thanks to Sandeep Mehta, Tonko de Rooy and Daniel Ceregatti for testing.
  10. Thanks to Rudolf Marek for helping me investigate conversion issues.
  11. Module Parameters
  12. -----------------
  13. * init int
  14. Chip initialization level:
  15. 0: None
  16. *1: Forcibly enable internal voltage and temperature channels, except in9
  17. 2: Forcibly enable all voltage and temperature channels, except in9
  18. 3: Forcibly enable all voltage and temperature channels, including in9
  19. Note that this parameter has no effect for the PC87360, PC87363 and PC87364
  20. chips.
  21. Also note that for the PC87366, initialization levels 2 and 3 don't enable
  22. all temperature channels, because some of them share pins with each other,
  23. so they can't be used at the same time.
  24. Description
  25. -----------
  26. The National Semiconductor PC87360 Super I/O chip contains monitoring and
  27. PWM control circuitry for two fans. The PC87363 chip is similar, and the
  28. PC87364 chip has monitoring and PWM control for a third fan.
  29. The National Semiconductor PC87365 and PC87366 Super I/O chips are complete
  30. hardware monitoring chipsets, not only controlling and monitoring three fans,
  31. but also monitoring eleven voltage inputs and two (PC87365) or up to four
  32. (PC87366) temperatures.
  33. Chip #vin #fan #pwm #temp devid
  34. PC87360 - 2 2 - 0xE1
  35. PC87363 - 2 2 - 0xE8
  36. PC87364 - 3 3 - 0xE4
  37. PC87365 11 3 3 2 0xE5
  38. PC87366 11 3 3 3-4 0xE9
  39. The driver assumes that no more than one chip is present, and one of the
  40. standard Super I/O addresses is used (0x2E/0x2F or 0x4E/0x4F)
  41. Fan Monitoring
  42. --------------
  43. Fan rotation speeds are reported in RPM (revolutions per minute). An alarm
  44. is triggered if the rotation speed has dropped below a programmable limit.
  45. A different alarm is triggered if the fan speed is too low to be measured.
  46. Fan readings are affected by a programmable clock divider, giving the
  47. readings more range or accuracy. Usually, users have to learn how it works,
  48. but this driver implements dynamic clock divider selection, so you don't
  49. have to care no more.
  50. For reference, here are a few values about clock dividers:
  51. slowest accuracy highest
  52. measurable around 3000 accurate
  53. divider speed (RPM) RPM (RPM) speed (RPM)
  54. 1 1882 18 6928
  55. 2 941 37 4898
  56. 4 470 74 3464
  57. 8 235 150 2449
  58. For the curious, here is how the values above were computed:
  59. * slowest measurable speed: clock/(255*divider)
  60. * accuracy around 3000 RPM: 3000^2/clock
  61. * highest accurate speed: sqrt(clock*100)
  62. The clock speed for the PC87360 family is 480 kHz. I arbitrarily chose 100
  63. RPM as the lowest acceptable accuracy.
  64. As mentioned above, you don't have to care about this no more.
  65. Note that not all RPM values can be represented, even when the best clock
  66. divider is selected. This is not only true for the measured speeds, but
  67. also for the programmable low limits, so don't be surprised if you try to
  68. set, say, fan1_min to 2900 and it finally reads 2909.
  69. Fan Control
  70. -----------
  71. PWM (pulse width modulation) values range from 0 to 255, with 0 meaning
  72. that the fan is stopped, and 255 meaning that the fan goes at full speed.
  73. Be extremely careful when changing PWM values. Low PWM values, even
  74. non-zero, can stop the fan, which may cause irreversible damage to your
  75. hardware if temperature increases too much. When changing PWM values, go
  76. step by step and keep an eye on temperatures.
  77. One user reported problems with PWM. Changing PWM values would break fan
  78. speed readings. No explanation nor fix could be found.
  79. Temperature Monitoring
  80. ----------------------
  81. Temperatures are reported in degrees Celsius. Each temperature measured has
  82. associated low, high and overtemperature limits, each of which triggers an
  83. alarm when crossed.
  84. The first two temperature channels are external. The third one (PC87366
  85. only) is internal.
  86. The PC87366 has three additional temperature channels, based on
  87. thermistors (as opposed to thermal diodes for the first three temperature
  88. channels). For technical reasons, these channels are held by the VLM
  89. (voltage level monitor) logical device, not the TMS (temperature
  90. measurement) one. As a consequence, these temperatures are exported as
  91. voltages, and converted into temperatures in user-space.
  92. Note that these three additional channels share their pins with the
  93. external thermal diode channels, so you (physically) can't use them all at
  94. the same time. Although it should be possible to mix the two sensor types,
  95. the documents from National Semiconductor suggest that motherboard
  96. manufacturers should choose one type and stick to it. So you will more
  97. likely have either channels 1 to 3 (thermal diodes) or 3 to 6 (internal
  98. thermal diode, and thermistors).
  99. Voltage Monitoring
  100. ------------------
  101. Voltages are reported relatively to a reference voltage, either internal or
  102. external. Some of them (in7:Vsb, in8:Vdd and in10:AVdd) are divided by two
  103. internally, you will have to compensate in sensors.conf. Others (in0 to in6)
  104. are likely to be divided externally. The meaning of each of these inputs as
  105. well as the values of the resistors used for division is left to the
  106. motherboard manufacturers, so you will have to document yourself and edit
  107. sensors.conf accordingly. National Semiconductor has a document with
  108. recommended resistor values for some voltages, but this still leaves much
  109. room for per motherboard specificities, unfortunately. Even worse,
  110. motherboard manufacturers don't seem to care about National Semiconductor's
  111. recommendations.
  112. Each voltage measured has associated low and high limits, each of which
  113. triggers an alarm when crossed.
  114. When available, VID inputs are used to provide the nominal CPU Core voltage.
  115. The driver will default to VRM 9.0, but this can be changed from user-space.
  116. The chipsets can handle two sets of VID inputs (on dual-CPU systems), but
  117. the driver will only export one for now. This may change later if there is
  118. a need.
  119. General Remarks
  120. ---------------
  121. If an alarm triggers, it will remain triggered until the hardware register
  122. is read at least once. This means that the cause for the alarm may already
  123. have disappeared! Note that all hardware registers are read whenever any
  124. data is read (unless it is less than 2 seconds since the last update, in
  125. which case cached values are returned instead). As a consequence, when
  126. a once-only alarm triggers, it may take 2 seconds for it to show, and 2
  127. more seconds for it to disappear.
  128. Monitoring of in9 isn't enabled at lower init levels (<3) because that
  129. channel measures the battery voltage (Vbat). It is a known fact that
  130. repeatedly sampling the battery voltage reduces its lifetime. National
  131. Semiconductor smartly designed their chipset so that in9 is sampled only
  132. once every 1024 sampling cycles (that is every 34 minutes at the default
  133. sampling rate), so the effect is attenuated, but still present.
  134. Limitations
  135. -----------
  136. The datasheets suggests that some values (fan mins, fan dividers)
  137. shouldn't be changed once the monitoring has started, but we ignore that
  138. recommendation. We'll reconsider if it actually causes trouble.