12 #define FAN_0_OFFSET 0x00
13 #define FAN_1_OFFSET 0x10
14 #define FAN_2_OFFSET 0x20
15 #define FAN_3_OFFSET 0x30
16 #define FAN_4_OFFSET 0x40
18 #define FAN_INPUT_CONTROL_REG 0x00
19 #define FAN_CONTROL_REG 0x01
20 #define FAN_FREQUENCY_REG 0x02
21 #define FAN_LOW_DUTY_REG 0x03
22 #define FAN_MED_DUTY_REG 0x04
23 #define FAN_MULTIPLIER_REG 0x05
24 #define FAN_LOW_TEMP_LO_REG 0x06
25 #define FAN_LOW_TEMP_HI_REG 0x07
26 #define FAN_MED_TEMP_LO_REG 0x08
27 #define FAN_MED_TEMP_HI_REG 0x09
28 #define FAN_HIGH_TEMP_LO_REG 0x0A
29 #define FAN_HIGH_TEMP_HI_REG 0x0B
30 #define FAN_LINEAR_RANGE_REG 0x0C
31 #define FAN_LINEAR_HOLD_REG 0x0D
34 #define FAN_INPUT_INTERNAL_DIODE 0
35 #define FAN_INPUT_TEMP0 1
36 #define FAN_INPUT_TEMP1 2
37 #define FAN_INPUT_TEMP2 3
38 #define FAN_INPUT_TEMP3 4
39 #define FAN_INPUT_TEMP0_FILTER 5
40 #define FAN_INPUT_ZERO 6
41 #define FAN_INPUT_DISABLED 7
44 #define FAN_AUTOMODE (1 << 0)
45 #define FAN_LINEARMODE (1 << 1)
46 #define FAN_STEPMODE 0
47 #define FAN_POLARITY_HIGH (1 << 2)
48 #define FAN_POLARITY_LOW 0
51 #define FAN_POLARITY_HIGH_MAX_SPEED 0xff
52 #define FAN_POLARITY_LOW_MAX_SPEED 0x00
56 #define FREQ_28KHZ 0x0
57 #define FREQ_25KHZ 0x1
58 #define FREQ_23KHZ 0x2
59 #define FREQ_21KHZ 0x3
60 #define FREQ_29KHZ 0x4
61 #define FREQ_18KHZ 0x5
63 #define FREQ_100HZ 0xF7
64 #define FREQ_87HZ 0xF8
65 #define FREQ_58HZ 0xF9
66 #define FREQ_44HZ 0xFA
67 #define FREQ_35HZ 0xFB
68 #define FREQ_29HZ 0xFC
69 #define FREQ_22HZ 0xFD
70 #define FREQ_14HZ 0xFE
71 #define FREQ_11HZ 0xFF
74 #define IMC_MODE1_FAN_ENABLED ( 1 << 0 )
75 #define IMC_MODE1_FAN_IMC_CONTROLLED ( 1 << 2 )
76 #define IMC_MODE1_FAN_LINEAR_MODE ( 1 << 4 )
77 #define IMC_MODE1_FAN_STEP_MODE 0
78 #define IMC_MODE1_NO_FANOUT 0
79 #define IMC_MODE1_FANOUT0 ( 1 << 5 )
80 #define IMC_MODE1_FANOUT1 ( 2 << 5 )
81 #define IMC_MODE1_FANOUT2 ( 3 << 5 )
82 #define IMC_MODE1_FANOUT3 ( 4 << 5 )
83 #define IMC_MODE1_FANOUT4 ( 5 << 5 )
85 #define IMC_MODE2_TEMPIN_NONE 0
86 #define IMC_MODE2_TEMPIN_0 1
87 #define IMC_MODE2_TEMPIN_1 2
88 #define IMC_MODE2_TEMPIN_2 3
89 #define IMC_MODE2_TEMPIN_3 4
90 #define IMC_MODE2_INT_TEMPIN 5
91 #define IMC_MODE2_TEMPIN_SB_TSI 6
92 #define IMC_MODE2_TEMPIN_OTHER 7
93 #define IMC_MODE2_FANIN_NONE 0
94 #define IMC_MODE2_FANIN0 ( 1 << 3 )
95 #define IMC_MODE2_FANIN1 ( 2 << 3 )
96 #define IMC_MODE2_FANIN2 ( 3 << 3 )
97 #define IMC_MODE2_FANIN3 ( 4 << 3 )
98 #define IMC_MODE2_FANIN4 ( 5 << 3 )
99 #define IMC_MODE2_TEMP_AVERAGING_ENABLED ( 1 << 6 )
100 #define IMC_MODE2_TEMP_AVERAGING_DISABLED 0
102 #define IMC_TEMP_SENSOR_ON_SMBUS_0 0
103 #define IMC_TEMP_SENSOR_ON_SMBUS_2 1
104 #define IMC_TEMP_SENSOR_ON_SMBUS_3 2
105 #define IMC_TEMP_SENSOR_ON_SMBUS_4 3
113 #define IMC_TEMPIN_TUNING_DEFAULT_MODE 0
114 #define IMC_TEMPIN_TUNING_HIGH_CURRENT_RATIO 1
115 #define IMC_TEMPIN_TUNING_HIGH_CURRENT 2
116 #define IMC_TEMPIN_TUNING_DISABLE_FILTERING ( 1 << 2 )
119 #define IMC_ENABLE_ZONE0 0x111
120 #define IMC_ENABLE_ZONE1 0x222
121 #define IMC_ENABLE_ZONE2 0x333
122 #define IMC_ENABLE_ZONE3 0x444
123 #define IMC_ENABLE_TEMPIN0 ( 1 << 12 )
124 #define IMC_ENABLE_TEMPIN1 ( 1 << 13 )
125 #define IMC_ENABLE_TEMPIN2 ( 1 << 14 )
126 #define IMC_ENABLE_TEMPIN3 ( 1 << 15 )
129 #define IMC_FAN_THRESHOLD_COUNT 9
130 #define IMC_FAN_SPEED_COUNT 8
131 #define IMC_FAN_CONFIG_COUNT 8
132 #define FAN_REGISTER_COUNT 15
void init_sb800_IMC_fans(struct device *dev)
void init_sb800_MANUAL_fans(struct device *dev)