1 .\" $NetBSD: dbcool.4,v 1.3 2008/10/06 01:35:35 pgoyette Exp $
3 .\" Copyright (c) 2008 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This code is derived from software contributed to The NetBSD Foundation
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
18 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGE.
45 .Nd dbCool(tm) family of environmental monitors and fan controllers
47 .Cd "dbcool* at ki2c?"
48 .Cd "dbcool* at iic? addr 0x2e"
52 driver provides support for the
54 dbCool environmental monitor chips to be used with the
58 These chips support up to fourteen sensors.
59 Not all of the following sensors are supported on all chips.
60 .Bl -column "Sensor" "Units" "Typical" -offset indent
61 .It Sy "Sensor" Ta Sy "Units" Ta Sy "Typical Use"
62 .It Li "l_temp" Ta "uK" Ta "local chip temperature"
63 .It Li "r1_temp" Ta "uK" Ta "CPU temperature"
64 .It Li "r2_temp" Ta "uK" Ta "GPU temperature"
65 .It Li "Vccp" Ta "uV DC" Ta "CPU Vcore"
66 .It Li "Vcc" Ta "uV DC" Ta "Chip's supply voltage"
67 .It Li "2.5V" Ta "uV DC" Ta "2.5V supply"
68 .It Li "5V" Ta "uV DC" Ta "5V supply"
69 .It Li "12V" Ta "uV DC" Ta "12V supply"
70 .It Li "Vtt" Ta "uV DC" Ta "PECI ref. voltage (2.25V ref, ADT7490 only)"
71 .It Li "Imon" Ta "uV DC" Ta "Current monitor (2.25V ref, ADT7490 only)"
72 .It Li "AIN1" Ta "uV DC" Ta "Analog In (2.25V ref, ADT7466 only)"
73 .It Li "AIN2" Ta "uV DC" Ta "Analog In (2.25V ref, ADT7466 only)"
74 .It Li "fan1" Ta "RPM" Ta "Chassis Fan"
75 .It Li "fan2" Ta "RPM" Ta "Chassis Fan"
76 .It Li "fan3" Ta "RPM" Ta "Chassis Fan"
77 .It Li "fan4" Ta "RPM" Ta "Chassis Fan"
80 Each temperature and voltage sensor has a
81 programmable high- and low-limit; fan sensors have only a low-limit.
82 The user can set the threshold values using
84 .Bd -literal -offset indent
85 hw.dbcool0.l_temp.low_lim = 35 degrees C
86 hw.dbcool0.l_temp.hi_lim = 75 degrees C
87 hw.dbcool0.fan1.low_lim = 300 RPM
88 hw.dbcool0.Vcc.low_lim = 2250 milliVolts
89 hw.dbcool0.Vcc.hi_lim = 2750 milliVolts
92 Temperature sensors also have
99 variables; these values are used by the fan speed controllers.
103 variables associated with temperature sensors are in units of degC, since
104 this is the unit which is programmed into the device registers.
105 Limit values for voltage sensors are in millivolts.
106 The low limit value for fan sensors is measured in RPM; due to
107 the manner in which fan speed is measured, the lowest possible
108 value for a fan limit is 83 RPM.
110 All members of the dbCool family support Pulse-Width Modulated (PWM)
111 fan speed control based on temperature thresholds - the fan will spin up
112 when one or more thermal sensors exceeds its configured
115 The fan will go faster as the temperature rises, and will slow down
116 as the temperature falls.
117 If the temperature exceeds the sensor's
119 value, the THERM signal will be asserted, and if enabled the fan will
121 The fan will be turned off when the sensor(s) that triggered it
122 reports a temperature which is at least
128 Each fan controller is programmable using the following
131 .Bd -literal -offset indent
132 hw.dbcool0.fan_ctl_0.behavior
133 hw.dbcool0.fan_ctl_0.min_duty
134 hw.dbcool0.fan_ctl_0.max_duty
135 hw.dbcool0.fan_ctl_0.cur_duty
140 variable controls the selection of temperature sensors associated with
142 When the associated temperature sensor reaches its
144 value, the fan controller starts the fan at its minimum duty cycle;
145 when the associated temperature sensor reaches its
147 value and asserts the THERM signal (or if an external THERM signal is
148 asserted), the fan controller sets the fan speed to a 100% duty cycle.
149 Between these two settings, each temperature sensor is used to calculate
150 a duty cycle linearly based on the slope defined by the temperature sensor's
153 When the associated temperature falls at least
157 value, the fan controller will turn off the fan.
161 is fixed at 5 degrees C.)
166 .Bd -literal -offset indent
167 local (not available on ADM1030)
169 remote2 (not available on ADM1030)
170 local+remote2 (not available on ADM1030)
172 full-speed (not available on ADM1030)
183 variable becomes user-writable and can be set to any value between 0 and
184 100 inclusive to control the fan's duty cycle manually.
189 variable is read-only and updates are ignored.
195 variables define the range over which the fan controller will manage the
197 On the ADM1030, these values are not separately controllable.
200 is fixed at 100%, and the
202 variable is used to specify the minimum duty cycle when the fan
203 controller is running in automatic mode.
205 Note that the duty-cycle value does not directly correspond to the fan's
207 That is, a 33% duty cycle does not mean that the fan runs at 33%
208 of its maximum speed; in actuality, a 33% duty cycle drives the
209 fan at a speed close to 50% of its maximum.
210 Fan speed correlates approximately to the square root of the duty
215 utility can be used to determine the sensors supported:
216 .Bd -literal -offset indent
217 Current CritMax CritMin CritCap Unit
229 Using this information, the following commands in
231 will set appropriate limits for CPU temperature and chip supply
232 voltage, and powerd will be notified if the limits are exceeded:
233 .Bd -literal -offset indent
247 Alternatively, set the following commands in
249 to perform limit checking in the hardware:
250 .Bd -literal -offset indent
251 hw.dbcool0.r1_temp.hi_lim = 65
252 hw.dbcool0.Vcc.low_lim = 3200000
253 hw.dbcool0.Vcc.hi_lim = 3500000
266 Although the sensor limit registers can be programmed, there is currently
267 no use of the dbCool chips' ability to generate an SMBus interrupt when the
269 Limit checking is only performed when the sensor values are polled
272 The ADT7466 chip, although officially a member of the dbCool family, is
273 programmed quite differently.
274 The fan controllers on this chip are not currently implemented.
276 The PECI (Processor Environment Control Interface) temperature sensors
277 and the associated PWM behavior modes on the ADT7490 are not currently