1*4882a593SmuzhiyunKernel driver lm63 2*4882a593Smuzhiyun================== 3*4882a593Smuzhiyun 4*4882a593SmuzhiyunSupported chips: 5*4882a593Smuzhiyun 6*4882a593Smuzhiyun * National Semiconductor LM63 7*4882a593Smuzhiyun 8*4882a593Smuzhiyun Prefix: 'lm63' 9*4882a593Smuzhiyun 10*4882a593Smuzhiyun Addresses scanned: I2C 0x4c 11*4882a593Smuzhiyun 12*4882a593Smuzhiyun Datasheet: Publicly available at the National Semiconductor website 13*4882a593Smuzhiyun 14*4882a593Smuzhiyun http://www.national.com/pf/LM/LM63.html 15*4882a593Smuzhiyun 16*4882a593Smuzhiyun * National Semiconductor LM64 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun Prefix: 'lm64' 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun Addresses scanned: I2C 0x18 and 0x4e 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun Datasheet: Publicly available at the National Semiconductor website 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun http://www.national.com/pf/LM/LM64.html 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun * National Semiconductor LM96163 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun Prefix: 'lm96163' 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun Addresses scanned: I2C 0x4c 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun Datasheet: Publicly available at the National Semiconductor website 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun http://www.national.com/pf/LM/LM96163.html 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun 37*4882a593SmuzhiyunAuthor: Jean Delvare <jdelvare@suse.de> 38*4882a593Smuzhiyun 39*4882a593SmuzhiyunThanks go to Tyan and especially Alex Buckingham for setting up a remote 40*4882a593Smuzhiyunaccess to their S4882 test platform for this driver. 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun https://www.tyan.com/ 43*4882a593Smuzhiyun 44*4882a593SmuzhiyunDescription 45*4882a593Smuzhiyun----------- 46*4882a593Smuzhiyun 47*4882a593SmuzhiyunThe LM63 is a digital temperature sensor with integrated fan monitoring 48*4882a593Smuzhiyunand control. 49*4882a593Smuzhiyun 50*4882a593SmuzhiyunThe LM63 is basically an LM86 with fan speed monitoring and control 51*4882a593Smuzhiyuncapabilities added. It misses some of the LM86 features though: 52*4882a593Smuzhiyun 53*4882a593Smuzhiyun - No low limit for local temperature. 54*4882a593Smuzhiyun - No critical limit for local temperature. 55*4882a593Smuzhiyun - Critical limit for remote temperature can be changed only once. We 56*4882a593Smuzhiyun will consider that the critical limit is read-only. 57*4882a593Smuzhiyun 58*4882a593SmuzhiyunThe datasheet isn't very clear about what the tachometer reading is. 59*4882a593Smuzhiyun 60*4882a593SmuzhiyunAn explanation from National Semiconductor: The two lower bits of the read 61*4882a593Smuzhiyunvalue have to be masked out. The value is still 16 bit in width. 62*4882a593Smuzhiyun 63*4882a593SmuzhiyunAll temperature values are given in degrees Celsius. Resolution is 1.0 64*4882a593Smuzhiyundegree for the local temperature, 0.125 degree for the remote temperature. 65*4882a593Smuzhiyun 66*4882a593SmuzhiyunThe fan speed is measured using a tachometer. Contrary to most chips which 67*4882a593Smuzhiyunstore the value in an 8-bit register and have a selectable clock divider 68*4882a593Smuzhiyunto make sure that the result will fit in the register, the LM63 uses 16-bit 69*4882a593Smuzhiyunvalue for measuring the speed of the fan. It can measure fan speeds down to 70*4882a593Smuzhiyun83 RPM, at least in theory. 71*4882a593Smuzhiyun 72*4882a593SmuzhiyunNote that the pin used for fan monitoring is shared with an alert out 73*4882a593Smuzhiyunfunction. Depending on how the board designer wanted to use the chip, fan 74*4882a593Smuzhiyunspeed monitoring will or will not be possible. The proper chip configuration 75*4882a593Smuzhiyunis left to the BIOS, and the driver will blindly trust it. Only the original 76*4882a593SmuzhiyunLM63 suffers from this limitation, the LM64 and LM96163 have separate pins 77*4882a593Smuzhiyunfor fan monitoring and alert out. On the LM64, monitoring is always enabled; 78*4882a593Smuzhiyunon the LM96163 it can be disabled. 79*4882a593Smuzhiyun 80*4882a593SmuzhiyunA PWM output can be used to control the speed of the fan. The LM63 has two 81*4882a593SmuzhiyunPWM modes: manual and automatic. Automatic mode is not fully implemented yet 82*4882a593Smuzhiyun(you cannot define your custom PWM/temperature curve), and mode change isn't 83*4882a593Smuzhiyunsupported either. 84*4882a593Smuzhiyun 85*4882a593SmuzhiyunThe lm63 driver will not update its values more frequently than configured with 86*4882a593Smuzhiyunthe update_interval sysfs attribute; reading them more often will do no harm, 87*4882a593Smuzhiyunbut will return 'old' values. Values in the automatic fan control lookup table 88*4882a593Smuzhiyun(attributes pwm1_auto_*) have their own independent lifetime of 5 seconds. 89*4882a593Smuzhiyun 90*4882a593SmuzhiyunThe LM64 is effectively an LM63 with GPIO lines. The driver does not 91*4882a593Smuzhiyunsupport these GPIO lines at present. 92*4882a593Smuzhiyun 93*4882a593SmuzhiyunThe LM96163 is an enhanced version of LM63 with improved temperature accuracy 94*4882a593Smuzhiyunand better PWM resolution. For LM96163, the external temperature sensor type is 95*4882a593Smuzhiyunconfigurable as CPU embedded diode(1) or 3904 transistor(2). 96