2 * This file is part of the superiotool project.
4 * Copyright (C) 2007 Uwe Hermann <uwe@hermann-uwe.de>
5 * Copyright (C) 2008 coresystems GmbH <info@coresystems.de>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #include "superiotool.h"
24 #define DEVICE_ID_REG_OLD 0x0d
25 #define DEVICE_REV_REG_OLD 0x0e
27 #define DEVICE_ID_REG 0x20
28 #define DEVICE_REV_REG 0x21
30 static const struct superio_registers reg_table[] = {
31 /* The following Super I/Os use the 0x20/0x21 ID registers. */
32 {0x03, "FDC37C93xFR", {
33 /* FIXME: There's another 0x03 but found on port 0x0d/0x0e! */
37 {0x02,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
38 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
39 {0x00,0x0a,0x00,0x00,0x00,0x04,0x04,NANA,NANA,0x00,
40 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
42 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf3,0xf4,
44 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,RSVD,0x00,
46 {0x1, "Power management (PM1)",
48 {0x00,0x00,0x00,EOT}},
49 {0x3, "Parallel port",
50 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
51 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
53 {0x30,0x60,0x61,0x70,0xf0,EOT},
54 {0x00,0x00,0x00,0x00,0x00,EOT}},
56 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1,
58 {0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x02,
60 {0x6, "Real-time clock (RTC)",
61 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,EOT},
62 {0x00,0x00,0x70,0x00,0x74,0x00,0x00,NANA,EOT}},
64 {0x30,0x60,0x61,0x70,0x72,0xf0,EOT},
65 {0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
66 {0x8, "Embedded controller (EC)",
68 {0x00,0x00,0x62,EOT}},
71 {0x00,0x00,0x00,EOT}},
75 {0x02,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
76 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
77 {0x00,0x0b,0x00,0x00,0x00,0x04,0x04,NANA,NANA,0x00,
78 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
80 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf3,0xf4,
82 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,RSVD,0x00,
84 {0x1, "Power management (PM1)",
86 {0x00,0x00,0x00,EOT}},
87 {0x3, "Parallel port",
88 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
89 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
91 {0x30,0x60,0x61,0x70,0xf0,EOT},
92 {0x00,0x00,0x00,0x00,0x00,EOT}},
94 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1,
96 {0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x02,
98 {0x6, "Real-time clock (RTC)",
99 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,EOT},
100 {0x00,0x00,0x70,0x00,0x74,0x00,0x00,NANA,EOT}},
102 {0x30,0x60,0x61,0x70,0x72,0xf0,EOT},
103 {0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
104 {0x8, "Embedded controller (EC)",
105 {0x30,0x60,0x61,EOT},
106 {0x00,0x00,0x62,EOT}},
108 {0x30,0x60,0x61,EOT},
109 {0x00,0x00,0x00,EOT}},
111 {0x0e, "LPC47N252", { /* From sensors-detect */
113 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
114 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
115 {0x0e,NANA,0x00,0x00,0x04,0x04,NANA,NANA,0x00,
116 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
118 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf3,0xf4,
120 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,RSVD,0x00,
122 {0x1, "Power management (PM1)",
123 {0x30,0x60,0x61,EOT},
124 {0x00,0x00,0x00,EOT}},
125 {0x3, "Parallel port",
126 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
127 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
129 {0x30,0x60,0x61,0x70,0xf0,EOT},
130 {0x00,0x00,0x00,0x00,0x00,EOT}},
132 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1,
134 {0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x02,
135 0x03,0x00,0x00,EOT}},
136 {0x6, "Real-time clock (RTC)",
137 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,EOT},
138 {0x00,0x00,0x70,0x00,0x74,0x00,0x00,NANA,EOT}},
140 {0x30,0x60,0x61,0x70,0x72,0xf0,EOT},
141 {0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
142 {0x8, "Embedded controller (EC)",
143 {0x30,0x60,0x61,EOT},
144 {0x00,0x00,0x62,EOT}},
145 {0x9, "Mailbox Interface",
146 {0x30,0x60,0x61,EOT},
147 {0x00,0x00,0x00,EOT}},
148 {0xa, "LPC/8051 addressable GPIO (LGPIO)",
149 {0x30,0x60,0x61,EOT},
150 {0x00,0x00,0x00,EOT}},
152 {0x14, "LPC47M172", {
154 {0x30, "FDC37C93xAPM", {
156 {0x40, "FDC37C67x", { /* E.g. FDC37C672. Chiprev: 0x01 */
158 {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x2b,0x2c,
160 {0x03,0x40,NANA,0x00,0x00,0x04,MISC,MISC,NANA,NANA,
161 NANA,NANA,NANA,EOT}},
163 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
165 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00,
167 {0x3, "Parallel port",
168 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
169 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
171 {0x30,0x60,0x61,0x70,0xf0,EOT},
172 {0x00,0x00,0x00,0x00,0x00,EOT}},
174 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1,0xf2,
176 {0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x02,0x03,
179 {0x30,0x70,0x72,0xf0,EOT},
180 {0x00,0x00,0x00,0x00,EOT}},
182 {0x30,0xb4,0xb5,0xb6,0xb7,0xc0,0xc1,0xc2,0xc3,0xc4,
183 0xf1,0xf2,0xf3,0xf4,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,
185 {0x00,NANA,NANA,NANA,NANA,0x06,0x03,NANA,NANA,NANA,
186 0x00,0x00,0x00,MISC,RSVD,RSVD,RSVD,RSVD,RSVD,RSVD,
189 {0x42, "FDC37B80x/FDC37M707", {
191 {0x09, "FDC37N958FR", { /* Found in e.g. Dell Latitude CPi A366XT. */
193 {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,0x2b,
194 0x2c,0x2d,0x2e,0x2f,EOT},
195 {0x03,0x44,0x00,0x00,0x00,0x04,MISC,MISC,0x00,NANA,
196 NANA,NANA,NANA,NANA,EOT}},
198 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
200 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00,
202 {0x3, "Parallel port",
203 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
204 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
206 {0x30,0x60,0x61,0x70,0xf0,EOT},
207 {0x00,0x00,0x00,0x00,0x00,EOT}},
209 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1,0xf2,
211 {NANA,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x02,0x03,
213 {0x6, "Real-time clock (RTC)",
214 {0x30,0x62,0x63,0x70,0xf0,EOT},
215 {0x00,0x00,0x70,0x00,0x00,EOT}},
217 {0x30,0x70,0x72,0xf0,EOT},
218 {0x00,0x00,0x00,0x00,EOT}},
220 {0x30,0xb0,0xb1,0xb2,0xb3,0xb8,0xc0,0xc1,0xc2,0xc3,
221 0xc4,0xc5,0xc6,0xc8,0xca,0xcb,0xcc,0xd0,0xd1,0xd2,
222 0xd3,0xd4,0xd5,0xd6,0xd7,0xe0,0xe1,0xe2,0xe3,0xe4,
223 0xe5,0xe6,0xe7,0xef,0xf0,0xf1,0xf2,0xf3,0xf4,0xf6,
225 {0x00,NANA,NANA,NANA,NANA,NANA,NANA,0x01,NANA,NANA,
226 NANA,0x00,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
227 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
228 NANA,NANA,NANA,NANA,NANA,0x00,0x00,0x00,0x00,NANA,
231 {0x30,0x60,0x61,0x70,0xf0,EOT},
232 {0x00,0x00,0x00,NANA,NANA,EOT}},
234 {0x43, "FDC37B77x", {
236 {0x44, "FDC37B78x", {
238 {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,0x2b,
239 0x2c,0x2d,0x2e,0x2f,EOT},
240 {0x03,0x44,0x00,0x00,0x00,0x04,MISC,MISC,0x00,NANA,
241 NANA,NANA,NANA,NANA,EOT}},
243 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
245 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00,
247 {0x3, "Parallel port",
248 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
249 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
251 {0x30,0x60,0x61,0x70,0xf0,EOT},
252 {0x00,0x00,0x00,0x00,0x00,EOT}},
254 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1,0xf2,
256 {NANA,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x02,0x03,
258 {0x6, "Real-time clock (RTC)",
259 {0x30,0x62,0x63,0x70,0xf0,EOT},
260 {0x00,0x00,0x70,0x00,0x00,EOT}},
262 {0x30,0x70,0x72,0xf0,EOT},
263 {0x00,0x00,0x00,0x00,EOT}},
265 {0x30,0xb0,0xb1,0xb2,0xb3,0xb8,0xc0,0xc1,0xc2,0xc3,
266 0xc4,0xc5,0xc6,0xc8,0xca,0xcb,0xcc,0xd0,0xd1,0xd2,
267 0xd3,0xd4,0xd5,0xd6,0xd7,0xe0,0xe1,0xe2,0xe3,0xe4,
268 0xe5,0xe6,0xe7,0xef,0xf0,0xf1,0xf2,0xf3,0xf4,0xf6,
270 {0x00,NANA,NANA,NANA,NANA,NANA,NANA,0x01,NANA,NANA,
271 NANA,0x00,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
272 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
273 NANA,NANA,NANA,NANA,NANA,0x00,0x00,0x00,0x00,NANA,
276 {0x30,0x60,0x61,0x70,0xf0,EOT},
277 {0x00,0x00,0x00,NANA,NANA,EOT}},
279 {0x46, "FDC37M602", { /* Found in Biostar M6TLD. */
281 {0x47, "FDC37M60x", { /* TODO: Not yet in sensors-detect */
283 {0x4c, "FDC37B72x", {
285 {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,0x2b,
286 0x2c,0x2d,0x2e,0x2f,EOT},
287 {0x03,0x4c,0x00,0x00,0x00,0x04,MISC,MISC,0x00,NANA,
288 NANA,NANA,NANA,NANA,EOT}},
290 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
292 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00,
294 {0x3, "Parallel port",
295 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
296 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
298 {0x30,0x60,0x61,0x70,0xf0,EOT},
299 {0x00,0x00,0x00,0x00,0x00,EOT}},
301 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
302 {NANA,0x00,0x00,0x00,0x00,0x02,0x03,EOT}},
304 {0x30,0x70,0x72,0xf0,EOT},
305 {0x00,0x00,0x00,0x00,EOT}},
307 {0x30,0xb0,0xb1,0xb2,0xb3,0xb8,0xc0,0xc1,0xc2,0xc3,
308 0xc4,0xc5,0xc6,0xc8,0xca,0xcb,0xcc,0xd0,0xd1,0xd2,
309 0xd3,0xd4,0xd5,0xd6,0xd7,0xe0,0xe1,0xe2,0xe3,0xe4,
310 0xe5,0xe6,0xe7,0xef,0xf0,0xf1,0xf2,0xf3,0xf4,0xf6,
312 {0x00,NANA,NANA,NANA,NANA,NANA,0x00,0x01,NANA,NANA,
313 NANA,0x00,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
314 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
315 NANA,NANA,NANA,NANA,NANA,0x00,0x00,0x00,MISC,NANA,
318 {0x30,0x60,0x61,0x70,0xf0,EOT},
319 {0x00,0x00,0x00,NANA,NANA,EOT}},
321 {0x4d, "FDC37M81x", {
323 {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x2b,0x2c,
325 {0x03,0x4d,NANA,0x00,0x00,0x04,MISC,MISC,NANA,NANA,
326 NANA,NANA,NANA,EOT}},
328 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
330 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
332 {0x3, "Parallel port",
333 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
334 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
336 {0x30,0x60,0x61,0x70,0xf0,EOT},
337 {0x00,0x00,0x00,0x00,0x00,EOT}},
339 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,EOT},
340 {0x00,0x00,0x00,RSVD,RSVD,0x00,0x00,0x02,0x03,EOT}},
342 {0x30,0x70,0x72,0xf0,EOT},
343 {0x00,0x00,0x00,0x00,EOT}},
345 /* Only 0xf6 existing (and reserved) or 0xf6..0xfb? */
346 {0x30,0xb4,0xb5,0xb6,0xb7,0xc0,0xc1,0xc2,0xc3,0xc4,
347 0xc5,0xc6,0xc7,0xc8,0xf1,0xf2,0xf3,0xf4,0xf6,0xf7,
348 0xf8,0xf9,0xfa,0xfb,EOT},
349 {0x00,NANA,NANA,NANA,NANA,0x02,0x01,NANA,NANA,NANA,
350 NANA,NANA,NANA,NANA,0x00,0x00,0x00,0x00,RSVD,RSVD,
351 RSVD,RSVD,RSVD,RSVD,EOT}},
353 {0x51, "LPC47B27x", {
355 {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,
356 0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
357 {RSVD,0x51,NANA,0x00,0x00,0x04,MISC,MISC,RSVD,
358 NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
360 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
362 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00,
364 {0x3, "Parallel port",
365 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
366 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
368 {0x30,0x60,0x61,0x70,0xf0,EOT},
369 {0x00,0x00,0x00,0x00,0x00,EOT}},
371 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1,0xf2,
373 {NANA,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x02,0x03,
376 {0x30,0x70,0x72,0xf0,EOT},
377 {0x00,0x00,0x00,0x00,EOT}},
379 {0x30,0x60,0x61,EOT},
380 {0x00,0x00,0x00,EOT}},
381 {0xa, "Power-management events (PME)",
382 {0x30,0x60,0x61,0xf0,0xf1,EOT},
383 {0x00,0x00,0x00,NANA,NANA,EOT}},
384 {0xb, "MIDI port (MPU-401)",
385 {0x30,0x60,0x61,0x70,EOT},
386 {0x00,0x03,0x30,0x05,EOT}},
388 {0x52, "LPC47B37x", {
390 {0x54, "LPC47U33x", {
392 {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x2a,0x2b,
393 0x2c,0x2d,0x2e,0x2f,EOT},
394 {RSVD,0x54,NANA,0x00,0x00,0x04,MISC,MISC,NANA,NANA,
395 NANA,NANA,NANA,NANA,EOT}},
397 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
399 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00,
401 {0x3, "Parallel port",
402 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
403 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
405 {0x30,0x60,0x61,0x70,0xf0,EOT},
406 {0x00,0x00,0x00,0x00,0x00,EOT}},
407 {0x5, "MIDI port (MPU-401)",
408 {0x30,0x60,0x61,0x70,EOT},
409 {0x00,0x03,0x30,0x05,EOT}},
411 {0x30,0x70,0x72,0xf0,EOT},
412 {0x00,0x00,0x00,0x00,EOT}},
414 {0x30,0x60,0x61,EOT},
415 {0x00,0x00,0x00,EOT}},
416 {0xa, "Runtime registers",
417 {0x30,0x60,0x61,0xf0,0xf1,EOT},
418 {0x00,0x00,0x00,NANA,NANA,EOT}},
420 {0x30,0x60,0x61,0x70,EOT},
421 {0x00,0x00,0x00,0x00,EOT}},
423 {0x56, "LPC47B34x", {
425 {0x57, "LPC47S42x", {
427 {0x59, "LPC47M10x/112/13x", {
429 {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,0x2a,
430 0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
431 {RSVD,0x59,NANA,0x00,0x00,0x44,MISC,MISC,RSVD,NANA,
432 NANA,NANA,NANA,NANA,NANA,EOT}},
434 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
436 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
438 {0x3, "Parallel port",
439 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
440 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
442 {0x30,0x60,0x61,0x70,0xf0,EOT},
443 {0x00,0x00,0x00,0x00,0x00,EOT}},
445 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1,
447 {NANA,0x00,0x00,RSVD,RSVD,0x00,RSVD,0x00,0x02,
450 {0x30,0x70,0x72,0xf0,EOT},
451 {0x00,0x00,0x00,0x00,EOT}},
453 {0x30,0x60,0x61,EOT},
454 {0x00,0x00,0x00,EOT}},
455 {0xa, "Power management events (PME)",
456 {0x30,0x60,0x61,0xf0,0xf1,EOT},
457 {0x00,0x00,0x00,NANA,RSVD,EOT}},
459 {0x30,0x60,0x61,0x70,EOT},
460 {0x00,0x03,0x30,0x05,EOT}},
462 {0x5d, "LPC47B357", { /* From sensors-detect (no datasheet) */
464 {0x5f, "LPC47M14x", {
466 {0x60, "LPC47M15x/192/997", {
468 {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,0x2a,
469 0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
470 {RSVD,0x60,NANA,0x00,0x00,0x44,MISC,MISC,RSVD,NANA,
471 NANA,NANA,NANA,NANA,NANA,EOT}},
473 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
475 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00,
477 {0x3, "Parallel port",
478 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
479 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
481 {0x30,0x60,0x61,0x70,0xf0,EOT},
482 {0x00,0x00,0x00,0x00,0x00,EOT}},
484 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
485 {NANA,0x00,0x00,0x00,0x00,0x02,0x03,EOT}},
487 {0x30,0x70,0x72,0xf0,EOT},
488 {0x00,0x00,0x00,0x00,EOT}},
490 {0x30,0x60,0x61,EOT},
491 {0x00,0x00,0x00,EOT}},
492 {0xa, "Power management events (PME)",
493 {0x30,0x60,0x61,0xf0,EOT},
494 {0x00,0x00,0x00,NANA,EOT}},
496 {0x30,0x60,0x61,0x70,EOT},
497 {0x00,0x03,0x30,0x05,EOT}},
499 {0x62, "LPC47S45x", {
501 {0x67, "EMC2700LPC", { /* From sensors-detect */
503 {0x6b, "LPC47M292", { /* From sensors-detect */
505 {0x6e, "LPC47B387", { /* TODO: Not yet in sensors-detect */
506 /* Found in the HP Compaq Business Desktop d530 Series */
507 /* http://article.gmane.org/gmane.linux.bios/27192 */
508 /* We cannot find a public datasheet for this Super I/O. */
510 {0x6f, "LPC47B397", {
512 {0x74, "LPC47M182", { /* Only for LD_NUM = 0 */
514 {0x02,0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,
515 0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
516 {0x00,RSVD,0x74,RSVD,0x00,RSVD,0x44,MISC,0x00,
517 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
519 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
521 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
523 {0x1, "Parallel port",
524 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf8,EOT},
525 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,0x08,EOT}},
527 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
528 {0x00,0x00,0x00,0x00,0x00,0x02,0x03,EOT}},
530 {0x30,0x60,0x61,0x70,0xf0,EOT},
531 {0x00,0x00,0x00,0x00,0x00,EOT}},
532 {0x4, "Power control",
533 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
534 {0x00,0x00,0x00,0x00,NANA,0x00,EOT}},
539 {0x30,0x70,0xf0,EOT},
540 {0x00,0x00,0x00,EOT}},
542 {0x30,0x60,0x61,0x70,0x72,0xf0,EOT},
543 {0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
544 {0xa, "Runtime registers",
545 {0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT},
546 {0x00,0x00,0x00,0x00,0x00,NANA,RSVD,0x04,EOT}},
548 {0x76, "LPC47M584", { /* From sensors-detect (no datasheet) */
550 {0x77, "A8000", { /* ASUS A8000, a rebranded DME1737(?) */
552 {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,0x2a,
553 0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
554 {RSVD,0x77,NANA,0x00,RSVD,0x44,MISC,MISC,RSVD,NANA,
555 NANA,NANA,NANA,NANA,NANA,EOT}},
557 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
559 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
561 {0x3, "Parallel port",
562 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
563 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
565 {0x30,0x60,0x61,0x70,0xf0,EOT},
566 {0x00,0x00,0x00,0x00,0x00,EOT}},
568 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
569 {0x00,0x00,0x00,0x00,0x00,0x02,0x03,EOT}},
571 {0x30,0x70,0x72,0xf0,EOT},
572 {0x00,0x00,0x00,0x00,EOT}},
573 {0xa, "Runtime registers",
574 {0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT},
575 {0x00,0x00,0x00,0x00,0x00,NANA,RSVD,0x04,EOT}},
579 {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,0x2a,
580 0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
581 {RSVD,0x77,NANA,0x00,RSVD,0x44,MISC,MISC,RSVD,NANA,
582 NANA,NANA,NANA,NANA,NANA,EOT}},
584 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
586 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
588 {0x3, "Parallel port",
589 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
590 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
592 {0x30,0x60,0x61,0x70,0xf0,EOT},
593 {0x00,0x00,0x00,0x00,0x00,EOT}},
595 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
596 {0x00,0x00,0x00,0x00,0x00,0x02,0x03,EOT}},
598 {0x30,0x70,0x72,0xf0,EOT},
599 {0x00,0x00,0x00,0x00,EOT}},
600 {0xa, "Runtime registers",
601 {0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT},
602 {0x00,0x00,0x00,0x00,0x00,NANA,RSVD,0x04,EOT}},
604 {0x79, "SCH5504", { /* From sensors-detect (no datasheet) */
606 {0x7a, "LPC47N217", { /* Found in Toshiba Satellite A80-117. */
616 {0x83, "SCH5514D", { /* From sensors-detect */
618 {0x85, "SCH5317", { /* From sensors-detect */
619 /* The SCH5317 can have either 0x85 or 0x8c as device ID. */
621 {0x86, "SCH5127", { /* From sensors-detect */
623 {0x89, "SCH5027", { /* From sensors-detect (no public datasheet) */
625 {0x8c, "SCH5317", { /* From sensors-detect */
626 /* The SCH5317 can have either 0x85 or 0x8c as device ID. */
628 {0x90, "SCH4307", { /* From sensors-detect */
631 /* The following Super I/Os use the 0x0d/0x0e ID registers. */
632 {0x03, "FDC37C669", {
633 /* Init: 0x55, 0x55. Exit: 0xaa. Ports: 0x3f0/0x370. */
635 /* FIXME: There's another 0x03 but found on port 0x20/0x21! */
637 {0x04, "FDC37C669FR", { /* TODO: Not yet in sensors-detect. */
638 /* Init: 0x55, 0x55. Exit: 0xaa. Ports: 0x3f0/0x370. */
640 {0x13, "LPC47N237", {
641 /* Init: 0x55. Exit: 0xaa. Ports: 0x2e/0x4e. */
643 {0x28, "FDC37N769", {
644 /* Init: 0x55. Exit: 0xaa. Ports: 0x3f0/0x370. */
646 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,
647 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,
648 0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,
649 0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,
650 0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
651 {0x28,0x9c,0x88,0x70,0x00,0x00,0xff,0x00,0x00,0x00,
652 0x00,0x00,0x02,0x28,NANA,0x00,0x00,0x80,RSVD,RSVD,
653 NANA,NANA,NANA,0x03,RSVD,RSVD,RSVD,RSVD,RSVD,RSVD,
654 0x80,0x00,0x3c,RSVD,RSVD,0x00,0x00,0x00,0x00,0x00,
655 0x00,0x00,RSVD,0x00,0x00,0x03,0x00,0x00,EOT}},
657 {0x29, "FDC37N3869/FDC37N869", {
658 /* Init: 0x55. Exit: 0xaa. Ports: 0x3f0/0x370. */
660 {0x5a, "LPC47N227", {
661 /* Init: 0x55. Exit: 0xaa. Ports: 0x2e/0x4e. */
663 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,
664 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,
665 0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,
666 0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,
667 0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,0x30,0x31,
668 0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,EOT},
669 {0x28,0x9c,0x08,0x70,0x00,0x00,0xff,0x00,RSVD,0x00,
670 0x00,0x00,0x02,0x5a,NANA,0x00,0x00,0x80,MISC,0x00,
671 NANA,NANA,NANA,0x03,RSVD,RSVD,RSVD,RSVD,RSVD,RSVD,
672 RSVD,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
673 0x00,0x80,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,
674 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,EOT}},
676 {0x5b, "SIO10N268", {
677 /* Init: 0x55. Exit: 0xaa. Ports: 0x2e/0x4e. */
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,
682 0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,
683 0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,0x30,0x31,
684 0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,
685 0x3c,0x3d,0x3e,0x3f,0x40,0x41,0x42,0x43,0x44,0x45,
686 0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,
687 0x50,0x51,0x52,0x53,0x54,EOT},
688 {0x20,0x98,0x00,0x70,0x00,0x00,0xff,0x00,0x00,0x00,
689 0x00,0x00,0x02,0x5b,NANA,0x00,0x00,0x00,MISC,0x00,
690 NANA,NANA,NANA,0x03,0x00,NANA,NANA,0x00,0x00,0x00,
691 NANA,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0xff,0x00,
692 0x00,0x80,0x00,0x00,0x0f,0x03,0x00,0x00,0x00,NANA,
693 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,0x00,0x00,
694 0x00,0x00,0x00,0x00,NANA,NANA,NANA,NANA,NANA,0x50,
695 NANA,0x00,NANA,NANA,NANA,NANA,NANA,NANA,0x00,0x01,
696 0x00,0x01,0x00,0x8c,MISC,EOT}},
698 {0x65, "FDC37C665GT/IR", {
699 /* Init: 0x55, 0x55. Exit: 0xaa. Port: 0x3f0. */
700 /* Chiprev: 0x02 = FDC37C665GT, 0x82 = FDC37C665IR */
702 {0x66, "FDC37C666GT", {
703 /* Init: 0x55, 0x55. Exit: 0xaa. Port: 0x3f0. Chiprev: 0x02. */
708 static void enter_conf_mode_smsc(uint16_t port)
710 /* Some of the SMSC Super I/Os have an 0x55,0x55 init, some only
711 * require one 0x55. We do 0x55,0x55 for all of them at the moment,
712 * in the assumption that the extra 0x55 won't hurt the other
713 * Super I/Os. This is verified to be true on (at least) the FDC37N769.
719 static void exit_conf_mode_smsc(uint16_t port)
724 static void probe_idregs_smsc_helper(uint16_t port, uint8_t idreg,
728 uint16_t runtime_base;
729 const char *info = (idreg == 0x20) ? "(idregs=0x20/0x21) "
730 : "(idregs=0x0d/0x0e) ";
732 probing_for("SMSC", info, port);
734 enter_conf_mode_smsc(port);
736 id = regval(port, idreg);
737 rev = regval(port, revreg);
739 if (superio_unknown(reg_table, id)) {
741 printf(NOTFOUND "id=0x%02x, rev=0x%02x\n", id, rev);
742 exit_conf_mode_smsc(port);
746 printf("Found %s %s (id=0x%02x, rev=0x%02x) at 0x%x\n",
747 (id == 0x77 ? "ASUS" : "SMSC"), get_superio_name(reg_table, id),
751 dump_superio((id == 0x77 ? "ASUS" : "SMSC"), reg_table, port, id,
756 case 0x5a: /* LPC47N227 */
757 runtime_base = regval(port, 0x30) << 4;
759 dump_io(runtime_base, 16);
761 printf("Runtime Register Block not mapped on this Super I/O.\n");
764 printf("No extra registers known for this chip.\n");
768 exit_conf_mode_smsc(port);
771 void probe_idregs_smsc(uint16_t port)
773 probe_idregs_smsc_helper(port, DEVICE_ID_REG, DEVICE_REV_REG);
774 probe_idregs_smsc_helper(port, DEVICE_ID_REG_OLD, DEVICE_REV_REG_OLD);
777 void print_smsc_chips(void)
779 print_vendor_chips("SMSC", reg_table);
780 printf("SMSC LPC47N227 runtime register block\n\n");