aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/hwmon/smsc47b397
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2005-07-13 18:09:23 -0400
committerAnton Altaparmakov <aia21@cantab.net>2005-07-13 18:09:23 -0400
commitc514720716c7b109ff980f8b3cb93f9af872c91c (patch)
tree490a9578995705de69712893a190b67651bddc56 /Documentation/hwmon/smsc47b397
parent07929dcb963786512c760dd3ecd148d89295e7e5 (diff)
parent1e279dd855d15b72364b4103f872d67d8592647e (diff)
Automatic merge with /usr/src/ntfs-2.6.git.
Diffstat (limited to 'Documentation/hwmon/smsc47b397')
-rw-r--r--Documentation/hwmon/smsc47b397158
1 files changed, 158 insertions, 0 deletions
diff --git a/Documentation/hwmon/smsc47b397 b/Documentation/hwmon/smsc47b397
new file mode 100644
index 000000000000..da9d80c96432
--- /dev/null
+++ b/Documentation/hwmon/smsc47b397
@@ -0,0 +1,158 @@
1Kernel driver smsc47b397
2========================
3
4Supported chips:
5 * SMSC LPC47B397-NC
6 Prefix: 'smsc47b397'
7 Addresses scanned: none, address read from Super I/O config space
8 Datasheet: In this file
9
10Authors: Mark M. Hoffman <mhoffman@lightlink.com>
11 Utilitek Systems, Inc.
12
13November 23, 2004
14
15The following specification describes the SMSC LPC47B397-NC sensor chip
16(for which there is no public datasheet available). This document was
17provided by Craig Kelly (In-Store Broadcast Network) and edited/corrected
18by Mark M. Hoffman <mhoffman@lightlink.com>.
19
20* * * * *
21
22Methods for detecting the HP SIO and reading the thermal data on a dc7100.
23
24The thermal information on the dc7100 is contained in the SIO Hardware Monitor
25(HWM). The information is accessed through an index/data pair. The index/data
26pair is located at the HWM Base Address + 0 and the HWM Base Address + 1. The
27HWM Base address can be obtained from Logical Device 8, registers 0x60 (MSB)
28and 0x61 (LSB). Currently we are using 0x480 for the HWM Base Address and
290x480 and 0x481 for the index/data pair.
30
31Reading temperature information.
32The temperature information is located in the following registers:
33Temp1 0x25 (Currently, this reflects the CPU temp on all systems).
34Temp2 0x26
35Temp3 0x27
36Temp4 0x80
37
38Programming Example
39The following is an example of how to read the HWM temperature registers:
40MOV DX,480H
41MOV AX,25H
42OUT DX,AL
43MOV DX,481H
44IN AL,DX
45
46AL contains the data in hex, the temperature in Celsius is the decimal
47equivalent.
48
49Ex: If AL contains 0x2A, the temperature is 42 degrees C.
50
51Reading tach information.
52The fan speed information is located in the following registers:
53 LSB MSB
54Tach1 0x28 0x29 (Currently, this reflects the CPU
55 fan speed on all systems).
56Tach2 0x2A 0x2B
57Tach3 0x2C 0x2D
58Tach4 0x2E 0x2F
59
60Important!!!
61Reading the tach LSB locks the tach MSB.
62The LSB Must be read first.
63
64How to convert the tach reading to RPM.
65The tach reading (TCount) is given by: (Tach MSB * 256) + (Tach LSB)
66The SIO counts the number of 90kHz (11.111us) pulses per revolution.
67RPM = 60/(TCount * 11.111us)
68
69Example:
70Reg 0x28 = 0x9B
71Reg 0x29 = 0x08
72
73TCount = 0x89B = 2203
74
75RPM = 60 / (2203 * 11.11111 E-6) = 2451 RPM
76
77Obtaining the SIO version.
78
79CONFIGURATION SEQUENCE
80To program the configuration registers, the following sequence must be followed:
811. Enter Configuration Mode
822. Configure the Configuration Registers
833. Exit Configuration Mode.
84
85Enter Configuration Mode
86To place the chip into the Configuration State The config key (0x55) is written
87to the CONFIG PORT (0x2E).
88
89Configuration Mode
90In configuration mode, the INDEX PORT is located at the CONFIG PORT address and
91the DATA PORT is at INDEX PORT address + 1.
92
93The desired configuration registers are accessed in two steps:
94a. Write the index of the Logical Device Number Configuration Register
95 (i.e., 0x07) to the INDEX PORT and then write the number of the
96 desired logical device to the DATA PORT.
97
98b. Write the address of the desired configuration register within the
99 logical device to the INDEX PORT and then write or read the config-
100 uration register through the DATA PORT.
101
102Note: If accessing the Global Configuration Registers, step (a) is not required.
103
104Exit Configuration Mode
105To exit the Configuration State the write 0xAA to the CONFIG PORT (0x2E).
106The chip returns to the RUN State. (This is important).
107
108Programming Example
109The following is an example of how to read the SIO Device ID located at 0x20
110
111; ENTER CONFIGURATION MODE
112MOV DX,02EH
113MOV AX,055H
114OUT DX,AL
115; GLOBAL CONFIGURATION REGISTER
116MOV DX,02EH
117MOV AL,20H
118OUT DX,AL
119; READ THE DATA
120MOV DX,02FH
121IN AL,DX
122; EXIT CONFIGURATION MODE
123MOV DX,02EH
124MOV AX,0AAH
125OUT DX,AL
126
127The registers of interest for identifying the SIO on the dc7100 are Device ID
128(0x20) and Device Rev (0x21).
129
130The Device ID will read 0X6F
131The Device Rev currently reads 0x01
132
133Obtaining the HWM Base Address.
134The following is an example of how to read the HWM Base Address located in
135Logical Device 8.
136
137; ENTER CONFIGURATION MODE
138MOV DX,02EH
139MOV AX,055H
140OUT DX,AL
141; CONFIGURE REGISTER CRE0,
142; LOGICAL DEVICE 8
143MOV DX,02EH
144MOV AL,07H
145OUT DX,AL ;Point to LD# Config Reg
146MOV DX,02FH
147MOV AL, 08H
148OUT DX,AL;Point to Logical Device 8
149;
150MOV DX,02EH
151MOV AL,60H
152OUT DX,AL ; Point to HWM Base Addr MSB
153MOV DX,02FH
154IN AL,DX ; Get MSB of HWM Base Addr
155; EXIT CONFIGURATION MODE
156MOV DX,02EH
157MOV AX,0AAH
158OUT DX,AL