xref: /openbmc/linux/Documentation/hwmon/adt7475.rst (revision c39f2d9db0fd81ea20bb5cce9b3f082ca63753e2)
1*7ebd8b66SMauro Carvalho ChehabKernel driver adt7475
2*7ebd8b66SMauro Carvalho Chehab=====================
3*7ebd8b66SMauro Carvalho Chehab
4*7ebd8b66SMauro Carvalho ChehabSupported chips:
5*7ebd8b66SMauro Carvalho Chehab
6*7ebd8b66SMauro Carvalho Chehab  * Analog Devices ADT7473
7*7ebd8b66SMauro Carvalho Chehab
8*7ebd8b66SMauro Carvalho Chehab    Prefix: 'adt7473'
9*7ebd8b66SMauro Carvalho Chehab
10*7ebd8b66SMauro Carvalho Chehab    Addresses scanned: I2C 0x2C, 0x2D, 0x2E
11*7ebd8b66SMauro Carvalho Chehab
12*7ebd8b66SMauro Carvalho Chehab    Datasheet: Publicly available at the On Semiconductors website
13*7ebd8b66SMauro Carvalho Chehab
14*7ebd8b66SMauro Carvalho Chehab  * Analog Devices ADT7475
15*7ebd8b66SMauro Carvalho Chehab
16*7ebd8b66SMauro Carvalho Chehab    Prefix: 'adt7475'
17*7ebd8b66SMauro Carvalho Chehab
18*7ebd8b66SMauro Carvalho Chehab    Addresses scanned: I2C 0x2E
19*7ebd8b66SMauro Carvalho Chehab
20*7ebd8b66SMauro Carvalho Chehab    Datasheet: Publicly available at the On Semiconductors website
21*7ebd8b66SMauro Carvalho Chehab
22*7ebd8b66SMauro Carvalho Chehab  * Analog Devices ADT7476
23*7ebd8b66SMauro Carvalho Chehab
24*7ebd8b66SMauro Carvalho Chehab    Prefix: 'adt7476'
25*7ebd8b66SMauro Carvalho Chehab
26*7ebd8b66SMauro Carvalho Chehab    Addresses scanned: I2C 0x2C, 0x2D, 0x2E
27*7ebd8b66SMauro Carvalho Chehab
28*7ebd8b66SMauro Carvalho Chehab    Datasheet: Publicly available at the On Semiconductors website
29*7ebd8b66SMauro Carvalho Chehab
30*7ebd8b66SMauro Carvalho Chehab  * Analog Devices ADT7490
31*7ebd8b66SMauro Carvalho Chehab
32*7ebd8b66SMauro Carvalho Chehab    Prefix: 'adt7490'
33*7ebd8b66SMauro Carvalho Chehab
34*7ebd8b66SMauro Carvalho Chehab    Addresses scanned: I2C 0x2C, 0x2D, 0x2E
35*7ebd8b66SMauro Carvalho Chehab
36*7ebd8b66SMauro Carvalho Chehab    Datasheet: Publicly available at the On Semiconductors website
37*7ebd8b66SMauro Carvalho Chehab
38*7ebd8b66SMauro Carvalho ChehabAuthors:
39*7ebd8b66SMauro Carvalho Chehab	- Jordan Crouse
40*7ebd8b66SMauro Carvalho Chehab	- Hans de Goede
41*7ebd8b66SMauro Carvalho Chehab	- Darrick J. Wong (documentation)
42*7ebd8b66SMauro Carvalho Chehab	- Jean Delvare
43*7ebd8b66SMauro Carvalho Chehab
44*7ebd8b66SMauro Carvalho Chehab
45*7ebd8b66SMauro Carvalho ChehabDescription
46*7ebd8b66SMauro Carvalho Chehab-----------
47*7ebd8b66SMauro Carvalho Chehab
48*7ebd8b66SMauro Carvalho ChehabThis driver implements support for the Analog Devices ADT7473, ADT7475,
49*7ebd8b66SMauro Carvalho ChehabADT7476 and ADT7490 chip family. The ADT7473 and ADT7475 differ only in
50*7ebd8b66SMauro Carvalho Chehabminor details. The ADT7476 has additional features, including extra voltage
51*7ebd8b66SMauro Carvalho Chehabmeasurement inputs and VID support. The ADT7490 also has additional
52*7ebd8b66SMauro Carvalho Chehabfeatures, including extra voltage measurement inputs and PECI support. All
53*7ebd8b66SMauro Carvalho Chehabthe supported chips will be collectively designed by the name "ADT747x" in
54*7ebd8b66SMauro Carvalho Chehabthe rest of this document.
55*7ebd8b66SMauro Carvalho Chehab
56*7ebd8b66SMauro Carvalho ChehabThe ADT747x uses the 2-wire interface compatible with the SMBus 2.0
57*7ebd8b66SMauro Carvalho Chehabspecification. Using an analog to digital converter it measures three (3)
58*7ebd8b66SMauro Carvalho Chehabtemperatures and two (2) or more voltages. It has four (4) 16-bit counters
59*7ebd8b66SMauro Carvalho Chehabfor measuring fan speed. There are three (3) PWM outputs that can be used
60*7ebd8b66SMauro Carvalho Chehabto control fan speed.
61*7ebd8b66SMauro Carvalho Chehab
62*7ebd8b66SMauro Carvalho ChehabA sophisticated control system for the PWM outputs is designed into the
63*7ebd8b66SMauro Carvalho ChehabADT747x that allows fan speed to be adjusted automatically based on any of the
64*7ebd8b66SMauro Carvalho Chehabthree temperature sensors. Each PWM output is individually adjustable and
65*7ebd8b66SMauro Carvalho Chehabprogrammable. Once configured, the ADT747x will adjust the PWM outputs in
66*7ebd8b66SMauro Carvalho Chehabresponse to the measured temperatures without further host intervention.
67*7ebd8b66SMauro Carvalho ChehabThis feature can also be disabled for manual control of the PWM's.
68*7ebd8b66SMauro Carvalho Chehab
69*7ebd8b66SMauro Carvalho ChehabEach of the measured inputs (voltage, temperature, fan speed) has
70*7ebd8b66SMauro Carvalho Chehabcorresponding high/low limit values. The ADT747x will signal an ALARM if
71*7ebd8b66SMauro Carvalho Chehabany measured value exceeds either limit.
72*7ebd8b66SMauro Carvalho Chehab
73*7ebd8b66SMauro Carvalho ChehabThe ADT747x samples all inputs continuously. The driver will not read
74*7ebd8b66SMauro Carvalho Chehabthe registers more often than once every other second. Further,
75*7ebd8b66SMauro Carvalho Chehabconfiguration data is only read once per minute.
76*7ebd8b66SMauro Carvalho Chehab
77*7ebd8b66SMauro Carvalho ChehabChip Differences Summary
78*7ebd8b66SMauro Carvalho Chehab------------------------
79*7ebd8b66SMauro Carvalho Chehab
80*7ebd8b66SMauro Carvalho ChehabADT7473:
81*7ebd8b66SMauro Carvalho Chehab  * 2 voltage inputs
82*7ebd8b66SMauro Carvalho Chehab  * system acoustics optimizations (not implemented)
83*7ebd8b66SMauro Carvalho Chehab
84*7ebd8b66SMauro Carvalho ChehabADT7475:
85*7ebd8b66SMauro Carvalho Chehab  * 2 voltage inputs
86*7ebd8b66SMauro Carvalho Chehab
87*7ebd8b66SMauro Carvalho ChehabADT7476:
88*7ebd8b66SMauro Carvalho Chehab  * 5 voltage inputs
89*7ebd8b66SMauro Carvalho Chehab  * VID support
90*7ebd8b66SMauro Carvalho Chehab
91*7ebd8b66SMauro Carvalho ChehabADT7490:
92*7ebd8b66SMauro Carvalho Chehab  * 6 voltage inputs
93*7ebd8b66SMauro Carvalho Chehab  * 1 Imon input (not implemented)
94*7ebd8b66SMauro Carvalho Chehab  * PECI support (not implemented)
95*7ebd8b66SMauro Carvalho Chehab  * 2 GPIO pins (not implemented)
96*7ebd8b66SMauro Carvalho Chehab  * system acoustics optimizations (not implemented)
97*7ebd8b66SMauro Carvalho Chehab
98*7ebd8b66SMauro Carvalho ChehabSysfs Mapping
99*7ebd8b66SMauro Carvalho Chehab-------------
100*7ebd8b66SMauro Carvalho Chehab
101*7ebd8b66SMauro Carvalho Chehab==== =========== =========== ========= ==========
102*7ebd8b66SMauro Carvalho Chehabin   ADT7490     ADT7476     ADT7475   ADT7473
103*7ebd8b66SMauro Carvalho Chehab==== =========== =========== ========= ==========
104*7ebd8b66SMauro Carvalho Chehabin0  2.5VIN (22) 2.5VIN (22) -         -
105*7ebd8b66SMauro Carvalho Chehabin1  VCCP   (23) VCCP   (23) VCCP (14) VCCP (14)
106*7ebd8b66SMauro Carvalho Chehabin2  VCC    (4)  VCC    (4)  VCC  (4)  VCC  (3)
107*7ebd8b66SMauro Carvalho Chehabin3  5VIN   (20) 5VIN   (20)
108*7ebd8b66SMauro Carvalho Chehabin4  12VIN  (21) 12VIN  (21)
109*7ebd8b66SMauro Carvalho Chehabin5  VTT    (8)
110*7ebd8b66SMauro Carvalho Chehab==== =========== =========== ========= ==========
111*7ebd8b66SMauro Carvalho Chehab
112*7ebd8b66SMauro Carvalho ChehabSpecial Features
113*7ebd8b66SMauro Carvalho Chehab----------------
114*7ebd8b66SMauro Carvalho Chehab
115*7ebd8b66SMauro Carvalho ChehabThe ADT747x has a 10-bit ADC and can therefore measure temperatures
116*7ebd8b66SMauro Carvalho Chehabwith a resolution of 0.25 degree Celsius. Temperature readings can be
117*7ebd8b66SMauro Carvalho Chehabconfigured either for two's complement format or "Offset 64" format,
118*7ebd8b66SMauro Carvalho Chehabwherein 64 is subtracted from the raw value to get the temperature value.
119*7ebd8b66SMauro Carvalho Chehab
120*7ebd8b66SMauro Carvalho ChehabThe datasheet is very detailed and describes a procedure for determining
121*7ebd8b66SMauro Carvalho Chehaban optimal configuration for the automatic PWM control.
122*7ebd8b66SMauro Carvalho Chehab
123*7ebd8b66SMauro Carvalho ChehabFan Speed Control
124*7ebd8b66SMauro Carvalho Chehab-----------------
125*7ebd8b66SMauro Carvalho Chehab
126*7ebd8b66SMauro Carvalho ChehabThe driver exposes two trip points per PWM channel.
127*7ebd8b66SMauro Carvalho Chehab
128*7ebd8b66SMauro Carvalho Chehab- point1: Set the PWM speed at the lower temperature bound
129*7ebd8b66SMauro Carvalho Chehab- point2: Set the PWM speed at the higher temperature bound
130*7ebd8b66SMauro Carvalho Chehab
131*7ebd8b66SMauro Carvalho ChehabThe ADT747x will scale the PWM linearly between the lower and higher PWM
132*7ebd8b66SMauro Carvalho Chehabspeed when the temperature is between the two temperature boundaries.
133*7ebd8b66SMauro Carvalho ChehabTemperature boundaries are associated to temperature channels rather than
134*7ebd8b66SMauro Carvalho ChehabPWM outputs, and a given PWM output can be controlled by several temperature
135*7ebd8b66SMauro Carvalho Chehabchannels. As a result, the ADT747x may compute more than one PWM value
136*7ebd8b66SMauro Carvalho Chehabfor a channel at a given time, in which case the maximum value (fastest
137*7ebd8b66SMauro Carvalho Chehabfan speed) is applied. PWM values range from 0 (off) to 255 (full speed).
138*7ebd8b66SMauro Carvalho Chehab
139*7ebd8b66SMauro Carvalho ChehabFan speed may be set to maximum when the temperature sensor associated with
140*7ebd8b66SMauro Carvalho Chehabthe PWM control exceeds temp#_max.
141*7ebd8b66SMauro Carvalho Chehab
142*7ebd8b66SMauro Carvalho ChehabAt Tmin - hysteresis the PWM output can either be off (0% duty cycle) or at the
143*7ebd8b66SMauro Carvalho Chehabminimum (i.e. auto_point1_pwm). This behaviour can be configured using the
144*7ebd8b66SMauro Carvalho Chehab`pwm[1-*]_stall_disable sysfs attribute`. A value of 0 means the fans will shut
145*7ebd8b66SMauro Carvalho Chehaboff. A value of 1 means the fans will run at auto_point1_pwm.
146*7ebd8b66SMauro Carvalho Chehab
147*7ebd8b66SMauro Carvalho ChehabThe responsiveness of the ADT747x to temperature changes can be configured.
148*7ebd8b66SMauro Carvalho ChehabThis allows smoothing of the fan speed transition. To set the transition time
149*7ebd8b66SMauro Carvalho Chehabset the value in ms in the `temp[1-*]_smoothing` sysfs attribute.
150*7ebd8b66SMauro Carvalho Chehab
151*7ebd8b66SMauro Carvalho ChehabNotes
152*7ebd8b66SMauro Carvalho Chehab-----
153*7ebd8b66SMauro Carvalho Chehab
154*7ebd8b66SMauro Carvalho ChehabThe nVidia binary driver presents an ADT7473 chip via an on-card i2c bus.
155*7ebd8b66SMauro Carvalho ChehabUnfortunately, they fail to set the i2c adapter class, so this driver may
156*7ebd8b66SMauro Carvalho Chehabfail to find the chip until the nvidia driver is patched.
157