blob: 4175d3ee054638e83097abd86f26cf989cc88e6b [file] [log] [blame]
Patrick Georgi7333a112020-05-08 20:48:04 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Uwe Hermann6ff6af72007-09-18 22:24:34 +00002
3#include "superiotool.h"
4
Uwe Hermann0f867322007-09-24 01:40:09 +00005#define DEVICE_ID_REG_OLD 0x0d
6#define DEVICE_REV_REG_OLD 0x0e
7
Elyes HAOUASb9585c52018-05-29 22:23:48 +02008#define DEVICE_ID_REG 0x20
9#define DEVICE_REV_REG 0x21
Uwe Hermann6ff6af72007-09-18 22:24:34 +000010
Uwe Hermann246be7d2007-10-31 22:22:11 +000011static const struct superio_registers reg_table[] = {
Uwe Hermann14f304a2007-10-08 01:11:11 +000012 /* The following Super I/Os use the 0x20/0x21 ID registers. */
Marc Bertens4d68df72010-04-13 01:22:20 +000013 {0x02, "FDC37C932", {
14 {NOLDN, NULL,
15 {0x02,0x03,0x20,0x21,0x22,0x23,0x24,0x2d,0x2e,
16 0x2f,EOT},
17 {0x00,0x03,0x02,0x01,0x00,0x00,0x04,NANA,NANA,
18 0x00,EOT}},
19 {0x0, "Floppy",
20 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
21 0xf5,EOT},
22 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
23 0x00,EOT}},
24 {0x1, "IDE 1",
25 {0x30,0x60,0x61,0x62,0x63,0x70,EOT},
26 {0x00,0x01,0xf0,0x03,0xf6,0x0e,EOT}},
27 {0x2, "IDE 2",
28 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,EOT},
29 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
30 {0x3, "Parallel port",
31 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
32 {0x00,0x00,0x00,0x00,0x04,0x3c,EOT}},
33 {0x4, "COM1",
34 {0x30,0x60,0x61,0x70,0xf0,EOT},
35 {0x00,0x00,0x00,0x00,0x00,EOT}},
36 {0x5, "COM2",
37 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
38 {0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
39 {0x6, "Real-time clock (RTC)",
40 {0x30,0x70,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,EOT},
41 {0x00,0x00,0x00,0x00,0x00,NANA,MISC,NANA,NANA,EOT}},
42 {0x7, "Keyboard",
43 {0x30,0x70,0x72,EOT},
44 {0x00,0x00,0x00,EOT}},
45 {0x8, "Aux I/O",
46 {0x30,0x60,0x61,0x62,0x63,0xe0,0xe1,0xe2,0xe3,0xe4,
47 0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xf0,
48 0xf1,0xf2,0xf3,0xf4,EOT},
49 {0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,
50 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,
51 0x00,0x00,0x00,MISC,EOT}},
Stefan Reinauer14e22772010-04-27 06:56:47 +000052 {EOT}}},
Uwe Hermann74b29b92007-11-17 17:13:52 +000053 {0x03, "FDC37C93xFR", {
54 /* FIXME: There's another 0x03 but found on port 0x0d/0x0e! */
55 {EOT}}},
Iru Cai7f46fff2017-02-24 15:35:55 +080056 {0x07, "KBC1126", {
57 /*
58 * Found in HP Elitebook 2760p and 8470p.
59 * The registers are taken from the datasheet of KBC1122 which is similar.
60 */
61 {NOLDN, NULL,
62 {0x02,0x03,0x07,0x17,0x20,0x21,0x22,0x23,0x24,0x25,
63 0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,
64 EOT},
65 {0x00,RSVD,0x00,RSVD,0x07,0x00,0x00,0x00,0x04,0x04,
66 MISC,MISC,RSVD,RSVD,RSVD,RSVD,RSVD,RSVD,RSVD,RSVD,
67 EOT}},
68 {0x1, "Power management (PM1)",
69 {0x30,0x60,0x61,EOT},
70 {0x00,0x00,0x00,EOT}},
71 {0x4, "COM1",
72 {0x30,0x60,0x61,0x70,0xf0,EOT},
73 {0x00,0x00,0x00,0x00,0x00,EOT}},
74 {0x5, "COM2 / IRCC",
75 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1,
76 0xf2,0xf7,0xf8,EOT},
77 {0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x02,
78 0x03,0x00,0x00,EOT}},
79 {0x7, "Keyboard",
80 {0x30,0x60,0x61,0x70,0x72,0xf0,EOT},
81 {0x00,0x00,0x60,0x00,0x00,0x00,EOT}},
82 {0x8, "Embedded controller (EC)",
83 {0x30,0x60,0x61,EOT},
84 {0x00,0x00,0x62,EOT}},
85 {0x9, "Mailbox",
86 {0x30,0x60,0x61,EOT},
87 {0x00,0x00,0x00,EOT}},
88 {0xa, "LPC/8051 addressable GPIO (LGPIO)",
89 {0x30,0x60,0x61,EOT},
90 {0x00,0x00,0x00,EOT}},
91 {0xb, "Share flash interface (SFI)",
92 {0x30,0xff,EOT},
93 {0x01,0x0c,EOT}},
94 {0xd, "EC channel 1",
95 {0x30,0x60,0x61,EOT},
96 {0x00,0x00,0x62,EOT}},
97 {0xe, "EC channel 2",
98 {0x30,0x60,0x61,EOT},
99 {0x00,0x00,0x62,EOT}},
100 {0x10, "Infrared CIRCC2.0",
101 {0x30,0x60,0x61,0x70,0x74,0xe0,0xf0,0xf1,0xf2,0xf7,0xf8,EOT},
102 {0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x02,0x03,0x00,0x00,EOT}},
103 {EOT}}},
Uwe Hermann74b29b92007-11-17 17:13:52 +0000104 {0x0a, "FDC37N971", {
Stefan Reinauera12eb6a2008-07-19 14:07:35 +0000105 {NOLDN, NULL,
Uwe Hermannb0ae9762008-10-14 16:34:38 +0000106 {0x02,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
107 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
108 {0x00,0x0a,0x00,0x00,0x00,0x04,0x04,NANA,NANA,0x00,
109 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
Stefan Reinauera12eb6a2008-07-19 14:07:35 +0000110 {0x0, "Floppy",
111 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf3,0xf4,
112 0xf5,EOT},
113 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,RSVD,0x00,
114 0x00,EOT}},
Michael Gold556e6fb2009-06-26 15:25:04 +0000115 {0x1, "Power management (PM1)",
Stefan Reinauera12eb6a2008-07-19 14:07:35 +0000116 {0x30,0x60,0x61,EOT},
117 {0x00,0x00,0x00,EOT}},
118 {0x3, "Parallel port",
119 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
120 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
121 {0x4, "COM1",
122 {0x30,0x60,0x61,0x70,0xf0,EOT},
123 {0x00,0x00,0x00,0x00,0x00,EOT}},
124 {0x5, "COM2",
125 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1,
126 0xf2,0xf7,0xf8,EOT},
127 {0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x02,
128 0x03,0x00,0x00,EOT}},
129 {0x6, "Real-time clock (RTC)",
130 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,EOT},
131 {0x00,0x00,0x70,0x00,0x74,0x00,0x00,NANA,EOT}},
132 {0x7, "Keyboard",
133 {0x30,0x60,0x61,0x70,0x72,0xf0,EOT},
134 {0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
Michael Gold556e6fb2009-06-26 15:25:04 +0000135 {0x8, "Embedded controller (EC)",
Stefan Reinauera12eb6a2008-07-19 14:07:35 +0000136 {0x30,0x60,0x61,EOT},
137 {0x00,0x00,0x62,EOT}},
138 {0x9, "Mailbox",
139 {0x30,0x60,0x61,EOT},
140 {0x00,0x00,0x00,EOT}},
Uwe Hermann74b29b92007-11-17 17:13:52 +0000141 {EOT}}},
142 {0x0b, "FDC37N972", {
Stefan Reinauera12eb6a2008-07-19 14:07:35 +0000143 {NOLDN, NULL,
Uwe Hermannb0ae9762008-10-14 16:34:38 +0000144 {0x02,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
145 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
146 {0x00,0x0b,0x00,0x00,0x00,0x04,0x04,NANA,NANA,0x00,
147 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
Stefan Reinauera12eb6a2008-07-19 14:07:35 +0000148 {0x0, "Floppy",
149 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf3,0xf4,
150 0xf5,EOT},
151 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,RSVD,0x00,
152 0x00,EOT}},
Michael Gold556e6fb2009-06-26 15:25:04 +0000153 {0x1, "Power management (PM1)",
Stefan Reinauera12eb6a2008-07-19 14:07:35 +0000154 {0x30,0x60,0x61,EOT},
155 {0x00,0x00,0x00,EOT}},
156 {0x3, "Parallel port",
157 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
158 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
159 {0x4, "COM1",
160 {0x30,0x60,0x61,0x70,0xf0,EOT},
161 {0x00,0x00,0x00,0x00,0x00,EOT}},
162 {0x5, "COM2",
163 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1,
164 0xf2,0xf7,0xf8,EOT},
165 {0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x02,
166 0x03,0x00,0x00,EOT}},
167 {0x6, "Real-time clock (RTC)",
168 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,EOT},
169 {0x00,0x00,0x70,0x00,0x74,0x00,0x00,NANA,EOT}},
170 {0x7, "Keyboard",
171 {0x30,0x60,0x61,0x70,0x72,0xf0,EOT},
172 {0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
Michael Gold556e6fb2009-06-26 15:25:04 +0000173 {0x8, "Embedded controller (EC)",
Stefan Reinauera12eb6a2008-07-19 14:07:35 +0000174 {0x30,0x60,0x61,EOT},
175 {0x00,0x00,0x62,EOT}},
176 {0x9, "Mailbox",
177 {0x30,0x60,0x61,EOT},
178 {0x00,0x00,0x00,EOT}},
Uwe Hermann74b29b92007-11-17 17:13:52 +0000179 {EOT}}},
Uwe Hermann14f304a2007-10-08 01:11:11 +0000180 {0x0e, "LPC47N252", { /* From sensors-detect */
François-Regis Vuillemin22b44ba2009-06-27 02:23:26 +0000181 {NOLDN, NULL,
182 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
183 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
184 {0x0e,NANA,0x00,0x00,0x04,0x04,NANA,NANA,0x00,
185 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
186 {0x0, "Floppy",
187 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf3,0xf4,
188 0xf5,EOT},
189 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,RSVD,0x00,
190 0x00,EOT}},
191 {0x1, "Power management (PM1)",
192 {0x30,0x60,0x61,EOT},
193 {0x00,0x00,0x00,EOT}},
194 {0x3, "Parallel port",
195 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
196 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
197 {0x4, "COM1",
198 {0x30,0x60,0x61,0x70,0xf0,EOT},
199 {0x00,0x00,0x00,0x00,0x00,EOT}},
200 {0x5, "COM2 / IRCC",
201 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1,
202 0xf2,0xf7,0xf8,EOT},
203 {0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x02,
204 0x03,0x00,0x00,EOT}},
205 {0x6, "Real-time clock (RTC)",
206 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,EOT},
207 {0x00,0x00,0x70,0x00,0x74,0x00,0x00,NANA,EOT}},
208 {0x7, "Keyboard",
209 {0x30,0x60,0x61,0x70,0x72,0xf0,EOT},
210 {0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
211 {0x8, "Embedded controller (EC)",
212 {0x30,0x60,0x61,EOT},
213 {0x00,0x00,0x62,EOT}},
214 {0x9, "Mailbox Interface",
215 {0x30,0x60,0x61,EOT},
216 {0x00,0x00,0x00,EOT}},
217 {0xa, "LPC/8051 addressable GPIO (LGPIO)",
218 {0x30,0x60,0x61,EOT},
219 {0x00,0x00,0x00,EOT}},
Uwe Hermann6ff6af72007-09-18 22:24:34 +0000220 {EOT}}},
Uwe Hermann14f304a2007-10-08 01:11:11 +0000221 {0x14, "LPC47M172", {
222 {EOT}}},
Uwe Hermann74b29b92007-11-17 17:13:52 +0000223 {0x30, "FDC37C93xAPM", {
224 {EOT}}},
Uwe Hermann0446dbb2007-10-08 01:59:46 +0000225 {0x40, "FDC37C67x", { /* E.g. FDC37C672. Chiprev: 0x01 */
Robinson P. Tryon29cbb362007-11-25 21:43:29 +0000226 {NOLDN, NULL,
227 {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x2b,0x2c,
228 0x2d,0x2e,0x2f,EOT},
229 {0x03,0x40,NANA,0x00,0x00,0x04,MISC,MISC,NANA,NANA,
230 NANA,NANA,NANA,EOT}},
231 {0x0, "Floppy",
232 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
233 EOT},
234 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00,
235 EOT}},
236 {0x3, "Parallel port",
237 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
238 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
239 {0x4, "COM1",
240 {0x30,0x60,0x61,0x70,0xf0,EOT},
241 {0x00,0x00,0x00,0x00,0x00,EOT}},
242 {0x5, "COM2",
243 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1,0xf2,
244 EOT},
245 {0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x02,0x03,
246 EOT}},
247 {0x7, "Keyboard",
248 {0x30,0x70,0x72,0xf0,EOT},
249 {0x00,0x00,0x00,0x00,EOT}},
250 {0x8, "Aux I/O",
251 {0x30,0xb4,0xb5,0xb6,0xb7,0xc0,0xc1,0xc2,0xc3,0xc4,
252 0xf1,0xf2,0xf3,0xf4,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,
253 EOT},
254 {0x00,NANA,NANA,NANA,NANA,0x06,0x03,NANA,NANA,NANA,
255 0x00,0x00,0x00,MISC,RSVD,RSVD,RSVD,RSVD,RSVD,RSVD,
256 EOT}},
Uwe Hermann14f304a2007-10-08 01:11:11 +0000257 {EOT}}},
258 {0x42, "FDC37B80x/FDC37M707", {
Uwe Hermann0f867322007-09-24 01:40:09 +0000259 {EOT}}},
Uwe Hermann4c280342007-11-14 00:30:36 +0000260 {0x09, "FDC37N958FR", { /* Found in e.g. Dell Latitude CPi A366XT. */
261 {NOLDN, NULL,
Uwe Hermannb0ae9762008-10-14 16:34:38 +0000262 {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,0x2b,
263 0x2c,0x2d,0x2e,0x2f,EOT},
264 {0x03,0x44,0x00,0x00,0x00,0x04,MISC,MISC,0x00,NANA,
265 NANA,NANA,NANA,NANA,EOT}},
Uwe Hermann4c280342007-11-14 00:30:36 +0000266 {0x0, "Floppy",
267 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
268 EOT},
269 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00,
270 EOT}},
271 {0x3, "Parallel port",
272 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
273 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
274 {0x4, "COM1",
275 {0x30,0x60,0x61,0x70,0xf0,EOT},
276 {0x00,0x00,0x00,0x00,0x00,EOT}},
277 {0x5, "COM2",
278 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1,0xf2,
279 EOT},
280 {NANA,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x02,0x03,
281 EOT}},
282 {0x6, "Real-time clock (RTC)",
283 {0x30,0x62,0x63,0x70,0xf0,EOT},
284 {0x00,0x00,0x70,0x00,0x00,EOT}},
285 {0x7, "Keyboard",
286 {0x30,0x70,0x72,0xf0,EOT},
287 {0x00,0x00,0x00,0x00,EOT}},
288 {0x8, "Aux I/O",
289 {0x30,0xb0,0xb1,0xb2,0xb3,0xb8,0xc0,0xc1,0xc2,0xc3,
290 0xc4,0xc5,0xc6,0xc8,0xca,0xcb,0xcc,0xd0,0xd1,0xd2,
291 0xd3,0xd4,0xd5,0xd6,0xd7,0xe0,0xe1,0xe2,0xe3,0xe4,
292 0xe5,0xe6,0xe7,0xef,0xf0,0xf1,0xf2,0xf3,0xf4,0xf6,
293 0xf9,0xfa,EOT},
294 {0x00,NANA,NANA,NANA,NANA,NANA,NANA,0x01,NANA,NANA,
295 NANA,0x00,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
296 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
297 NANA,NANA,NANA,NANA,NANA,0x00,0x00,0x00,0x00,NANA,
298 NANA,NANA,EOT}},
299 {0xa, "ACPI",
300 {0x30,0x60,0x61,0x70,0xf0,EOT},
301 {0x00,0x00,0x00,NANA,NANA,EOT}},
302 {EOT}}},
Uwe Hermann74b29b92007-11-17 17:13:52 +0000303 {0x43, "FDC37B77x", {
304 {EOT}}},
Uwe Hermann0f867322007-09-24 01:40:09 +0000305 {0x44, "FDC37B78x", {
Robinson P. Tryone1073f12007-10-07 15:04:17 +0000306 {NOLDN, NULL,
Uwe Hermannb0ae9762008-10-14 16:34:38 +0000307 {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,0x2b,
308 0x2c,0x2d,0x2e,0x2f,EOT},
309 {0x03,0x44,0x00,0x00,0x00,0x04,MISC,MISC,0x00,NANA,
310 NANA,NANA,NANA,NANA,EOT}},
Robinson P. Tryone1073f12007-10-07 15:04:17 +0000311 {0x0, "Floppy",
312 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
313 EOT},
314 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00,
315 EOT}},
316 {0x3, "Parallel port",
317 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
318 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
319 {0x4, "COM1",
320 {0x30,0x60,0x61,0x70,0xf0,EOT},
321 {0x00,0x00,0x00,0x00,0x00,EOT}},
322 {0x5, "COM2",
323 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1,0xf2,
324 EOT},
325 {NANA,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x02,0x03,
326 EOT}},
327 {0x6, "Real-time clock (RTC)",
328 {0x30,0x62,0x63,0x70,0xf0,EOT},
329 {0x00,0x00,0x70,0x00,0x00,EOT}},
330 {0x7, "Keyboard",
331 {0x30,0x70,0x72,0xf0,EOT},
332 {0x00,0x00,0x00,0x00,EOT}},
333 {0x8, "Aux I/O",
334 {0x30,0xb0,0xb1,0xb2,0xb3,0xb8,0xc0,0xc1,0xc2,0xc3,
335 0xc4,0xc5,0xc6,0xc8,0xca,0xcb,0xcc,0xd0,0xd1,0xd2,
336 0xd3,0xd4,0xd5,0xd6,0xd7,0xe0,0xe1,0xe2,0xe3,0xe4,
337 0xe5,0xe6,0xe7,0xef,0xf0,0xf1,0xf2,0xf3,0xf4,0xf6,
338 0xf9,0xfa,EOT},
339 {0x00,NANA,NANA,NANA,NANA,NANA,NANA,0x01,NANA,NANA,
340 NANA,0x00,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
341 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
342 NANA,NANA,NANA,NANA,NANA,0x00,0x00,0x00,0x00,NANA,
343 NANA,NANA,EOT}},
344 {0xa, "ACPI",
345 {0x30,0x60,0x61,0x70,0xf0,EOT},
346 {0x00,0x00,0x00,NANA,NANA,EOT}},
Uwe Hermann0f867322007-09-24 01:40:09 +0000347 {EOT}}},
Uwe Hermanna57a0ac2009-09-24 12:17:07 +0000348 {0x46, "FDC37M602", { /* Found in Biostar M6TLD. */
349 {EOT}}},
Uwe Hermann14f304a2007-10-08 01:11:11 +0000350 {0x47, "FDC37M60x", { /* TODO: Not yet in sensors-detect */
351 {EOT}}},
Uwe Hermann0f867322007-09-24 01:40:09 +0000352 {0x4c, "FDC37B72x", {
Robinson P. Tryon8a9c03f2007-10-07 15:12:12 +0000353 {NOLDN, NULL,
Uwe Hermannb0ae9762008-10-14 16:34:38 +0000354 {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,0x2b,
355 0x2c,0x2d,0x2e,0x2f,EOT},
356 {0x03,0x4c,0x00,0x00,0x00,0x04,MISC,MISC,0x00,NANA,
357 NANA,NANA,NANA,NANA,EOT}},
Robinson P. Tryon8a9c03f2007-10-07 15:12:12 +0000358 {0x0, "Floppy",
359 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
360 EOT},
361 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00,
362 EOT}},
363 {0x3, "Parallel port",
364 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
365 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
366 {0x4, "COM1",
367 {0x30,0x60,0x61,0x70,0xf0,EOT},
368 {0x00,0x00,0x00,0x00,0x00,EOT}},
369 {0x5, "COM2",
370 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
371 {NANA,0x00,0x00,0x00,0x00,0x02,0x03,EOT}},
372 {0x7, "Keyboard",
373 {0x30,0x70,0x72,0xf0,EOT},
374 {0x00,0x00,0x00,0x00,EOT}},
375 {0x8, "Aux I/O",
376 {0x30,0xb0,0xb1,0xb2,0xb3,0xb8,0xc0,0xc1,0xc2,0xc3,
377 0xc4,0xc5,0xc6,0xc8,0xca,0xcb,0xcc,0xd0,0xd1,0xd2,
378 0xd3,0xd4,0xd5,0xd6,0xd7,0xe0,0xe1,0xe2,0xe3,0xe4,
379 0xe5,0xe6,0xe7,0xef,0xf0,0xf1,0xf2,0xf3,0xf4,0xf6,
380 0xf9,0xfa,EOT},
381 {0x00,NANA,NANA,NANA,NANA,NANA,0x00,0x01,NANA,NANA,
382 NANA,0x00,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
383 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
384 NANA,NANA,NANA,NANA,NANA,0x00,0x00,0x00,MISC,NANA,
385 NANA,NANA,EOT}},
386 {0xa, "ACPI",
387 {0x30,0x60,0x61,0x70,0xf0,EOT},
388 {0x00,0x00,0x00,NANA,NANA,EOT}},
Uwe Hermann0f867322007-09-24 01:40:09 +0000389 {EOT}}},
David Hendricksb159f7a2011-02-17 00:52:02 +0000390#if 0
391 /* FIXME: FDC37M81x and MEC1308 have conflicting device IDs */
Uwe Hermann0f867322007-09-24 01:40:09 +0000392 {0x4d, "FDC37M81x", {
Robinson P. Tryon87c49992007-10-07 14:33:13 +0000393 {NOLDN, NULL,
Uwe Hermannb0ae9762008-10-14 16:34:38 +0000394 {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x2b,0x2c,
395 0x2d,0x2e,0x2f,EOT},
396 {0x03,0x4d,NANA,0x00,0x00,0x04,MISC,MISC,NANA,NANA,
397 NANA,NANA,NANA,EOT}},
Robinson P. Tryon87c49992007-10-07 14:33:13 +0000398 {0x0, "Floppy",
399 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
400 0xf5,EOT},
401 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
402 0x00,EOT}},
403 {0x3, "Parallel port",
404 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
405 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
406 {0x4, "COM1",
407 {0x30,0x60,0x61,0x70,0xf0,EOT},
408 {0x00,0x00,0x00,0x00,0x00,EOT}},
409 {0x5, "COM2",
410 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,EOT},
411 {0x00,0x00,0x00,RSVD,RSVD,0x00,0x00,0x02,0x03,EOT}},
412 {0x7, "Keyboard",
413 {0x30,0x70,0x72,0xf0,EOT},
414 {0x00,0x00,0x00,0x00,EOT}},
415 {0x8, "Aux I/O",
416 /* Only 0xf6 existing (and reserved) or 0xf6..0xfb? */
417 {0x30,0xb4,0xb5,0xb6,0xb7,0xc0,0xc1,0xc2,0xc3,0xc4,
418 0xc5,0xc6,0xc7,0xc8,0xf1,0xf2,0xf3,0xf4,0xf6,0xf7,
419 0xf8,0xf9,0xfa,0xfb,EOT},
420 {0x00,NANA,NANA,NANA,NANA,0x02,0x01,NANA,NANA,NANA,
421 NANA,NANA,NANA,NANA,0x00,0x00,0x00,0x00,RSVD,RSVD,
422 RSVD,RSVD,RSVD,RSVD,EOT}},
Uwe Hermann0f867322007-09-24 01:40:09 +0000423 {EOT}}},
David Hendricksb159f7a2011-02-17 00:52:02 +0000424#endif
425 {0x4d, "MEC1308", {
426 {NOLDN, NULL,
427 {0x02,0x03,0x07,0x17,0x20,0x21,0x22,0x23,0x24,0x25,
Uwe Hermannc55bcde2011-06-09 20:56:29 +0200428 0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,
David Hendricksb159f7a2011-02-17 00:52:02 +0000429 EOT},
430 {0x00,RSVD,0x00,RSVD,0x4d,0x00,0x00,0x00,0x04,0x04,
431 MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,
432 EOT}},
433 {0x1, "PM1",
434 {0x30,0x60,0x61,EOT},
435 {0x00,0x00,0x00,EOT}},
436 {0x4, "COM1",
437 {0x30,0x60,0x61,0x70,EOT},
438 {0x00,0x00,0x00,0x00,EOT}},
439 {0x7, "KBD",
Uwe Hermannc55bcde2011-06-09 20:56:29 +0200440 {0x30,0x70,0x72,0xf0,EOT},
David Hendricksb159f7a2011-02-17 00:52:02 +0000441 {0x00,0x00,0x00,0x00,EOT}},
442 {0x8, "EC/ACPI",
443 {0x30,0x60,0x61,EOT},
444 {0x00,0x00,0x62,EOT}},
445 {0x9, "Mailbox",
446 {0x30,0x60,0x61,EOT},
447 {0x00,0x00,0x00,EOT}},
448 {0x10, "CIRV",
449 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf3,0xf4,EOT},
450 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
451 {EOT}}},
Uwe Hermann0f867322007-09-24 01:40:09 +0000452 {0x51, "LPC47B27x", {
Uwe Hermannf811ede2007-11-22 03:36:18 +0000453 {NOLDN, NULL,
454 {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,
455 0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
456 {RSVD,0x51,NANA,0x00,0x00,0x04,MISC,MISC,RSVD,
457 NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
458 {0x0, "Floppy",
459 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
460 EOT},
461 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00,
462 EOT}},
463 {0x3, "Parallel port",
464 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
465 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
466 {0x4, "COM1",
467 {0x30,0x60,0x61,0x70,0xf0,EOT},
468 {0x00,0x00,0x00,0x00,0x00,EOT}},
469 {0x5, "COM2",
470 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1,0xf2,
471 EOT},
472 {NANA,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x02,0x03,
473 EOT}},
474 {0x7, "Keyboard",
475 {0x30,0x70,0x72,0xf0,EOT},
476 {0x00,0x00,0x00,0x00,EOT}},
477 {0x9, "Game port",
478 {0x30,0x60,0x61,EOT},
479 {0x00,0x00,0x00,EOT}},
480 {0xa, "Power-management events (PME)",
481 {0x30,0x60,0x61,0xf0,0xf1,EOT},
482 {0x00,0x00,0x00,NANA,NANA,EOT}},
483 {0xb, "MIDI port (MPU-401)",
484 {0x30,0x60,0x61,0x70,EOT},
485 {0x00,0x03,0x30,0x05,EOT}},
Uwe Hermann0f867322007-09-24 01:40:09 +0000486 {EOT}}},
Uwe Hermann14f304a2007-10-08 01:11:11 +0000487 {0x52, "LPC47B37x", {
Uwe Hermann0446dbb2007-10-08 01:59:46 +0000488 {EOT}}},
489 {0x54, "LPC47U33x", {
Michael Gold556e6fb2009-06-26 15:25:04 +0000490 {NOLDN, NULL,
491 {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x2a,0x2b,
492 0x2c,0x2d,0x2e,0x2f,EOT},
493 {RSVD,0x54,NANA,0x00,0x00,0x04,MISC,MISC,NANA,NANA,
494 NANA,NANA,NANA,NANA,EOT}},
495 {0x0, "Floppy",
496 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
497 EOT},
498 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00,
499 EOT}},
500 {0x3, "Parallel port",
501 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
502 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
503 {0x4, "COM1",
504 {0x30,0x60,0x61,0x70,0xf0,EOT},
505 {0x00,0x00,0x00,0x00,0x00,EOT}},
506 {0x5, "MIDI port (MPU-401)",
507 {0x30,0x60,0x61,0x70,EOT},
508 {0x00,0x03,0x30,0x05,EOT}},
509 {0x7, "Keyboard",
510 {0x30,0x70,0x72,0xf0,EOT},
511 {0x00,0x00,0x00,0x00,EOT}},
512 {0x9, "Game port",
513 {0x30,0x60,0x61,EOT},
514 {0x00,0x00,0x00,EOT}},
515 {0xa, "Runtime registers",
516 {0x30,0x60,0x61,0xf0,0xf1,EOT},
517 {0x00,0x00,0x00,NANA,NANA,EOT}},
518 {0xb, "SMBus",
519 {0x30,0x60,0x61,0x70,EOT},
520 {0x00,0x00,0x00,0x00,EOT}},
Uwe Hermann0446dbb2007-10-08 01:59:46 +0000521 {EOT}}},
522 {0x56, "LPC47B34x", {
523 {EOT}}},
524 {0x57, "LPC47S42x", {
525 {EOT}}},
526 {0x59, "LPC47M10x/112/13x", {
Uwe Hermann23740c82007-10-05 15:11:38 +0000527 {NOLDN, NULL,
Uwe Hermannb0ae9762008-10-14 16:34:38 +0000528 {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,0x2a,
529 0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
530 {RSVD,0x59,NANA,0x00,0x00,0x44,MISC,MISC,RSVD,NANA,
531 NANA,NANA,NANA,NANA,NANA,EOT}},
Uwe Hermann23740c82007-10-05 15:11:38 +0000532 {0x0, "Floppy",
533 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
534 0xf5,EOT},
535 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
536 0x00,EOT}},
537 {0x3, "Parallel port",
538 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
539 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
540 {0x4, "COM1",
541 {0x30,0x60,0x61,0x70,0xf0,EOT},
542 {0x00,0x00,0x00,0x00,0x00,EOT}},
543 {0x5, "COM2",
544 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1,
545 0xf2,EOT},
546 {NANA,0x00,0x00,RSVD,RSVD,0x00,RSVD,0x00,0x02,
547 0x03,EOT}},
548 {0x7, "Keyboard",
549 {0x30,0x70,0x72,0xf0,EOT},
550 {0x00,0x00,0x00,0x00,EOT}},
551 {0x9, "Game port",
552 {0x30,0x60,0x61,EOT},
553 {0x00,0x00,0x00,EOT}},
Michael Gold556e6fb2009-06-26 15:25:04 +0000554 {0xa, "Power management events (PME)",
Uwe Hermann23740c82007-10-05 15:11:38 +0000555 {0x30,0x60,0x61,0xf0,0xf1,EOT},
556 {0x00,0x00,0x00,NANA,RSVD,EOT}},
557 {0xb, "MPU-401",
558 {0x30,0x60,0x61,0x70,EOT},
559 {0x00,0x03,0x30,0x05,EOT}},
Uwe Hermann0f867322007-09-24 01:40:09 +0000560 {EOT}}},
Uwe Hermann14f304a2007-10-08 01:11:11 +0000561 {0x5d, "LPC47B357", { /* From sensors-detect (no datasheet) */
562 {EOT}}},
563 {0x5f, "LPC47M14x", {
564 {EOT}}},
565 {0x60, "LPC47M15x/192/997", {
Ulf Jordanc9a677b2007-12-14 20:00:58 +0000566 {NOLDN, NULL,
Uwe Hermannb0ae9762008-10-14 16:34:38 +0000567 {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,0x2a,
568 0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
569 {RSVD,0x60,NANA,0x00,0x00,0x44,MISC,MISC,RSVD,NANA,
570 NANA,NANA,NANA,NANA,NANA,EOT}},
Ulf Jordanc9a677b2007-12-14 20:00:58 +0000571 {0x0, "Floppy",
572 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
573 EOT},
574 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00,
575 EOT}},
576 {0x3, "Parallel port",
577 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
578 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
579 {0x4, "COM1",
580 {0x30,0x60,0x61,0x70,0xf0,EOT},
581 {0x00,0x00,0x00,0x00,0x00,EOT}},
582 {0x5, "COM2 / IR",
583 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
584 {NANA,0x00,0x00,0x00,0x00,0x02,0x03,EOT}},
585 {0x7, "Keyboard",
586 {0x30,0x70,0x72,0xf0,EOT},
587 {0x00,0x00,0x00,0x00,EOT}},
588 {0x9, "Game port",
589 {0x30,0x60,0x61,EOT},
590 {0x00,0x00,0x00,EOT}},
Michael Gold556e6fb2009-06-26 15:25:04 +0000591 {0xa, "Power management events (PME)",
Ulf Jordanc9a677b2007-12-14 20:00:58 +0000592 {0x30,0x60,0x61,0xf0,EOT},
593 {0x00,0x00,0x00,NANA,EOT}},
594 {0xb, "MPU-401",
595 {0x30,0x60,0x61,0x70,EOT},
596 {0x00,0x03,0x30,0x05,EOT}},
Uwe Hermann0f867322007-09-24 01:40:09 +0000597 {EOT}}},
598 {0x62, "LPC47S45x", {
599 {EOT}}},
Uwe Hermanncfb6ac72008-10-01 20:16:58 +0000600 {0x67, "EMC2700LPC", { /* From sensors-detect */
601 {EOT}}},
Uwe Hermann14f304a2007-10-08 01:11:11 +0000602 {0x6b, "LPC47M292", { /* From sensors-detect */
603 {EOT}}},
604 {0x6e, "LPC47B387", { /* TODO: Not yet in sensors-detect */
Uwe Hermanndb5f9532007-10-04 16:28:56 +0000605 /* Found in the HP Compaq Business Desktop d530 Series */
Uwe Hermann59b99d92007-11-29 02:43:50 +0000606 /* http://article.gmane.org/gmane.linux.bios/27192 */
Uwe Hermanndb5f9532007-10-04 16:28:56 +0000607 /* We cannot find a public datasheet for this Super I/O. */
608 {EOT}}},
Uwe Hermann0f867322007-09-24 01:40:09 +0000609 {0x6f, "LPC47B397", {
610 {EOT}}},
Stefan Reinauer6df0c622009-03-11 14:48:20 +0000611 {0x74, "LPC47M182", { /* Only for LD_NUM = 0 */
Uwe Hermann83da8dc2009-03-25 17:38:40 +0000612 {NOLDN, NULL,
Uwe Hermanndb52fb82009-06-26 15:53:07 +0000613 {0x02,0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,
Stefan Reinauer6df0c622009-03-11 14:48:20 +0000614 0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
Uwe Hermanndb52fb82009-06-26 15:53:07 +0000615 {0x00,RSVD,0x74,RSVD,0x00,RSVD,0x44,MISC,0x00,
Stefan Reinauer6df0c622009-03-11 14:48:20 +0000616 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
617 {0x0, "Floppy",
618 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
619 0xf8,EOT},
620 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
621 0x24,EOT}},
622 {0x1, "Parallel port",
623 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf8,EOT},
624 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,0x08,EOT}},
625 {0x2, "COM2",
626 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
627 {0x00,0x00,0x00,0x00,0x00,0x02,0x03,EOT}},
628 {0x3, "COM1",
629 {0x30,0x60,0x61,0x70,0xf0,EOT},
630 {0x00,0x00,0x00,0x00,0x00,EOT}},
Michael Gold556e6fb2009-06-26 15:25:04 +0000631 {0x4, "Power control",
Stefan Reinauer6df0c622009-03-11 14:48:20 +0000632 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
633 {0x00,0x00,0x00,0x00,NANA,0x00,EOT}},
634 {0x5, "Mouse",
635 {0x30,0x70,EOT},
636 {0x00,0x00,EOT}},
637 {0x6, "Keyboard",
638 {0x30,0x70,0xf0,EOT},
639 {0x00,0x00,0x00,EOT}},
640 {0x7, "GPIO",
641 {0x30,0x60,0x61,0x70,0x72,0xf0,EOT},
642 {0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
643 {0xa, "Runtime registers",
644 {0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT},
645 {0x00,0x00,0x00,0x00,0x00,NANA,RSVD,0x04,EOT}},
Uwe Hermann14f304a2007-10-08 01:11:11 +0000646 {EOT}}},
647 {0x76, "LPC47M584", { /* From sensors-detect (no datasheet) */
648 {EOT}}},
Uwe Hermann0f867322007-09-24 01:40:09 +0000649 {0x77, "A8000", { /* ASUS A8000, a rebranded DME1737(?) */
650 {NOLDN, NULL,
Uwe Hermannb0ae9762008-10-14 16:34:38 +0000651 {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,0x2a,
652 0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
653 {RSVD,0x77,NANA,0x00,RSVD,0x44,MISC,MISC,RSVD,NANA,
654 NANA,NANA,NANA,NANA,NANA,EOT}},
Uwe Hermann0f867322007-09-24 01:40:09 +0000655 {0x0, "Floppy",
656 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
657 0xf5,EOT},
658 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
659 0x00,EOT}},
660 {0x3, "Parallel port",
661 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
662 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
663 {0x4, "COM1",
664 {0x30,0x60,0x61,0x70,0xf0,EOT},
665 {0x00,0x00,0x00,0x00,0x00,EOT}},
666 {0x5, "COM2",
667 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
668 {0x00,0x00,0x00,0x00,0x00,0x02,0x03,EOT}},
669 {0x7, "Keyboard",
670 {0x30,0x70,0x72,0xf0,EOT},
671 {0x00,0x00,0x00,0x00,EOT}},
672 {0xa, "Runtime registers",
673 {0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT},
674 {0x00,0x00,0x00,0x00,0x00,NANA,RSVD,0x04,EOT}},
675 {EOT}}},
676 {0x78, "DME1737", {
677 {NOLDN, NULL,
Uwe Hermannb0ae9762008-10-14 16:34:38 +0000678 {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,0x2a,
679 0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
680 {RSVD,0x77,NANA,0x00,RSVD,0x44,MISC,MISC,RSVD,NANA,
681 NANA,NANA,NANA,NANA,NANA,EOT}},
Uwe Hermann0f867322007-09-24 01:40:09 +0000682 {0x0, "Floppy",
683 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
684 0xf5,EOT},
685 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
686 0x00,EOT}},
687 {0x3, "Parallel port",
688 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
689 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
690 {0x4, "COM1",
691 {0x30,0x60,0x61,0x70,0xf0,EOT},
692 {0x00,0x00,0x00,0x00,0x00,EOT}},
693 {0x5, "COM2",
694 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
695 {0x00,0x00,0x00,0x00,0x00,0x02,0x03,EOT}},
696 {0x7, "Keyboard",
697 {0x30,0x70,0x72,0xf0,EOT},
698 {0x00,0x00,0x00,0x00,EOT}},
699 {0xa, "Runtime registers",
700 {0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT},
701 {0x00,0x00,0x00,0x00,0x00,NANA,RSVD,0x04,EOT}},
702 {EOT}}},
Angel Pons49c8de72018-10-07 18:57:21 +0200703 {0x79, "SCH5504", { /* No datasheet, reverse-engineered */
704 {NOLDN, NULL, /* FIXME: Is this correct? */
705 {0x02,0x03,0x21,0x22,0x23,0x24,0x26,0x27,
706 0x28,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
707 {0x00,RSVD,MISC,0x00,0x00,0x04,MISC,0x00,
708 RSVD,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
709 {0x0, "Floppy",
710 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
711 0xf5,EOT},
712 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
713 0x00,EOT}},
714 {0x3, "Parallel port",
715 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
716 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
717 {0x4, "COM1",
718 {0x30,0x60,0x61,0x70,0xf0,EOT},
719 {0x00,0x00,0x00,0x00,0x00,EOT}},
720 {0x5, "COM2",
721 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
722 {0x00,0x00,0x00,0x00,0x00,0x02,0x03,EOT}},
723 {0x7, "Keyboard",
724 {0x30,0x70,0x72,0xf0,EOT},
725 {0x00,0x00,0x00,0x00,EOT}},
726 {0xa, "Runtime registers", /* FIXME: Is this correct? */
727 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
728 {0x00,0x00,0x00,0x00,0x00,RSVD,EOT}},
Uwe Hermann14f304a2007-10-08 01:11:11 +0000729 {EOT}}},
Uwe Hermann2ac37ca2009-05-07 00:21:02 +0000730 {0x7a, "LPC47N217", { /* Found in Toshiba Satellite A80-117. */
Iru Cai1f355172017-05-06 17:46:25 +0800731 {NOLDN, NULL,
732 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,
733 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,
734 0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,
735 0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,
736 0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,0x30,0x31,
737 0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,EOT},
738 {0x28,0x9c,0x08,0x70,0x00,0x00,0xff,0x00,RSVD,0x00,
739 0x00,0x00,0x02,0x7a,NANA,0x00,0x00,0x00,MISC,0x00,
740 NANA,NANA,NANA,0x03,RSVD,RSVD,RSVD,RSVD,RSVD,RSVD,
741 RSVD,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
742 0x00,0x80,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,
743 0x00,0x00,0x00,0x00,RSVD,0x00,0x00,0x80,EOT}},
Uwe Hermann14f304a2007-10-08 01:11:11 +0000744 {EOT}}},
Uwe Hermann14f304a2007-10-08 01:11:11 +0000745 {0x7c, "SCH3112", {
Mark Norman1866e9c2011-06-18 10:24:36 +0930746 {NOLDN, NULL,
Angel Ponsfa6ff60c2018-09-28 21:03:47 +0200747 {0x02,0x03,0x19,0x21,0x22,0x23,0x24,0x25,0x26,0x27,
Mark Norman1866e9c2011-06-18 10:24:36 +0930748 0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
Angel Ponsfa6ff60c2018-09-28 21:03:47 +0200749 {0x00,RSVD,RSVD,MISC,0x00,RSVD,0x44,RSVD,MISC,MISC,
Mark Norman1866e9c2011-06-18 10:24:36 +0930750 RSVD,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
751 {0x0, "Floppy",
752 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
753 0xf5,EOT},
754 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
755 0x00,EOT}},
756 {0x3, "Parallel port",
757 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
758 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
759 {0x4, "COM1",
760 {0x30,0x60,0x61,0x70,0xf0,EOT},
761 {0x00,0x00,0x00,0x00,0x00,EOT}},
762 {0x5, "COM2",
763 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
764 {0x00,0x00,0x00,0x00,0x00,0x02,0x03,EOT}},
765 {0x7, "Keyboard",
766 {0x30,0x70,0x72,0xf0,EOT},
767 {0x00,0x00,0x00,0x00,EOT}},
768 {0xa, "Runtime registers",
769 {0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT},
Angel Ponsfa6ff60c2018-09-28 21:03:47 +0200770 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,EOT}},
771 {EOT}}},
772 {0x7d, "SCH3114", {
773 {NOLDN, NULL,
774 {0x02,0x03,0x19,0x21,0x22,0x23,0x24,0x25,0x26,0x27,
775 0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
776 {0x00,RSVD,RSVD,MISC,0x00,RSVD,0x44,RSVD,MISC,MISC,
777 RSVD,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
778 {0x0, "Floppy",
779 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
780 0xf5,EOT},
781 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
782 0x00,EOT}},
783 {0x3, "Parallel port",
784 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
785 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
786 {0x4, "COM1",
787 {0x30,0x60,0x61,0x70,0xf0,EOT},
788 {0x00,0x00,0x00,0x00,0x00,EOT}},
789 {0x5, "COM2",
790 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
791 {0x00,0x00,0x00,0x00,0x00,0x02,0x03,EOT}},
792 {0x7, "Keyboard",
793 {0x30,0x70,0x72,0xf0,EOT},
794 {0x00,0x00,0x00,0x00,EOT}},
795 {0xa, "Runtime registers",
796 {0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT},
797 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,EOT}},
Mark Norman1866e9c2011-06-18 10:24:36 +0930798 {0xb, "COM3",
799 {0x30,0x60,0x61,0x70,0xf0,EOT},
800 {0x00,0x00,0x00,0x00,0x00,EOT}},
801 {0xc, "COM4",
802 {0x30,0x60,0x61,0x70,0xf0,EOT},
803 {0x00,0x00,0x00,0x00,0x00,EOT}},
Uwe Hermann14f304a2007-10-08 01:11:11 +0000804 {EOT}}},
805 {0x7f, "SCH3116", {
Angel Ponsfa6ff60c2018-09-28 21:03:47 +0200806 {NOLDN, NULL,
807 {0x02,0x03,0x19,0x21,0x22,0x23,0x24,0x25,0x26,0x27,
808 0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
809 {0x00,RSVD,RSVD,MISC,0x00,RSVD,0x44,RSVD,MISC,MISC,
810 RSVD,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
811 {0x0, "Floppy",
812 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
813 0xf5,EOT},
814 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
815 0x00,EOT}},
816 {0x3, "Parallel port",
817 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
818 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
819 {0x4, "COM1",
820 {0x30,0x60,0x61,0x70,0xf0,EOT},
821 {0x00,0x00,0x00,0x00,0x00,EOT}},
822 {0x5, "COM2",
823 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
824 {0x00,0x00,0x00,0x00,0x00,0x02,0x03,EOT}},
825 {0x7, "Keyboard",
826 {0x30,0x70,0x72,0xf0,EOT},
827 {0x00,0x00,0x00,0x00,EOT}},
828 {0xa, "Runtime registers",
829 {0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT},
830 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,EOT}},
831 {0xb, "COM3",
832 {0x30,0x60,0x61,0x70,0xf0,EOT},
833 {0x00,0x00,0x00,0x00,0x00,EOT}},
834 {0xc, "COM4",
835 {0x30,0x60,0x61,0x70,0xf0,EOT},
836 {0x00,0x00,0x00,0x00,0x00,EOT}},
837 {0xd, "COM5",
838 {0x30,0x60,0x61,0x70,0xf0,EOT},
839 {0x00,0x00,0x00,0x00,0x00,EOT}},
840 {0xe, "COM6",
841 {0x30,0x60,0x61,0x70,0xf0,EOT},
842 {0x00,0x00,0x00,0x00,0x00,EOT}},
Uwe Hermann14f304a2007-10-08 01:11:11 +0000843 {EOT}}},
Uwe Hermann0f867322007-09-24 01:40:09 +0000844 {0x81, "SCH5307", {
845 {EOT}}},
Uwe Hermanncfb6ac72008-10-01 20:16:58 +0000846 {0x83, "SCH5514D", { /* From sensors-detect */
847 {EOT}}},
Angel Ponsfa6ff60c2018-09-28 21:03:47 +0200848 {0x86, "SCH5127", { /* From sensors-detect, dump from datasheet */
849 {NOLDN, NULL,
850 {0x02,0x03,0x21,0x22,0x23,0x24,0x26,0x27,
851 0x28,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
852 {0x00,RSVD,MISC,0x00,0x00,0x44,MISC,0x00,
853 RSVD,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
854 {0x0, "Floppy",
855 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
856 0xf5,EOT},
857 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
858 0x00,EOT}},
859 {0x3, "Parallel port",
860 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
861 {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
862 {0x4, "COM1",
863 {0x30,0x60,0x61,0x70,0xf0,EOT},
864 {0x00,0x00,0x00,0x00,0x00,EOT}},
865 {0x5, "COM2",
866 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
867 {0x00,0x00,0x00,0x00,0x00,0x02,0x03,EOT}},
868 {0x7, "Keyboard",
869 {0x30,0x70,0x72,0xf0,EOT},
870 {0x00,0x00,0x00,0x00,EOT}},
871 {0xa, "Runtime registers",
872 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
873 {0x00,0x00,0x00,0x00,0x00,RSVD,EOT}},
Uwe Hermann14f304a2007-10-08 01:11:11 +0000874 {EOT}}},
Uwe Hermannbb33e4a2008-04-23 09:27:18 +0000875 {0x89, "SCH5027", { /* From sensors-detect (no public datasheet) */
876 {EOT}}},
Uwe Hermanncfb6ac72008-10-01 20:16:58 +0000877 {0x8c, "SCH5317", { /* From sensors-detect */
878 /* The SCH5317 can have either 0x85 or 0x8c as device ID. */
879 {EOT}}},
Uwe Hermann14f304a2007-10-08 01:11:11 +0000880 {0x90, "SCH4307", { /* From sensors-detect */
881 {EOT}}},
882
883 /* The following Super I/Os use the 0x0d/0x0e ID registers. */
884 {0x03, "FDC37C669", {
885 /* Init: 0x55, 0x55. Exit: 0xaa. Ports: 0x3f0/0x370. */
886 /* Chiprev: 0x02. */
Uwe Hermann74b29b92007-11-17 17:13:52 +0000887 /* FIXME: There's another 0x03 but found on port 0x20/0x21! */
Uwe Hermann14f304a2007-10-08 01:11:11 +0000888 {EOT}}},
889 {0x04, "FDC37C669FR", { /* TODO: Not yet in sensors-detect. */
890 /* Init: 0x55, 0x55. Exit: 0xaa. Ports: 0x3f0/0x370. */
891 {EOT}}},
Uwe Hermann74b29b92007-11-17 17:13:52 +0000892 {0x13, "LPC47N237", {
893 /* Init: 0x55. Exit: 0xaa. Ports: 0x2e/0x4e. */
894 {EOT}}},
Uwe Hermann14f304a2007-10-08 01:11:11 +0000895 {0x28, "FDC37N769", {
896 /* Init: 0x55. Exit: 0xaa. Ports: 0x3f0/0x370. */
897 {NOLDN, NULL,
898 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,
899 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,
900 0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,
901 0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,
902 0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
903 {0x28,0x9c,0x88,0x70,0x00,0x00,0xff,0x00,0x00,0x00,
904 0x00,0x00,0x02,0x28,NANA,0x00,0x00,0x80,RSVD,RSVD,
905 NANA,NANA,NANA,0x03,RSVD,RSVD,RSVD,RSVD,RSVD,RSVD,
906 0x80,0x00,0x3c,RSVD,RSVD,0x00,0x00,0x00,0x00,0x00,
907 0x00,0x00,RSVD,0x00,0x00,0x03,0x00,0x00,EOT}},
908 {EOT}}},
Uwe Hermann74b29b92007-11-17 17:13:52 +0000909 {0x29, "FDC37N3869/FDC37N869", {
910 /* Init: 0x55. Exit: 0xaa. Ports: 0x3f0/0x370. */
911 {EOT}}},
Uwe Hermann14f304a2007-10-08 01:11:11 +0000912 {0x5a, "LPC47N227", {
913 /* Init: 0x55. Exit: 0xaa. Ports: 0x2e/0x4e. */
Stefan Reinauer45c15562007-10-13 17:06:21 +0000914 {NOLDN, NULL,
915 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,
916 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,
917 0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,
918 0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,
919 0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,0x30,0x31,
920 0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,EOT},
921 {0x28,0x9c,0x08,0x70,0x00,0x00,0xff,0x00,RSVD,0x00,
922 0x00,0x00,0x02,0x5a,NANA,0x00,0x00,0x80,MISC,0x00,
923 NANA,NANA,NANA,0x03,RSVD,RSVD,RSVD,RSVD,RSVD,RSVD,
924 RSVD,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
925 0x00,0x80,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,
926 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,EOT}},
Uwe Hermann14f304a2007-10-08 01:11:11 +0000927 {EOT}}},
Stefan Reinauera3f05792008-07-19 14:42:21 +0000928 {0x5b, "SIO10N268", {
929 /* Init: 0x55. Exit: 0xaa. Ports: 0x2e/0x4e. */
930 {NOLDN, NULL,
Stefan Reinauer67b35cb12008-08-15 09:46:55 +0000931 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,
Stefan Reinauera3f05792008-07-19 14:42:21 +0000932 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,
933 0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,
934 0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,
935 0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,0x30,0x31,
936 0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,
937 0x3c,0x3d,0x3e,0x3f,0x40,0x41,0x42,0x43,0x44,0x45,
938 0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,
939 0x50,0x51,0x52,0x53,0x54,EOT},
940 {0x20,0x98,0x00,0x70,0x00,0x00,0xff,0x00,0x00,0x00,
941 0x00,0x00,0x02,0x5b,NANA,0x00,0x00,0x00,MISC,0x00,
942 NANA,NANA,NANA,0x03,0x00,NANA,NANA,0x00,0x00,0x00,
943 NANA,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0xff,0x00,
944 0x00,0x80,0x00,0x00,0x0f,0x03,0x00,0x00,0x00,NANA,
945 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,0x00,0x00,
946 0x00,0x00,0x00,0x00,NANA,NANA,NANA,NANA,NANA,0x50,
947 NANA,0x00,NANA,NANA,NANA,NANA,NANA,NANA,0x00,0x01,
948 0x00,0x01,0x00,0x8c,MISC,EOT}},
949 {EOT}}},
Uwe Hermann14f304a2007-10-08 01:11:11 +0000950 {0x65, "FDC37C665GT/IR", {
951 /* Init: 0x55, 0x55. Exit: 0xaa. Port: 0x3f0. */
952 /* Chiprev: 0x02 = FDC37C665GT, 0x82 = FDC37C665IR */
953 {EOT}}},
954 {0x66, "FDC37C666GT", {
955 /* Init: 0x55, 0x55. Exit: 0xaa. Port: 0x3f0. Chiprev: 0x02. */
956 {EOT}}},
Alexander Couzens3b8deee2017-06-16 14:45:08 +0200957 {0xc4, "SCH5545", {
958 /* based on SCH5627 datasheet */
959 /* Init: 0x55. Exit: 0xaa. */
960 {0x7, "COM1",
961 {0x30, 0xf0, EOT},
962 {0x00, 0x00, EOT}},
963 {0x0c, "LPC Interface",
964 {0x30,
965 /* IRQ config */
966 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
967 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
968 /* DMA Channel 0 - 7 */
969 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
970 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
971 /* BAR configuration port */
972 0x60, 0x61, 0x62, 0x63,
973 /* BAR EMI */
974 0x64, 0x65, 0x66, 0x67,
975 /* BAR UART1 */
976 0x68, 0x69, 0x6a, 0x6b,
977 /* BAR UART2 */
978 0x6c, 0x6d, 0x6e, 0x6f,
979 /* BAR Runtime Registers */
980 0x70, 0x71, 0x72, 0x73,
981 /* BAR 8042 */
982 0x78, 0x79, 0x7a, 0x7b,
983 /* BAR Floppy Disk Controller */
984 0x7c, 0x7d, 0x7e, 0x7f,
985 /* BAR Parallel Port */
986 0x80, 0x81, 0x82, 0x83,
987 EOT},
988 {EOT}},
989 {EOT}}},
Uwe Hermann6ff6af72007-09-18 22:24:34 +0000990 {EOT}
991};
992
Uwe Hermann3acf31e2007-09-19 01:55:35 +0000993static void enter_conf_mode_smsc(uint16_t port)
Uwe Hermann25a6c0f2007-09-19 00:48:42 +0000994{
Uwe Hermann14f304a2007-10-08 01:11:11 +0000995 /* Some of the SMSC Super I/Os have an 0x55,0x55 init, some only
996 * require one 0x55. We do 0x55,0x55 for all of them at the moment,
997 * in the assumption that the extra 0x55 won't hurt the other
998 * Super I/Os. This is verified to be true on (at least) the FDC37N769.
999 */
Andriy Gaponb64aa602008-10-28 22:13:38 +00001000 OUTB(0x55, port);
1001 OUTB(0x55, port);
Uwe Hermann25a6c0f2007-09-19 00:48:42 +00001002}
1003
Uwe Hermann3acf31e2007-09-19 01:55:35 +00001004static void exit_conf_mode_smsc(uint16_t port)
Uwe Hermann25a6c0f2007-09-19 00:48:42 +00001005{
Andriy Gaponb64aa602008-10-28 22:13:38 +00001006 OUTB(0xaa, port);
Uwe Hermann25a6c0f2007-09-19 00:48:42 +00001007}
1008
Uwe Hermann5f45fc22007-09-28 15:02:17 +00001009static void probe_idregs_smsc_helper(uint16_t port, uint8_t idreg,
1010 uint8_t revreg)
Uwe Hermann6ff6af72007-09-18 22:24:34 +00001011{
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +00001012 uint8_t id, rev;
Uwe Hermann83da8dc2009-03-25 17:38:40 +00001013 uint16_t runtime_base;
Uwe Hermann8b8d0392007-10-04 15:23:38 +00001014 const char *info = (idreg == 0x20) ? "(idregs=0x20/0x21) "
1015 : "(idregs=0x0d/0x0e) ";
1016
1017 probing_for("SMSC", info, port);
Uwe Hermann6ff6af72007-09-18 22:24:34 +00001018
Uwe Hermann25a6c0f2007-09-19 00:48:42 +00001019 enter_conf_mode_smsc(port);
Uwe Hermann6ff6af72007-09-18 22:24:34 +00001020
Uwe Hermann5f45fc22007-09-28 15:02:17 +00001021 id = regval(port, idreg);
1022 rev = regval(port, revreg);
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +00001023
1024 if (superio_unknown(reg_table, id)) {
Uwe Hermann8b8d0392007-10-04 15:23:38 +00001025 if (verbose)
1026 printf(NOTFOUND "id=0x%02x, rev=0x%02x\n", id, rev);
Uwe Hermann07024692007-09-20 22:13:48 +00001027 exit_conf_mode_smsc(port);
Uwe Hermann6ff6af72007-09-18 22:24:34 +00001028 return;
1029 }
1030
Jonathan A. Kollasch522e9e92011-11-07 10:43:05 -06001031 /* Infineon TPM causes false match of FDC37N972 */
1032 if (idreg == DEVICE_ID_REG && revreg == DEVICE_REV_REG &&
1033 id == 0x0b && rev == 0x00) {
1034 /* Infineon sets config port in 0x27:0x26, but SMSC does not */
1035 if (((regval(port, 0x27)<<8)|regval(port, 0x26)) == port) {
1036 if (verbose)
1037 printf(NOTFOUND "id=0x%02x, rev=0x%02x\n",
1038 id, rev);
1039 exit_conf_mode_smsc(port);
1040 return;
1041 }
1042 }
1043
Uwe Hermann8b8d0392007-10-04 15:23:38 +00001044 printf("Found %s %s (id=0x%02x, rev=0x%02x) at 0x%x\n",
Uwe Hermann0f867322007-09-24 01:40:09 +00001045 (id == 0x77 ? "ASUS" : "SMSC"), get_superio_name(reg_table, id),
1046 id, rev, port);
Uwe Hermanne9d46162007-10-07 20:01:23 +00001047 chip_found = 1;
Uwe Hermann6ff6af72007-09-18 22:24:34 +00001048
Stefan Reinauer7a51e502008-12-01 14:18:57 +00001049 dump_superio((id == 0x77 ? "ASUS" : "SMSC"), reg_table, port, id,
1050 LDN_SEL);
Uwe Hermann6ff6af72007-09-18 22:24:34 +00001051
Stefan Reinauer6df0c622009-03-11 14:48:20 +00001052 if (extra_dump) {
Stefan Reinauer6df0c622009-03-11 14:48:20 +00001053 switch (id) {
Uwe Hermann83da8dc2009-03-25 17:38:40 +00001054 case 0x5a: /* LPC47N227 */
Stefan Reinauer6df0c622009-03-11 14:48:20 +00001055 runtime_base = regval(port, 0x30) << 4;
1056 if (runtime_base)
1057 dump_io(runtime_base, 16);
1058 else
Uwe Hermann83da8dc2009-03-25 17:38:40 +00001059 printf("Runtime Register Block not mapped on this Super I/O.\n");
Stefan Reinauer6df0c622009-03-11 14:48:20 +00001060 break;
Alexander Couzens3b8deee2017-06-16 14:45:08 +02001061 case 0xc4: /* SMSC5545 */
1062 /* choose LPC interface */
1063 regwrite(port, LDN_SEL, 0x0c);
1064 runtime_base = regval(port, 0x73) << 8;
1065 runtime_base |= regval(port, 0x72);
1066 dump_io(runtime_base, 0x34);
1067 break;
Stefan Reinauer6df0c622009-03-11 14:48:20 +00001068 default:
Uwe Hermann83da8dc2009-03-25 17:38:40 +00001069 printf("No extra registers known for this chip.\n");
Stefan Reinauer6df0c622009-03-11 14:48:20 +00001070 }
1071 }
1072
Uwe Hermann25a6c0f2007-09-19 00:48:42 +00001073 exit_conf_mode_smsc(port);
Uwe Hermann6ff6af72007-09-18 22:24:34 +00001074}
1075
Uwe Hermann5f45fc22007-09-28 15:02:17 +00001076void probe_idregs_smsc(uint16_t port)
1077{
1078 probe_idregs_smsc_helper(port, DEVICE_ID_REG, DEVICE_REV_REG);
1079 probe_idregs_smsc_helper(port, DEVICE_ID_REG_OLD, DEVICE_REV_REG_OLD);
1080}
Robinson P. Tryon552cfb72008-01-15 22:30:55 +00001081
1082void print_smsc_chips(void)
1083{
1084 print_vendor_chips("SMSC", reg_table);
Uwe Hermann83da8dc2009-03-25 17:38:40 +00001085 printf("SMSC LPC47N227 runtime register block\n\n");
Robinson P. Tryon552cfb72008-01-15 22:30:55 +00001086}