xref: /OK3568_Linux_fs/kernel/Documentation/hwmon/thmc50.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunKernel driver thmc50
2*4882a593Smuzhiyun=====================
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunSupported chips:
5*4882a593Smuzhiyun
6*4882a593Smuzhiyun  * Analog Devices ADM1022
7*4882a593Smuzhiyun
8*4882a593Smuzhiyun    Prefix: 'adm1022'
9*4882a593Smuzhiyun
10*4882a593Smuzhiyun    Addresses scanned: I2C 0x2c - 0x2e
11*4882a593Smuzhiyun
12*4882a593Smuzhiyun    Datasheet: http://www.analog.com/en/prod/0,2877,ADM1022,00.html
13*4882a593Smuzhiyun
14*4882a593Smuzhiyun  * Texas Instruments THMC50
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun    Prefix: 'thmc50'
17*4882a593Smuzhiyun
18*4882a593Smuzhiyun    Addresses scanned: I2C 0x2c - 0x2e
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun    Datasheet: https://www.ti.com/
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun
23*4882a593SmuzhiyunAuthor: Krzysztof Helt <krzysztof.h1@wp.pl>
24*4882a593Smuzhiyun
25*4882a593SmuzhiyunThis driver was derived from the 2.4 kernel thmc50.c source file.
26*4882a593Smuzhiyun
27*4882a593SmuzhiyunCredits:
28*4882a593Smuzhiyun
29*4882a593Smuzhiyun  thmc50.c (2.4 kernel):
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun	- Frodo Looijaard <frodol@dds.nl>
32*4882a593Smuzhiyun	- Philip Edelbrock <phil@netroedge.com>
33*4882a593Smuzhiyun
34*4882a593SmuzhiyunModule Parameters
35*4882a593Smuzhiyun-----------------
36*4882a593Smuzhiyun
37*4882a593Smuzhiyun* adm1022_temp3: short array
38*4882a593Smuzhiyun    List of adapter,address pairs to force chips into ADM1022 mode with
39*4882a593Smuzhiyun    second remote temperature. This does not work for original THMC50 chips.
40*4882a593Smuzhiyun
41*4882a593SmuzhiyunDescription
42*4882a593Smuzhiyun-----------
43*4882a593Smuzhiyun
44*4882a593SmuzhiyunThe THMC50 implements: an internal temperature sensor, support for an
45*4882a593Smuzhiyunexternal diode-type temperature sensor (compatible w/ the diode sensor inside
46*4882a593Smuzhiyunmany processors), and a controllable fan/analog_out DAC. For the temperature
47*4882a593Smuzhiyunsensors, limits can be set through the appropriate Overtemperature Shutdown
48*4882a593Smuzhiyunregister and Hysteresis register. Each value can be set and read to half-degree
49*4882a593Smuzhiyunaccuracy.  An alarm is issued (usually to a connected LM78) when the
50*4882a593Smuzhiyuntemperature gets higher then the Overtemperature Shutdown value; it stays on
51*4882a593Smuzhiyununtil the temperature falls below the Hysteresis value. All temperatures are in
52*4882a593Smuzhiyundegrees Celsius, and are guaranteed within a range of -55 to +125 degrees.
53*4882a593Smuzhiyun
54*4882a593SmuzhiyunThe THMC50 only updates its values each 1.5 seconds; reading it more often
55*4882a593Smuzhiyunwill do no harm, but will return 'old' values.
56*4882a593Smuzhiyun
57*4882a593SmuzhiyunThe THMC50 is usually used in combination with LM78-like chips, to measure
58*4882a593Smuzhiyunthe temperature of the processor(s).
59*4882a593Smuzhiyun
60*4882a593SmuzhiyunThe ADM1022 works the same as THMC50 but it is faster (5 Hz instead of
61*4882a593Smuzhiyun1 Hz for THMC50). It can be also put in a new mode to handle additional
62*4882a593Smuzhiyunremote temperature sensor. The driver use the mode set by BIOS by default.
63*4882a593Smuzhiyun
64*4882a593SmuzhiyunIn case the BIOS is broken and the mode is set incorrectly, you can force
65*4882a593Smuzhiyunthe mode with additional remote temperature with adm1022_temp3 parameter.
66*4882a593SmuzhiyunA typical symptom of wrong setting is a fan forced to full speed.
67*4882a593Smuzhiyun
68*4882a593SmuzhiyunDriver Features
69*4882a593Smuzhiyun---------------
70*4882a593Smuzhiyun
71*4882a593SmuzhiyunThe driver provides up to three temperatures:
72*4882a593Smuzhiyun
73*4882a593Smuzhiyuntemp1
74*4882a593Smuzhiyun	- internal
75*4882a593Smuzhiyuntemp2
76*4882a593Smuzhiyun	- remote
77*4882a593Smuzhiyuntemp3
78*4882a593Smuzhiyun	- 2nd remote only for ADM1022
79*4882a593Smuzhiyun
80*4882a593Smuzhiyunpwm1
81*4882a593Smuzhiyun	- fan speed (0 = stop, 255 = full)
82*4882a593Smuzhiyunpwm1_mode
83*4882a593Smuzhiyun	- always 0 (DC mode)
84*4882a593Smuzhiyun
85*4882a593SmuzhiyunThe value of 0 for pwm1 also forces FAN_OFF signal from the chip,
86*4882a593Smuzhiyunso it stops fans even if the value 0 into the ANALOG_OUT register does not.
87*4882a593Smuzhiyun
88*4882a593SmuzhiyunThe driver was tested on Compaq AP550 with two ADM1022 chips (one works
89*4882a593Smuzhiyunin the temp3 mode), five temperature readings and two fans.
90