| xj | b04a402 | 2021-11-25 15:01:52 +0800 | [diff] [blame] | 1 | Kernel driver adt7475 | 
 | 2 | ===================== | 
 | 3 |  | 
 | 4 | Supported chips: | 
 | 5 |   * Analog Devices ADT7473 | 
 | 6 |     Prefix: 'adt7473' | 
 | 7 |     Addresses scanned: I2C 0x2C, 0x2D, 0x2E | 
 | 8 |     Datasheet: Publicly available at the On Semiconductors website | 
 | 9 |   * Analog Devices ADT7475 | 
 | 10 |     Prefix: 'adt7475' | 
 | 11 |     Addresses scanned: I2C 0x2E | 
 | 12 |     Datasheet: Publicly available at the On Semiconductors website | 
 | 13 |   * Analog Devices ADT7476 | 
 | 14 |     Prefix: 'adt7476' | 
 | 15 |     Addresses scanned: I2C 0x2C, 0x2D, 0x2E | 
 | 16 |     Datasheet: Publicly available at the On Semiconductors website | 
 | 17 |   * Analog Devices ADT7490 | 
 | 18 |     Prefix: 'adt7490' | 
 | 19 |     Addresses scanned: I2C 0x2C, 0x2D, 0x2E | 
 | 20 |     Datasheet: Publicly available at the On Semiconductors website | 
 | 21 |  | 
 | 22 | Authors: | 
 | 23 | 	Jordan Crouse | 
 | 24 | 	Hans de Goede | 
 | 25 | 	Darrick J. Wong (documentation) | 
 | 26 | 	Jean Delvare | 
 | 27 |  | 
 | 28 |  | 
 | 29 | Description | 
 | 30 | ----------- | 
 | 31 |  | 
 | 32 | This driver implements support for the Analog Devices ADT7473, ADT7475, | 
 | 33 | ADT7476 and ADT7490 chip family. The ADT7473 and ADT7475 differ only in | 
 | 34 | minor details. The ADT7476 has additional features, including extra voltage | 
 | 35 | measurement inputs and VID support. The ADT7490 also has additional | 
 | 36 | features, including extra voltage measurement inputs and PECI support. All | 
 | 37 | the supported chips will be collectively designed by the name "ADT747x" in | 
 | 38 | the rest of this document. | 
 | 39 |  | 
 | 40 | The ADT747x uses the 2-wire interface compatible with the SMBus 2.0 | 
 | 41 | specification. Using an analog to digital converter it measures three (3) | 
 | 42 | temperatures and two (2) or more voltages. It has four (4) 16-bit counters | 
 | 43 | for measuring fan speed. There are three (3) PWM outputs that can be used | 
 | 44 | to control fan speed. | 
 | 45 |  | 
 | 46 | A sophisticated control system for the PWM outputs is designed into the | 
 | 47 | ADT747x that allows fan speed to be adjusted automatically based on any of the | 
 | 48 | three temperature sensors. Each PWM output is individually adjustable and | 
 | 49 | programmable. Once configured, the ADT747x will adjust the PWM outputs in | 
 | 50 | response to the measured temperatures without further host intervention. | 
 | 51 | This feature can also be disabled for manual control of the PWM's. | 
 | 52 |  | 
 | 53 | Each of the measured inputs (voltage, temperature, fan speed) has | 
 | 54 | corresponding high/low limit values. The ADT747x will signal an ALARM if | 
 | 55 | any measured value exceeds either limit. | 
 | 56 |  | 
 | 57 | The ADT747x samples all inputs continuously. The driver will not read | 
 | 58 | the registers more often than once every other second. Further, | 
 | 59 | configuration data is only read once per minute. | 
 | 60 |  | 
 | 61 | Chip Differences Summary | 
 | 62 | ------------------------ | 
 | 63 |  | 
 | 64 | ADT7473: | 
 | 65 |   * 2 voltage inputs | 
 | 66 |   * system acoustics optimizations (not implemented) | 
 | 67 |  | 
 | 68 | ADT7475: | 
 | 69 |   * 2 voltage inputs | 
 | 70 |  | 
 | 71 | ADT7476: | 
 | 72 |   * 5 voltage inputs | 
 | 73 |   * VID support | 
 | 74 |  | 
 | 75 | ADT7490: | 
 | 76 |   * 6 voltage inputs | 
 | 77 |   * 1 Imon input (not implemented) | 
 | 78 |   * PECI support (not implemented) | 
 | 79 |   * 2 GPIO pins (not implemented) | 
 | 80 |   * system acoustics optimizations (not implemented) | 
 | 81 |  | 
 | 82 | Special Features | 
 | 83 | ---------------- | 
 | 84 |  | 
 | 85 | The ADT747x has a 10-bit ADC and can therefore measure temperatures | 
 | 86 | with a resolution of 0.25 degree Celsius. Temperature readings can be | 
 | 87 | configured either for two's complement format or "Offset 64" format, | 
 | 88 | wherein 64 is subtracted from the raw value to get the temperature value. | 
 | 89 |  | 
 | 90 | The datasheet is very detailed and describes a procedure for determining | 
 | 91 | an optimal configuration for the automatic PWM control. | 
 | 92 |  | 
 | 93 | Fan Speed Control | 
 | 94 | ----------------- | 
 | 95 |  | 
 | 96 | The driver exposes two trip points per PWM channel. | 
 | 97 |  | 
 | 98 | point1: Set the PWM speed at the lower temperature bound | 
 | 99 | point2: Set the PWM speed at the higher temperature bound | 
 | 100 |  | 
 | 101 | The ADT747x will scale the PWM linearly between the lower and higher PWM | 
 | 102 | speed when the temperature is between the two temperature boundaries. | 
 | 103 | Temperature boundaries are associated to temperature channels rather than | 
 | 104 | PWM outputs, and a given PWM output can be controlled by several temperature | 
 | 105 | channels. As a result, the ADT747x may compute more than one PWM value | 
 | 106 | for a channel at a given time, in which case the maximum value (fastest | 
 | 107 | fan speed) is applied. PWM values range from 0 (off) to 255 (full speed). | 
 | 108 |  | 
 | 109 | Fan speed may be set to maximum when the temperature sensor associated with | 
 | 110 | the PWM control exceeds temp#_max. | 
 | 111 |  | 
 | 112 | At Tmin - hysteresis the PWM output can either be off (0% duty cycle) or at the | 
 | 113 | minimum (i.e. auto_point1_pwm). This behaviour can be configured using the | 
 | 114 | pwm[1-*]_stall_disable sysfs attribute. A value of 0 means the fans will shut | 
 | 115 | off. A value of 1 means the fans will run at auto_point1_pwm. | 
 | 116 |  | 
 | 117 | The responsiveness of the ADT747x to temperature changes can be configured. | 
 | 118 | This allows smoothing of the fan speed transition. To set the transition time | 
 | 119 | set the value in ms in the temp[1-*]_smoothing sysfs attribute. | 
 | 120 |  | 
 | 121 | Notes | 
 | 122 | ----- | 
 | 123 |  | 
 | 124 | The nVidia binary driver presents an ADT7473 chip via an on-card i2c bus. | 
 | 125 | Unfortunately, they fail to set the i2c adapter class, so this driver may | 
 | 126 | fail to find the chip until the nvidia driver is patched. |