Back to home page

OSCL-LXR

 
 

    


0001 Kernel driver adm1026
0002 =====================
0003 
0004 Supported chips:
0005   * Analog Devices ADM1026
0006 
0007     Prefix: 'adm1026'
0008 
0009     Addresses scanned: I2C 0x2c, 0x2d, 0x2e
0010 
0011     Datasheet: Publicly available at the Analog Devices website
0012 
0013                https://www.onsemi.com/PowerSolutions/product.do?id=ADM1026
0014 
0015 Authors:
0016         - Philip Pokorny <ppokorny@penguincomputing.com> for Penguin Computing
0017         - Justin Thiessen <jthiessen@penguincomputing.com>
0018 
0019 Module Parameters
0020 -----------------
0021 
0022 * gpio_input: int array (min = 1, max = 17)
0023     List of GPIO pins (0-16) to program as inputs
0024 
0025 * gpio_output: int array (min = 1, max = 17)
0026     List of GPIO pins (0-16) to program as outputs
0027 
0028 * gpio_inverted: int array (min = 1, max = 17)
0029     List of GPIO pins (0-16) to program as inverted
0030 
0031 * gpio_normal: int array (min = 1, max = 17)
0032     List of GPIO pins (0-16) to program as normal/non-inverted
0033 
0034 * gpio_fan: int array (min = 1, max = 8)
0035     List of GPIO pins (0-7) to program as fan tachs
0036 
0037 
0038 Description
0039 -----------
0040 
0041 This driver implements support for the Analog Devices ADM1026. Analog
0042 Devices calls it a "complete thermal system management controller."
0043 
0044 The ADM1026 implements three (3) temperature sensors, 17 voltage sensors,
0045 16 general purpose digital I/O lines, eight (8) fan speed sensors (8-bit),
0046 an analog output and a PWM output along with limit, alarm and mask bits for
0047 all of the above. There is even 8k bytes of EEPROM memory on chip.
0048 
0049 Temperatures are measured in degrees Celsius. There are two external
0050 sensor inputs and one internal sensor. Each sensor has a high and low
0051 limit. If the limit is exceeded, an interrupt (#SMBALERT) can be
0052 generated. The interrupts can be masked. In addition, there are over-temp
0053 limits for each sensor. If this limit is exceeded, the #THERM output will
0054 be asserted. The current temperature and limits have a resolution of 1
0055 degree.
0056 
0057 Fan rotation speeds are reported in RPM (rotations per minute) but measured
0058 in counts of a 22.5kHz internal clock. Each fan has a high limit which
0059 corresponds to a minimum fan speed. If the limit is exceeded, an interrupt
0060 can be generated. Each fan can be programmed to divide the reference clock
0061 by 1, 2, 4 or 8. Not all RPM values can accurately be represented, so some
0062 rounding is done. With a divider of 8, the slowest measurable speed of a
0063 two pulse per revolution fan is 661 RPM.
0064 
0065 There are 17 voltage sensors. An alarm is triggered if the voltage has
0066 crossed a programmable minimum or maximum limit. Note that minimum in this
0067 case always means 'closest to zero'; this is important for negative voltage
0068 measurements. Several inputs have integrated attenuators so they can measure
0069 higher voltages directly. 3.3V, 5V, 12V, -12V and battery voltage all have
0070 dedicated inputs. There are several inputs scaled to 0-3V full-scale range
0071 for SCSI terminator power. The remaining inputs are not scaled and have
0072 a 0-2.5V full-scale range. A 2.5V or 1.82V reference voltage is provided
0073 for negative voltage measurements.
0074 
0075 If an alarm triggers, it will remain triggered until the hardware register
0076 is read at least once. This means that the cause for the alarm may already
0077 have disappeared! Note that in the current implementation, all hardware
0078 registers are read whenever any data is read (unless it is less than 2.0
0079 seconds since the last update). This means that you can easily miss
0080 once-only alarms.
0081 
0082 The ADM1026 measures continuously. Analog inputs are measured about 4
0083 times a second. Fan speed measurement time depends on fan speed and
0084 divisor. It can take as long as 1.5 seconds to measure all fan speeds.
0085 
0086 The ADM1026 has the ability to automatically control fan speed based on the
0087 temperature sensor inputs. Both the PWM output and the DAC output can be
0088 used to control fan speed. Usually only one of these two outputs will be
0089 used. Write the minimum PWM or DAC value to the appropriate control
0090 register. Then set the low temperature limit in the tmin values for each
0091 temperature sensor. The range of control is fixed at 20 °C, and the
0092 largest difference between current and tmin of the temperature sensors sets
0093 the control output. See the datasheet for several example circuits for
0094 controlling fan speed with the PWM and DAC outputs. The fan speed sensors
0095 do not have PWM compensation, so it is probably best to control the fan
0096 voltage from the power lead rather than on the ground lead.
0097 
0098 The datasheet shows an example application with VID signals attached to
0099 GPIO lines. Unfortunately, the chip may not be connected to the VID lines
0100 in this way. The driver assumes that the chips *is* connected this way to
0101 get a VID voltage.