xref: /OK3568_Linux_fs/kernel/Documentation/hwmon/gl518sm.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunKernel driver gl518sm
2*4882a593Smuzhiyun=====================
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunSupported chips:
5*4882a593Smuzhiyun
6*4882a593Smuzhiyun  * Genesys Logic GL518SM release 0x00
7*4882a593Smuzhiyun
8*4882a593Smuzhiyun    Prefix: 'gl518sm'
9*4882a593Smuzhiyun
10*4882a593Smuzhiyun    Addresses scanned: I2C 0x2c and 0x2d
11*4882a593Smuzhiyun
12*4882a593Smuzhiyun  * Genesys Logic GL518SM release 0x80
13*4882a593Smuzhiyun
14*4882a593Smuzhiyun    Prefix: 'gl518sm'
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun    Addresses scanned: I2C 0x2c and 0x2d
17*4882a593Smuzhiyun
18*4882a593Smuzhiyun    Datasheet: http://www.genesyslogic.com/
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunAuthors:
21*4882a593Smuzhiyun       - Frodo Looijaard <frodol@dds.nl>,
22*4882a593Smuzhiyun       - Kyösti Mälkki <kmalkki@cc.hut.fi>
23*4882a593Smuzhiyun       - Hong-Gunn Chew <hglinux@gunnet.org>
24*4882a593Smuzhiyun       - Jean Delvare <jdelvare@suse.de>
25*4882a593Smuzhiyun
26*4882a593SmuzhiyunDescription
27*4882a593Smuzhiyun-----------
28*4882a593Smuzhiyun
29*4882a593Smuzhiyun.. important::
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun   For the revision 0x00 chip, the in0, in1, and in2  values (+5V, +3V,
32*4882a593Smuzhiyun   and +12V) CANNOT be read. This is a limitation of the chip, not the driver.
33*4882a593Smuzhiyun
34*4882a593SmuzhiyunThis driver supports the Genesys Logic GL518SM chip. There are at least
35*4882a593Smuzhiyuntwo revision of this chip, which we call revision 0x00 and 0x80. Revision
36*4882a593Smuzhiyun0x80 chips support the reading of all voltages and revision 0x00 only
37*4882a593Smuzhiyunfor VIN3.
38*4882a593Smuzhiyun
39*4882a593SmuzhiyunThe GL518SM implements one temperature sensor, two fan rotation speed
40*4882a593Smuzhiyunsensors, and four voltage sensors. It can report alarms through the
41*4882a593Smuzhiyuncomputer speakers.
42*4882a593Smuzhiyun
43*4882a593SmuzhiyunTemperatures are measured in degrees Celsius. An alarm goes off while the
44*4882a593Smuzhiyuntemperature is above the over temperature limit, and has not yet dropped
45*4882a593Smuzhiyunbelow the hysteresis limit. The alarm always reflects the current
46*4882a593Smuzhiyunsituation. Measurements are guaranteed between -10 degrees and +110
47*4882a593Smuzhiyundegrees, with a accuracy of +/-3 degrees.
48*4882a593Smuzhiyun
49*4882a593SmuzhiyunRotation speeds are reported in RPM (rotations per minute). An alarm is
50*4882a593Smuzhiyuntriggered if the rotation speed has dropped below a programmable limit. In
51*4882a593Smuzhiyuncase when you have selected to turn fan1 off, no fan1 alarm is triggered.
52*4882a593Smuzhiyun
53*4882a593SmuzhiyunFan readings can be divided by a programmable divider (1, 2, 4 or 8) to
54*4882a593Smuzhiyungive the readings more range or accuracy.  Not all RPM values can
55*4882a593Smuzhiyunaccurately be represented, so some rounding is done. With a divider
56*4882a593Smuzhiyunof 2, the lowest representable value is around 1900 RPM.
57*4882a593Smuzhiyun
58*4882a593SmuzhiyunVoltage sensors (also known as VIN sensors) report their values in volts.
59*4882a593SmuzhiyunAn alarm is triggered if the voltage has crossed a programmable minimum or
60*4882a593Smuzhiyunmaximum limit. Note that minimum in this case always means 'closest to
61*4882a593Smuzhiyunzero'; this is important for negative voltage measurements. The VDD input
62*4882a593Smuzhiyunmeasures voltages between 0.000 and 5.865 volt, with a resolution of 0.023
63*4882a593Smuzhiyunvolt. The other inputs measure voltages between 0.000 and 4.845 volt, with
64*4882a593Smuzhiyuna resolution of 0.019 volt. Note that revision 0x00 chips do not support
65*4882a593Smuzhiyunreading the current voltage of any input except for VIN3; limit setting and
66*4882a593Smuzhiyunalarms work fine, though.
67*4882a593Smuzhiyun
68*4882a593SmuzhiyunWhen an alarm is triggered, you can be warned by a beeping signal through your
69*4882a593Smuzhiyuncomputer speaker. It is possible to enable all beeping globally, or only the
70*4882a593Smuzhiyunbeeping for some alarms.
71*4882a593Smuzhiyun
72*4882a593SmuzhiyunIf an alarm triggers, it will remain triggered until the hardware register
73*4882a593Smuzhiyunis read at least once (except for temperature alarms). This means that the
74*4882a593Smuzhiyuncause for the alarm may already have disappeared! Note that in the current
75*4882a593Smuzhiyunimplementation, all hardware registers are read whenever any data is read
76*4882a593Smuzhiyun(unless it is less than 1.5 seconds since the last update). This means that
77*4882a593Smuzhiyunyou can easily miss once-only alarms.
78*4882a593Smuzhiyun
79*4882a593SmuzhiyunThe GL518SM only updates its values each 1.5 seconds; reading it more often
80*4882a593Smuzhiyunwill do no harm, but will return 'old' values.
81