Back to home page

OSCL-LXR

 
 

    


0001 Kernel driver lm63
0002 ==================
0003 
0004 Supported chips:
0005 
0006   * National Semiconductor LM63
0007 
0008     Prefix: 'lm63'
0009 
0010     Addresses scanned: I2C 0x4c
0011 
0012     Datasheet: Publicly available at the National Semiconductor website
0013 
0014                http://www.national.com/pf/LM/LM63.html
0015 
0016   * National Semiconductor LM64
0017 
0018     Prefix: 'lm64'
0019 
0020     Addresses scanned: I2C 0x18 and 0x4e
0021 
0022     Datasheet: Publicly available at the National Semiconductor website
0023 
0024                http://www.national.com/pf/LM/LM64.html
0025 
0026   * National Semiconductor LM96163
0027 
0028     Prefix: 'lm96163'
0029 
0030     Addresses scanned: I2C 0x4c
0031 
0032     Datasheet: Publicly available at the National Semiconductor website
0033 
0034                http://www.national.com/pf/LM/LM96163.html
0035 
0036 
0037 Author: Jean Delvare <jdelvare@suse.de>
0038 
0039 Thanks go to Tyan and especially Alex Buckingham for setting up a remote
0040 access to their S4882 test platform for this driver.
0041 
0042   https://www.tyan.com/
0043 
0044 Description
0045 -----------
0046 
0047 The LM63 is a digital temperature sensor with integrated fan monitoring
0048 and control.
0049 
0050 The LM63 is basically an LM86 with fan speed monitoring and control
0051 capabilities added. It misses some of the LM86 features though:
0052 
0053  - No low limit for local temperature.
0054  - No critical limit for local temperature.
0055  - Critical limit for remote temperature can be changed only once. We
0056    will consider that the critical limit is read-only.
0057 
0058 The datasheet isn't very clear about what the tachometer reading is.
0059 
0060 An explanation from National Semiconductor: The two lower bits of the read
0061 value have to be masked out. The value is still 16 bit in width.
0062 
0063 All temperature values are given in degrees Celsius. Resolution is 1.0
0064 degree for the local temperature, 0.125 degree for the remote temperature.
0065 
0066 The fan speed is measured using a tachometer. Contrary to most chips which
0067 store the value in an 8-bit register and have a selectable clock divider
0068 to make sure that the result will fit in the register, the LM63 uses 16-bit
0069 value for measuring the speed of the fan. It can measure fan speeds down to
0070 83 RPM, at least in theory.
0071 
0072 Note that the pin used for fan monitoring is shared with an alert out
0073 function. Depending on how the board designer wanted to use the chip, fan
0074 speed monitoring will or will not be possible. The proper chip configuration
0075 is left to the BIOS, and the driver will blindly trust it. Only the original
0076 LM63 suffers from this limitation, the LM64 and LM96163 have separate pins
0077 for fan monitoring and alert out. On the LM64, monitoring is always enabled;
0078 on the LM96163 it can be disabled.
0079 
0080 A PWM output can be used to control the speed of the fan. The LM63 has two
0081 PWM modes: manual and automatic. Automatic mode is not fully implemented yet
0082 (you cannot define your custom PWM/temperature curve), and mode change isn't
0083 supported either.
0084 
0085 The lm63 driver will not update its values more frequently than configured with
0086 the update_interval sysfs attribute; reading them more often will do no harm,
0087 but will return 'old' values. Values in the automatic fan control lookup table
0088 (attributes pwm1_auto_*) have their own independent lifetime of 5 seconds.
0089 
0090 The LM64 is effectively an LM63 with GPIO lines. The driver does not
0091 support these GPIO lines at present.
0092 
0093 The LM96163 is an enhanced version of LM63 with improved temperature accuracy
0094 and better PWM resolution. For LM96163, the external temperature sensor type is
0095 configurable as CPU embedded diode(1) or 3904 transistor(2).