Kernel driver dme1737

Supported chips:

  • SMSC DME1737 and compatibles (like Asus A8000)

    Prefix: ‘dme1737’

    Addresses scanned: I2C 0x2c, 0x2d, 0x2e

    Datasheet: Provided by SMSC upon request and under NDA

  • SMSC SCH3112, SCH3114, SCH3116

    Prefix: ‘sch311x’

    Addresses scanned: none, address read from Super-I/O config space

    Datasheet: Available on the Internet

  • SMSC SCH5027

    Prefix: ‘sch5027’

    Addresses scanned: I2C 0x2c, 0x2d, 0x2e

    Datasheet: Provided by SMSC upon request and under NDA

  • SMSC SCH5127

    Prefix: ‘sch5127’

    Addresses scanned: none, address read from Super-I/O config space

    Datasheet: Provided by SMSC upon request and under NDA

Authors:
Juerg Haefliger <juergh@gmail.com>

Module Parameters

  • force_start: bool
    Enables the monitoring of voltage, fan and temp inputsand PWM output control functions. Using this parametershouldn’t be required since the BIOS usually takes careof this.
  • probe_all_addr: bool
    Include non-standard LPC addresses 0x162e and 0x164ewhen probing for ISA devices. This is required for thefollowing boards:- VIA EPIA SN18000

Description

This driver implements support for the hardware monitoring capabilities of theSMSC DME1737 and Asus A8000 (which are the same), SMSC SCH5027, SCH311x,and SCH5127 Super-I/O chips. These chips feature monitoring of 3 temp sensorstemp[1-3] (2 remote diodes and 1 internal), 8 voltages in[0-7] (7 external and1 internal) and up to 6 fan speeds fan[1-6]. Additionally, the chips implementup to 5 PWM outputs pwm[1-3,5-6] for controlling fan speeds both manually andautomatically.

For the DME1737, A8000 and SCH5027, fan[1-2] and pwm[1-2] are always present.Fan[3-6] and pwm[3,5-6] are optional features and their availability depends onthe configuration of the chip. The driver will detect which features arepresent during initialization and create the sysfs attributes accordingly.

For the SCH311x and SCH5127, fan[1-3] and pwm[1-3] are always present andfan[4-6] and pwm[5-6] don’t exist.

The hardware monitoring features of the DME1737, A8000, and SCH5027 are onlyaccessible via SMBus, while the SCH311x and SCH5127 only provide access viathe ISA bus. The driver will therefore register itself as an I2C client driverif it detects a DME1737, A8000, or SCH5027 and as a platform driver if itdetects a SCH311x or SCH5127 chip.

Voltage Monitoring

The voltage inputs are sampled with 12-bit resolution and have internalscaling resistors. The values returned by the driver therefore reflect truemillivolts and don’t need scaling. The voltage inputs are mapped as follows(the last column indicates the input ranges):

DME1737, A8000:

in0: +5VTR      (+5V standby)           0V - 6.64Vin1: Vccp       (processor core)        0V - 3Vin2: VCC        (internal +3.3V)        0V - 4.38Vin3: +5V                                0V - 6.64Vin4: +12V                               0V - 16Vin5: VTR        (+3.3V standby)         0V - 4.38Vin6: Vbat       (+3.0V)                 0V - 4.38V

SCH311x:

in0: +2.5V                              0V - 3.32Vin1: Vccp       (processor core)        0V - 2Vin2: VCC        (internal +3.3V)        0V - 4.38Vin3: +5V                                0V - 6.64Vin4: +12V                               0V - 16Vin5: VTR        (+3.3V standby)         0V - 4.38Vin6: Vbat       (+3.0V)                 0V - 4.38V

SCH5027:

in0: +5VTR      (+5V standby)           0V - 6.64Vin1: Vccp       (processor core)        0V - 3Vin2: VCC        (internal +3.3V)        0V - 4.38Vin3: V2_IN                              0V - 1.5Vin4: V1_IN                              0V - 1.5Vin5: VTR        (+3.3V standby)         0V - 4.38Vin6: Vbat       (+3.0V)                 0V - 4.38V

SCH5127:

in0: +2.5                               0V - 3.32Vin1: Vccp       (processor core)        0V - 3Vin2: VCC        (internal +3.3V)        0V - 4.38Vin3: V2_IN                              0V - 1.5Vin4: V1_IN                              0V - 1.5Vin5: VTR        (+3.3V standby)         0V - 4.38Vin6: Vbat       (+3.0V)                 0V - 4.38Vin7: Vtrip      (+1.5V)                 0V - 1.99V

Each voltage input has associated min and max limits which trigger an alarmwhen crossed.

Temperature Monitoring

Temperatures are measured with 12-bit resolution and reported in millidegreeCelsius. The chip also features offsets for all 3 temperature inputs which -when programmed - get added to the input readings. The chip does all thescaling by itself and the driver therefore reports true temperatures that don’tneed any user-space adjustments. The temperature inputs are mapped as follows(the last column indicates the input ranges):

temp1: Remote diode 1 (3904 type) temperature   -127C - +127Ctemp2: DME1737 internal temperature             -127C - +127Ctemp3: Remote diode 2 (3904 type) temperature   -127C - +127C

Each temperature input has associated min and max limits which trigger an alarmwhen crossed. Additionally, each temperature input has a fault attribute thatreturns 1 when a faulty diode or an unconnected input is detected and 0otherwise.

Fan Monitoring

Fan RPMs are measured with 16-bit resolution. The chip provides inputs for 6fan tachometers. All 6 inputs have an associated min limit which triggers analarm when crossed. Fan inputs 1-4 provide type attributes that need to be setto the number of pulses per fan revolution that the connected tachometergenerates. Supported values are 1, 2, and 4. Fan inputs 5-6 only support fansthat generate 2 pulses per revolution. Fan inputs 5-6 also provide a maxattribute that needs to be set to the maximum attainable RPM (fan at 100% duty-cycle) of the input. The chip adjusts the sampling rate based on this value.

PWM Output Control

This chip features 5 PWM outputs. PWM outputs 1-3 are associated with faninputs 1-3 and PWM outputs 5-6 are associated with fan inputs 5-6. PWM outputs1-3 can be configured to operate either in manual or automatic mode by settingthe appropriate enable attribute accordingly. PWM outputs 5-6 can only operatein manual mode, their enable attributes are therefore read-only. When set tomanual mode, the fan speed is set by writing the duty-cycle value to theappropriate PWM attribute. In automatic mode, the PWM attribute returns thecurrent duty-cycle as set by the fan controller in the chip. All PWM outputssupport the setting of the output frequency via the freq attribute.

In automatic mode, the chip supports the setting of the PWM ramp rate whichdefines how fast the PWM output is adjusting to changes of the associatedtemperature input. Associating PWM outputs to temperature inputs is done viatemperature zones. The chip features 3 zones whose assignments to temperatureinputs is static and determined during initialization. These assignments canbe retrieved via the zone[1-3]_auto_channels_temp attributes. Each PWM outputis assigned to one (or hottest of multiple) temperature zone(s) through thepwm[1-3]_auto_channels_zone attributes. Each PWM output has 3 distinct outputduty-cycles: full, low, and min. Full is internally hard-wired to 255 (100%)and low and min can be programmed via pwm[1-3]_auto_point1_pwm andpwm[1-3]_auto_pwm_min, respectively. The thermal thresholds of the zones areprogrammed via zone[1-3]_auto_point[1-3]_temp andzone[1-3]_auto_point1_temp_hyst:

pwm[1-3]_auto_point2_pwmfull-speed duty-cycle (255, i.e., 100%)
pwm[1-3]_auto_point1_pwmlow-speed duty-cycle
pwm[1-3]_auto_pwm_minmin-speed duty-cycle
zone[1-3]_auto_point3_tempfull-speed temp (all outputs)
zone[1-3]_auto_point2_tempfull-speed temp
zone[1-3]_auto_point1_templow-speed temp
zone[1-3]_auto_point1_temp_hystmin-speed temp

The chip adjusts the output duty-cycle linearly in the range of auto_point1_pwmto auto_point2_pwm if the temperature of the associated zone is betweenauto_point1_temp and auto_point2_temp. If the temperature drops below theauto_point1_temp_hyst value, the output duty-cycle is set to the auto_pwm_minvalue which only supports two values: 0 or auto_point1_pwm. That means that thefan either turns completely off or keeps spinning with the low-speedduty-cycle. If any of the temperatures rise above the auto_point3_temp value,all PWM outputs are set to 100% duty-cycle.

Following is another representation of how the chip sets the output duty-cyclebased on the temperature of the associated thermal zone:

TemperatureDuty-CycleRising TempDuty-CycleFalling Temp
full-speedfull-speedfull-speed
< linearlyadjustedduty-cycle >
low-speedlow-speedlow-speed
min-speedlow-speed
min-speedmin-speedmin-speed
min-speedmin-speed

Sysfs Attributes

Following is a list of all sysfs attributes that the driver provides, theirpermissions and a short description:

NamePermDescription
cpu0_vidROCPU core reference voltage inmillivolts.
vrmRWVoltage regulator module versionnumber.
in[0-7]_inputROMeasured voltage in millivolts.
in[0-7]_minRWLow limit for voltage input.
in[0-7]_maxRWHigh limit for voltage input.
in[0-7]_alarmROVoltage input alarm. Returns 1 ifvoltage input is or went outside theassociated min-max range, 0 otherwise.
temp[1-3]_inputROMeasured temperature in millidegreeCelsius.
temp[1-3]_minRWLow limit for temp input.
temp[1-3]_maxRWHigh limit for temp input.
temp[1-3]_offsetRWOffset for temp input. This value willbe added by the chip to the measuredtemperature.
temp[1-3]_alarmROAlarm for temp input. Returns 1 if tempinput is or went outside the associatedmin-max range, 0 otherwise.
temp[1-3]_faultROTemp input fault. Returns 1 if the chipdetects a faulty thermal diode or anunconnected temp input, 0 otherwise.
zone[1-3]_auto_channels_tempRO

Temperature zone to temperature inputmapping. This attribute is a bitfieldand supports the following values:

  • 1: temp1
  • 2: temp2
  • 4: temp3
zone[1-3]_auto_point1_temp_hystRWAuto PWM temp point1 hysteresis. Theoutput of the corresponding PWM is setto the pwm_auto_min value if the tempfalls below the auto_point1_temp_hystvalue.
zone[1-3]_auto_point[1-3]_tempRWAuto PWM temp points. Auto_point1 isthe low-speed temp, auto_point2 is thefull-speed temp, and auto_point3 is thetemp at which all PWM outputs are setto full-speed (100% duty-cycle).
fan[1-6]_inputROMeasured fan speed in RPM.
fan[1-6]_minRWLow limit for fan input.
fan[1-6]_alarmROAlarm for fan input. Returns 1 if faninput is or went below the associatedmin value, 0 otherwise.
fan[1-4]_typeRWType of attached fan. Expressed innumber of pulses per revolution thatthe fan generates. Supported values are1, 2, and 4.
fan[5-6]_maxRWMax attainable RPM at 100% duty-cycle.Required for chip to adjust thesampling rate accordingly.
pmw[1-3,5-6]RO/RWDuty-cycle of PWM output. Supportedvalues are 0-255 (0%-100%). Onlywriteable if the associated PWM is inmanual mode.
pwm[1-3]_enableRW

Enable of PWM outputs 1-3. Supportedvalues are:

  • 0: turned off (output @ 100%)
  • 1: manual mode
  • 2: automatic mode
pwm[5-6]_enableROEnable of PWM outputs 5-6. Alwaysreturns 1 since these 2 outputs arehard-wired to manual mode.
pmw[1-3,5-6]_freqRWFrequency of PWM output. Supportedvalues are in the range 11Hz-30000Hz(default is 25000Hz).
pmw[1-3]_ramp_rateRWRamp rate of PWM output. Determines howfast the PWM duty-cycle will changewhen the PWM is in automatic mode.Expressed in ms per PWM step. Supportedvalues are in the range 0ms-206ms(default is 0, which means the duty-cycle changes instantly).
pwm[1-3]_auto_channels_zoneRW

PWM output to temperature zone mapping.This attribute is a bitfield andsupports the following values:

  • 1: zone1
  • 2: zone2
  • 4: zone3
  • 6: highest of zone[2-3]
  • 7: highest of zone[1-3]
pwm[1-3]_auto_pwm_minRWAuto PWM min pwm. Minimum PWM duty-cycle. Supported values are 0 orauto_point1_pwm.
pwm[1-3]_auto_point1_pwmRWAuto PWM pwm point. Auto_point1 is thelow-speed duty-cycle.
pwm[1-3]_auto_point2_pwmROAuto PWM pwm point. Auto_point2 is thefull-speed duty-cycle which is hard-wired to 255 (100% duty-cycle).

Chip Differences

Featuredme1737sch311xsch5027sch5127
temp[1-3]_offsetyesyes  
vidyes   
zone3yesyesyes 
zone[1-3]_hystyesyes  
pwm min/offyesyes  
fan3optyesoptyes
pwm3optyesoptyes
fan4opt opt 
fan5opt opt 
pwm5opt opt 
fan6opt opt 
pwm6opt opt 
in7   yes