[BACK]Return to dbcool.4 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / man / man4

File: [cvs.NetBSD.org] / src / share / man / man4 / dbcool.4 (download)

Revision 1.3, Mon Oct 6 01:35:35 2008 UTC (15 years, 5 months ago) by pgoyette
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend
Changes since 1.2: +19 -16 lines

Various clean-ups:
  1. Trange sysctl's belong to the temp sensors, not to the fan controllers
  2. Trange really describes a slope on many chips, so modify the description
  3. Most of the sysctl's are read/write even if the chip's config is
     locked;  reflect that in the CTLFLAGs
  4. Apply correct 'nominal' values for voltage sensors/limits, specify
     them in microVolts, and calculate once rather than each time needed
  5. Be more consistent in register names - for example, use VCC instead of
     SUPPLY_VOLTAGE, to match VCC_LOWLIM & VCC_HIGHLIM
  6. Type of dbcool_islocked() should be bool, not int
  7. Reduce some unnecessary code indentation
  8. Define Vtt and Imon, and add ADT7490 support (excluding PECI sensors)
  9. Split the huge (250+ lines) dbcool_setup() function into a few smaller
     routines for better readability
 10. Update sensor tables for ADT7476 and ADT7468 - these chips have five
     voltage sensors, not two
 11. Adjust flags for ADT7463 and ADM1027 - these chips can monitor CPU
     VID data bits
 12. Update man page

.\"	$NetBSD: dbcool.4,v 1.3 2008/10/06 01:35:35 pgoyette Exp $
.\"
.\" Copyright (c) 2008 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Paul Goyette.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd October 5, 2008
.Dt DBCOOL 4
.Os
.Sh NAME
.Nm dbcool ,
.Nm adm1027 ,
.Nm adm1030 ,
.Nm adt7463 ,
.Nm adt7466 ,
.Nm adt7467 ,
.Nm adt7468 ,
.Nm adt7473 ,
.Nm adt7475 ,
.Nm adt7476 ,
.Nm adt7490
.Nd dbCool(tm) family of environmental monitors and fan controllers
.Sh SYNOPSIS
.Cd "dbcool* at ki2c?"
.Cd "dbcool* at iic? addr 0x2e"
.Sh DESCRIPTION
The
.Nm
driver provides support for the
.Tn Analog Devices
dbCool environmental monitor chips to be used with the
.Xr envsys 4
API.
.Pp
These chips support up to fourteen sensors.
Not all of the following sensors are supported on all chips.
.Bl -column "Sensor" "Units" "Typical" -offset indent
.It Sy "Sensor" Ta Sy "Units" Ta Sy "Typical Use"
.It Li "l_temp" Ta "uK" Ta "local chip temperature"
.It Li "r1_temp" Ta "uK" Ta "CPU temperature"
.It Li "r2_temp" Ta "uK" Ta "GPU temperature"
.It Li "Vccp" Ta "uV DC" Ta "CPU Vcore"
.It Li "Vcc" Ta "uV DC" Ta "Chip's supply voltage"
.It Li "2.5V" Ta "uV DC" Ta "2.5V supply"
.It Li "5V" Ta "uV DC" Ta "5V supply"
.It Li "12V" Ta "uV DC" Ta "12V supply"
.It Li "Vtt" Ta "uV DC" Ta "PECI ref. voltage (2.25V ref, ADT7490 only)"
.It Li "Imon" Ta "uV DC" Ta "Current monitor (2.25V ref, ADT7490 only)"
.It Li "AIN1" Ta "uV DC" Ta "Analog In (2.25V ref, ADT7466 only)"
.It Li "AIN2" Ta "uV DC" Ta "Analog In (2.25V ref, ADT7466 only)"
.It Li "fan1" Ta "RPM" Ta "Chassis Fan"
.It Li "fan2" Ta "RPM" Ta "Chassis Fan"
.It Li "fan3" Ta "RPM" Ta "Chassis Fan"
.It Li "fan4" Ta "RPM" Ta "Chassis Fan"
.El
.Pp
Each temperature and voltage sensor has a
programmable high- and low-limit; fan sensors have only a low-limit.
The user can set the threshold values using
.Xr sysctl 8
.Bd -literal -offset indent
hw.dbcool0.l_temp.low_lim = 35         degrees C
hw.dbcool0.l_temp.hi_lim = 75          degrees C
hw.dbcool0.fan1.low_lim = 300          RPM
hw.dbcool0.Vcc.low_lim = 2250          milliVolts
hw.dbcool0.Vcc.hi_lim = 2750           milliVolts
.Ed
.Pp
Temperature sensors also have
.Em Tmin ,
.Em Trange ,
.Em Thyst ,
and
.Em Ttherm
.Xr sysctl 8
variables; these values are used by the fan speed controllers.
.Pp
All
.Xr sysctl 8
variables associated with temperature sensors are in units of degC, since
this is the unit which is programmed into the device registers.
Limit values for voltage sensors are in millivolts.
The low limit value for fan sensors is measured in RPM; due to
the manner in which fan speed is measured, the lowest possible
value for a fan limit is 83 RPM.
.Pp
All members of the dbCool family support Pulse-Width Modulated (PWM)
fan speed control based on temperature thresholds - the fan will spin up
when one or more thermal sensors exceeds its configured
.Em 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
.Em 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
.Em Thyst
degrees below its
.Em Tmin
threshold.
.Pp
Each fan controller is programmable using the following
.Xr sysctl 8
variables.
.Bd -literal -offset indent
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
.Ed
.Pp
The
.Em behavior
variable controls the selection of temperature sensors associated with
the fan controller.
When the associated temperature sensor reaches its
.Em Tmin
value, the fan controller starts the fan at its minimum duty cycle;
when the associated temperature sensor reaches its
.Em 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
.Em range
variable.
When the associated temperature falls at least
.Em Thyst
degress below its
.Em Tmin
value, the fan controller will turn off the fan.
(On the ADM1030, the
value for
.Em Thyst
is fixed at 5 degrees C.)
.Pp
Valid values for the
.Em behavior
variable are:
.Bd -literal -offset indent
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
.Ed
.Pp
When the
.Em behavior
variable is set to
.Dq manual ,
the
.Em cur-duty
variable becomes user-writeable and can be set to any value between 0 and
100 inclusive to control the fan's duty cycle manually.
In all other
.Em behavior
modes, the
.Em cur-duty
variable is read-only and updates are ignored.
.Pp
The
.Em min-duty
and
.Em 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
.Em max-duty
is fixed at 100%, and the
.Em cur-duty
variable is used to specify the minimum duty cycle when the fan
controller is running in automatic mode.
.Pp
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.
.Sh EXAMPLES
The
.Xr envstat 8
utility can be used to determine the sensors supported:
.Bd -literal -offset indent
            Current  CritMax  CritMin  CritCap     Unit
 l_temp:     44.250                                degC
r1_temp:     41.250                                degC
r2_temp:        N/A
   Vccp:      0.002                                   V
    Vcc:      3.351                                   V
   fan1:        N/A
   fan2:        N/A
   fan3:        N/A
   fan4:        N/A
.Ed
.Pp
Using this information, the following commands in
.Pa /etc/envsys.conf
will set appropriate limits for CPU temperature and chip supply
voltage, and powerd will be notified if the limits are exceeded:
.Bd -literal -offset indent
dbcool0 {
        sensor1 {
                warning-max  = 60C;
                critical-max = 65C;
        }
        sensor4 {
                critical-min = 3.1;
                warning-min =  3.2;
                critical-max = 3.5;
        }
}
.Ed
.Pp
Alternatively, set the following commands in
.Pa /etc/sysctl.conf
to perform limit checking in the hardware:
.Bd -literal -offset indent
hw.dbcool0.r1_temp.hi_lim = 65
hw.dbcool0.Vcc.low_lim = 3200000
hw.dbcool0.Vcc.hi_lim = 3500000
.Ed
.Sh SEE ALSO
.Xr envsys 4 ,
.Xr envstat 8 ,
.Xr powerd 8 ,
.Xr sysctl 8
.Sh HISTORY
The
.Nm
device appeared in
.Nx 5.0 .
.Sh BUGS
Although the sensor limit registers can be programmed, there is currently
no use of the dbCool chips' ability to generate an SMBus interrupt when the
limits are exceeded.
Limit checking is only performed when the sensor values are polled
and refreshed.
.Pp
The ADT7466 chip, although officially a member of the dbCool family, is
programmed quite differently.
The fan controllers on this chip are not currently implemented.
.Pp
The PECI (Processor Environment Control Interface) temperature sensors
and the associated PWM behavior modes on the ADT7490 are not currently
supported.