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