w83791d 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. Kernel driver w83791d
  2. =====================
  3. Supported chips:
  4. * Winbond W83791D
  5. Prefix: 'w83791d'
  6. Addresses scanned: I2C 0x2c - 0x2f
  7. Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83791D_W83791Gb.pdf
  8. Author: Charles Spirakis <bezaur@gmail.com>
  9. This driver was derived from the w83781d.c and w83792d.c source files.
  10. Credits:
  11. w83781d.c:
  12. Frodo Looijaard <frodol@dds.nl>,
  13. Philip Edelbrock <phil@netroedge.com>,
  14. and Mark Studebaker <mdsxyz123@yahoo.com>
  15. w83792d.c:
  16. Shane Huang (Winbond),
  17. Rudolf Marek <r.marek@assembler.cz>
  18. Additional contributors:
  19. Sven Anders <anders@anduras.de>
  20. Marc Hulsman <m.hulsman@tudelft.nl>
  21. Module Parameters
  22. -----------------
  23. * init boolean
  24. (default 0)
  25. Use 'init=1' to have the driver do extra software initializations.
  26. The default behavior is to do the minimum initialization possible
  27. and depend on the BIOS to properly setup the chip. If you know you
  28. have a w83791d and you're having problems, try init=1 before trying
  29. reset=1.
  30. * reset boolean
  31. (default 0)
  32. Use 'reset=1' to reset the chip (via index 0x40, bit 7). The default
  33. behavior is no chip reset to preserve BIOS settings.
  34. * force_subclients=bus,caddr,saddr,saddr
  35. This is used to force the i2c addresses for subclients of
  36. a certain chip. Example usage is `force_subclients=0,0x2f,0x4a,0x4b'
  37. to force the subclients of chip 0x2f on bus 0 to i2c addresses
  38. 0x4a and 0x4b.
  39. Description
  40. -----------
  41. This driver implements support for the Winbond W83791D chip. The W83791G
  42. chip appears to be the same as the W83791D but is lead free.
  43. Detection of the chip can sometimes be foiled because it can be in an
  44. internal state that allows no clean access (Bank with ID register is not
  45. currently selected). If you know the address of the chip, use a 'force'
  46. parameter; this will put it into a more well-behaved state first.
  47. The driver implements three temperature sensors, ten voltage sensors,
  48. five fan rotation speed sensors and manual PWM control of each fan.
  49. Temperatures are measured in degrees Celsius and measurement resolution is 1
  50. degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when
  51. the temperature gets higher than the Overtemperature Shutdown value; it stays
  52. on until the temperature falls below the Hysteresis value.
  53. Voltage sensors (also known as IN sensors) report their values in millivolts.
  54. An alarm is triggered if the voltage has crossed a programmable minimum
  55. or maximum limit.
  56. Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
  57. triggered if the rotation speed has dropped below a programmable limit. Fan
  58. readings can be divided by a programmable divider (1, 2, 4, 8, 16,
  59. 32, 64 or 128 for all fans) to give the readings more range or accuracy.
  60. Each fan controlled is controlled by PWM. The PWM duty cycle can be read and
  61. set for each fan separately. Valid values range from 0 (stop) to 255 (full).
  62. PWM 1-3 support Thermal Cruise mode, in which the PWMs are automatically
  63. regulated to keep respectively temp 1-3 at a certain target temperature.
  64. See below for the description of the sysfs-interface.
  65. The w83791d has a global bit used to enable beeping from the speaker when an
  66. alarm is triggered as well as a bitmask to enable or disable the beep for
  67. specific alarms. You need both the global beep enable bit and the
  68. corresponding beep bit to be on for a triggered alarm to sound a beep.
  69. The sysfs interface to the global enable is via the sysfs beep_enable file.
  70. This file is used for both legacy and new code.
  71. The sysfs interface to the beep bitmask has migrated from the original legacy
  72. method of a single sysfs beep_mask file to a newer method using multiple
  73. *_beep files as described in .../Documentation/hwmon/sysfs-interface.
  74. A similar change has occurred for the bitmap corresponding to the alarms. The
  75. original legacy method used a single sysfs alarms file containing a bitmap
  76. of triggered alarms. The newer method uses multiple sysfs *_alarm files
  77. (again following the pattern described in sysfs-interface).
  78. Since both methods read and write the underlying hardware, they can be used
  79. interchangeably and changes in one will automatically be reflected by
  80. the other. If you use the legacy bitmask method, your user-space code is
  81. responsible for handling the fact that the alarms and beep_mask bitmaps
  82. are not the same (see the table below).
  83. NOTE: All new code should be written to use the newer sysfs-interface
  84. specification as that avoids bitmap problems and is the preferred interface
  85. going forward.
  86. The driver reads the hardware chip values at most once every three seconds.
  87. User mode code requesting values more often will receive cached values.
  88. /sys files
  89. ----------
  90. The sysfs-interface is documented in the 'sysfs-interface' file. Only
  91. chip-specific options are documented here.
  92. pwm[1-3]_enable - this file controls mode of fan/temperature control for
  93. fan 1-3. Fan/PWM 4-5 only support manual mode.
  94. * 1 Manual mode
  95. * 2 Thermal Cruise mode
  96. * 3 Fan Speed Cruise mode (no further support)
  97. temp[1-3]_target - defines the target temperature for Thermal Cruise mode.
  98. Unit: millidegree Celsius
  99. RW
  100. temp[1-3]_tolerance - temperature tolerance for Thermal Cruise mode.
  101. Specifies an interval around the target temperature
  102. in which the fan speed is not changed.
  103. Unit: millidegree Celsius
  104. RW
  105. Alarms bitmap vs. beep_mask bitmask
  106. ------------------------------------
  107. For legacy code using the alarms and beep_mask files:
  108. in0 (VCORE) : alarms: 0x000001 beep_mask: 0x000001
  109. in1 (VINR0) : alarms: 0x000002 beep_mask: 0x002000 <== mismatch
  110. in2 (+3.3VIN): alarms: 0x000004 beep_mask: 0x000004
  111. in3 (5VDD) : alarms: 0x000008 beep_mask: 0x000008
  112. in4 (+12VIN) : alarms: 0x000100 beep_mask: 0x000100
  113. in5 (-12VIN) : alarms: 0x000200 beep_mask: 0x000200
  114. in6 (-5VIN) : alarms: 0x000400 beep_mask: 0x000400
  115. in7 (VSB) : alarms: 0x080000 beep_mask: 0x010000 <== mismatch
  116. in8 (VBAT) : alarms: 0x100000 beep_mask: 0x020000 <== mismatch
  117. in9 (VINR1) : alarms: 0x004000 beep_mask: 0x004000
  118. temp1 : alarms: 0x000010 beep_mask: 0x000010
  119. temp2 : alarms: 0x000020 beep_mask: 0x000020
  120. temp3 : alarms: 0x002000 beep_mask: 0x000002 <== mismatch
  121. fan1 : alarms: 0x000040 beep_mask: 0x000040
  122. fan2 : alarms: 0x000080 beep_mask: 0x000080
  123. fan3 : alarms: 0x000800 beep_mask: 0x000800
  124. fan4 : alarms: 0x200000 beep_mask: 0x200000
  125. fan5 : alarms: 0x400000 beep_mask: 0x400000
  126. tart1 : alarms: 0x010000 beep_mask: 0x040000 <== mismatch
  127. tart2 : alarms: 0x020000 beep_mask: 0x080000 <== mismatch
  128. tart3 : alarms: 0x040000 beep_mask: 0x100000 <== mismatch
  129. case_open : alarms: 0x001000 beep_mask: 0x001000
  130. global_enable: alarms: -------- beep_mask: 0x800000 (modified via beep_enable)