root/lm-sensors/branches/lm-sensors-2.10/doc/chips/lm93

Revision 3165, 14.0 KB (checked in by khali, 6 years ago)

Misc fixes here and there.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1Kernel driver 'lm93.o'
2======================
3
4Status: In progress
5
6Supported chips:
7  * National Semiconductor LM93
8    Prefix: 'lm93'
9    Addresses scanned: I2C 0x2c-0x2e
10
11Author:
12        Mark M. Hoffman <mhoffman@lightlink.com>
13
14
15Module Parameters
16-----------------
17
18(specific to LM93)
19* init: integer
20  Set to zero to disable some initializations (default is 1)
21* disable_block: integer
22  A "0" allows SMBus block data transactions if the host supports them.  A "1"
23  disables SMBus block data transactions.  The default is 0.
24* vccp_limit_type: integer array (2)
25  Configures in7 and in8 limit type, where 0 means absolute and non-zero
26  means relative.  "Relative" here refers to "Dynamic Vccp Monitoring using
27  VID" from the datasheet.  It greatly simplifies the interface to allow
28  only one set of limits (absolute or relative) to be in operation at a
29  time (even though the hardware is capable of enabling both).  There's
30  not a compelling use case for enabling both at once, anyway.  The default
31  is "0,0".
32* vid_agtl: integer
33  A "0" configures the VID pins for V(ih) = 2.1V min, V(il) = 0.8V max.
34  A "1" configures the VID pins for V(ih) = 0.8V min, V(il) = 0.4V max.
35  (The latter setting is referred to as AGTL+ Compatible in the datasheet.)
36  I.e. this parameter controls the VID pin input thresholds; if your VID
37  inputs are not working, trying changing this.  The default value is "0".
38
39(common among sensor drivers)
40* force: short array (min = 1, max = 48)
41  List of adapter,address pairs to assume to be present.  Autodetection
42  of the target device will still be attempted.  Use one of the more
43  specific force directives below if this doesn't detect the device.
44* force_lm93: short array (min = 1, max = 48)
45  List of adapter,address pairs which are unquestionably assumed to contain
46  a 'lm93' chip
47* ignore: short array (min = 1, max = 48)
48  List of adapter,address pairs not to scan
49* ignore_range: short array (min = 1, max = 48)
50  List of adapter,start-addr,end-addr triples not to scan
51* probe: short array (min = 1, max = 48)
52  List of adapter,address pairs to scan additionally
53* probe_range: short array (min = 1, max = 48)
54  List of adapter,start-addr,end-addr triples to scan additionally
55
56
57Hardware Description
58--------------------
59
60(from the datasheet)
61
62The LM93, hardware monitor, has a two wire digital interface compatible with
63SMBus 2.0. Using an 8-bit ADC, the LM93 measures the temperature of two remote
64diode connected transistors as well as its own die and 16 power supply
65voltages. To set fan speed, the LM93 has two PWM outputs that are each
66controlled by up to four temperature zones. The fancontrol algorithm is lookup
67table based. The LM93 includes a digital filter that can be invoked to smooth
68temperature readings for better control of fan speed. The LM93 has four
69tachometer inputs to measure fan speed. Limit and status registers for all
70measured values are included. The LM93 builds upon the functionality of
71previous motherboard management ASICs and uses some of the LM85's features
72(i.e. smart tachometer mode). It also adds measurement and control support
73for dynamic Vccp monitoring and PROCHOT. It is designed to monitor a dual
74processor Xeon class motherboard with a minimum of external components.
75
76
77User Interface
78--------------
79
80#PROCHOT:
81
82The LM93 can monitor two #PROCHOT signals.  The results are found in the
83/proc files prochot1 and prochot2.  There are three values per file: the first
84value is the user limit.  The second value is the current reading for the
85most recent complete time interval.  The third value is something like a
862 period exponential moving average (but not quite - check the datasheet).
87Note that this third value is calculated by the chip itself.  All values
88range from 0-255 where 0 indicates no throttling, and 255 indicates > 99.6%.
89
90The monitoring intervals for the two #PROCHOT signals is also configurable.
91These intervals can be found in the /proc file prochot_interval.  There are
92two values in this file: one each for #P1_PROCHOT and #P2_PROCHOT, res-
93pectively.  Selecting a value not in this list will cause the driver to
94use the next largest interval.  The available intervals are (in seconds):
95
96#PROCHOT intervals: 0.73, 1.46, 2.9, 5.8, 11.7, 23.3, 46.6, 93.2, 186, 372
97
98It is possible to configure the LM93 to logically short the two #PROCHOT
99signals.  I.e. when #P1_PROCHOT is asserted, the LM93 will automatically
100assert #P2_PROCHOT, and vice-versa.  This mode is enabled by writing a
101non-zero integer to the /proc file prochot_short.
102
103The LM93 can also override the #PROCHOT pins by driving a PWM signal onto
104one or both of them.  When overridden, the signal has a period of 3.56 ms,
105a minimum pulse width of 5 clocks (at 22.5kHz => 6.25% duty cycle), and
106a maximum pulse width of 80 clocks (at 22.5kHz => 99.88% duty cycle).
107
108The /proc file prochot_override has three values.  The first two are boolean
109integers which enable/disable the override funtion for #P1_PROCHOT and
110#P2_PROCHOT, the third value is 0-15 where 0 indicates minimum duty cycle
111and 15 indicates maximum.
112
113#VRD_HOT:
114
115The LM93 can monitor two #VRD_HOT signals. The results are found in the
116/proc files vrdhot1 and vrdhot2. There is one value per file: a boolean for
117which 1 indicates #VRD_HOT is asserted and 0 indicates it is negated. These
118files are read-only.
119
120Smart Tach Mode:
121
122(from the datasheet)
123
124        If a fan is driven using a low-side drive PWM, the tachometer
125        output of the fan is corrupted. The LM93 includes smart tachometer
126        circuitry that allows an accurate tachometer reading to be
127        achieved despite the signal corruption.  In smart tach mode all
128        four signals are measured within 4 seconds.
129
130Smart tach mode is enabled by the driver by writing 1 or 2 (associating the
131the fan tachometer with a pwm) to the /proc file fan<n>_smart_tach.  A zero
132will disable the function for that fan.  Note that Smart tach mode cannot be
133enabled if the PWM output frequency is 22500 Hz (see below).
134
135Manual PWM:
136
137The LM93 has a fixed or override mode for the two PWM outputs (although, there
138are still some conditions that will override even this mode - see section
13915.10.6 of the datasheet for details.)  The /proc files pwm1 and pwm2 are
140used to enable and control this mode.  The first value of the file is an
141integer (0-255) where 0 is 0% duty cycle, and 255 is 100%.  The second value
142is a boolean integer where 0 disables and 1 enables the manual control mode.
143Note that the duty cycle values are constrained by the hardware. Selecting
144a value which is not available will cause the driver to use the next largest
145value.  Also note: when manual PWM mode is disabled, the first value of the
146/proc files indicates the current duty cycle chosen by the h/w.
147
148PWM Output Frequency:
149
150The LM93 supports several different frequencies for the PWM output channels.
151The /proc files pwm1_freq and pwm2_freq are used to select the frequency. The
152frequency values are constrained by the hardware.  Selecting a value which is
153not available will cause the driver to use the next largest value.  Also note
154that this parameter has implications for the Smart Tach Mode (see above).
155
156PWM Output Frequencies: 12, 36, 48, 60, 72, 84, 96, 22500 Hz (h/w default)
157
158Automatic PWM:
159
160The LM93 is capable of complex automatic fan control, with many different
161points of configuration.  To start, each PWM output can be bound to any
162combination of eight control sources.  The final PWM is the largest of all
163individual control sources to which the PWM output is bound.
164
165The eight control sources are: temp1-temp4 (aka "zones" in the datasheet),
166#PROCHOT 1 & 2, and #VRDHOT 1 & 2.  The bindings are expressed as a bitmask
167in the /proc files pwm<n>_auto_channels, where a "1" enables the binding, and
168a "0" disables it. The h/w default is 0x0f (all temperatures bound).
169
170        0x01 - Temp 1
171        0x02 - Temp 2
172        0x04 - Temp 3
173        0x08 - Temp 4
174        0x10 - #PROCHOT 1
175        0x20 - #PROCHOT 2
176        0x40 - #VRDHOT 1
177        0x80 - #VRDHOT 2
178
179The function y = f(x) takes a source temperature x to a PWM output y.  This
180function of the LM93 is derived from a base temperature and a table of 12
181temperature offsets.  The base temperature is expressed in degrees C in the
182/proc files temp<n>_auto_base.  The offsets are expressed in cumulative
183degrees C, with all 12 values in the files temp<n>_auto_offsets. E.g. if the
184base temperature is 40C:
185
186     offset #   temp<n>_auto_offsets    range           pwm
187         1              0               -                25.00%
188         2              0               -                28.57%
189         3              1               40C - 41C        32.14%
190         4              1               41C - 42C        35.71%
191         5              2               42C - 44C        39.29%
192         6              2               44C - 46C        42.86%
193         7              2               48C - 50C        46.43%
194         8              2               50C - 52C        50.00%
195         9              2               52C - 54C        53.57%
196        10              2               54C - 56C        57.14%
197        11              2               56C - 58C        71.43%
198        12              2               58C - 60C        85.71%
199                                        > 60C           100.00%
200       
201Valid offsets are in the range 0C <= x <= 7.5C in 0.5C increments.
202
203There is an independent base temperature for each temperature channel. Note,
204however, there are only two tables of offsets: one each for temp[12] and
205temp[34].  Therefore, any change to e.g. temp1_auto_offsets will also affect
206temp2_auto_offsets.
207
208The LM93 can also apply hysteresis to the offset table, to prevent unwanted
209oscillation between two steps in the offsets table.  These values are found in
210the /proc files temp<n>_auto_offset_hyst.  There is just one value; it has the
211same representation as in temp<n>_auto_offsets.
212
213If a temperature reading falls below the base value for that channel, the LM93
214will use the minimum PWM value.  These values are found in the /proc files
215temp<n>_auto_pwm_min.  Note, there are only two minimums: one each for temp[12]
216and temp[34].  Therefore, any change to e.g. temp1_auto_pwm_min will also
217affect temp2_auto_pwm_min.
218
219PWM Spin-Up Cycle:
220
221A spin-up cycle occurs when a PWM output is commanded from 0% duty cycle to
222some value > 0%.  The LM93 supports a minimum duty cycle during spin-up.  These
223values are found in the /proc files pwm<n>_auto_spinup_min. There is one value
224per file; it has the same representation as other PWM duty cycle values. The
225duration of the spin-up cycle is also configurable.  These values are  found in
226the /proc files pwm<n>_auto_spinup_time. There is one value per file; it is
227the spin-up time in seconds.  The available spin-up times are constrained by
228the hardware.  Selecting a value which is not available will cause the driver
229to use the next largest value.
230
231Spin-up Durations: 0 (disabled, h/w default), 0.1, 0.25, 0.4, 0.7, 1.0, 2.0, 4.0
232
233#PROCHOT and #VRDHOT PWM Ramping:
234
235If the #PROCHOT or #VRDHOT signals are asserted while bound to a PWM output
236channel, the LM93 will ramp the PWM output up to 100% duty cycle in discrete
237steps. The duration of each step is configurable. There are two files, with
238one value each in seconds: pwm_auto_prochot_ramp and pwm_auto_vrdhot_ramp.
239The available ramp times are constrained by the hardware.  Selecting a value
240which is not available will cause the driver to use the next largest value.
241
242Ramp Times: 0 (disabled, h/w default) to 0.75 in 0.05 second intervals
243
244Fan Boost:
245
246For each temperature channel, there is a boost temperature: if the channel
247exceeds this limit, the LM93 will immediately drive both PWM outputs to 100%.
248This limit is expressed in degrees C in the /proc files temp<n>_auto_boost.
249There is also a hysteresis temperature for this function: after the boost
250limit is reached, the temperature channel must drop below this value before
251the boost function is disabled.  This temperature is also expressed in degrees
252C in the /proc files temp<n>_auto_boost_hyst.
253
254GPIO Pins:
255
256The LM93 can monitor the logic level of four dedicated GPIO pins as well as the
257four tach input pins.  GPIO0-GPIO3 correspond to (fan) tach 1-4, respectively.
258All eight GPIOs are read by reading the bitmask in the /proc file gpio.  The
259LSB is GPIO0, and the MSB is GPIO7.
260
261
262LM93 Unique /proc Files
263-----------------------
264
265        file                    description
266        -------------------------------------------------------------
267
268        prochot<n>              limit, current, and moving average #PROCHOT %
269
270        prochot_short           enable or disable logical #PROCHOT pin short
271
272        prochot_override        force #PROCHOT assertion as PWM
273
274        prochot_interval        #PROCHOT PWM sampling interval
275
276        vrdhot<n>               0 means negated, 1 means asserted
277
278        fan<n>_smart_tach       enable or disable smart tach mode
279
280        pwm<n>_auto_spinup_min  minimum duty cycle during spin-up
281
282        pwm<n>_auto_spinup_time duration of spin-up
283
284        pwm_auto_prochot_ramp   ramp time per step when #PROCHOT asserted
285
286        pwm_auto_vrdhot_ramp    ramp time per step when #VRDHOT asserted
287
288        temp<n>_auto_base       temperature channel base
289
290        temp<n>_auto_offsets    temperature channel offsets
291
292        temp<n>_auto_offset_hyst
293                                temperature channel offset hysteresis
294
295        temp<n>_auto_boost      temperature channel boost (PWMs to 100%) limit
296
297        temp<n>_auto_boost_hyst temperature channel boost hysteresis
298
299        gpio                    input state of 8 GPIO pins; read-only
300
301
302Sample Configuration File
303-------------------------
304
305Here is a sample LM93 chip config for sensors.conf:
306
307---------- cut here ----------
308chip "lm93-*"
309
310# VOLTAGE INPUTS
311
312        # labels and scaling based on datasheet recommendations
313        label in1       "+12V1"
314        compute in1     @ * 12.945, @ / 12.945
315        set in1_min     12 * 0.90
316        set in1_max     12 * 1.10
317
318        label in2       "+12V2"
319        compute in2     @ * 12.945, @ / 12.945
320        set in2_min     12 * 0.90
321        set in2_max     12 * 1.10
322
323        label in3       "+12V3"
324        compute in3     @ * 12.945, @ / 12.945
325        set in3_min     12 * 0.90
326        set in3_max     12 * 1.10
327
328        label in4       "FSB_Vtt"
329
330        label in5       "3GIO"
331
332        label in6       "ICH_Core"
333
334        label in7       "Vccp1"
335
336        label in8       "Vccp2"
337
338        label in9       "+3.3V"
339        set in9_min     3.3 * 0.90
340        set in9_max     3.3 * 1.10
341
342        label in10      "+5V"
343        set in10_min    5.0 * 0.90
344        set in10_max    5.0 * 1.10
345
346        label in11      "SCSI_Core"
347
348        label in12      "Mem_Core"
349
350        label in13      "Mem_Vtt"
351
352        label in14      "Gbit_Core"
353
354        # Assuming R1/R2 = 4.1143, and 3.3V reference
355        # -12V = (4.1143 + 1) * (@ - 3.3) + 3.3
356        label in15      "-12V"
357        compute in15 @ * 5.1143 - 13.57719, (@ + 13.57719) / 5.1143
358        set in15_min    -12 * 0.90
359        set in15_max    -12 * 1.10
360
361        label in16      "+3.3VSB"
362        set in16_min    3.3 * 0.90
363        set in16_max    3.3 * 1.10
364
365# TEMPERATURE INPUTS
366
367        label temp1     "CPU1"
368        label temp2     "CPU2"
369        label temp3     "LM93"
370
371# TACHOMETER INPUTS
372
373        label fan1      "Fan1"
374        set fan1_min    3000
375        label fan2      "Fan2"
376        set fan2_min    3000
377        label fan3      "Fan3"
378        set fan3_min    3000
379        label fan4      "Fan4"
380        set fan4_min    3000
381
382# PWM OUTPUTS
383
384        label pwm1      "CPU1"
385        label pwm2      "CPU2"
386
Note: See TracBrowser for help on using the browser.