mb/google/poppy/variants/nocturne: remove dup'ed dptf_enable
[coreboot.git] / util / superiotool / ite.c
blob1eccb64475a17fdbb363ded225894551884e6ab8
1 /*
2 * This file is part of the superiotool project.
4 * Copyright (C) 2007 Carl-Daniel Hailfinger
5 * Copyright (C) 2007-2008 Uwe Hermann <uwe@hermann-uwe.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.
18 #include "superiotool.h"
20 #define CHIP_ID_BYTE1_REG 0x20
21 #define CHIP_ID_BYTE2_REG 0x21
22 #define CHIP_VERSION_REG 0x22
23 #define ISA_PNP_ADDR 0x279
25 static const struct superio_registers reg_table[] = {
26 {0x8228, "IT8228E", {
27 {EOT}}},
28 {0x8500, "IT8500B/E", {
29 {NOLDN, NULL,
30 {0x20,0x21,0x22,0x23,0x25,0x2d,0x2e,0x2f,0x30,EOT},
31 {0x85,0x00,0x01,0x01,0x00,0x00,NANA,NANA,0x00,EOT}},
32 {0x04, "System Wake-Up Control (SWUC)",
33 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
34 {0x00,0x00,0x00,0x00,0x00,0x00,0x01,EOT}},
35 {0x05, "KBC/Mouse Interface",
36 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
37 {0x00,0x00,0x00,0x00,0x00,0x0c,0x01,EOT}},
38 {0x06, "KBC/Keyboard Interface",
39 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
40 {0x00,0x00,0x60,0x00,0x64,0x01,0x01,EOT}},
41 {0x0f, "Shared Memory/Flash Interface (SMFI)",
42 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf4,EOT},
43 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,NANA,EOT}},
44 {0x10, "BRAM",
45 {0x30,0x62,0x63,0x70,0x71,0xf3,0xf4,0xf5,EOT},
46 {0x00,0x00,0x72,0x08,0x01,NANA,NANA,NANA,EOT}},
47 {0x11, "Power Management I/F Channel 1 (PMC1)",
48 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
49 {0x00,0x00,0x62,0x00,0x66,0x01,0x01,EOT}},
50 {0x12, "Power Management I/F Channel 2 (PMC2)",
51 {0x30,0x60,0x61,0x62,0x63,0x64,0x65,0x70,0x71,0xf0,EOT},
52 {0x00,0x00,0x68,0x00,0x6c,0x00,0x00,0x01,0x01,NANA,EOT}},
53 {EOT}}},
54 {0x8502, "IT8502E/TE/G", {
55 {NOLDN, NULL,
56 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,
57 0x2A,0x2B,0x2C,0x2D,0x2E,EOT},
58 {0x85,0x02,0x71,0x01,NANA,0x00,0x00,NANA,NANA,NANA,
59 NANA,NANA,NANA,0x00,NANA,EOT}},
60 {0x1, "UART1",
61 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
62 {0x00,0x03,0xf8,0x00,0x00,0x04,0x02,0x00,EOT}},
63 {0x4, "System Wake-Up",
64 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
65 {0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,EOT}},
66 {0x5, "Mouse",
67 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
68 {0x01,0x00,0x00,0x00,0x00,0x0C,0x01,NANA,EOT}},
69 {0x6, "Keyboard",
70 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
71 {0x01,0x00,0x60,0x00,0x64,0x01,0x01,NANA,EOT}},
72 {0xf, "Shared Memory/Flash",
73 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf4,0xf5,
74 0xf6,EOT},
75 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
76 0x00,EOT}},
77 {0x10, "BRAM",
78 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf3,0xf4,
79 0xf5,EOT},
80 {0x00,0x00,0x70,0x00,0x72,0x08,0x01,NANA,NANA,
81 NANA,EOT}},
82 {0x11, "Power Channel 1",
83 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
85 {0x00,0x00,0x62,0x00,0x66,0x01,0x01,EOT}},
86 {0x12, "Power Channel 2",
87 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
88 {0x00,0x00,0x68,0x00,0x6c,0x01,0x01,EOT}},
89 {0x17, "Power Channel 3",
90 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
91 {0x00,0x00,0x6a,0x00,0x6e,0x01,0x01,EOT}},
92 {EOT}}},
93 {0x8510, "IT8510E/TE/G", {
94 {NOLDN, "Chip ID",
95 {0x20,0x21, EOT},
96 {0x85,0x10, EOT}},
97 {NOLDN, "Chip Version",
98 {0x22,EOT},
99 {0x21,EOT}},
100 {NOLDN, "Super I/O Control Reigster (SIOCTRL)",
101 {0x23,EOT},
102 {0x01,EOT}},
103 {NOLDN, "Super I/O Configuration Register (SIOIRQ)",
104 {0x25,EOT},
105 {0x00,EOT}},
106 {NOLDN, "Super I/O General Purpose Register (SIOGP)",
107 {0x26,EOT},
108 {0x00,EOT}},
109 {NOLDN, "Super I/O Power Mode Register (SIOPWR)",
110 {0x2d,EOT},
111 {0x00,EOT}},
112 {NOLDN, "Logical Device Activate Register (LDA)",
113 {0x30,EOT},
114 {0x00,EOT}},
115 {NOLDN, "I/O Port Base Address for Descriptor 0 (IOBAD0)",
116 {0x60,0x61,EOT},
117 {NANA,NANA,EOT}},
118 {NOLDN, "I/O Port Base Address for Descriptor 1 (IOBAD1)",
119 {0x62,0x63,EOT},
120 {NANA,NANA,EOT}},
121 {NOLDN, "Interupt Request Number and Wake-Up on IRQ Enable (IRQNUMX)",
122 {0x70,EOT},
123 {NANA,EOT}},
124 {NOLDN, "Interrupt Request Type Select (IRQTP)",
125 {0x71,EOT},
126 {NANA,EOT}},
127 {NOLDN, "DMA Channel Select 0 (DMAS0)",
128 {0x74,EOT},
129 {0x04,EOT}},
130 {NOLDN, "DMA Channel Select 1 (DMAS1)",
131 {0x75,EOT},
132 {0x04,EOT}},
133 {0x4, "System Wakup-Up (SWUC)",
134 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
135 {0x00,0x00,0x00,0x00,0x00,0x00,0x03,EOT}},
136 {0x5, "Keyboard/Mouse",
137 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
138 {0x00,0x00,0x00,0x00,0x00,0x0c,0x03,EOT}},
139 {0x6, "Keyboard/Mouse",
140 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
141 {0x00,0x00,0x60,0x00,0x64,0x01,0x03,EOT}},
142 {0xf, "Shared Memory/Flash Interface (SMFI)",
143 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf4,0xf5,0xf6,0xf7,0xf8,EOT},
144 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
145 {0x10, "Real Time Clock (RTC)",
146 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,0xf1,0xf2,EOT},
147 {0x00,0x00,0x70,0x00,0x72,0x08,0x00,0x00,0x49,0x4a,EOT}},
148 {0x11, "Power Management Interface Channel 1",
149 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
150 {0x00,0x00,0x62,0x00,0x66,0x01,0x03,EOT}},
151 {0x12, "Power Management Interface Channel 2",
152 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
153 {0x00,0x00,0x68,0x00,0x6c,0x01,0x03,EOT}},
154 {EOT}}},
155 {0x8511, "IT8511E/TE/G", {
156 {NOLDN, NULL,
157 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,
158 0x2A,0x2B,0x2C,0x2D,0x2E,EOT},
159 {0x85,0x11,0x10,0x01,NANA,0x00,0x00,NANA,NANA,NANA,
160 NANA,NANA,NANA,0x00,NANA,EOT}},
161 {0x4, "System Wake-Up",
162 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
163 {0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,EOT}},
164 {0x5, "Mouse",
165 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
166 {0x01,0x00,0x00,0x00,0x00,0x0C,0x03,NANA,EOT}},
167 {0x6, "Keyboard",
168 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
169 {0x01,0x00,0x60,0x00,0x64,0x01,0x03,NANA,EOT}},
170 {0xf, "Shared Memory/Flash",
171 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf4,0xf5,
172 0xf6,EOT},
173 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
174 0x00,EOT}},
175 {0x10, "Real-Time Clock",
176 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,0xf1,
177 0xf2,0xf3,0xf4,0xf5,EOT},
178 {0x00,0x00,0x70,0x00,0x72,0x08,0x00,0x00,0x49,
179 0x4A,NANA,NANA,NANA,EOT}},
180 {0x11, "Power Channel 1",
181 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
182 {0x00,0x00,0x62,0x00,0x66,0x01,0x03,EOT}},
183 {0x12, "Power Channel 2",
184 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
185 {0x00,0x00,0x68,0x00,0x6c,0x01,0x03,EOT}},
186 {EOT}}},
187 {0x8512, "IT8512E/F/G", {
188 {NOLDN, NULL,
189 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,
190 0x2A,0x2B,0x2C,0x2D,0x2E,EOT},
191 {0x85,0x12,0x22,0x01,NANA,0x00,0x00,NANA,NANA,NANA,
192 NANA,NANA,NANA,0x00,NANA,EOT}},
193 {0x4, "System Wake-Up",
194 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
195 {0x00,0x00,0x00,0x00,0x00,0x00,0x03,EOT}},
196 {0x5, "Mouse",
197 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
198 {0x00,0x00,0x00,0x00,0x00,0x0C,0x03,NANA,EOT}},
199 {0x6, "Keyboard",
200 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
201 {0x00,0x00,0x60,0x00,0x64,0x01,0x03,NANA,EOT}},
202 {0xf, "Shared Memory/Flash",
203 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf4,0xf5,
204 0xf6,EOT},
205 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
206 0x00,EOT}},
207 {0x10, "BRAM",
208 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf3,0xf4,
209 0xf5,EOT},
210 {0x00,0x00,0x70,0x00,0x72,0x08,0x00,NANA,NANA,
211 NANA,EOT}},
212 {0x11, "Power Channel 1",
213 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
214 {0x00,0x00,0x62,0x00,0x66,0x01,0x03,EOT}},
215 {0x12, "Power Channel 2",
216 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
217 {0x00,0x00,0x68,0x00,0x6c,0x01,0x03,EOT}},
218 {EOT}}},
219 {0x8513, "IT8513E/F/G", {
220 {EOT}}},
221 {0x8516, "IT8516???", {
222 {NOLDN, "Chip ID",
223 {0x20,0x21, EOT},
224 {0x85,0x16, EOT}},
225 {NOLDN, "Chip Version",
226 {0x22,EOT},
227 {0x63,EOT}},
228 {NOLDN, "Super I/O Control Reigster (SIOCTRL)",
229 {0x23,EOT},
230 {0x01,EOT}},
231 {NOLDN, "Super I/O Configuration Register (SIOIRQ)",
232 {0x25,EOT},
233 {0x00,EOT}},
234 {NOLDN, "Super I/O General Purpose Register (SIOGP)",
235 {0x26,EOT},
236 {0x00,EOT}},
237 {NOLDN, "Super I/O Power Mode Register (SIOPWR)",
238 {0x2d,EOT},
239 {0x00,EOT}},
240 {0x01, "UART1",
241 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
242 {0x00,0x03,0xf8,0x00,0x00,0x04,0x02,EOT}},
243 {0x02, "UART2",
244 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
245 {0x00,0x02,0xf8,0x00,0x00,0x04,0x02,EOT}},
246 {0x04, "System Wakup-Up (SWUC)",
247 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
248 {0x00,0x00,0x00,0x00,0x00,0x00,0x01,EOT}},
249 {0x05, "Mouse",
250 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
251 {0x00,0x00,0x00,0x00,0x00,0x0C,0x01,EOT}},
252 {0x06, "Keyboard",
253 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
254 {0x00,0x00,0x60,0x00,0x64,0x01,0x01,EOT}},
255 {0x0f, "Shared Memory/Flash Interface (SMFI)",
256 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,
257 0xf4,0xf5,EOT},
258 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,
259 NANA,NANA,EOT}},
260 {0x10, "BRAM / Real Time Clock (RTC)",
261 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,
262 0xf1,0xf2,0xf3,0xf4,0xf5,EOT},
263 {0x00,0x00,0x70,0x00,0x72,0x08,0x01,
264 NANA,NANA,NANA,NANA,NANA,EOT}},
265 {0x11, "Power Management Interface Channel 1",
266 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
267 {0x00,0x00,0x62,0x00,0x66,0x01,0x01,EOT}},
268 {0x12, "Power Management Interface Channel 2",
269 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
270 {0x00,0x00,0x68,0x00,0x6c,0x01,0x01,EOT}},
271 {0x17, "Power Management Interface Channel 3",
272 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
273 {0x00,0x00,0x6a,0x00,0x6e,0x01,0x01,EOT}},
274 {EOT}}},
275 {0x8623, "IT8623E", {
276 /* Defaults are not specified as no datasheet available */
277 {NOLDN, NULL,
278 {0x20,0x21,0x22,0x23,0x24,0x2b,EOT},
279 {0x86,0x23,0x01,NANA,NANA,NANA,EOT}},
280 {0x0, "Floppy",
281 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
282 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
283 {0x1, "COM1",
284 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
285 {NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
286 {0x2, "COM2",
287 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
288 {NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
289 {0x3, "Parallel port",
290 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,EOT},
291 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
292 {0x4, "Environment controller",
293 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3,
294 0xf4,0xf5,0xf6,EOT},
295 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
296 NANA,NANA,NANA,EOT}},
297 {0x5, "Keyboard",
298 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
299 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
300 {0x6, "Mouse",
301 {0x30,0x70,0x71,0xf0,EOT},
302 {NANA,NANA,NANA,NANA,EOT}},
303 {0x7, "GPIO",
304 {0x25,0x26,0x27,0x28,0x29,0x2a,0x2c,0x60,0x61,0x62,
305 0x63,0x64,0x65,0x70,0x71,0x72,0x73,0x74,0xb0,0xb1,
306 0xb2,0xb3,0xb4,0xb5,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,
307 0xc0,0xc1,0xc2,0xc3,0xc4,0xc8,0xc9,0xca,0xcb,0xcc,
308 0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,0xf0,
309 0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,
310 0xfb,0xfc,0xfd,0xfe,0xff,EOT},
311 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
312 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
313 NANA,NANA,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,NANA,NANA,NANA,NANA,NANA,
316 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
317 NANA,NANA,NANA,NANA,NANA,EOT}},
318 {EOT}}},
319 {0x8661, "IT8661F/IT8770F", {
320 {NOLDN, NULL,
321 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x20,0x21,0x22,
322 0x23,0x24,EOT},
323 {NANA,NANA,NANA,NANA,NANA,NANA,0x00,0x86,0x61,0x00,
324 0x00,0x00,EOT}},
325 {0x0, "Floppy",
326 {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0xf0,EOT},
327 {0x00,0x00,0x03,0xf0,0x06,0x02,0x02,0x00,EOT}},
328 {0x1, "COM1",
329 {0x30,0x31,0x60,0x61,0x70,0x71,0xf0,EOT},
330 {0x00,0x00,0x03,0xf8,0x04,0x02,0x00,EOT}},
331 {0x2, "COM2",
332 {0x30,0x31,0x60,0x61,0x70,0x71,0xf0,EOT},
333 {0x00,0x00,0x02,0xf8,0x03,0x02,0x00,EOT}},
334 {0x3, "Parallel port",
335 {0x30,0x31,0x60,0x61,0x62,0x63,0x70,0x71,0x74,
336 0xf0,EOT},
337 {0x00,0x00,0x03,0x78,0x07,0x78,0x07,0x02,0x03,
338 0x03,EOT}},
339 {0x4, "IR",
340 {0x30,0x31,0x60,0x61,0x62,0x63,0x70,0x71,0x72,0x73,
341 0x74,0x75,0xf0,EOT},
342 {0x00,0x00,0x02,0xe8,0x03,0x00,0x0a,0x02,0x0b,0x02,
343 0x01,0x00,0x00,EOT}},
344 {0x5, "GPIO",
345 {0x25,0x26,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,
346 0x70,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,
347 0xf9,0xfa,0xfb,0xfc,EOT},
348 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
349 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
350 0x00,0x00,0x00,0x00,EOT}},
351 {EOT}}},
352 {0x8673, "IT8673F", {
353 {EOT}}},
354 {0x8681, "IT8671F/IT8687R", {
355 {NOLDN, NULL,
356 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x20,0x21,0x22,
357 0x23,0x24,0x25,0x26,0x2e,0x2f,EOT},
358 {NANA,NANA,NANA,NANA,NANA,NANA,0x00,0x86,0x81,0x00,
359 0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
360 {0x0, "Floppy",
361 {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0xf0,EOT},
362 {0x00,0x00,0x03,0xf0,0x06,0x02,0x02,0x00,EOT}},
363 {0x1, "COM1",
364 {0x30,0x31,0x60,0x61,0x70,0x71,0xf0,EOT},
365 {0x00,0x00,0x03,0xf8,0x04,0x02,0x00,EOT}},
366 {0x2, "COM2",
367 {0x30,0x31,0x60,0x61,0x62,0x63,0x70,0x71,0x72,0x73,
368 0x74,0x75,0xf0,0xf1,EOT},
369 {0x00,0x00,0x02,0xf8,0x03,0x00,0x03,0x02,0x0a,0x02,
370 0x00,0x01,0x00,0x00,EOT}},
371 {0x3, "Parallel port",
372 {0x30,0x31,0x60,0x61,0x62,0x63,0x70,0x71,0x74,
373 0xf0,EOT},
374 {0x00,0x00,0x03,0x78,0x07,0x78,0x07,0x02,0x03,
375 0x03,EOT}},
376 {0x4, "APC",
377 {0x30,0xf0,0xf1,0xf2,0xf4,0xf5,0xf6,EOT},
378 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
379 {0x5, "Keyboard",
380 {0x30,0x31,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
381 {MISC,0x00,0x00,0x60,0x00,0x64,0x01,0x02,0x00,EOT}},
382 {0x6, "Mouse",
383 {0x30,0x70,0x71,0xf0,EOT},
384 {0x00,0x0c,0x02,0x00,EOT}},
385 {0x7, "GPIO",
386 {0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,
387 0x70,0x71,0x72,0x73,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,
388 0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff,
389 0xe0,0xe1,0xe2,0xe3,0xe4,EOT},
390 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
391 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
392 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
393 0x00,0x00,0x00,0x00,0x00,EOT}},
394 {EOT}}},
395 {0x8701, "IT8703F", {
396 {NOLDN, NULL,
397 {0x20,0x21,0x23,0x24,0x26,0x29,0x2a,0x2b,EOT},
398 {0x87,0x00,0x00,0x80,0x00,0x00,0x7c,0xc0,EOT}},
399 {0x0, "Floppy",
400 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf3,0xf4,
401 0xf5,EOT},
402 {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00,
403 0x00,EOT}},
404 {0x1, "Parallel port",
405 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,EOT},
406 {0x00,0x03,0x78,0x00,0x80,0x07,0x03,0x03,EOT}},
407 {0x2, "COM1",
408 {0x30,0x60,0x61,0x70,0xf0,EOT},
409 {0x00,0x03,0xf8,0x04,0x00,EOT}},
410 {0x3, "COM2",
411 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT},
412 {0x00,0x02,0xf8,0x03,0x00,0x00,0x00,0x7f,EOT}},
413 {0x5, "Keyboard",
414 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
415 {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x80,EOT}},
416 {0x6, "Consumer IR",
417 {0x30,0x60,0x61,0x70,EOT},
418 {0x00,0x00,0x00,0x00,EOT}},
419 {0x7, "Game port, MIDI, GPIO set 1",
420 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,EOT},
421 {0x00,0x02,0x01,0x03,0x30,0x00,0xff,0x00,0x00,EOT}},
422 {0x8, "GPIO set 2",
423 {0x30,0xf0,0xf1,0xf2,0xf3,0xf5,EOT},
424 {0x00,0xff,0x00,0x00,0x00,0x00,EOT}},
425 {0x9, "GPIO set 3 and 4",
426 {0x30,0x60,0x61,0xf0,0xf1,0xf2,0xf3,0xf4,EOT},
427 {0x00,0x02,0x90,0xff,0x00,0x00,0x00,0x00,EOT}},
428 {0xa, "ACPI",
429 {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
430 0xf3,0xf4,0xf6,0xf7,0xf9,EOT},
431 {0x00,0x00,0x00,0x00,NANA,NANA,0x00,0x00,0x00,0x00,
432 NANA,NANA,0x00,0x00,0x00,EOT}},
433 {0xc, "GPIO set 5, 6 and 7",
434 {0x30,0x60,0x61,0xf0,0xf3,0xf6,EOT},
435 {0x00,0x03,0x70,0x00,0xff,0xff,EOT}},
436 {EOT}}},
437 {0x8702, "IT8702F", {
438 {EOT}}},
439 {0x8705, "IT8705F/AF / IT8700F", {
440 {NOLDN, NULL,
441 {0x20,0x21,0x22,0x23,0x24,EOT},
442 {0x87,0x05,0x00,0x00,NANA,EOT}},
443 {0x0, "Floppy",
444 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
445 {0x00,0x03,0xf0,0x06,0x02,0x00,0x00,EOT}},
446 {0x1, "COM1",
447 {0x30,0x60,0x61,0x70,0xf0,EOT},
448 {0x00,0x03,0xf8,0x04,0x00,EOT}},
449 {0x2, "COM2",
450 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT},
451 {0x00,0x02,0xf8,0x03,0x00,0x50,0x00,0x7f,EOT}},
452 {0x3, "Parallel port",
453 {0x30,0x60,0x61,0x62,0x63,0x64,0x65,0x70,0x74,
454 0xf0,EOT},
455 {0x00,0x03,0x78,0x07,0x78,0x00,0x80,0x07,0x03,
456 0x03,EOT}},
457 {0x4, "Environment controller",
458 {0x2b,0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,
459 0xf3,0xf4,0xf5,0xf6,EOT},
460 {0x00,0x00,0x02,0x90,0x02,0x30,0x09,0x00,0x00,0x00,
461 0x00,0x00,NANA,NANA,EOT}},
462 {0x5, "GPIO",
463 {0x25,0x26,0x27,0x28,0x29,0x2a,0x60,0x61,0x62,0x63,
464 0x64,0x65,0x70,0x71,0x72,0xb0,0xb1,0xb2,0xb3,0xb4,
465 0xb5,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xc0,0xc1,0xc2,
466 0xc3,0xc4,0xc5,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xd0,
467 0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd8,0xd9,0xda,0xf0,
468 0xf1,0xf2,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,
469 0xfd,0xfe,0xff,EOT},
470 {0x00,0x00,0x00,0xff,0xe0,0xff,0x00,0x00,0x00,0x00,
471 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
472 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
473 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
474 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
475 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
476 0x00,NANA,0x00,EOT}},
477 {0x6, "Game port",
478 {0x30,0x60,0x61,EOT},
479 {0x00,0x02,0x01,EOT}},
480 {0x7, "Consumer IR",
481 {0x30,0x60,0x61,0x70,0xf0,EOT},
482 {0x00,0x03,0x10,0x0b,0x00,EOT}},
483 {0x8, "MIDI port",
484 {0x30,0x60,0x61,0x70,0xf0,EOT},
485 {0x00,0x03,0x00,0x0a,0x00,EOT}},
486 {EOT}}},
487 {0x8706, "IT8706R", { /* TODO: Not yet in sensors-detect */
488 /* This is a "Special General Purpose I/O chip". */
489 {EOT}}},
490 {0x8707, "IT8707F", {
491 {EOT}}},
492 {0x8708, "IT8708F", {
493 {NOLDN, NULL,
494 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,
495 0x2a,0x2e,0x2f,EOT},
496 {0x87,0x08,0x00,0x00,NANA,0x3f,0x00,0xff,0xff,0xff,
497 0xff,0x00,0x00,EOT}},
498 {0x0, "Floppy",
499 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
500 {0x00,0x03,0xf0,0x06,0x02,0x00,0x00,EOT}},
501 {0x1, "COM1",
502 {0x30,0x60,0x61,0x70,0xf0,EOT},
503 {0x00,0x03,0xf8,0x04,0x00,EOT}},
504 {0x2, "COM2",
505 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT},
506 {0x00,0x02,0xf8,0x03,0x00,0x50,0x00,0x7f,EOT}},
507 {0x3, "Parallel port",
508 {0x30,0x60,0x61,0x62,0x63,0x64,0x65,0x70,0x74,
509 0xf0,EOT},
510 {0x00,0x03,0x78,0x07,0x78,0x00,0x80,0x07,0x03,
511 0x03,EOT}},
512 {0x4, "SWC",
513 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
514 0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,EOT},
515 {NANA,NANA,0x00,0x00,0x00,0x00,0x00,0x00,
516 0x00,0x00,0x00,0x00,0x00,NANA,NANA,EOT}},
517 {0x5, "Keyboard",
518 /* Note: 0x30 can actually be 0x00 _or_ 0x01. */
519 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
520 {0x01,0x00,0x60,0x00,0x64,0x01,0x02,0x00,EOT}},
521 {0x6, "Mouse",
522 {0x30,0x70,0x71,0xf0,EOT},
523 {0x00,0x0c,0x02,0x00,EOT}},
524 {0x7, "GPIO",
525 {0x70,0xb0,0xb1,0xb2,0xb3,0xb4,0xb5,0xb8,0xb9,0xba,
526 0xbb,0xbc,0xbd,0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc8,
527 0xc9,0xca,0xcb,0xcc,0xcd,0xd0,0xd1,0xd2,0xd3,0xd4,
528 0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xf0,0xf1,
529 0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,
530 0xfc,EOT},
531 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
532 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
533 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
534 0x00,0x00,NANA,NANA,NANA,NANA,NANA,NANA,0x00,0x00,
535 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,NANA,
536 0x00,EOT}},
537 {0x8, "Game port",
538 {0x30,0x60,0x61,EOT},
539 {0x00,0x02,0x01,EOT}},
540 {0x9, "Consumer IR",
541 {0x30,0x60,0x61,0x70,0xf0,EOT},
542 {0x00,0x03,0x10,0x0b,0x00,EOT}},
543 {0xa, "MIDI port",
544 {0x30,0x60,0x61,0x70,0xf0,EOT},
545 {0x00,0x03,0x00,0x0a,0x00,EOT}},
546 {EOT}}},
547 {0x8710, "IT8710F", { /* TODO: Not yet in sensors-detect */
548 {EOT}}},
549 {0x8711, "IT8711F", { /* 0x8711 is a guess, not found in datasheet. */
550 {EOT}}},
551 {0x8712, "IT8712F", {
552 {NOLDN, NULL,
553 {0x20,0x21,0x22,0x23,0x24,0x2b,EOT},
554 {0x87,0x12,0x08,0x00,0x00,0x00,EOT}},
555 {0x0, "Floppy",
556 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
557 {0x00,0x03,0xf0,0x06,0x02,0x00,0x00,EOT}},
558 {0x1, "COM1",
559 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT},
560 {0x00,0x03,0xf8,0x04,0x00,0x50,0x00,0x7f,EOT}},
561 {0x2, "COM2",
562 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT},
563 {0x00,0x02,0xf8,0x03,0x00,0x50,0x00,0x7f,EOT}},
564 {0x3, "Parallel port",
565 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,EOT},
566 {0x00,0x03,0x78,0x07,0x78,0x07,0x03,0x03,EOT}},
567 {0x4, "Environment controller",
568 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3,
569 0xf4,0xf5,0xf6,EOT},
570 {0x00,0x02,0x90,0x02,0x30,0x09,0x00,0x00,0x00,0x00,
571 0x00,NANA,NANA,EOT}},
572 {0x5, "Keyboard",
573 /* TODO: 0xf0: Error in datasheet? */
574 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
575 {0x01,0x00,0x60,0x00,0x64,0x01,0x02,0x08,EOT}},
576 {0x6, "Mouse",
577 {0x30,0x70,0x71,0xf0,EOT},
578 {0x00,0x0c,0x02,0x00,EOT}},
579 {0x7, "GPIO", /* TODO: 0x72, 0x73: Errors in datasheet? */
580 {0x25,0x26,0x27,0x28,0x29,0x2a,0x2c,0x60,0x61,0x62,
581 0x63,0x64,0x65,0x70,0x71,0x72,0x73,0x74,0xb0,0xb1,
582 0xb2,0xb3,0xb4,0xb5,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,
583 0xc0,0xc1,0xc2,0xc3,0xc4,0xc8,0xc9,0xca,0xcb,0xcc,
584 0xe0,0xe1,0xe2,0xe3,0xe4,0xf0,0xf1,0xf2,0xf3,0xf4,
585 0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,EOT},
586 {0x01,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
587 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,
588 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
589 0x01,0x00,0x00,0x40,0x00,0x01,0x00,0x00,0x40,0x00,
590 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
591 0x00,0x00,0x00,0x00,0x00,0x00,0x00,NANA,0x00,EOT}},
592 {0x8, "MIDI port",
593 {0x30,0x60,0x61,0x70,0xf0,EOT},
594 {0x00,0x03,0x00,0x0a,0x00,EOT}},
595 {0x9, "Game port",
596 {0x30,0x60,0x61,EOT},
597 {0x00,0x02,0x01,EOT}},
598 {0xa, "Consumer IR",
599 {0x30,0x60,0x61,0x70,0xf0,EOT},
600 {0x00,0x03,0x10,0x0b,0x00,EOT}},
601 {EOT}}},
602 {0x8716, "IT8716F", {
603 {NOLDN, NULL,
604 {0x20,0x21,0x22,0x23,0x24,0x2b,EOT},
605 {0x87,0x16,0x01,0x00,0x00,0x00,EOT}},
606 {0x0, "Floppy",
607 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
608 {0x00,0x03,0xf0,0x06,0x02,0x00,0x00,EOT}},
609 {0x1, "COM1",
610 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT},
611 {0x00,0x03,0xf8,0x04,0x00,0x50,0x00,0x7f,EOT}},
612 {0x2, "COM2",
613 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT},
614 {0x00,0x02,0xf8,0x03,0x00,0x50,0x00,0x7f,EOT}},
615 {0x3, "Parallel port",
616 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,EOT},
617 {0x00,0x03,0x78,0x07,0x78,0x07,0x03,0x03,EOT}},
618 {0x4, "Environment controller",
619 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3,
620 0xf4,0xf5,0xf6,EOT},
621 {0x00,0x02,0x90,0x02,0x30,0x09,0x00,0x00,0x00,0x00,
622 0x00,NANA,NANA,EOT}},
623 {0x5, "Keyboard",
624 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
625 {0x01,0x00,0x60,0x00,0x64,0x01,0x02,0x00,EOT}},
626 {0x6, "Mouse",
627 {0x30,0x70,0x71,0xf0,EOT},
628 {0x00,0x0c,0x02,0x00,EOT}},
629 {0x7, "GPIO",
630 {0x25,0x26,0x27,0x28,0x29,0x2a,0x2c,0x60,0x61,0x62,
631 0x63,0x64,0x65,0x70,0x71,0x72,0x73,0x74,0xb0,0xb1,
632 0xb2,0xb3,0xb4,0xb5,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,
633 0xc0,0xc1,0xc2,0xc3,0xc4,0xc8,0xc9,0xca,0xcb,0xcc,
634 0xe0,0xe1,0xe2,0xe3,0xe4,0xf0,0xf1,0xf2,0xf3,0xf4,
635 0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,EOT},
636 {0x01,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
637 0x00,0x00,0x00,0x00,0x00,0x20,0x38,0x00,0x00,0x00,
638 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
639 0x01,0x00,0x00,0x40,0x00,0x01,0x00,0x00,0x40,0x00,
640 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
641 0x00,0x00,0x00,0x00,0x00,0x00,0x00,NANA,0x00,EOT}},
642 {0x8, "MIDI port",
643 {0x30,0x60,0x61,0x70,0xf0,EOT},
644 {0x00,0x03,0x00,0x0a,0x00,EOT}},
645 {0x9, "Game port",
646 {0x30,0x60,0x61,EOT},
647 {0x00,0x02,0x01,EOT}},
648 {0xa, "Consumer IR",
649 {0x30,0x60,0x61,0x70,0xf0,EOT},
650 {0x00,0x03,0x10,0x0b,0x00,EOT}},
651 {EOT}}},
652 {0x8718, "IT8718F", {
653 {NOLDN, NULL,
654 {0x20,0x21,0x22,0x23,0x24,0x2b,EOT},
655 {0x87,0x18,0x01,0x00,0x00,0x00,EOT}},
656 {0x0, "Floppy",
657 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
658 {0x00,0x03,0xf0,0x06,0x02,0x00,0x00,EOT}},
659 {0x1, "COM1",
660 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT},
661 {0x00,0x03,0xf8,0x04,0x00,0x50,0x00,0x7f,EOT}},
662 {0x2, "COM2",
663 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT},
664 {0x00,0x02,0xf8,0x03,0x00,0x50,0x00,0x7f,EOT}},
665 {0x3, "Parallel port",
666 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,EOT},
667 {0x00,0x03,0x78,0x07,0x78,0x07,0x03,0x03,EOT}},
668 {0x4, "Environment controller",
669 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3,
670 0xf4,0xf5,0xf6,EOT},
671 {0x00,0x02,0x90,0x02,0x30,0x09,0x00,0x00,0x00,0x00,
672 0x00,NANA,NANA,EOT}},
673 {0x5, "Keyboard",
674 /* 0xf0: Datasheet page 33: 0x00; page 56: 0x08. */
675 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
676 {0x01,0x00,0x60,0x00,0x64,0x01,0x02,0x00,EOT}},
677 {0x6, "Mouse",
678 {0x30,0x70,0x71,0xf0,EOT},
679 {0x00,0x0c,0x02,0x00,EOT}},
680 {0x7, "GPIO",
681 /* 0x2c: Datasheet page 30: 0x00; page 43: 0x1f. */
682 {0x25,0x26,0x27,0x28,0x29,0x2a,0x2c,0x60,0x61,0x62,
683 0x63,0x64,0x65,0x70,0x71,0x72,0x73,0x74,0xb0,0xb1,
684 0xb2,0xb3,0xb4,0xb5,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,
685 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc8,0xc9,0xca,0xcb,
686 0xcc,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xf0,
687 0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,
688 0xfb,0xfc,0xfd,0xfe,0xff,EOT},
689 {0x01,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
690 0x00,0x00,0x00,0x00,0x00,0x20,0x38,0x00,0x00,0x00,
691 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
692 0x01,0x00,0x00,0x40,0x00,0x00,0x01,0x00,0x00,0x40,
693 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
694 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
695 0x00,NANA,0x00,0x00,0x00,EOT}},
696 {0xa, "Consumer IR",
697 {0x30,0x60,0x61,0x70,0xf0,EOT},
698 {0x00,0x03,0x10,0x0b,0x00,EOT}},
699 {EOT}}},
700 {0x8720, "IT8720F", {
701 {NOLDN, NULL,
702 {0x20,0x21,0x22,0x23,0x24,0x2b,EOT},
703 {0x87,0x20,0x05,0x00,0x00,0x00,EOT}},
704 {0x0, "Floppy",
705 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
706 {0x00,0x03,0xf0,0x06,0x02,0x00,0x00,EOT}},
707 {0x1, "COM1",
708 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
709 {0x00,0x03,0xf8,0x04,0x00,0x50,EOT}},
710 {0x2, "COM2",
711 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
712 {0x00,0x02,0xf8,0x03,0x00,0x50,EOT}},
713 {0x3, "Parallel port",
714 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,EOT},
715 {0x00,0x03,0x78,0x07,0x78,0x07,0x03,0x03,EOT}},
716 {0x4, "Environment controller",
717 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3,
718 0xf4,0xf5,0xf6,EOT},
719 {0x00,0x02,0x90,0x02,0x30,0x09,0x00,0x00,0x00,0x00,
720 0x00,NANA,NANA,EOT}},
721 {0x5, "Keyboard",
722 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
723 {0x01,0x00,0x60,0x00,0x64,0x01,0x02,0x48,EOT}},
724 {0x6, "Mouse",
725 {0x30,0x70,0x71,0xf0,EOT},
726 {0x00,0x0c,0x02,0x00,EOT}},
727 {0x7, "GPIO",
728 {0x25,0x26,0x27,0x28,0x29,0x2a,0x2c,0x60,0x61,0x62,
729 0x63,0x64,0x65,0x70,0x71,0x72,0x73,0x74,0xb0,0xb1,
730 0xb2,0xb3,0xb4,0xb5,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,
731 0xc0,0xc1,0xc2,0xc3,0xc4,0xc8,0xc9,0xca,0xcb,0xcc,
732 0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,0xf0,
733 0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,
734 0xfb,0xfc,0xfd,0xfe,0xff,EOT},
735 {0x00,0xff,0x00,0x40,0x00,0x00,0x03,0x00,0x00,0x00,
736 0x00,0x00,0x00,0x00,0x00,NANA,0x38,0x00,0x00,0x00,
737 0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,
738 0x01,0x00,0x00,0x40,0x00,0x01,0x00,0x00,0x40,0x00,
739 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,NANA,0x00,
740 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
741 0x00,NANA,0x00,0x00,0x00,EOT}},
742 {0xa, "Consumer IR",
743 {0x30,0x60,0x61,0x70,0xf0,EOT},
744 {0x00,0x03,0x10,0x0b,0x06,EOT}},
745 {EOT}}},
746 {0x8721, "IT8721F", {
747 {EOT}}},
748 {0x8722, "IT8722F", {
749 {EOT}}},
750 {0x8726, "IT8726F", {
751 /* Datasheet wrongly says that the ID is 0x8716. */
752 {NOLDN, NULL,
753 {0x20,0x21,0x22,0x23,0x24,0x2b,EOT},
754 {0x87,0x26,0x01,0x00,MISC,0x00,EOT}},
755 {0x0, "Floppy",
756 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
757 {0x00,0x03,0xf0,0x06,0x02,0x00,0x00,EOT}},
758 {0x1, "COM1",
759 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT},
760 {0x00,0x03,0xf8,0x04,0x00,0x50,0x00,0x7f,EOT}},
761 {0x2, "COM2",
762 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT},
763 {0x00,0x02,0xf8,0x03,0x00,0x50,0x00,0x7f,EOT}},
764 {0x3, "Parallel port",
765 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,EOT},
766 {0x00,0x03,0x78,0x07,0x78,0x07,0x03,0x03,EOT}},
767 {0x4, "Environment controller",
768 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3,
769 0xf4,0xf5,0xf6,EOT},
770 {0x00,0x02,0x90,0x02,0x30,0x09,0x00,0x00,0x00,0x00,
771 0x00,MISC,MISC,EOT}},
772 {0x5, "Keyboard",
773 /* 0xf0: Datasheet page 35: 0x00; page 59: 0x08. */
774 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
775 {0x01,0x00,0x60,0x00,0x64,0x01,0x02,0x08,EOT}},
776 {0x6, "Mouse",
777 {0x30,0x70,0x71,0xf0,EOT},
778 {0x00,0x0c,0x02,0x00,EOT}},
779 {0x7, "GPIO",
780 /* 0x2c: Datasheet page 33: 0x00; page 45: 0x1f. */
781 {0x25,0x26,0x27,0x28,0x29,0x2a,0x2c,0x60,0x61,0x62,
782 0x63,0x64,0x65,0x70,0x71,0x72,0x73,0x74,0xb0,0xb1,
783 0xb2,0xb3,0xb4,0xb5,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,
784 0xc0,0xc1,0xc2,0xc3,0xc4,0xc8,0xc9,0xca,0xcb,0xcc,
785 0xe0,0xe1,0xe2,0xe3,0xe4,0xf0,0xf1,0xf2,0xf3,0xf4,
786 0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,EOT},
787 {0x01,0x00,0x00,0x40,0x00,0x00,0x1f,0x00,0x00,0x00,
788 0x00,0x00,0x00,0x00,0x00,MISC,0x38,0x00,0x00,0x00,
789 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
790 0x01,0x00,0x00,0x40,0x00,0x01,0x00,0x00,0x40,0x00,
791 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
792 0x00,0x00,0x00,0x00,0x00,0x00,0x00,MISC,0x00,EOT}},
793 {0x8, "MIDI port",
794 {0x30,0x60,0x61,0x70,0xf0,EOT},
795 {0x00,0x03,0x00,0x0a,0x00,EOT}},
796 {0x9, "Game port",
797 {0x30,0x60,0x61,EOT},
798 {0x00,0x02,0x01,EOT}},
799 {0xa, "Consumer IR",
800 {0x30,0x60,0x61,0x70,0xf0,EOT},
801 {0x00,0x03,0x10,0x0b,0x00,EOT}},
802 {EOT}}},
803 {0x8728, "IT8728F", {
804 {NOLDN, NULL,
805 {0x02,0x07,0x20,0x21,0x22,0x23,0x24,0x2b,0x2e,0x2f,EOT},
806 {NANA,NANA,0x87,0x28,0x01,0x00,0x00,MISC,0x00,0x00,EOT}},
807 {0x0, "Floppy",
808 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
809 {0x00,0x03,0xf0,0x06,0x02,0x00,0x00,EOT}},
810 {0x1, "COM1",
811 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
812 {0x00,0x03,0xf8,0x04,0x00,0x50,EOT}},
813 {0x2, "COM2",
814 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
815 {0x00,0x02,0xf8,0x03,0x00,0x50,EOT}},
816 {0x3, "Parallel port",
817 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,EOT},
818 {0x00,0x03,0x78,0x07,0x78,0x07,0x03,0x03,EOT}},
819 {0x4, "Environment controller",
820 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,
821 0xf3,0xf4,0xf5,0xf6,0xF9,0xFA,0xFB,EOT},
822 {0x00,0x02,0x90,0x02,0x30,0x09,0x00,0x00,0x00,
823 0x00,0x00,MISC,MISC,MISC,MISC,MISC,EOT}},
824 {0x5, "Keyboard",
825 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
826 {0x01,0x00,0x60,0x00,0x64,0x01,0x02,0x48,EOT}},
827 {0x6, "Mouse",
828 {0x30,0x70,0x71,0xf0,EOT},
829 {0x00,0x0c,0x02,0x00,EOT}},
830 {0x7, "GPIO",
831 {0x25,0x26,0x27,0x28,0x29,0x2a,0x2c,0x2d,0x60,
832 0x61,0x62,0x63,0x64,0x65,0x70,0x71,0x72,0x73,
833 0x74,0xb0,0xb1,0xb2,0xb3,0xb4,0xb8,0xb9,0xba,
834 0xbb,0xbc,0xbd,0xc0,0xc1,0xc2,0xc3,0xc4,0xc8,
835 0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xe0,0xe1,
836 0xe2,0xe3,0xe4,0xe9,0xf0,0xf1,0xf2,0xf3,0xf4,
837 0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,EOT},
838 {0x00,0xf3,0x00,0x00,0x00,0x00,0x03,0x00,0x00,
839 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x38,
840 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,
841 0x00,0x00,0x00,0x01,0x00,0x00,0x40,0x00,0x01,
842 0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
843 0x00,0x00,0x00,MISC,0x00,0x00,0x00,0x00,0x00,
844 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
845 {0xa, "Consumer IR",
846 {0x30,0x60,0x61,0x70,0xf0,EOT},
847 {0x00,0x03,0x10,0x0b,0x06,EOT}},
848 {EOT}}},
849 {0x8761, "IT8761E", {
850 {EOT}}},
851 {0x8772, "IT8772F", {
852 {EOT}}},
853 {0x8780, "IT8780F", {
854 {EOT}}},
855 {0x8783, "IT8783E/F", {
856 {NOLDN, NULL,
857 {0x02,0x07,0x20,0x21,0x22,0x23,0x24,0x25,0x26,
858 0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,
859 EOT},
860 {NANA,NANA,0x87,0x83,0x00,0x00,MISC,0x00,0x00,
861 0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
862 EOT}},
863 {0x0, "Floppy",
864 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
865 {0x00,0x03,0xf0,0x06,0x02,0x00,0x00,EOT}},
866 {0x1, "COM1",
867 {0x30,0x60,0x61,0x70,0xf0,EOT},
868 {0x00,0x03,0xf8,0x04,0x00,EOT}},
869 {0x2, "COM2",
870 {0x30,0x60,0x61,0x70,0xf0,EOT},
871 {0x00,0x02,0xf8,0x03,0x00,EOT}},
872 {0x3, "Parallel port",
873 {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,EOT},
874 {0x00,0x03,0x78,0x07,0x78,0x07,0x03,0x03,EOT}},
875 {0x4, "Environment controller",
876 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,
877 0xf3,0xf4,0xf5,0xf6,0xf7,EOT},
878 {0x00,0x02,0x90,0x02,0x30,0x09,0x00,0x00,0x00,
879 0x00,0x00,MISC,MISC,MISC,EOT}},
880 {0x5, "Keyboard",
881 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
882 {0x01,0x00,0x60,0x00,0x64,0x01,0x02,0x08,EOT}},
883 {0x6, "Mouse",
884 {0x30,0x70,0x71,0xf0,EOT},
885 {0x00,0x0c,0x02,0x00,EOT}},
886 {0x7, "GPIO",
887 {0x60,0x61,0x62,0x63,0x64,0x65,0x70,0x71,0x72,
888 0x73,0x74,0x81,0x82,0x83,0x84,0x91,0x92,0x93,
889 0x94,0xb0,0xb1,0xb2,0xb3,0xb4,0xb8,0xb9,0xba,
890 0xbb,0xbc,0xc0,0xc1,0xc2,0xc3,0xc4,0xc8,0xc9,
891 0xca,0xcb,0xcc,0xcd,0xe0,0xe1,0xe2,0xe3,0xe4,
892 0xef,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,
893 0xf8,0xf9,0xfa,0xfb,EOT},
894 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,MISC,
895 0x38,0x00,0x00,MISC,0x38,0x00,0x00,MISC,0x38,
896 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
897 0x00,0x00,0x01,0x00,0x00,0x40,0x00,0x01,0x00,
898 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
899 MISC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
900 0x00,0x00,0x00,0x00,EOT}},
901 {0x8, "COM3",
902 {0x30,0x60,0x61,0x70,0xf0,EOT},
903 {0x00,0x03,0xf8,0x04,0x00,EOT}},
904 {0x9, "COM4",
905 {0x30,0x60,0x61,0x70,0xf0,EOT},
906 {0x00,0x02,0xf8,0x03,0x00,EOT}},
907 {0xa, "COM5",
908 {0x30,0x60,0x61,0x70,0xf0,EOT},
909 {0x00,0x03,0xf8,0x04,0x00,EOT}},
910 {0xb, "COM6",
911 {0x30,0x60,0x61,0x70,0xf0,EOT},
912 {0x00,0x02,0xf8,0x03,0x00,EOT}},
913 {0xc, "Consumer IR",
914 {0x30,0x60,0x61,0x70,0xf0,EOT},
915 {0x00,0x03,0x10,0x0b,0x06,EOT}},
916 {EOT}}},
917 {EOT}
920 static const struct superio_registers ec_table[] = {
921 {0x8716, "IT8716F", {
922 {NOLDN, NULL,
923 {0x00,0x04,0x05,0x06,0x07,0x08,0x09,0x0b,0x0c,0x10,
924 0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x1b,0x1c,0x1d,
925 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,
926 0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,0x40,0x41,0x42,0x43,
927 0x44,0x45,0x48,0x50,0x51,0x52,0x53,0x54,0x56,0x57,
928 0x59,0x5c,
929 0x5d,0x5e,0x5f,0x60,0x61,0x62,0x63,0x64,0x65,0x68,
930 0x69,0x6a,0x6b,0x6c,0x6d,0x70,0x71,0x72,0x73,0x74,
931 0x75,0x84,0x85,0x86,0x87,0x88,0x89,0x8c,0x8d,0x8e,
932 0x8f,0x90,0x91,0x92,0x93,0x94,0x95,0x98,0x99,0x9a,
933 0x9b,0x9c,0x9d,EOT},
934 {0x18,0x00,0x00,0x00,0x00,0x00,0x80,0x09,0x00,NANA,
935 NANA,NANA,0x07,0x50,NANA,NANA,NANA,NANA,NANA,NANA,
936 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
937 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
938 NANA,NANA,RSVD,0x00,0x00,0x7f,0x7f,0x7f,0x00,0x00,
939 0x00,0x00,
940 0x00,0x00,0x00,0x7f,0x7f,0x7f,0x00,0x00,0x7f,0x7f,
941 0x7f,0x7f,0x00,0x00,0x7f,0x7f,0x7f,0x7f,0x00,0x00,
942 0x7f,NANA,NANA,NANA,NANA,0x00,0x00,0x02,0x00,0x99,
943 0x99,0x7f,0x7f,0x7f,0x00,0x00,0x7f,0x7f,0x7f,0x7f,
944 0x00,0x00,0x7f,EOT}},
945 {EOT}}},
946 {0x8718, "IT8718F", {
947 {NOLDN, NULL,
948 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,
949 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,
950 0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,
951 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,
952 0x2a,0x2b,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,
953 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,0x40,0x41,
954 0x42,0x43,0x44,0x45,0x50,0x51,0x52,0x53,0x54,0x56,
955 0x57,0x58,0x59,0x5b,0x5c,0x5d,0x5e,0x5f,0x60,0x61,
956 0x62,0x63,0x64,0x65,0x68,0x69,0x6a,0x6b,0x6c,0x6d,
957 0x70,0x71,0x72,0x73,0x74,0x75,0x80,0x81,0x82,0x83,
958 0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,
959 0x92,0x94,0x95,0x96,0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,
960 0xa6,EOT},
961 {0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
962 0x40,0x09,0x00,NANA,NANA,NANA,NANA,NANA,NANA,0x07,
963 0x50,MISC,MISC,MISC,NANA,NANA,NANA,NANA,NANA,NANA,
964 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
965 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
966 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
967 NANA,NANA,NANA,NANA,0x00,0x00,0x7f,0x7f,0x7f,0x00,
968 0x00,0x90,0x00,0x12,0x00,0x00,0x00,0x00,0x7f,0x7f,
969 0x7f,0x00,0x00,0x7f,0x7f,0x7f,0x7f,0x00,0x00,0x7f,
970 0x7f,0x7f,0x7f,0x00,0x00,0x7f,NANA,NANA,NANA,NANA,
971 0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0xff,0x00,
972 0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
973 0x00,EOT}},
974 {EOT}}},
975 {0x8783, "IT8783E/F", {
976 {NOLDN, NULL,
977 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,
978 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,
979 0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,
980 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,
981 0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,0x30,0x31,0x32,0x33,
982 0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,
983 0x3e,0x3f,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,
984 0x48,0x49,0x4a,0x4b,0x50,0x51,0x52,0x53,0x54,0x55,
985 0x56,0x57,0x58,0x59,0x5a,0x5b,0x5c,0x5d,0x5e,0x5f,
986 0x60,0x61,0x62,0x63,0x64,0x65,0x68,0x69,0x6a,0x6b,
987 0x6c,0x6d,0x70,0x71,0x72,0x73,0x74,0x75,0x88,0x89,
988 0x8a,0x8b,0x8c,0x8d,0x8e,EOT},
989 {0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
990 0x54,0x09,0x00,NANA,NANA,NANA,MISC,MISC,MISC,0x07,
991 0x50,MISC,MISC,MISC,NANA,NANA,NANA,MISC,MISC,MISC,
992 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
993 NANA,NANA,NANA,NANA,NANA,NANA,MISC,MISC,MISC,MISC,
994 MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,
995 MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,0x5f,0x74,
996 0x2d,0x40,0xab,0x22,0x00,0x00,0x7f,0x7f,0x7f,0x50,
997 0x00,0x00,0x90,0x00,MISC,0x12,0x60,0x00,0x00,0x00,
998 0x7f,0x7f,0x7f,0x00,0x00,0x7f,0x7f,0x7f,0x7f,0x00,
999 0x00,0x7f,0x7f,0x7f,0x7f,0x00,0x00,0x7f,MISC,0x00,
1000 0x00,0x00,0x00,MISC,0x02,EOT}},
1001 {EOT}}},
1002 {EOT}
1005 static const struct superio_registers bram_table[] = {
1006 {0x8516, "IT8516???", {
1007 {NOLDN, NULL,
1008 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
1009 0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,EOT},
1010 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
1011 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
1012 {NOLDN, NULL,
1013 {0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
1014 0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,EOT},
1015 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
1016 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
1017 {NOLDN, NULL,
1018 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,
1019 0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
1020 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
1021 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
1022 {NOLDN, NULL,
1023 {0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,
1024 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,EOT},
1025 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
1026 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
1027 {NOLDN, NULL,
1028 {0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,
1029 0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,EOT},
1030 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
1031 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
1032 {NOLDN, NULL,
1033 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,
1034 0x58,0x59,0x5a,0x5b,0x5c,0x5d,0x5e,0x5f,EOT},
1035 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
1036 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
1037 {NOLDN, NULL,
1038 {0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,
1039 0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,EOT},
1040 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
1041 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
1042 {NOLDN, NULL,
1043 {0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,
1044 0x78,0x79,0x7a,0x7b,0x7c,0x7d,0x7e,0x7f,EOT},
1045 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
1046 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
1047 {NOLDN, NULL,
1048 {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,
1049 0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,EOT},
1050 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
1051 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
1052 {NOLDN, NULL,
1053 {0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,
1054 0x98,0x99,0x9a,0x9b,0x9c,0x9d,0x9e,0x9f,EOT},
1055 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
1056 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
1057 {NOLDN, NULL,
1058 {0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,
1059 0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,EOT},
1060 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
1061 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
1062 {NOLDN, NULL,
1063 {0xb0,0xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,
1064 0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf,EOT},
1065 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
1066 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
1067 {NOLDN, NULL,
1068 {0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,
1069 0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,EOT},
1070 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
1071 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
1072 {EOT}}},
1073 {EOT}
1076 /* Works for: IT8661F/IT8770F */
1077 static const uint8_t initkey_it8661f[][4] = {
1078 {0x86, 0x61, 0x55, 0x55}, /* 0x3f0 */
1079 {0x86, 0x61, 0x55, 0xaa}, /* 0x3bd */
1080 {0x86, 0x61, 0xaa, 0x55}, /* 0x370 */
1083 /* Works for: IT8671F/IT8687R, IT8673F */
1084 static const uint8_t initkey_it8671f[][4] = {
1085 {0x86, 0x80, 0x55, 0x55}, /* 0x3f0 */
1086 {0x86, 0x80, 0x55, 0xaa}, /* 0x3bd */
1087 {0x86, 0x80, 0xaa, 0x55}, /* 0x370 */
1090 /* Works for: IT8661F/IT8770F, IT8671F/IT8687R, IT8673F. */
1091 static const uint8_t initkey_mbpnp[] = {
1092 0x6a, 0xb5, 0xda, 0xed, 0xf6, 0xfb, 0x7d, 0xbe, 0xdf, 0x6f, 0x37,
1093 0x1b, 0x0d, 0x86, 0xc3, 0x61, 0xb0, 0x58, 0x2c, 0x16, 0x8b, 0x45,
1094 0xa2, 0xd1, 0xe8, 0x74, 0x3a, 0x9d, 0xce, 0xe7, 0x73, 0x39,
1097 /* Works for: IT8661F/IT8770F, IT8671F/IT8687R, IT8673F. */
1098 static void enter_conf_mode_ite_legacy(uint16_t port, const uint8_t init[][4])
1100 int i, idx;
1102 /* Determine Super I/O config port. */
1103 idx = (port == 0x3f0) ? 0 : ((port == 0x3bd) ? 1 : 2);
1104 for (i = 0; i < 4; i++)
1105 OUTB(init[idx][i], ISA_PNP_ADDR);
1107 /* Sequentially write the 32 MB PnP init values. */
1108 for (i = 0; i < 32; i++)
1109 OUTB(initkey_mbpnp[i], port);
1112 static void enter_conf_mode_ite(uint16_t port)
1114 OUTB(0x87, port);
1115 OUTB(0x01, port);
1116 OUTB(0x55, port);
1117 OUTB((port == 0x2e) ? 0x55 : 0xaa, port);
1120 static void enter_conf_mode_ite_it8502e(uint16_t port)
1122 OUTB(0x85, port);
1123 OUTB(0x02, port);
1124 OUTB(0x55, port);
1125 OUTB((port == 0x2e) ? 0x55 : 0xaa, port);
1128 static void enter_conf_mode_ite_it8761e(uint16_t port)
1130 OUTB(0x87, port);
1131 OUTB(0x61, port);
1132 OUTB(0x55, port);
1133 OUTB((port == 0x2e) ? 0x55 : 0xaa, port);
1136 static void enter_conf_mode_ite_it8228e(uint16_t port)
1138 OUTB(0x82, port);
1139 OUTB(0x28, port);
1140 OUTB(0x55, port);
1141 OUTB((port == 0x2e) ? 0x55 : 0xaa, port);
1144 static void exit_conf_mode_ite(uint16_t port)
1146 regwrite(port, 0x02, 0x02);
1149 static int chip_found_at_port;
1151 static void probe_idregs_ite_helper(const char *init, uint16_t port)
1153 uint16_t id, chipver, ecport;
1155 probing_for("ITE", init, port);
1157 id = regval(port, CHIP_ID_BYTE1_REG) << 8;
1158 id |= regval(port, CHIP_ID_BYTE2_REG);
1159 chipver = regval(port, CHIP_VERSION_REG) & 0x0f; /* Only bits 3..0 */
1161 if (superio_unknown(reg_table, id)) {
1162 if (verbose)
1163 printf(NOTFOUND "id=0x%04x, rev=0x%01x\n", id, chipver);
1164 return;
1167 printf("Found ITE %s (id=0x%04x, rev=0x%01x) at 0x%x\n",
1168 get_superio_name(reg_table, id), id, chipver, port);
1169 chip_found = 1;
1170 chip_found_at_port = 1;
1172 dump_superio("ITE", reg_table, port, id, LDN_SEL);
1174 if (extra_dump) {
1175 regwrite(port, LDN_SEL, 0x04); /* Select LDN 4 (EC). */
1177 /* Get EC base address (stored in LDN 4, index 0x60/0x61). */
1178 ecport = regval(port, 0x60) << 8;
1179 ecport |= regval(port, 0x61);
1181 /* EC address register = EC base address + 5. */
1182 ecport += 5;
1184 printf("Environment controller (0x%04x)\n", ecport);
1185 dump_superio("ITE-EC", ec_table, ecport, id, LDN_SEL);
1187 regwrite(port, LDN_SEL, 0x10); /* Select LDN 16 (BRAM). */
1188 /* Get EC base address (stored in LDN 16, index 0x62/0x63). */
1189 ecport = regval(port, 0x62) << 8;
1190 ecport |= regval(port, 0x63);
1191 printf("BRAM (0x%04x)\n", ecport);
1192 dump_superio("ITE-BRAM", bram_table, ecport, id, LDN_SEL);
1196 void probe_idregs_ite(uint16_t port)
1198 chip_found_at_port = 0;
1200 if (port == 0x3f0 || port == 0x3bd || port == 0x370) {
1201 enter_conf_mode_ite_legacy(port, initkey_it8661f);
1202 probe_idregs_ite_helper("(init=legacy/it8661f) ", port);
1203 exit_conf_mode_ite(port);
1204 if (chip_found_at_port)
1205 return;
1207 enter_conf_mode_ite_legacy(port, initkey_it8671f);
1208 probe_idregs_ite_helper("(init=legacy/it8671f) ", port);
1209 exit_conf_mode_ite(port);
1210 if (chip_found_at_port)
1211 return;
1212 } else {
1213 enter_conf_mode_ite(port);
1214 probe_idregs_ite_helper("(init=standard) ", port);
1215 exit_conf_mode_ite(port);
1216 if (chip_found_at_port)
1217 return;
1219 enter_conf_mode_ite_it8502e(port);
1220 probe_idregs_ite_helper("(init=it8502e) ", port);
1221 exit_conf_mode_ite(port);
1222 if (chip_found_at_port)
1223 return;
1225 enter_conf_mode_ite_it8761e(port);
1226 probe_idregs_ite_helper("(init=it8761e) ", port);
1227 exit_conf_mode_ite(port);
1228 if (chip_found_at_port)
1229 return;
1231 enter_conf_mode_ite_it8228e(port);
1232 probe_idregs_ite_helper("(init=it8228e) ", port);
1233 exit_conf_mode_ite(port);
1234 if (chip_found_at_port)
1235 return;
1237 enter_conf_mode_winbond_fintek_ite_8787(port);
1238 probe_idregs_ite_helper("(init=0x87,0x87) ", port);
1239 exit_conf_mode_winbond_fintek_ite_8787(port);
1240 if (chip_found_at_port)
1241 return;
1245 void print_ite_chips(void)
1247 print_vendor_chips("ITE", reg_table);
1248 print_vendor_chips("ITE-EC", ec_table);