2 * This file is part of the superiotool project.
4 * Copyright (C) 2007 Uwe Hermann <uwe@hermann-uwe.de>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
17 #include "superiotool.h"
19 #define DEVICE_ID_REG_OLD 0x09
21 #define DEVICE_ID_REG 0x20
22 #define DEVICE_REV_REG 0x21
25 * The ID entries must be in 0xYYZ format, where YY is the device ID,
26 * and Z is bits 7..4 of the device revision register. We do not match
27 * bits 3..0 of the device revision here (at least for newer Super I/Os).
29 * But some of the older versions use both bytes (0x20 and 0x21), where
30 * register 0x21 holds the ID and the full 8 bits of 0x21 hold the revision.
32 * Some other Super I/Os only use bits 3..0 of 0x09 as ID.
34 static const struct superio_registers reg_table
[] = {
35 /* ID and rev[3..0] */
36 {0x527, "W83977CTF", { /* TODO: Not yet in sensors-detect */
38 {0x52f, "W83977EF/EG", {
40 {0x02,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x28,0x2a,
41 0x2b,0x2c,0x2d,0x2e,0x2f,EOT
},
42 {RSVD
,0x52,MISC
,0xff,0xfe,MISC
,0x00,MISC
,0x00,0x00,
43 0x00,0x00,RSVD
,RSVD
,RSVD
,EOT
}},
44 /* Some register defaults depend on the value of PNPCSV. */
46 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
48 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
50 {0x1, "Parallel port",
51 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT
},
52 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT
}},
54 {0x30,0x60,0x61,0x70,0xf0,EOT
},
55 {0x01,0x03,0xf8,0x04,0x00,EOT
}},
57 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT
},
58 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT
}},
60 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT
},
61 {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x83,EOT
}},
63 {0x30,0x60,0x61,0x62,0x63,0x64,0x65,0x70,0x72,0xe0,
64 0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xf1,EOT
},
65 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
66 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,EOT
}},
68 {0x30,0x60,0x61,0x70,0x72,0xe8,0xe9,0xea,0xeb,0xec,
69 0xed,0xf0,0xf1,0xf2,0xf3,0xf4,EOT
},
70 {0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,
71 0x01,0x00,RSVD
,0x00,0x00,0x00,EOT
}},
73 {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
74 0xf0,0xf1,0xf3,0xf4,0xf6,0xf7,0xf9,0xfe,0xff,EOT
},
75 {0x00,0x00,0x00,0x00,MISC
,MISC
,MISC
,0x00,0x00,0x00,
76 0x00,0x00,0x00,0x00,0x00,0x00,0x00,RSVD
,RSVD
,EOT
}},
78 {0x595, "W83627SF", { /* TODO: Not yet in sensors-detect */
80 {0x601, "W83697HF/F/HG", { /* No G version? */
82 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x28,0x29,
84 {0x60,NANA
,0xff,0x00,0x00,0x00,0x00,0x00,0x00,
86 /* Some register defaults depend on the value of PNPCSV. */
88 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
90 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
92 {0x1, "Parallel port",
93 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT
},
94 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT
}},
96 {0x30,0x60,0x61,0x70,0xf0,EOT
},
97 {0x01,0x03,0xf8,0x04,0x00,EOT
}},
99 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT
},
100 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT
}},
102 {0x30,0x60,0x61,0x70,EOT
},
103 {0x00,0x00,0x00,0x00,EOT
}},
104 {0x7, "Game port, GPIO 1",
105 {0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT
},
106 {0x00,0x02,0x01,0x00,0x00,0xff,0x00,0x00,EOT
}},
107 {0x8, "MIDI port, GPIO 5",
108 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3,
110 {0x00,0x03,0x30,0x00,0x00,0x09,0xff,0x00,0x00,0x00,
112 {0x9, "GPIO 2, GPIO 3, GPIO 4",
113 {0x30,0x60,0x61,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,
115 {0x00,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,
116 0x00,0x00,0x00,EOT
}},
118 {0x30,0x70,0xe0,0xe1,0xe2,0xe5,0xe6,0xe7,
119 0xf0,0xf1,0xf3,0xf4,0xf6,0xf7,0xf9,EOT
},
120 {0x00,0x00,0x00,0x00,NANA
,0x00,0x00,0x00,
121 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT
}},
122 {0xb, "Hardware monitor",
123 {0x30,0x60,0x61,0x70,EOT
},
124 {0x00,0x00,0x00,0x00,EOT
}},
126 {0x610, "W83L517D/D-F", {
128 {0x708, "W83637HF/HG", {
130 {0x828, "W83627THF/THG", { /* We assume rev is bits 3..0 of 0x21. */
132 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x28,0x29,0x2a,
133 0x2b,0x2c,0x2d,0x2e,0x2f,EOT
},
134 {0x82,NANA
,0xff,0x00,MISC
,0x00,MISC
,0x00,0x00,0x00,
135 MISC
,MISC
,MISC
,0x00,0x00,EOT
}},
136 /* Some register defaults depend on the value of PNPCSV. */
138 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
140 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
142 {0x1, "Parallel port",
143 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT
},
144 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT
}},
146 {0x30,0x60,0x61,0x70,0xf0,EOT
},
147 {0x01,0x03,0xf8,0x04,0x00,EOT
}},
149 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT
},
150 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT
}},
152 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT
},
153 {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x80,EOT
}},
154 {0x7, "GPIO 1, GPIO 5, game port, MIDI port",
155 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3,
157 {0x00,0x02,0x01,0x03,0x30,0x09,0xff,0x00,0x00,0xff,
160 {0x30,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,EOT
},
161 {0x00,0xff,0x00,0x00,0x00,RSVD
,0x00,0x00,0x00,EOT
}},
162 {0x9, "GPIO 3, GPIO 4",
163 {0x30,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,EOT
},
164 {0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,EOT
}},
166 /* Note: Datasheet says 0xe2 can't be read/written. */
167 {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
168 0xf0,0xf1,0xf3,0xf4,0xf6,0xf7,0xf9,0xfe,0xff,EOT
},
169 {0x00,0x00,0x00,0x00,MISC
,MISC
,0x00,0x00,0x00,0x00,
170 0x00,0x00,0x00,0x00,0x00,0x00,0x00,RSVD
,RSVD
,EOT
}},
171 {0xb, "Hardware monitor",
172 {0x30,0x60,0x61,0x70,EOT
},
173 {0x00,0x00,0x00,0x00,EOT
}},
176 {0x85x
, "W83687THF", { /* TODO: sensors-detect: 0x85 */
179 {0xa02, "W83627DHG", {
181 {0x02,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
182 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT
},
183 {0x00,0xa0,NANA
,0xff,0x00,MISC
,0x00,MISC
,RSVD
,0x50,
184 0x00,0x00,RSVD
,0xe2,0x21,0x00,0x00,EOT
}},
186 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
188 {0x01,0x03,0xf0,0x06,0x02,0x8e,0x00,0xff,0x00,0x00,
190 {0x1, "Parallel port",
191 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT
},
192 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT
}},
194 {0x30,0x60,0x61,0x70,0xf0,EOT
},
195 {0x01,0x03,0xf8,0x04,0x00,EOT
}},
197 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT
},
198 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT
}},
200 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT
},
201 {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x83,EOT
}},
202 {0x6, "Serial peripheral interface",
203 {0x30,0x62,0x63,EOT
},
204 {0x00,0x00,0x00,EOT
}},
206 {0x30,0xf4,0xf5,0xf6,0xf7,EOT
},
207 {0x00,0xff,0x00,0x00,0x00,EOT
}},
209 {0x30,0xf5,0xf6,0xf7,EOT
},
210 {0x00,0x00,0x00,0x00,EOT
}},
211 {0x9, "GPIO 2, GPIO 3, GPIO 4, GPIO 5",
212 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
213 0xe9,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xfe,
215 {0x00,0xff,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,
216 0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,
219 {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
220 0xe8,0xe9,0xf2,0xf3,0xf4,0xf6,0xf7,0xfe,EOT
},
221 {0x00,0x00,0x01,0x00,0xff,0x08,0x00,RSVD
,0x1c,0x00,
222 RSVD
,RSVD
,0x7c,0x00,0x00,0x00,0x00,0x00,EOT
}},
223 {0xb, "Hardware monitor",
224 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT
},
225 {0x00,0x00,0x00,0x00,0x81,0x00,0x00,EOT
}},
227 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe8,0xf1,0xfe,0xff,
229 {0x00,0x48,0x48,0x48,0x48,0x00,0x00,0x48,0x00,0x00,
232 {0xa23, "W83627UHG = NCT6627UD", { /* TODO: Not yet in sensors-detect */
233 {NOLDN
, NULL
, /* CR2B (485) is only valid for chip rev.E */
234 {0x02,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
235 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT
},
236 {0x00,0xa2,NANA
,0xff,0xF0,MISC
,0x00,MISC
,RSVD
,0x00,
237 0x00,0x00,0x00,0x02,0x00,0x00,0x00,EOT
}},
239 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
241 {0x01,0x03,0xf0,0x06,0x02,0x8e,0x00,0xff,0x00,0x00,
243 {0x1, "Parallel port",
244 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT
},
245 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT
}},
247 {0x30,0x60,0x61,0x70,0xf0,EOT
},
248 {0x01,0x03,0xf8,0x04,0x00,EOT
}},
250 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT
},
251 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT
}},
253 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT
},
254 {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x83,EOT
}},
256 {0x30,0x60,0x61,0x70,0xf0,EOT
},
257 {0x01,0x03,0xE0,0x04,0x00,EOT
}},
258 {0x7, "GPIO 3, GPIO 4",
259 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,EOT
},
260 {0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,EOT
}},
261 {0x8, "WDTO#, PLED, GPIO 5,6 & GPIO Base Address",
263 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,
266 0xFF,0x00,0x00,0x00,0xFF,0x1F,0x00,0x00,
267 0x00,0x00,0x00,EOT
}},
268 {0x9, "GPIO 1, GPIO 2 and SUSLED",
270 0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
273 0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,
276 {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
277 0xe8,0xe9,0xf2,0xf3,0xf4,0xf6,0xf7,0xfe,EOT
},
278 {0x00,0x00,0x01,0x00,0xff,0x08,0x00,0x00,0x1c,0x00,
279 RSVD
,RSVD
,0x3e,0x00,0x00,0x00,0x00,0x00,EOT
}},
280 {0xb, "Hardware monitor",
281 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT
},
282 {0x00,0x00,0x00,0x00,RSVD
,RSVD
,0x00,EOT
}},
284 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
285 0xf1,0xf2,0xf3,0xfe,0xff,EOT
},
286 {0x00,0x48,0x48,0x48,0x48,0x00,RSVD
,RSVD
,0x00,
287 0x48,0x50,0x10,0x23,0x5A,EOT
}},
289 {0x30,0x60,0x61,0x70,0xf0,EOT
},
290 {0x00,0x02,0xe0,0x03,0x00,EOT
}},
292 {0x30,0x60,0x61,0x70,0xf0,EOT
},
293 {0x00,0x03,0xe8,0x04,0x00,EOT
}},
295 {0x30,0x60,0x61,0x70,0xf0,EOT
},
296 {0x00,0x02,0xe8,0x03,0x00,EOT
}},
298 {0xa51, "W83667HG", {
299 /* See also: http://lists.lm-sensors.org/pipermail/lm-sensors/2008-July/023683.html */
301 {0xb07, "W83627DHG-P/-PT", {
303 {0x02,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
304 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT
},
305 {0x00,0xb0,NANA
,0xff,0x00,MISC
,0x00,MISC
,RSVD
,0x50,
306 0x00,0x00,RSVD
,0xe2,0x21,0x00,0x00,EOT
}},
308 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
310 {0x01,0x03,0xf0,0x06,0x02,0x8e,0x00,0xff,0x00,0x00,
312 {0x1, "Parallel port",
313 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT
},
314 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT
}},
316 {0x30,0x60,0x61,0x70,0xf0,EOT
},
317 {0x01,0x03,0xf8,0x04,0x00,EOT
}},
319 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT
},
320 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT
}},
322 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT
},
323 {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x83,EOT
}},
324 {0x6, "Serial peripheral interface",
325 {0x30,0x62,0x63,EOT
},
326 {0x00,0x00,0x00,EOT
}},
328 {0x30,0xf4,0xf5,0xf6,0xf7,0xf8,EOT
},
329 {0x00,0xff,0x00,0x00,0x00,0x00,EOT
}},
331 {0x30,0xf5,0xf6,0xf7,EOT
},
332 {0x00,0x00,0x00,0x00,EOT
}},
333 {0x9, "GPIO 2, GPIO 3, GPIO 4, GPIO 5",
334 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
335 0xe9,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,
337 {0x00,0xff,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,
338 0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,
339 0x00,0x00,0x00,EOT
}},
341 {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
342 0xe8,0xe9,0xf2,0xf3,0xf4,0xf6,0xf7,0xfe,EOT
},
343 {0x00,0x00,0x01,0x00,0xff,0x08,0x00,RSVD
,0x1c,0x00,
344 RSVD
,RSVD
,0x7c,0x00,0x00,0x00,0x00,0x00,EOT
}},
345 {0xb, "Hardware monitor",
346 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT
},
347 {0x00,0x00,0x00,0x00,0x81,0x00,0x00,EOT
}},
349 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe8,0xe9,0xea,0xec,
350 0xee,0xef,0xf1,0xf2,0xf3,0xfe,0xff,EOT
},
351 {0x00,0x48,0x48,0x48,0x48,0x00,0x00,RSVD
,0x00,0x00,
352 0x01,0x5a,0x48,0x50,0x10,0x00,0x00,EOT
}},
354 {0xb35, "Nuvoton NCT5571D", {
356 {0x02,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,
357 0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT
},
358 {RSVD
,0xb3,NANA
,0xff,0x00,0x40,0x00,MISC
,0xff,0x20,0x00,
359 0x00,0x7f,0x0a,0x08,0x00,MISC
,EOT
}},
361 {0x30,0x60,0x61,0x70,0xf0,EOT
},
362 {0x01,0x03,0xf8,0x04,0x00,EOT
}},
364 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT
},
365 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,EOT
}},
366 {0x7, "GPIO 6, GPIO 8, GPIO 9",
367 {0x30,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,
368 0xee,0xf4,0xf5,0xf6,0xf7,0xf8,EOT
},
369 {0x18,0xef,MISC
,0x00,0x00,0xff,MISC
,0x00,0x00,RSVD
,0x00,
370 0x00,0xff,MISC
,0x00,0x00,0x00,EOT
}},
371 {0x9, "GPIO 2, GPIO 3, GPIO 5",
372 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,0xea,
373 0xeb,0xf4,0xf5,0xf6,0xf7,0xfe,EOT
},
374 {0x05,0xff,MISC
,0x00,0x00,0xff,MISC
,0x00,0x00,0x00,0x00,
375 0x00,0xff,MISC
,0x00,0x00,0x00,EOT
}},
377 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xf2,
378 0xf3,0xf4,0xf6,0xf7,0xfe,0xff,EOT
},
379 {0x01,0x00,0xff,0x00,0x00,0x02,0x1c,0x00,RSVD
,0x00,0x7c,
380 0x00,0x00,0x00,0x00,0x00,0x30,EOT
}},
381 {0xb, "Hardware monitor",
382 {0x30,0x60,0x61,0x70,0xe0,0xe1,0xe2,0xe3,0xf0,0xf5,EOT
},
383 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc1,0x10,EOT
}},
385 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe8,0xe9,0xea,0xec,
386 0xee,0xef,0xf1,0xf2,0xf3,0xfe,0xff,EOT
},
387 {0x00,0x48,0x48,0x48,0x48,0x00,0x00,0x00,RSVD
,0x00,0x00,
388 0x01,0x5a,0x48,0x50,0x10,0x80,0x01,EOT
}},
392 {0xf, "GPIO Push-Pull/OD Select",
393 {0xe0,0xe1,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xf0,0xf1,
394 0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,
396 {RSVD
,0xfd,RSVD
,0xf7,0xcb,RSVD
,0xff,0xff,0x00,MISC
,MISC
,
397 MISC
,MISC
,MISC
,MISC
,MISC
,MISC
,MISC
,MISC
,MISC
,MISC
,MISC
,
398 MISC
,MISC
,MISC
,EOT
}},
402 {0x9771, "W83977F-A/G-A/AF-A/AG-A", {
404 {0x9777, "W83977AF", {
406 * W83977AF as found on the Advantech PCM-5820. We weren't able
407 * to find a datasheet (so far) which lists the 0x77 revision,
408 * but the hardware is there in the wild, so detect it...
411 {0x9773, "W83977TF", {
413 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x28,0x2a,0x2b,
414 0x2c,0x2d,0x2e,0x2f,EOT
},
415 {0x97,0x73,0xff,0xfe,MISC
,0x00,MISC
,0x00,0x00,0x00,
416 0x00,RSVD
,RSVD
,RSVD
,EOT
}},
418 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
420 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00,
422 {0x1, "Parallel port",
423 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT
},
424 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT
}},
426 {0x30,0x60,0x61,0x70,0xf0,EOT
},
427 {0x01,0x03,0xf8,0x04,0x00,EOT
}},
429 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT
},
430 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT
}},
431 {0x5, "Keyboard / mouse",
432 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT
},
433 {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x83,EOT
}},
435 {0x30,0x60,0x61,0x62,0x63,0x64,0x65,0x70,0x72,0xe0,
436 0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xf1,EOT
},
437 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
438 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,EOT
}},
440 {0x30,0x60,0x61,0x70,0x72,0xe8,0xe9,0xea,0xeb,0xec,
441 0xed,0xee,0xf0,0xf1,0xf2,0xf3,0xf4,EOT
},
442 {0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,
443 0x01,0x01,0x00,RSVD
,0x00,0x00,0x00,EOT
}},
445 {0x30,0x60,0x61,0x62,0x63,0x64,0x65,0x70,0x72,0xe0,
446 0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xf1,EOT
},
447 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
448 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,EOT
}},
450 {0x30,0x60,0x61,0x62,0x63,0x64,0x65,0x70,0xe0,0xe1,
451 0xe2,0xe3,0xe4,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,
453 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
454 NANA
,MISC
,RSVD
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
455 0x00,RSVD
,RSVD
,EOT
}},
457 {0x9774, "W83977ATF", {
460 {0xb07, "W83527HG", { /* TODO: Not yet in sensors-detect */
462 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,
463 0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT
},
464 {0xB0,0x73,0xff,0x00,MISC
,0x00,0x00,RSVD
,0x50,0x00,
465 0x00,RSVD
,0xe2,0x21,0x00,0x00,EOT
}},
467 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT
},
468 {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x83,EOT
}},
470 {0x30,0xf5,0xf6,0xf7,EOT
},
471 {0x00,0x00,0x00,0x00,EOT
}},
472 {0x9, "GPIO 2, GPIO3, GPIO5",
473 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,
474 0xf0,0xf1,0xf2,0xf3,0xf8,0xf9,0xfa,0xfe,EOT
},
475 {0x00,0xff,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,
476 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT
}},
478 {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
479 0xe8,0xe9,0xf2,0xf3,0xf4,0xf6,0xf7,0xfe,EOT
},
480 {0x00,0x00,0x01,0x00,0xff,0x08,0x00,0x00,0x1c,0x00,
481 RSVD
,RSVD
,0x7c,0x00,0x00,0x00,0x00,0x00,EOT
}},
482 {0xb, "Hardware monitor",
483 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT
},
484 {0x00,0x00,0x00,0x00,0x81,RSVD
,0x00,EOT
}},
486 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe8,0xe9,0xea,0xec,
488 {0x00,0x48,0x48,0x48,0x48,0x00,0x00,RSVD
,0x00,0x00,
492 {0x52, "W83627HF/F/HG/G", {
494 {0x02,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x28,0x29,
495 0x2a,0x2b,0x2c,0x2e,0x2f,EOT
},
496 {0x00,0x52,NANA
,0xff,0x00,MISC
,0x00,0x00,0x00,0x00,
497 0x7c,0xc0,0x00,0x00,0x00,EOT
}},
499 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
501 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
503 {0x1, "Parallel port",
504 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT
},
505 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT
}},
507 {0x30,0x60,0x61,0x70,0xf0,EOT
},
508 {0x01,0x03,0xf8,0x04,0x00,EOT
}},
510 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT
},
511 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT
}},
513 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT
},
514 {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x80,EOT
}},
516 {0x30,0x60,0x61,0x70,EOT
},
517 {0x00,0x00,0x00,0x00,EOT
}},
518 {0x7, "Game port, MIDI port, GPIO 1",
519 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,EOT
},
520 {0x00,0x02,0x01,0x03,0x30,0x09,0xff,0x00,0x00,EOT
}},
521 {0x8, "GPIO 2, watchdog timer",
522 {0x30,0xf0,0xf1,0xf2,0xf3,0xf5,0xf6,0xf6,0xf7,EOT
},
523 {0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT
}},
525 {0x30,0xf0,0xf1,0xf2,0xf3,EOT
},
526 {0x00,0xff,0x00,0x00,0x00,EOT
}},
528 {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
529 0xf0,0xf1,0xf3,0xf4,0xf6,0xf7,0xf9,0xfe,0xff,EOT
},
530 {0x00,0x00,0x00,0x00,NANA
,NANA
,0x00,0x00,0x00,0x00,
531 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT
}},
532 {0xb, "Hardware monitor",
533 {0x30,0x60,0x61,0x70,0xf0,EOT
},
534 {0x00,0x00,0x00,0x00,0x00,EOT
}},
536 {0x68, "W83697SF/UF/UG", {
537 /* ID: 0x68 (for W83697SF/UF/UG)
538 * Rev: 0x1X (for W83697SF)
539 * 0x0X (for W83697SF) -- sic!
540 * 0x1X (for W83697UF/UG)
543 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x28,0x29,0x2a,
545 {0x68,NANA
,0xef,0xfe,MISC
,0x00,0x00,0x00,0x00,MISC
,
548 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
550 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00,
552 {0x1, "Parallel port",
553 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT
},
554 {0x01,0x03,0x78,0x07,0x03,0x3f,EOT
}},
556 {0x30,0x60,0x61,0x70,0xf0,EOT
},
557 {0x01,0x03,0xf8,0x04,0x00,EOT
}},
559 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT
},
560 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT
}},
561 {0x7, "Game port, GPIO 1",
562 {0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT
},
563 {0x00,0x02,0x01,0x00,0x00,0xff,0x00,0x00,EOT
}},
564 {0x8, "MIDI port, GPIO 5",
565 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3,
567 {0x00,0x03,0x30,0x00,0x00,0x09,0xff,0x00,0x00,0x00,
569 {0x9, "GPIO 2, GPIO 3, GPIO 4",
570 {0x30,0x60,0x61,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,
572 {0x00,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,
575 {0x30,0x70,0xf0,0xf1,0xf2,0xf3,0xf4,0xf6,0xf7,0xf9,
577 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
580 {0x30,0x60,0x61,EOT
},
581 {0x00,0x00,0x00,EOT
}},
583 {0x30,0x60,0x61,0x70,0xf0,EOT
},
584 {0x00,0x00,0x00,0x00,0x00,EOT
}},
586 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3,
588 {0x00,0x03,0xe8,0x00,0x00,0x00,0x00,0xff,0x00,0x00,
591 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3,
593 {0x00,0x02,0xe8,0x00,0x00,0x00,0x00,0xff,0x00,0x00,
596 {0x30,0x60,0x61,0xf0,0xf1,0xf2,EOT
},
597 {0x00,0x00,0x00,0xff,0x00,0x00,EOT
}},
599 {0x88, "W83627EHF/EF/EHG/EG", {
601 * As per datasheet the ID should be 0x886? here.
602 * Not mentioned in the datasheet, but sensors-detect says
603 * 0x8853 is also possible. Also, the ASUS A8V-E Deluxe
604 * (W83627EHF) has an ID of 0x8854 (verified on hardware).
605 * So we now assume all 0x88?? IDs to mean W83627EHF/EF/EHG/EG.
608 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
609 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT
},
610 {0x88,MISC
,0xff,0x00,MISC
,0x00,MISC
,RSVD
,0x50,
611 0x04,0x00,RSVD
,0x00,0x21,0x00,0x00,EOT
}},
613 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
615 {0x01,0x03,0xf0,0x06,0x02,0x8e,0x00,0xff,0x00,
617 {0x1, "Parallel port",
618 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT
},
619 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT
}},
621 {0x30,0x60,0x61,0x70,0xf0,EOT
},
622 {0x01,0x03,0xf8,0x04,0x00,EOT
}},
624 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT
},
625 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT
}},
627 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT
},
628 {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x83,EOT
}},
629 {0x6, "Serial flash interface",
630 {0x30,0x62,0x63,EOT
},
631 {0x00,0x00,0x00,EOT
}},
632 {0x7, "GPIO 1, GPIO 6, game port, MIDI port",
633 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3,
634 0xf4,0xf5,0xf6,0xf7,EOT
},
635 {0x00,0x02,0x01,0x03,0x30,0x09,0xff,0x00,0x00,0x00,
636 0xff,0x00,0x00,0x00,EOT
}},
638 {0x30,0xf5,0xf6,0xf7,EOT
},
639 {0x00,0x00,0x00,0x00,EOT
}},
640 {0x9, "GPIO 2, GPIO 3, GPIO 4, GPIO 5, SUSLED",
641 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xf0,0xf1,0xf2,
642 0xf3,0xf4,0xf5,0xf6,0xf7,EOT
},
643 {0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,
644 0x00,0xff,0x00,0x00,0x00,EOT
}},
646 {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
647 0xe8,0xf2,0xf3,0xf4,0xf6,0xf7,EOT
},
648 {0x00,0x00,0x01,0x00,0xff,0x08,0x00,RSVD
,0x00,0x00,
649 RSVD
,0x7c,0x00,0x00,0x00,0x00,EOT
}},
650 {0xb, "Hardware monitor",
651 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT
},
652 {0x00,0x00,0x00,0x00,0xc1,0x00,EOT
}},
660 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,
661 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,
662 0x14,0x15,0x16,0x17,0x1e,0x20,0x21,0x22,0x23,0x24,
663 0x25,0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,EOT
},
664 {0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x0a,
665 0x1f,0x0c,0x28,0xa3,RSVD
,RSVD
,0x00,0x00,0x00,0x00,
666 0x00,0x00,0x0e,0x00,MISC
,MISC
,MISC
,MISC
,MISC
,MISC
,
667 MISC
,MISC
,MISC
,MISC
,MISC
,MISC
,MISC
,MISC
,MISC
,EOT
}},
671 {0xd, "W83877ATF/ATG", {
676 static const struct superio_registers hwm_table
[] = {
677 {0x828, "W83627THF/THG", {
679 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,
680 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,
681 0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,
683 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,
684 0x2b,0x2c,0x2d,0x2e,0x2f,0x30,0x31,0x32,0x33,0x34,
685 0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,
687 0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,
688 0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,EOT
},
689 {RSVD
,0xff,RSVD
,0xff,0x00,0x00,0x00,0x00,0x01,0x01,
690 0x01,0x01,0x3c,0x3c,0x0a,0x0a,RSVD
,0xff,0x00,0x00,
691 0x00,0x01,0x01,0x3c,0x43,RSVD
,0xff,0xff,RSVD
,RSVD
,
693 NANA
,NANA
,NANA
,NANA
,NANA
,RSVD
,RSVD
,NANA
,NANA
,NANA
,
694 NANA
,NANA
,NANA
,NANA
,NANA
,NANA
,NANA
,NANA
,NANA
,NANA
,
695 RSVD
,RSVD
,RSVD
,RSVD
,NANA
,NANA
,NANA
,NANA
,NANA
,RSVD
,
697 0x03,0x00,0x00,0xfe,0xff,RSVD
,RSVD
,0x5f,NANA
,0x03,
698 RSVD
,0x44,0x18,0x15,0x80,0x5c,EOT
}},
700 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
702 {NANA
,NANA
,NANA
,NANA
,NANA
,NANA
,0x00,0x80,0x90,0x70,
703 0x00,RSVD
,RSVD
,EOT
}},
705 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,EOT
},
706 {NANA
,NANA
,0x00,0x4b,0x00,0x50,0x00,EOT
}},
708 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,EOT
},
709 {NANA
,NANA
,0x00,0x4b,0x00,0x50,0x00,EOT
}},
711 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x59,0x5a,
713 {0x00,0xff,RSVD
,0x00,0x00,0x00,0x00,0x00,0x00,
716 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,EOT
},
717 {NANA
,NANA
,RSVD
,RSVD
,NANA
,NANA
,NANA
,NANA
,EOT
}},
722 {0xb07, "W83627DHG-P/-PT", {
724 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,
725 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,
726 0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,
728 {0x04,0xff,0x04,NANA
,0x01,0x00,0x00,0x00,0x01,0x01,
729 0x01,0x01,0x3c,0x3c,0x0a,0x0a,0x04,0xff,0x00,0x00,
730 0x00,0x01,0x01,0x3c,0x43,RSVD
,RSVD
,RSVD
,RSVD
,RSVD
,
733 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,
734 0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,0x30,0x31,0x32,0x33,
735 0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,
737 {NANA
,NANA
,NANA
,NANA
,NANA
,NANA
,NANA
,NANA
,NANA
,NANA
,
738 NANA
,NANA
,NANA
,NANA
,NANA
,NANA
,NANA
,NANA
,NANA
,NANA
,
739 NANA
,NANA
,NANA
,NANA
,NANA
,NANA
,NANA
,NANA
,NANA
,NANA
,
742 {0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,
743 0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,EOT
},
744 {0x03,0x00,0x00,0xff,0xff,0x00,0x3f,0x55,0x2d,0x00,
745 0x00,0x44,0x10,0x95,0x80,0xa3,EOT
}},
747 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
748 0x5a,0x5b,0x5c,0x5d,0x5e,0x5f,0x60,0x61,0x62,0x63,
749 0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,
751 {RSVD
,RSVD
,RSVD
,RSVD
,RSVD
,RSVD
,0x00,0x80,0xc1,0x70,
752 RSVD
,RSVD
,RSVD
,0x04,0x04,RSVD
,0x04,NANA
,0x40,0x00,
753 0x01,0x01,0x3c,0xff,0x01,0xff,0x01,0xff,0xff,0xff,
755 {0x0, "Bank 0 [...]",
756 {0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,
757 0x7a,0x7b,0x7c,0x7d,EOT
},
758 {0x00,0x00,0x00,0x00,0x00,0x0e,0x00,0x00,0x00,0x00,
759 0x00,0x00,0x00,NANA
,EOT
}},
761 {0x50,0x51,0x52,0x53,0x54,0x55,0x56, 0x58,0x59,
762 0x5a,0x5b,0x5c,0x5d,0x5e, EOT
},
763 {NANA
,NANA
,0x00,0x4b,0x00,0x50,0x00, 0x00,0x00,
764 0x00,0x00,0x00,0x00,0x0e, EOT
}},
766 {0x50,0x51,0x52,0x53,0x54,0x55,0x56, EOT
},
767 {NANA
,NANA
,0x00,0x4b,0x00,0x50,0x00, EOT
}},
769 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
770 0x5a,0x5b,0x5c,0x5d,0x5e,0x5f,EOT
},
771 {0x00,0x13,RSVD
,0x00,0x00,0x00,0x00,RSVD
,RSVD
,0x00,
772 0x00,0x00,RSVD
,RSVD
,RSVD
,RSVD
,EOT
}},
774 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
776 {NANA
,NANA
,RSVD
,NANA
,NANA
,NANA
,NANA
,NANA
,RSVD
,RSVD
,
777 RSVD
,RSVD
,NANA
,EOT
}},
779 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
780 0x5a,0x5b,0x5c,0x5d,0x5e,0x5f,EOT
},
781 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
782 0x0d,0xff,0xff,0xff,0xff,0xff,EOT
}},
787 static void enter_conf_mode_winbond_88(uint16_t port
)
792 static void enter_conf_mode_winbond_89(uint16_t port
)
797 static void enter_conf_mode_winbond_86(uint16_t port
)
803 static int chip_found_at_port
;
805 static void probe_idregs_winbond_helper(const char *init
, uint16_t port
)
807 uint16_t id
, hwmport
;
808 uint8_t devid
, rev
, olddevid
;
810 probing_for("Winbond", init
, port
);
812 devid
= regval(port
, DEVICE_ID_REG
);
813 rev
= regval(port
, DEVICE_REV_REG
);
814 olddevid
= regval(port
, DEVICE_ID_REG_OLD
) & 0x0f;
816 if (devid
== 0x52 && (rev
& 0xf0) != 0xf0)
817 id
= devid
; /* ID only */
818 else if (devid
== 0x68 || devid
== 0x88)
819 id
= devid
; /* ID only */
820 else if ((devid
== 0x97) && ((rev
& 0xf0) == 0x70))
821 id
= (devid
<< 8) | rev
; /* ID and rev */
823 id
= (devid
<< 4) | ((rev
& 0xf0) >> 4); /* ID and rev[7..4] */
825 if (olddevid
>= 0x0a && olddevid
<= 0x0d)
826 id
= olddevid
& 0x0f; /* ID[3..0] */
828 if (superio_unknown(reg_table
, id
)) {
830 printf(NOTFOUND
"id/oldid=0x%02x/0x%02x, rev=0x%02x\n",
831 devid
, olddevid
, rev
);
835 if (olddevid
>= 0x0a && olddevid
<= 0x0d)
836 printf("Found Winbond %s (id=0x%02x) at 0x%x\n",
837 get_superio_name(reg_table
, id
), olddevid
, port
);
839 printf("Found Winbond %s (id=0x%02x, rev=0x%02x) at 0x%x\n",
840 get_superio_name(reg_table
, id
), devid
, rev
, port
);
842 chip_found_at_port
= 1;
844 dump_superio("Winbond", reg_table
, port
, id
, LDN_SEL
);
847 regwrite(port
, LDN_SEL
, 0x0b); /* Select LDN 0xb (HWM). */
849 if ((regval(port
, 0x30) & (1 << 0)) != (1 << 0)) {
850 printf("Hardware Monitor disabled or does not exist.\n");
854 /* Get HWM base address (stored in LDN 0xb, index 0x60/0x61). */
855 hwmport
= regval(port
, 0x60) << 8;
856 hwmport
|= regval(port
, 0x61);
858 /* HWM address register = HWM base address + 5. */
861 printf("Hardware monitor (0x%04x)\n", hwmport
);
862 dump_superio("Winbond-HWM", hwm_table
, hwmport
, id
,
867 void probe_idregs_winbond(uint16_t port
)
869 chip_found_at_port
= 0;
871 enter_conf_mode_winbond_88(port
);
872 probe_idregs_winbond_helper("(init=0x88) ", port
);
873 exit_conf_mode_winbond_fintek_ite_8787(port
);
874 if (chip_found_at_port
)
877 enter_conf_mode_winbond_89(port
);
878 probe_idregs_winbond_helper("(init=0x89) ", port
);
879 exit_conf_mode_winbond_fintek_ite_8787(port
);
880 if (chip_found_at_port
)
883 enter_conf_mode_winbond_86(port
);
884 probe_idregs_winbond_helper("(init=0x86,0x86) ", port
);
885 exit_conf_mode_winbond_fintek_ite_8787(port
);
886 if (chip_found_at_port
)
889 enter_conf_mode_winbond_fintek_ite_8787(port
);
890 probe_idregs_winbond_helper("(init=0x87,0x87) ", port
);
891 exit_conf_mode_winbond_fintek_ite_8787(port
);
892 if (chip_found_at_port
)
896 void print_winbond_chips(void)
898 print_vendor_chips("Winbond", reg_table
);
899 print_vendor_chips("Winbond-HWM", hwm_table
);