# Example configuration for the SuperMicro C2SBE.
# Contributed by Romain Dolbeau.

# The C2SBA is similar to the C2SBE (only with video on-board).


# settings for the supermicro C2SBE
# Originally written by Romain Dolbeau <romain@dolbeau.org>
# Uses at your own risk !
#
# Here's the info as supplied by Supermicro:
#
# Bus Type = ISAIO
# One W83627DHG
#
# Windbond W83627DHG, IndexReg=295, DataReg=296
# =============================================================
# Fan1/CPU Fan Speed, Bank 0, Offset 0x29		RPM = 1350000/8/Data
# Fan2 Fan Speed, Bank 5, Offset 0x53		RPM = 1350000/8/Data
# Fan3 Fan Speed, Bank 0, Offset 0x28		RPM = 1350000/8/Data
# Fan4 Fan Speed, Bank 0, Offset 0x3f		RPM = 1350000/8/Data
# Fan5 Fan Speed, Bank 0, Offset 0x2a		RPM = 1350000/8/Data
# CPU Voltage, Bank 0, Offset 0x20		Voltage = Data* 0.008
# -12V Voltage, Bank 0, Offset 0x26		Voltage =((Data*0.008-2.048)/(10./242.))+2.048
# +12V Voltage, Bank 0, Offset 0x21		Voltage = Data* 0.008/(10./160.)
# +3.3V Voltage, Bank 0, Offset 0x22		Voltage = Data* 0.016
# DIMM Voltage, Bank 0, Offset 0x24		Voltage = Data* 0.008
# +5V Voltage, Bank 0, Offset 0x25		Voltage = Data* 0.008/(10./40.)
# +3.3VSb Voltage, Bank 5, Offset 0x50		Voltage = Data* 0.016
# Battery Voltage, Bank 5, Offset 0x51		Voltage = Data* 0.016
# CPU Temperature, Bank 1, Offset 0x50		Temperature = Data
# System Temperature, Bank 0, Offset 0x27		Temperature = Data
# Chassis Intrusion, Bank 0, Offset 0x42, BitMask 0x10	1 = Bad, 0 = Good
#			(Clear Bit: Bank 0, Offset 0x46, BitMask 0x80)

chip "w83627dhg-*"
# Voltages ; note that in the table above, the .008 and .016 factors are
# already computed in the driver...
    label in0 "VCore"
    label in1 "+12V"
    label in2 "+3.3V"
    ignore in3
    label in4 "DIMM Voltage"
    label in5 "+5V"
    label in6 "-12V"
    label in7 "+3.3VSB"
    label in8 "VBAT"

# CPU Voltage limits are probably CPU-dependant
    compute in0 @, @
    set in0_min 1.0
    set in0_max 1.4
    compute in1 @*16,  @/16
    set in1_min 12*0.95
    set in1_max 12*1.05
    compute in2 @, @
    set in2_min 3.3*0.95
    set in2_max 3.3*1.05
#   compute in3 @, @
# DIMM Voltage limits ???
    compute in4 @, @
    set in4_min 1.8*0.95
    set in4_max 1.8*1.05
    compute in5 @*4, @/4
    set in5_min 5*0.95
    set in5_max 5*1.05
    compute in6 ((@-2.048)*24.2)+2.048, ((@-2.048)/24.2)+2.048
    set in6_min -12*1.05
    set in6_max -12*0.95
    compute in7 @, @
    set in7_min 3.3*0.95
    set in7_max 3.3*1.05
# VBAT Voltage limits ???
    compute in8 @, @
    set in8_min 3*0.9
    set in8_max 3*1.1

# Fans ; default in the driver is fine
# you should ignore the unplugged ones
   label fan1      "Fan 3"
   label fan2      "Fan1/CPU Fan"
   label fan3      "Fan 5"
   label fan4      "Fan 4"
   label fan5      "Fan 2"

# Temperatures
# Min and Max are environment-dependant
   label temp1     "System Temp"
   set temp1_max 45
   label temp2     "CPU Temp"
   set temp2_max 65
   ignore temp3
