The
dbcool driver provides support for the Analog Devices dbCool environmental monitor chips to be used with the
envsys(4) API.
These chips support up to fifteen sensors. Not all of the following sensors are supported on all chips.
l_temp
uK
local chip temperature
r1_temp
uK
CPU temperature
r2_temp
uK
GPU temperature
Vcc
uV DC
Chip's supply voltage
Vtt
uV DC
PECI ref. voltage (2.25V ref, ADT7490 only)
Imon
uV DC
Current monitor (2.25V ref, ADT7490 only)
AIN1
uV DC
Analog In (2.25V ref, ADT7466 only)
AIN2
uV DC
Analog In (2.25V ref, ADT7466 only)
VID
(none)
CPU VID code (selected chips only)
Each temperature and voltage sensor has programmable hardware high- and low-limits; fan sensors have only a low-limit. These limits can be set using the
envstat(8) utility. Due to hardware limitations, the minimum permissible value for the fan speed low-limits is 83 RPM.
Temperature sensors also have
Tmin,
Trange,
Thyst, and
Ttherm sysctl(8) variables; these values are used by the fan speed controllers. Their values are in units of degC, since this is the unit which is programmed into the device registers.
All members of the dbCool family support Pulse-Width Modulated (PWM) fan speed control based on temperature thresholds - the fan will spin up when its associated thermal sensor(s) exceeds its configured
Tmin value. The fan will go faster as the temperature rises, and will slow down as the temperature falls. If the temperature exceeds the sensor's
Ttherm value, the THERM signal will be asserted, and if enabled the fan will run at full speed. The fan will be turned off when the sensor(s) that triggered it reports a temperature which is at least
Thyst degrees below its
Tmin threshold.
Each fan controller is programmable using the following
sysctl(8) variables.
hw.dbcool0.fan_ctl_0.behavior
hw.dbcool0.fan_ctl_0.min_duty
hw.dbcool0.fan_ctl_0.max_duty
hw.dbcool0.fan_ctl_0.cur_duty
The
behavior variable controls the selection of temperature sensors associated with the fan controller. When the associated temperature sensor reaches its
Tmin value, the fan controller starts the fan at its minimum duty cycle; when the associated temperature sensor reaches its
Ttherm value and asserts the THERM signal (or if an external THERM signal is asserted), the fan controller sets the fan speed to a 100% duty cycle. Between these two settings, each temperature sensor is used to calculate a duty cycle linearly based on the slope defined by the temperature sensor's
range variable. When the associated temperature falls at least
Thyst degress below its
Tmin value, the fan controller will turn off the fan. (On the ADM1030, the value for
Thyst is fixed at 5 degC.)
Valid values for the
behavior variable are:
local (not available on ADM1030)
remote1
remote2 (not available on ADM1030)
local+remote2 (not available on ADM1030)
all-temps
full-speed (not available on ADM1030)
manual
disabled
When the
behavior variable is set to “manual”, the
cur-duty variable becomes user-writable and can be set to any value between 0 and 100 inclusive to control the fan's duty cycle manually. In all other
behavior modes, the
cur-duty variable is read-only and updates are ignored.
The
min-duty and
max-duty variables define the range over which the fan controller will manage the fan's duty cycle. On the ADM1030, these values are not separately controllable. The
max-duty is fixed at 100%, and the
cur-duty variable is used to specify the minimum duty cycle when the fan controller is running in automatic mode.
Note that the duty-cycle value does not directly correspond to the fan's speed. That is, a 33% duty cycle does not mean that the fan runs at 33% of its maximum speed; in actuality, a 33% duty cycle drives the fan at a speed close to 50% of its maximum. Fan speed correlates approximately to the square root of the duty cycle.