Back to home page

OSCL-LXR

 
 

    


0001 Kernel driver dme1737
0002 =====================
0003 
0004 Supported chips:
0005 
0006   * SMSC DME1737 and compatibles (like Asus A8000)
0007 
0008     Prefix: 'dme1737'
0009 
0010     Addresses scanned: I2C 0x2c, 0x2d, 0x2e
0011 
0012     Datasheet: Provided by SMSC upon request and under NDA
0013 
0014   * SMSC SCH3112, SCH3114, SCH3116
0015 
0016     Prefix: 'sch311x'
0017 
0018     Addresses scanned: none, address read from Super-I/O config space
0019 
0020     Datasheet: Available on the Internet
0021 
0022   * SMSC SCH5027
0023 
0024     Prefix: 'sch5027'
0025 
0026     Addresses scanned: I2C 0x2c, 0x2d, 0x2e
0027 
0028     Datasheet: Provided by SMSC upon request and under NDA
0029 
0030   * SMSC SCH5127
0031 
0032     Prefix: 'sch5127'
0033 
0034     Addresses scanned: none, address read from Super-I/O config space
0035 
0036     Datasheet: Provided by SMSC upon request and under NDA
0037 
0038 Authors:
0039     Juerg Haefliger <juergh@gmail.com>
0040 
0041 
0042 Module Parameters
0043 -----------------
0044 
0045 * force_start: bool
0046                         Enables the monitoring of voltage, fan and temp inputs
0047                         and PWM output control functions. Using this parameter
0048                         shouldn't be required since the BIOS usually takes care
0049                         of this.
0050 
0051 * probe_all_addr: bool
0052                         Include non-standard LPC addresses 0x162e and 0x164e
0053                         when probing for ISA devices. This is required for the
0054                         following boards:
0055                         - VIA EPIA SN18000
0056 
0057 
0058 Description
0059 -----------
0060 
0061 This driver implements support for the hardware monitoring capabilities of the
0062 SMSC DME1737 and Asus A8000 (which are the same), SMSC SCH5027, SCH311x,
0063 and SCH5127 Super-I/O chips. These chips feature monitoring of 3 temp sensors
0064 temp[1-3] (2 remote diodes and 1 internal), 8 voltages in[0-7] (7 external and
0065 1 internal) and up to 6 fan speeds fan[1-6]. Additionally, the chips implement
0066 up to 5 PWM outputs pwm[1-3,5-6] for controlling fan speeds both manually and
0067 automatically.
0068 
0069 For the DME1737, A8000 and SCH5027, fan[1-2] and pwm[1-2] are always present.
0070 Fan[3-6] and pwm[3,5-6] are optional features and their availability depends on
0071 the configuration of the chip. The driver will detect which features are
0072 present during initialization and create the sysfs attributes accordingly.
0073 
0074 For the SCH311x and SCH5127, fan[1-3] and pwm[1-3] are always present and
0075 fan[4-6] and pwm[5-6] don't exist.
0076 
0077 The hardware monitoring features of the DME1737, A8000, and SCH5027 are only
0078 accessible via SMBus, while the SCH311x and SCH5127 only provide access via
0079 the ISA bus. The driver will therefore register itself as an I2C client driver
0080 if it detects a DME1737, A8000, or SCH5027 and as a platform driver if it
0081 detects a SCH311x or SCH5127 chip.
0082 
0083 
0084 Voltage Monitoring
0085 ------------------
0086 
0087 The voltage inputs are sampled with 12-bit resolution and have internal
0088 scaling resistors. The values returned by the driver therefore reflect true
0089 millivolts and don't need scaling. The voltage inputs are mapped as follows
0090 (the last column indicates the input ranges):
0091 
0092 DME1737, A8000::
0093 
0094         in0: +5VTR      (+5V standby)           0V - 6.64V
0095         in1: Vccp       (processor core)        0V - 3V
0096         in2: VCC        (internal +3.3V)        0V - 4.38V
0097         in3: +5V                                0V - 6.64V
0098         in4: +12V                               0V - 16V
0099         in5: VTR        (+3.3V standby)         0V - 4.38V
0100         in6: Vbat       (+3.0V)                 0V - 4.38V
0101 
0102 SCH311x::
0103 
0104         in0: +2.5V                              0V - 3.32V
0105         in1: Vccp       (processor core)        0V - 2V
0106         in2: VCC        (internal +3.3V)        0V - 4.38V
0107         in3: +5V                                0V - 6.64V
0108         in4: +12V                               0V - 16V
0109         in5: VTR        (+3.3V standby)         0V - 4.38V
0110         in6: Vbat       (+3.0V)                 0V - 4.38V
0111 
0112 SCH5027::
0113 
0114         in0: +5VTR      (+5V standby)           0V - 6.64V
0115         in1: Vccp       (processor core)        0V - 3V
0116         in2: VCC        (internal +3.3V)        0V - 4.38V
0117         in3: V2_IN                              0V - 1.5V
0118         in4: V1_IN                              0V - 1.5V
0119         in5: VTR        (+3.3V standby)         0V - 4.38V
0120         in6: Vbat       (+3.0V)                 0V - 4.38V
0121 
0122 SCH5127::
0123 
0124         in0: +2.5                               0V - 3.32V
0125         in1: Vccp       (processor core)        0V - 3V
0126         in2: VCC        (internal +3.3V)        0V - 4.38V
0127         in3: V2_IN                              0V - 1.5V
0128         in4: V1_IN                              0V - 1.5V
0129         in5: VTR        (+3.3V standby)         0V - 4.38V
0130         in6: Vbat       (+3.0V)                 0V - 4.38V
0131         in7: Vtrip      (+1.5V)                 0V - 1.99V
0132 
0133 Each voltage input has associated min and max limits which trigger an alarm
0134 when crossed.
0135 
0136 
0137 Temperature Monitoring
0138 ----------------------
0139 
0140 Temperatures are measured with 12-bit resolution and reported in millidegree
0141 Celsius. The chip also features offsets for all 3 temperature inputs which -
0142 when programmed - get added to the input readings. The chip does all the
0143 scaling by itself and the driver therefore reports true temperatures that don't
0144 need any user-space adjustments. The temperature inputs are mapped as follows
0145 (the last column indicates the input ranges)::
0146 
0147         temp1: Remote diode 1 (3904 type) temperature   -127C - +127C
0148         temp2: DME1737 internal temperature             -127C - +127C
0149         temp3: Remote diode 2 (3904 type) temperature   -127C - +127C
0150 
0151 Each temperature input has associated min and max limits which trigger an alarm
0152 when crossed. Additionally, each temperature input has a fault attribute that
0153 returns 1 when a faulty diode or an unconnected input is detected and 0
0154 otherwise.
0155 
0156 
0157 Fan Monitoring
0158 --------------
0159 
0160 Fan RPMs are measured with 16-bit resolution. The chip provides inputs for 6
0161 fan tachometers. All 6 inputs have an associated min limit which triggers an
0162 alarm when crossed. Fan inputs 1-4 provide type attributes that need to be set
0163 to the number of pulses per fan revolution that the connected tachometer
0164 generates. Supported values are 1, 2, and 4. Fan inputs 5-6 only support fans
0165 that generate 2 pulses per revolution. Fan inputs 5-6 also provide a max
0166 attribute that needs to be set to the maximum attainable RPM (fan at 100% duty-
0167 cycle) of the input. The chip adjusts the sampling rate based on this value.
0168 
0169 
0170 PWM Output Control
0171 ------------------
0172 
0173 This chip features 5 PWM outputs. PWM outputs 1-3 are associated with fan
0174 inputs 1-3 and PWM outputs 5-6 are associated with fan inputs 5-6. PWM outputs
0175 1-3 can be configured to operate either in manual or automatic mode by setting
0176 the appropriate enable attribute accordingly. PWM outputs 5-6 can only operate
0177 in manual mode, their enable attributes are therefore read-only. When set to
0178 manual mode, the fan speed is set by writing the duty-cycle value to the
0179 appropriate PWM attribute. In automatic mode, the PWM attribute returns the
0180 current duty-cycle as set by the fan controller in the chip. All PWM outputs
0181 support the setting of the output frequency via the freq attribute.
0182 
0183 In automatic mode, the chip supports the setting of the PWM ramp rate which
0184 defines how fast the PWM output is adjusting to changes of the associated
0185 temperature input. Associating PWM outputs to temperature inputs is done via
0186 temperature zones. The chip features 3 zones whose assignments to temperature
0187 inputs is static and determined during initialization. These assignments can
0188 be retrieved via the zone[1-3]_auto_channels_temp attributes. Each PWM output
0189 is assigned to one (or hottest of multiple) temperature zone(s) through the
0190 pwm[1-3]_auto_channels_zone attributes. Each PWM output has 3 distinct output
0191 duty-cycles: full, low, and min. Full is internally hard-wired to 255 (100%)
0192 and low and min can be programmed via pwm[1-3]_auto_point1_pwm and
0193 pwm[1-3]_auto_pwm_min, respectively. The thermal thresholds of the zones are
0194 programmed via zone[1-3]_auto_point[1-3]_temp and
0195 zone[1-3]_auto_point1_temp_hyst:
0196 
0197         =============================== =======================================
0198         pwm[1-3]_auto_point2_pwm        full-speed duty-cycle (255, i.e., 100%)
0199         pwm[1-3]_auto_point1_pwm        low-speed duty-cycle
0200         pwm[1-3]_auto_pwm_min           min-speed duty-cycle
0201 
0202         zone[1-3]_auto_point3_temp      full-speed temp (all outputs)
0203         zone[1-3]_auto_point2_temp      full-speed temp
0204         zone[1-3]_auto_point1_temp      low-speed temp
0205         zone[1-3]_auto_point1_temp_hyst min-speed temp
0206         =============================== =======================================
0207 
0208 The chip adjusts the output duty-cycle linearly in the range of auto_point1_pwm
0209 to auto_point2_pwm if the temperature of the associated zone is between
0210 auto_point1_temp and auto_point2_temp. If the temperature drops below the
0211 auto_point1_temp_hyst value, the output duty-cycle is set to the auto_pwm_min
0212 value which only supports two values: 0 or auto_point1_pwm. That means that the
0213 fan either turns completely off or keeps spinning with the low-speed
0214 duty-cycle. If any of the temperatures rise above the auto_point3_temp value,
0215 all PWM outputs are set to 100% duty-cycle.
0216 
0217 Following is another representation of how the chip sets the output duty-cycle
0218 based on the temperature of the associated thermal zone:
0219 
0220         =============== =============== =================
0221         Temperature     Duty-Cycle      Duty-Cycle
0222                         Rising Temp     Falling Temp
0223         =============== =============== =================
0224         full-speed      full-speed      full-speed
0225 
0226         -               < linearly      -
0227                         adjusted
0228                         duty-cycle >
0229 
0230         low-speed       low-speed       low-speed
0231         -               min-speed       low-speed
0232         min-speed       min-speed       min-speed
0233         -               min-speed       min-speed
0234         =============== =============== =================
0235 
0236 
0237 Sysfs Attributes
0238 ----------------
0239 
0240 Following is a list of all sysfs attributes that the driver provides, their
0241 permissions and a short description:
0242 
0243 =============================== ======= =======================================
0244 Name                            Perm    Description
0245 =============================== ======= =======================================
0246 cpu0_vid                        RO      CPU core reference voltage in
0247                                         millivolts.
0248 vrm                             RW      Voltage regulator module version
0249                                         number.
0250 
0251 in[0-7]_input                   RO      Measured voltage in millivolts.
0252 in[0-7]_min                     RW      Low limit for voltage input.
0253 in[0-7]_max                     RW      High limit for voltage input.
0254 in[0-7]_alarm                   RO      Voltage input alarm. Returns 1 if
0255                                         voltage input is or went outside the
0256                                         associated min-max range, 0 otherwise.
0257 
0258 temp[1-3]_input                 RO      Measured temperature in millidegree
0259                                         Celsius.
0260 temp[1-3]_min                   RW      Low limit for temp input.
0261 temp[1-3]_max                   RW      High limit for temp input.
0262 temp[1-3]_offset                RW      Offset for temp input. This value will
0263                                         be added by the chip to the measured
0264                                         temperature.
0265 temp[1-3]_alarm                 RO      Alarm for temp input. Returns 1 if temp
0266                                         input is or went outside the associated
0267                                         min-max range, 0 otherwise.
0268 temp[1-3]_fault                 RO      Temp input fault. Returns 1 if the chip
0269                                         detects a faulty thermal diode or an
0270                                         unconnected temp input, 0 otherwise.
0271 
0272 zone[1-3]_auto_channels_temp    RO      Temperature zone to temperature input
0273                                         mapping. This attribute is a bitfield
0274                                         and supports the following values:
0275 
0276                                                 - 1: temp1
0277                                                 - 2: temp2
0278                                                 - 4: temp3
0279 zone[1-3]_auto_point1_temp_hyst RW      Auto PWM temp point1 hysteresis. The
0280                                         output of the corresponding PWM is set
0281                                         to the pwm_auto_min value if the temp
0282                                         falls below the auto_point1_temp_hyst
0283                                         value.
0284 zone[1-3]_auto_point[1-3]_temp  RW      Auto PWM temp points. Auto_point1 is
0285                                         the low-speed temp, auto_point2 is the
0286                                         full-speed temp, and auto_point3 is the
0287                                         temp at which all PWM outputs are set
0288                                         to full-speed (100% duty-cycle).
0289 
0290 fan[1-6]_input                  RO      Measured fan speed in RPM.
0291 fan[1-6]_min                    RW      Low limit for fan input.
0292 fan[1-6]_alarm                  RO      Alarm for fan input. Returns 1 if fan
0293                                         input is or went below the associated
0294                                         min value, 0 otherwise.
0295 fan[1-4]_type                   RW      Type of attached fan. Expressed in
0296                                         number of pulses per revolution that
0297                                         the fan generates. Supported values are
0298                                         1, 2, and 4.
0299 fan[5-6]_max                    RW      Max attainable RPM at 100% duty-cycle.
0300                                         Required for chip to adjust the
0301                                         sampling rate accordingly.
0302 
0303 pmw[1-3,5-6]                    RO/RW   Duty-cycle of PWM output. Supported
0304                                         values are 0-255 (0%-100%). Only
0305                                         writeable if the associated PWM is in
0306                                         manual mode.
0307 pwm[1-3]_enable                 RW      Enable of PWM outputs 1-3. Supported
0308                                         values are:
0309 
0310                                                 - 0: turned off (output @ 100%)
0311                                                 - 1: manual mode
0312                                                 - 2: automatic mode
0313 pwm[5-6]_enable                 RO      Enable of PWM outputs 5-6. Always
0314                                         returns 1 since these 2 outputs are
0315                                         hard-wired to manual mode.
0316 pmw[1-3,5-6]_freq               RW      Frequency of PWM output. Supported
0317                                         values are in the range 11Hz-30000Hz
0318                                         (default is 25000Hz).
0319 pmw[1-3]_ramp_rate              RW      Ramp rate of PWM output. Determines how
0320                                         fast the PWM duty-cycle will change
0321                                         when the PWM is in automatic mode.
0322                                         Expressed in ms per PWM step. Supported
0323                                         values are in the range 0ms-206ms
0324                                         (default is 0, which means the duty-
0325                                         cycle changes instantly).
0326 pwm[1-3]_auto_channels_zone     RW      PWM output to temperature zone mapping.
0327                                         This attribute is a bitfield and
0328                                         supports the following values:
0329 
0330                                                 - 1: zone1
0331                                                 - 2: zone2
0332                                                 - 4: zone3
0333                                                 - 6: highest of zone[2-3]
0334                                                 - 7: highest of zone[1-3]
0335 pwm[1-3]_auto_pwm_min           RW      Auto PWM min pwm. Minimum PWM duty-
0336                                         cycle. Supported values are 0 or
0337                                         auto_point1_pwm.
0338 pwm[1-3]_auto_point1_pwm        RW      Auto PWM pwm point. Auto_point1 is the
0339                                         low-speed duty-cycle.
0340 pwm[1-3]_auto_point2_pwm        RO      Auto PWM pwm point. Auto_point2 is the
0341                                         full-speed duty-cycle which is hard-
0342                                         wired to 255 (100% duty-cycle).
0343 =============================== ======= =======================================
0344 
0345 Chip Differences
0346 ----------------
0347 
0348 ======================= ======= ======= ======= =======
0349 Feature                 dme1737 sch311x sch5027 sch5127
0350 ======================= ======= ======= ======= =======
0351 temp[1-3]_offset        yes     yes
0352 vid                     yes
0353 zone3                   yes     yes     yes
0354 zone[1-3]_hyst          yes     yes
0355 pwm min/off             yes     yes
0356 fan3                    opt     yes     opt     yes
0357 pwm3                    opt     yes     opt     yes
0358 fan4                    opt             opt
0359 fan5                    opt             opt
0360 pwm5                    opt             opt
0361 fan6                    opt             opt
0362 pwm6                    opt             opt
0363 in7                                             yes
0364 ======================= ======= ======= ======= =======