soc/intel/common/block/itss: Route PCI INT pin to PIRQ using PIR
[coreboot2.git] / util / superiotool / fintek.c
blobcd61c84268219009708656d32b8ec39eae1a9437
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include "superiotool.h"
5 #define DEVICE_ID_BYTE1_REG 0x20
6 #define DEVICE_ID_BYTE2_REG 0x21
8 #define VENDOR_ID_BYTE1_REG 0x23
9 #define VENDOR_ID_BYTE2_REG 0x24
11 #define FINTEK_VENDOR_ID 0x3419
13 /* f81866 f81966 Port Select (27h): BANK_PROG_SEL[3-2] CLK_TUNE_PROG_EN[0] */
14 #define ESEL_27H(bank, en) {.name = "Port Select Register", .idx = 0x27, .mask = 0x0d, \
15 .val = esel_27h_##bank | esel_27h_clk_tune_##en}
16 /* f81866 f81966 Fan Fault Time Register (9Fh): FAN_PROG_SEL[7] */
17 #define ESEL_9FH(bank) {.name = "Fan Fault Time Register", .idx = 0x9f, .mask = 0x80, \
18 .val = esel_9fh_fan_prog_##bank}
19 /* f81866 Block Write Count Register (ECh) ECh: MCH_BANK_SEL[7] */
20 #define ESEL_ECH(data_temp) {.name = "Block Write Count Register", .idx = 0xec, .mask = 0x80, \
21 .val = esel_ech_mch_bank_##data_temp}
23 enum esel_27h_bank_prog_sel {
24 esel_27h_bank0 = 0 << 2,
25 esel_27h_bank1 = 1 << 2,
26 esel_27h_bank2 = 2 << 2,
27 esel_27h_bank3 = 3 << 2,
29 enum esel_27h_clk_tune {
30 esel_27h_clk_tune_dis = 0,
31 esel_27h_clk_tune_en = 1,
34 enum esel_9fh_fan_prog {
35 esel_9fh_fan_prog_bank0 = 0 << 7,
36 esel_9fh_fan_prog_bank1 = 1 << 7,
39 enum esel_ech_mch_bank {
40 esel_ech_mch_bank_temp = 0 << 7,
41 esel_ech_mch_bank_data = 1 << 7,
44 static const struct superio_registers reg_table[] = {
45 {0x0106, "F71862FG / F71863FG", { /* Same ID? Datasheet typo? */
46 /* We assume reserved bits are read as 0. */
47 {NOLDN, NULL,
48 {0x20,0x21,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2a,
49 0x2b,0x2c,0x2d,EOT},
50 {0x06,0x01,0x19,0x34,0x00,0x00,MISC,0x00,0x00,0x00,
51 0x00,0x00,0x08,EOT}},
52 {0x0, "Floppy",
53 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf2,0xf4,EOT},
54 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x03,0x00,EOT}},
55 {0x1, "COM1",
56 {0x30,0x60,0x61,0x70,0xf0,EOT},
57 {0x01,0x03,0xf8,0x04,0x00,EOT}},
58 {0x2, "COM2",
59 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
60 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT}},
61 {0x3, "Parallel port",
62 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
63 {0x01,0x03,0x78,0x07,0x03,0x42,EOT}},
64 {0x4, "Hardware monitor",
65 {0x30,0x60,0x61,0x70,EOT},
66 {0x01,0x02,0x95,0x00,EOT}},
67 {0x5, "Keyboard",
68 {0x30,0x60,0x61,0x70,0x72,EOT},
69 {0x01,0x00,0x60,0x00,0x00,EOT}},
70 {0x6, "GPIO",
71 {0xf0,0xf1,0xf2,0xf3,0xe0,0xe1,0xe2,0xe3,0xd0,0xd1,
72 0xd2,0xd3,0xc0,0xc1,0xc2,0xc3,0xb0,0xb1,0xb2,0xb3,
73 EOT},
74 {0x00,0x0f,NANA,0x00,0x00,0xff,NANA,0x00,0x00,0xff,
75 NANA,0x00,0x00,0x0f,NANA,0x00,0x00,0x3f,NANA,0x00,
76 EOT}},
77 {0x7, "VID",
78 {0x30,0x60,0x61, 0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,
79 0xf7,EOT},
80 {0x00,0x00,0x00, 0x00,0x00,MISC,0x00,NANA,0x00,0x00,
81 0x00,EOT}},
82 {0x8, "SPI",
83 {0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xfa,
84 0xfb,0xfc,0xfd,0xfe,0xff,EOT},
85 {0x10,0x04,0x01,NANA,0x00,0x00,0x00,NANA,0x00,0x00,
86 0x00,0x00,0x00,0x00,0x00,EOT}},
87 {0xa, "PME, ACPI",
88 {0x30,0xf0,0xf1,0xf4,0xf5,0xf7,EOT},
89 {0x00,0x00,NANA,0x06,0x1c,0x01,EOT}},
90 {EOT}}},
91 {0x0110, "F71808A", {
92 /* We assume reserved bits are read as 0. */
93 {NOLDN, NULL,
94 {0x02,0x07,0x20,0x21,0x23,0x24,0x25,0x26,0x27,0x28,
95 0x29,0x2a,0x2b,0x2c,0x2d,EOT},
96 {0x00,0x00,0x10,0x01,0x19,0x34,0x00,0x00,MISC,0x00,
97 0xc0,0x21,0x2f,0x5c,0x27,EOT}},
98 {0x1, "COM1",
99 {0x30,0x60,0x61,0x70,0xf0,EOT},
100 {0x01,0x03,0xf8,0x04,0x00,EOT}},
101 {0x4, "Hardware monitor",
102 {0x30,0x60,0x61,0x70,EOT},
103 {0x01,0x02,0x95,0x00,EOT}},
104 {0x5, "Keyboard",
105 {0x30,0x60,0x61,0x70,0x72,0xfe,0xff,EOT},
106 {0x01,0x00,0x60,0x01,0x0c,0x01,0x29,EOT}},
107 {0x6, "GPIO",
108 {0x70,0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xcb,0xcc,
109 0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,
110 0xd7,0xd8,0xe0,0xe1,0xe2,0xe3,0xf0,0xf1,0xf2,0xf3,
111 EOT},
112 {0x00,0x00,0x3f,NANA,0x00,0x00,0x00,0x00,0x00,0x00,
113 0x00,0xe0,0x40,0x00,0x00,NANA,0x00,0x00,0x00,0x00,
114 0x00,0x00,0x00,0x1f,NANA,0x00,0x00,0xff,NANA,0x00,
115 EOT}},
116 {0x7, "WDT",
117 {0x30,0x60,0x61,0xf0,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,
118 EOT},
119 {0x00,0x00,0x00,0x03,NANA,NANA,NANA,0x00,0x0a,0x00,
120 EOT}},
121 {0x8, "CIR",
122 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf8,0xf9,0xfa,0xfb,
123 0xfc,0xfd,0xfe,EOT},
124 {0x00,0x00,0x00,0x00,NANA,NANA,0x00,0x00,0x80,0x3b,
125 0x00,0x00,0x00,EOT}},
126 {0xa, "PME, ACPI, and EUP Power Saving",
127 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
128 0xe9,0xec,0xed,0xee,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,
129 0xf6,0xf7,0xf8,0xf9,0xfa,0xfd,EOT},
130 {0x00,0x10,0xcc,0x0c,0x13,0x09,0xc7,0x09,0x63,0x00,
131 0x0f,0x00,0x00,0x00,0x00,NANA,0x00,NANA,0x06,0x3c,
132 0x1f,0x00,0x00,0x00,0x00,NANA,EOT}},
133 {EOT}}},
134 {0x0710, "F71869A/AD", {
135 /* We assume reserved bits are read as 0. */
136 {NOLDN, NULL,
137 {0x02,0x07,0x20,0x21,0x23,0x24,0x25,0x26,0x27,0x28,
138 0x29,0x29,0x2a,0x2a,0x2b,0x2b,0x2c,0x2c,0x2d,EOT},
139 {0x00,0x00,0x10,0x07,0x19,0x34,0x00,0x00,NANA,0x38,
140 0x6f,0x03,0x0f,0xe7,0x0f,NANA,0x00,NANA,0x28,EOT}},
141 {0x0, "Floppy",
142 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf2,0xf4,EOT},
143 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x03,0x00,EOT}},
144 {0x1, "COM1",
145 {0x30,0x60,0x61,0x70,0xf0,EOT},
146 {0x01,0x03,0xf8,0x04,0x00,EOT}},
147 {0x2, "COM2",
148 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
149 {0x01,0x02,0xf8,0x03,0x00,0x04,EOT}},
150 {0x3, "Parallel port",
151 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
152 {0x01,0x03,0x78,0x07,0x03,0x42,EOT}},
153 {0x4, "Hardware monitor",
154 {0x30,0x60,0x61,0x70,EOT},
155 {0x01,0x02,0x95,0x00,EOT}},
156 {0x5, "Keyboard",
157 {0x30,0x60,0x61,0x70,0x72,0xf0,0xfe,0xff,EOT},
158 {0x01,0x00,0x60,0x01,0x0c,0x83,0x81,0x29,EOT}},
159 {0x6, "GPIO",
160 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,0xe0,0xe1,
161 0xe2,0xe3,0xe4,0xe5,0xe6,0xd0,0xd1,0xd2,0xd3,0xc0,
162 0xc1,0xc2,0xb0,0xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xa0,
163 0xa1,0xa2,0xa4,0xa5,0xa6,0xa9,0xab,0xac,0xad,0xae,
164 0xaf,0x90,0x91,0x92,0x80,0x81,0x82,0x83,EOT},
165 {0x00,0x00,0x00,0x00,0x00,0x3f,NANA,0x00,0x00,0xff,
166 NANA,0x00,0x00,0x00,0x00,0x00,0xff,NANA,0x00,0x00,
167 0xff,NANA,0x00,0x0f,NANA,0x00,0x00,0x00,0x00,0x00,
168 0x1f,NANA,0x00,0x00,0x00,0x00,0x00,0xe0,0x00,0x00,
169 0x40,0x00,0xff,NANA,0x00,0xff,NANA,0x00,EOT}},
170 {0x7, "WDT",
171 {0xf0,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,EOT},
172 {0x01,0x00,0x00,NANA,0x00,0x0a,0x00,EOT}},
173 {0x8, "CIR",
174 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf8,0xf9,0xfa,0xfb,
175 0xfc,0xfd,0xfe,EOT},
176 {0x00,0x00,0x00,0x00,NANA,NANA,0x00,0x00,0x80,0x3b,
177 0x00,0x00,0x00,EOT}},
178 {0xa, "PME, ACPI, and ERP Power Saving",
179 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
180 0xe9,0xec,0xed,0xee,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,
181 0xf6,0xf7,0xf8,0xf9,0xfa,0xfc,0xfe,EOT},
182 {0x00,0x00,0xcc,0x3c,0x13,0x09,0xc7,0x09,0x63,0x08,
183 0x0f,0x00,0x00,0x00,0x00,NANA,0x00,NANA,0x06,0x1c,
184 0x1f,0x86,0x00,0x00,0x00,0x07,0x00,EOT}},
185 {EOT}}},
186 {0x1408, "F71869E/ED", {
187 /* We assume reserved bits are read as 0. */
188 {NOLDN, NULL,
189 {0x02,0x07,0x20,0x21,0x23,0x24,0x26,0x27,0x28,0x29,
190 0x2a,0x2b,0x2d,EOT},
191 {0x00,0x00,0x08,0x14,0x19,0x34,0x00,NANA,0x38,0x6f,
192 0x07,0x0f,0x28,EOT}},
193 {0x00, "FDC",
194 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf2,0xf4,EOT},
195 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x03,0x00,EOT}},
196 {0x01, "UART1",
197 {0x30,0x60,0x61,0x70,0xf0,EOT},
198 {0x01,0x03,0xf8,0x04,0x00,EOT}},
199 {0x02, "UART2",
200 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
201 {0x01,0x02,0xf8,0x03,0x00,0x04,EOT}},
202 {0x03, "Parallel port",
203 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
204 {0x01,0x03,0x78,0x07,0x03,0x42,EOT}},
205 {0x04, "Hardware Monitor",
206 {0x30,0x60,0x61,0x70,EOT},
207 {0x01,0x02,0x95,0x00,EOT}},
208 {0x05, "KBC",
209 {0x30,0x60,0x61,0x70,0x72,0xf0,0xfe,0xff,EOT},
210 {0x01,0x00,0x60,0x01,0x0c,0x83,0x81,0x29,EOT}},
211 {0x06, "GPIO",
212 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,0xe0,0xe1,
213 0xe2,0xe3,0xe4,0xe5,0xe6,0xd0,0xd1,0xd2,0xd3,0xc0,
214 0xc1,0xc2,0xb0,0xb1,0xb2,0xb3,0xa0,0xa1,0xa2,0xa3,
215 0x90,0x91,0x92,0x93,EOT},
216 {0x00,0x00,0x00,0x00,0x00,0x3f,NANA,0x00,0x00,0xff,
217 NANA,0x00,0x00,0x00,0x00,0x00,0xff,NANA,0x00,0x00,
218 0xff,NANA,0x00,0x0f,NANA,0x00,0x00,0x1f,NANA,0x00,
219 0x00,0x3f,NANA,0x00,EOT}},
220 {0x07, "WDT",
221 {0xf0,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,EOT},
222 {0x01,0x00,0x00,NANA,0x00,0x0a,0x00,EOT}},
223 {0x0a, "PME, ACPI, and EUP Power Saving",
224 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
225 0xed,0xee,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,
226 0xf8,0xf9,0xfe,EOT},
227 {0x00,0x00,0xcc,0x3c,0x13,0x09,0xc7,0x09,0x63,0x08,
228 0x00,0x00,0x00,0x00,0x00,NANA,0x06,0x1c,0x1f,0x86,
229 0x00,0x00,0x00,EOT}},
230 {EOT}}},
231 {0x2307, "F71889", {
232 /* We assume reserved bits are read as 0. */
233 {NOLDN, NULL,
234 {0x20,0x21,0x23,0x24,0x25,0x26,0x27,0x28,0x2a,0x2b,
235 0x2c,0x2d,EOT},
236 {0x07,0x23,0x19,0x34,0x00,0x00,0x00,0x00,0xf0,0x30,
237 0x00,0x08,EOT}},
238 {0x0, "Floppy",
239 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf2,0xf4,EOT},
240 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x03,0x00,EOT}},
241 {0x1, "COM1",
242 {0x30,0x60,0x61,0x70,0xf0,EOT},
243 {0x01,0x03,0xf8,0x04,0x00,EOT}},
244 {0x2, "COM2",
245 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
246 {0x01,0x02,0xf8,0x03,0x00,0x04,EOT}},
247 {0x3, "Parallel port",
248 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
249 {0x01,0x03,0x78,0x07,0x03,0x42,EOT}},
250 {0x4, "Hardware monitor",
251 {0x30,0x60,0x61,0x70,EOT},
252 {0x01,0x02,0x95,0x00,EOT}},
253 {0x5, "Keyboard",
254 {0x30,0x60,0x61,0x70,0x72,0xfe,EOT},
255 {0x01,0x00,0x60,0x01,0x0c,0x81,EOT}},
256 {0x6, "GPIO",
257 {0x80,0x81,0x82,0x83,0x90,0x91,0x92,0x93,0xa0,0xa1,
258 0xa2,0xa3,0xb0,0xb1,0xb2,0xc0,0xc1,0xc2,0xc3,0xd0,
259 0xd1,0xd2,0xd3,0xe0,0xe1,0xe2,0xe3,0xf0,0xf1,0xf2,
260 0xf3,0xfe,0xff,EOT},
261 {0x00,0xff,NANA,0x00,0x00,0xff,NANA,0x00,0x00,0x1f,
262 NANA,0x00,0x00,0xff,NANA,0x00,0xff,NANA,0x00,0x00,
263 0xff,NANA,0x00,0x00,0x7f,NANA,0x00,0x00,0x7f,NANA,
264 0x00,0x00,0x00,EOT}},
265 {0x7, "VID",
266 {0x30,0x60,0x61,EOT},
267 {0x00,0x00,0x00,EOT}},
268 {0x8, "SPI",
269 {0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xfa,
270 0xfb,0xfc,0xfd,0xfe,0xff,EOT},
271 {0x00,RSVD,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
272 0x00,0x00,0x00,0x00,0x00,EOT}},
273 {0xa, "PME, ACPI",
274 {0x30,0xf0,0xf1,0xf4,0xf5,0xf6,EOT},
275 {0x00,0x00,0x00,0x26,0x1c,0x07,EOT}},
276 {0xb, "VREF",
277 {0xf0,0xf1,0xf2,0xf3,0xff,EOT},
278 {0x64,0x64,0x64,0x00,0x00,EOT}},
279 {EOT}}},
280 {0x4103, "F71872F/FG / F71806F/FG", { /* Same ID? Datasheet typo? */
281 {NOLDN, NULL,
282 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
283 0x29,0x2a,0x2b,0x2c,0x2d,EOT},
284 {0x03,0x41,RSVD,0x19,0x34,0x00,0x00,MISC,0x66,
285 0x80,0x00,0x00,0x00,0x04,EOT}},
286 {0x0, "Floppy",
287 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf2,0xf4,EOT},
288 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x03,0x00,EOT}},
289 {0x1, "COM1",
290 {0x30,0x60,0x61,0x70,0xf0,EOT},
291 {0x01,0x03,0xf8,0x04,0x00,EOT}},
292 {0x2, "COM2",
293 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
294 {0x01,0x02,0xf8,0x03,0x00,0x04,EOT}},
295 {0x3, "Parallel port",
296 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
297 {0x01,0x03,0x78,0x07,0x03,0x42,EOT}},
298 {0x4, "Hardware monitor",
299 {0x30,0x60,0x61,0x70,EOT},
300 {0x00,0x02,0x95,0x00,EOT}},
301 {0x5, "Keyboard", /* Only documented on F71872F/FG. */
302 {0x30,0x60,0x61,0x70,0x72,0xf0,0xf1,EOT},
303 {0x01,0x00,0x60,0x00,0x00,0x83,0x00,EOT}},
304 {0x6, "GPIO",
305 {0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
306 0xe9,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,
307 EOT},
308 {0x00,0x00,0x00,NANA,0x00,0x00,0x00,0x00,0x00,0x00,
309 0x7f,0x00,0x7f,NANA,0x00,0xff,NANA,0x00,0x03,NANA,
310 EOT}},
311 {0x7, "VID",
312 {0x30,0x60,0x61,EOT},
313 {0x00,0x00,0x00,EOT}},
314 {0xa, "PME, ACPI",
315 {0x30,0xf0,0xf1,0xf4,0xf5,EOT},
316 {0x00,0x00,0x61,0x06,0x3c,EOT}},
317 {EOT}}},
318 {0x4105, "F71882FG/F71883FG", { /* Same ID? Datasheet typo? */
319 /* We assume reserved bits are read as 0. */
320 {NOLDN, NULL,
321 {0x20,0x21,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2a,
322 0x2b,0x2c,0x2d,EOT},
323 {0x05,0x41,0x19,0x34,0x00,0x00,0x00,0x00,0x00,0x00,
324 0x00,0x08,0x08,EOT}},
325 {0x0, "Floppy",
326 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf2,0xf4,EOT},
327 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x03,0x00,EOT}},
328 {0x1, "COM1",
329 {0x30,0x60,0x61,0x70,0xf0,EOT},
330 {0x01,0x03,0xf8,0x04,0x00,EOT}},
331 {0x2, "COM2",
332 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
333 {0x01,0x02,0xf8,0x03,0x00,0x04,EOT}},
334 {0x3, "Parallel port",
335 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
336 {0x01,0x03,0x78,0x07,0x03,0x42,EOT}},
337 {0x4, "Hardware monitor",
338 {0x30,0x60,0x61,0x70,EOT},
339 {0x01,0x02,0x95,0x00,EOT}},
340 {0x5, "Keyboard",
341 {0x30,0x60,0x61,0x70,0x72,0xf0,EOT},
342 {0x01,0x00,0x60,0x00,0x00,0x83,EOT}},
343 {0x6, "GPIO",
344 {0x70,0xe0,0xe1,0xe2,0xe3,0xd0,0xd1,0xd2,0xd3,0xc0,
345 0xc1,0xc2,0xc3,0xb0,0xb1,0xb2,0xb3,0xf0,0xf1,0xf2,
346 0xf3,EOT},
347 {0x00,0x00,0xff,NANA,0x00,0x00,0xff,NANA,0x00,0x00,
348 0x0f,NANA,0x00,0x00,0x0f,NANA,0x00,0x00,0xff,NANA,
349 0x00,EOT}},
350 {0x7, "VID",
351 {0x30,0x60,0x61,EOT},
352 {0x00,0x00,0x00,EOT}},
353 {0x7, "SPI",
354 {0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xfa,
355 0xfb,0xfc,0xfd,0xfe,0xff,EOT},
356 {0x10,0x04,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
357 0x00,0x00,0x00,0x00,0x00,EOT}},
358 {0xa, "PME, ACPI",
359 {0x30,0xf0,0xf1,0xf4,0xf5,EOT},
360 {0x00,0x00,0x01,0x06,0x1c,EOT}},
361 {EOT}}},
362 {0x0604, "F71805F/FG", {
363 /* We assume reserved bits are read as 0. */
364 {NOLDN, NULL,
365 {0x20,0x21,0x23,0x24,0x25,0x26,0x27,0x28,0x29,EOT},
366 {0x04,0x06,0x19,0x34,0x00,0x00,0x3f,0x08,0x00,EOT}},
367 {0x0, "Floppy",
368 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf2,0xf4,EOT},
369 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x03,0x00,EOT}},
370 {0x1, "COM1",
371 {0x30,0x60,0x61,0x70,0xf0,EOT},
372 {0x01,0x03,0xf8,0x04,0x00,EOT}},
373 {0x2, "COM2",
374 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
375 {0x01,0x02,0xf8,0x03,0x00,0x04,EOT}},
376 {0x3, "Parallel port",
377 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
378 {0x01,0x03,0x78,0x07,0x03,0x42,EOT}},
379 {0x4, "Hardware monitor",
380 {0x30,0x60,0x61,0x70,EOT},
381 {0x00,0x02,0x95,0x00,EOT}},
382 {0x6, "GPIO",
383 {0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
384 0xe9,0xf0,0xf1,0xf3,0xf4,EOT},
385 {0x00,0x00,0x00,NANA,0x00,0x00,0x00,0x00,0x00,0x00,
386 0x00,0x00,NANA,0x00,NANA,EOT}},
387 {0xa, "PME",
388 {0x30,0xf0,0xf1,EOT},
389 {0x00,0x00,0x00,EOT}},
390 {EOT}}},
391 {0x0581, "F8000", { /* Fintek/ASUS F8000 */
392 {EOT}}},
393 {0x0802, "F81216D/DG", {
394 {NOLDN, NULL,
395 {0x25,0x2f,EOT},
396 {0x00,RSVD,EOT}},
397 {0x0, "UART1",
398 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
399 {NANA,NANA,NANA,NANA,0x00,0x40,EOT}},
400 {0x1, "UART2",
401 {0x30,0x60,0x61,0x70,0xf0,EOT},
402 {NANA,NANA,NANA,NANA,0x00,EOT}},
403 {0x2, "UART3",
404 {0x30,0x60,0x61,0x70,0xf0,EOT},
405 {NANA,NANA,NANA,NANA,0x00,EOT}},
406 {0x3, "UART4",
407 {0x30,0x60,0x61,0x70,0xf0,EOT},
408 {NANA,NANA,NANA,NANA,0x00,EOT}},
409 {0x8, "WDT",
410 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
411 {0x00,NANA,NANA,NANA,NANA,NANA,EOT}},
412 {EOT}}},
413 {0x1602, "F81216AD", {
414 {NOLDN, NULL,
415 {0x25,0x27,EOT},
416 {0x00,NANA,EOT}},
417 {0x0, "UART1",
418 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf4,0xf5,EOT},
419 {NANA,NANA,NANA,NANA,0x00,0x40,0x00,0x00,EOT}},
420 {0x1, "UART2",
421 {0x30,0x60,0x61,0x70,0xf0,0xf4,0xf5,EOT},
422 {NANA,NANA,NANA,NANA,0x00,0x00,0x00,EOT}},
423 {0x2, "UART3",
424 {0x30,0x60,0x61,0x70,0xf0,0xf4,0xf5,EOT},
425 {NANA,NANA,NANA,NANA,0x00,0x00,0x00,EOT}},
426 {0x3, "UART4",
427 {0x30,0x60,0x61,0x70,0xf0,0xf4,0xf5,EOT},
428 {NANA,NANA,NANA,NANA,0x00,0x00,0x00,EOT}},
429 {0x8, "WDT",
430 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
431 {0x00,NANA,NANA,NANA,NANA,NANA,EOT}},
432 {EOT}}},
433 {0x0407, "F81865F/F-I", {
434 {NOLDN, NULL,
435 {0x02,0x07,0x20,0x21,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2a,0x2a,0x2b,0x2c,0x2d,EOT},
436 {NANA,0x00,0x07,0x04,0x19,0x34,NANA,NANA,NANA,0x00,0x00,0x00,0x00,0x1f,0x00,0x08,EOT}},
437 {0x00, "FDC",
438 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf2,0xf4,EOT},
439 {NANA,0x03,0xf0,NANA,NANA,NANA,NANA,NANA,EOT}},
440 {0x03, "LPT",
441 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
442 {NANA,0x03,0x78,NANA,NANA,NANA,EOT}},
443 {0x04, "HWMON",
444 {0x30,0x60,0x61,0x70,EOT},
445 {NANA,0x02,0x95,NANA,EOT}},
446 {0x05, "KBC",
447 {0x30,0x60,0x61,0x70,0x72,0xfe,0xf0,EOT},
448 {NANA,0x00,0x60,NANA,NANA,NANA,0x71,EOT}},
449 {0x06, "GPIO",
450 {0x30,0x60,0x61,0x70,0xf1,0xf2,0xf3,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xe0,0xe1,0xe2,0xe3,0xef,0xd0,0xd1,0xd2,0xd3,0xc0,0xc1,0xc2,0xc3,0xb0,0xb1,0xb2,0xb3,0xa0,0xa1,0xa2,0xa3,0x90,0x91,0x92,0x93,EOT},
451 {NANA,0x00,0x60,NANA,0x00,NANA,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,NANA,0x00,NANA,0x00,0xff,NANA,0x00,0x00,0xff,NANA,0x00,0x00,0xff,NANA,0x00,0x00,0xff,NANA,0x00,NANA,NANA,NANA,NANA,EOT}},
452 {0x07, "WDT",
453 {0x30,0x60,0x61,0xf5,0xf6,0xfa,EOT},
454 {NANA,0x00,0x00,0x00,0x00,NANA,EOT}},
455 {0x08, "SPI",
456 {0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xfa,0xfb,0xfc,0xfd,0xfe,0xff,EOT},
457 {0x10,0x04,NANA,NANA,0x00,0x00,NANA,NANA,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
458 {0x0a, "PME & ACPI",
459 {0x30,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,EOT},
460 {NANA,NANA,NANA,NANA,NANA,0x06,NANA,0x00,EOT}},
461 {0x0b, "RTC",
462 {0x30,0x60,0x61,0x70,EOT},
463 {NANA,0x00,0x00,NANA,EOT}},
464 {0x10, "UART1",
465 {0x30,0x60,0x61,0x70,0xf0,0xf2,0xf4,0xf5,EOT},
466 {NANA,0x03,0xf8,NANA,NANA,NANA,0x00,0x00,EOT}},
467 {0x11, "UART2",
468 {0x30,0x60,0x61,0x70,0xf0,0xf2,0xf4,0xf5,EOT},
469 {NANA,0x02,0xf8,NANA,NANA,NANA,0x00,0x00,EOT}},
470 {0x12, "UART3",
471 {0x30,0x60,0x61,0x70,0xf0,0xf2,0xf4,0xf5,EOT},
472 {NANA,0x03,0xe8,NANA,NANA,NANA,0x00,0x00,EOT}},
473 {0x13, "UART4",
474 {0x30,0x60,0x61,0x70,0xf0,0xf2,0xf4,0xf5,EOT},
475 {NANA,0x02,0xe8,NANA,NANA,NANA,0x00,0x00,EOT}},
476 {0x14, "UART5",
477 {0x30,0x60,0x61,0x70,0xf0,0xf2,0xf4,0xf5,EOT},
478 {NANA,0x00,0x00,NANA,NANA,NANA,0x00,0x00,EOT}},
479 {0x15, "UART6",
480 {0x30,0x60,0x61,0x70,0xf0,0xf2,0xf4,0xf5,EOT},
481 {NANA,0x00,0x00,NANA,NANA,NANA,0x00,0x00,EOT}},
482 {EOT}}},
483 {0x1010, "F81866", {
484 {NOLDN, NULL, /* Global Control Registers */
485 {0x02, 0x07, 0x20, 0x21, 0x23, 0x24, 0x25, 0x26, 0x27, 0x2d, EOT},
486 {NANA, 0x00, 0x10, 0x10, 0x19, 0x34, 0x00, 0x03, 0x00, 0x08, EOT}},
487 {NOLDN, NULL,
488 {0x27, 0x2d, 0x28, 0x29, 0x2a, 0x2b, 0x2c, EOT},
489 {0x00, 0x08, 0x60, 0x03, NANA, 0x02, NANA, EOT},
490 ESEL_27H(bank0, dis)}, /* selectable */
491 {NOLDN, NULL,
492 {0x27, 0x28, 0x2c, EOT},
493 {0x00, NANA, 0x0f, EOT},
494 ESEL_27H(bank1, dis)}, /* selectable */
495 {NOLDN, NULL,
496 {0x27, 0x2c, EOT},
497 {0x00, 0x00, EOT},
498 ESEL_27H(bank2, dis)}, /* selectable */
499 {NOLDN, NULL,
500 {0x27, 0x29, 0x2A, 0x2b, 0x2c, EOT},
501 {0x00, 0x03, 0xe7, NANA, NANA, EOT},
502 ESEL_27H(bank0, en)}, /* selectable */
503 {0x00, "FDC",
504 {0x30, 0x60, 0x61, 0x70, 0x74, 0xf0, 0xf2, 0xf4, EOT},
505 {NANA, 0x03, 0xf0, NANA, NANA, NANA, NANA, NANA, EOT}},
506 {0x03, "LPT",
507 {0x30, 0x60, 0x61, 0x70, 0x74, 0xf0, EOT},
508 {NANA, 0x03, 0x78, NANA, NANA, NANA, EOT}},
509 {0x04, "HWMON",
510 {0x30, 0x60, 0x61, 0x70, EOT},
511 {NANA, 0x02, 0x95, NANA, EOT}},
512 {0x05, "KBC",
513 {0x30, 0x60, 0x61, 0x70, 0x72, 0xfe, EOT},
514 {NANA, 0x00, 0x60, NANA, NANA, NANA, EOT}},
515 {0x06, "GPIO",
516 {0x30, 0x60, 0x61, 0x70, 0x71, 0x72, 0x73, 0x7e, 0x7f,
517 0xf0, 0xf1, 0xf2, 0xf3, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, /* f0...f9 GPIO0 */
518 0xe0, 0xe1, 0xe2, 0xe3, 0xe8, 0xe9, /* e0...e9 GPIO1 */
519 0xd0, 0xd1, 0xd2, 0xd3, /* d0...d3 GPIO2 */
520 0xc0, 0xc1, 0xc2, 0xc3, /* c0...c3 GPIO3 */
521 0xb0, 0xb1, 0xb2, 0xb3, /* b0...b3 GPIO4 */
522 0xa0, 0xa1, 0xa2, 0xa3, 0xa8,0xa9, /* a0...a9 GPIO5 */
523 0x90, 0x91, 0x92, 0x93, /* 90...93 GPIO6 */
524 0x80, 0x81, 0x82, 0x83, /* 80...83 GPIO7 */
525 0x88, 0x89, 0x8a, 0x8b, 0x8e, 0x8f, /* 88...8f GPIO8 */
526 EOT},
527 {NANA, 0x00, 0x60, NANA, NANA, NANA, NANA, 0x00, 0x00,
528 0x00, 0x0f, NANA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* f0...f9 GPIO0 */
529 0x00, 0xff, NANA, 0x00, 0x00, 0x00, /* e0...e9 GPIO1 */
530 0x00, 0xff, NANA, 0x00, /* d0...d3 GPIO2 */
531 0x00, 0xff, NANA, 0x00, /* c0...c3 GPIO3 */
532 0x00, 0xff, NANA, 0x00, /* b0...b3 GPIO4 */
533 0x00, 0xff, NANA, 0x00, 0x00, 0x00, /* a0...a9 GPIO5 */
534 0x00, 0xff, NANA, 0x00, /* 90...93 GPIO6 */
535 0x00, 0xff, NANA, 0x00, /* 80...83 GPIO7 */
536 0x00, 0xff, NANA, 0x00, 0x00, 0x00, /* 88...8f GPIO8 */
537 EOT}},
538 {0x07, "WDT",
539 {0x30, 0x60, 0x61, 0xf5, 0xf6, 0xfa, EOT},
540 {NANA, 0x00, 0x00, 0x00, 0x00, NANA, EOT}},
541 {0x0a, "PME, ACPI & ERP",
542 {0x30, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf8, 0xf9, 0xfa,
543 0xfc, 0xfe, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8,
544 0xe9, 0xec, 0xed, 0xee, EOT},
545 {NANA, 0x00, NANA, 0x00, NANA, 0x07, 0x1c, 0x00, 0x00, 0x00, 0x07,
546 0x00, 0x00, 0x0c, 0x00, 0x00, 0x13, 0x09, 0xc7, 0x13, 0x63, 0x10,
547 0x0f, 0x14, 0x00, 0x00, EOT}},
548 {0x10, "UART1",
549 {0x30, 0x60, 0x61, 0x70, 0xf0, 0xf2, 0xf4, 0xf5, 0xf6, EOT},
550 {NANA, 0x03, 0xf8, NANA, NANA, NANA, 0x00, 0x00, 0x00, EOT}},
551 {0x11, "UART2",
552 {0x30, 0x60, 0x61, 0x70, 0xf0, 0xf2, 0xf4, 0xf5, 0xf6, EOT},
553 {NANA, 0x02, 0xf8, NANA, NANA, NANA, 0x00, 0x00, 0x00, EOT}},
554 {0x12, "UART3",
555 {0x30, 0x60, 0x61, 0x70, 0xf0, 0xf2, 0xf4, 0xf5, 0xf6, EOT},
556 {NANA, 0x03, 0xe8, NANA, NANA, NANA, 0x00, 0x00, 0x00, EOT}},
557 {0x13, "UART4",
558 {0x30, 0x60, 0x61, 0x70, 0xf0, 0xf2, 0xf4, 0xf5, 0xf6, EOT},
559 {NANA, 0x02, 0xe8, NANA, NANA, NANA, 0x00, 0x00, 0x00, EOT}},
560 {0x14, "UART5",
561 {0x30, 0x60, 0x61, 0x70, 0xf0, 0xf2, 0xf4, 0xf5, 0xf6, EOT},
562 {NANA, 0x00, 0x00, NANA, NANA, NANA, 0x00, 0x00, 0x00, EOT}},
563 {0x15, "UART6",
564 {0x30, 0x60, 0x61, 0x70, 0xf0, 0xf1, 0xf2, 0xf4, 0xf5, 0xf6, EOT},
565 {NANA, 0x00, 0x00, NANA, NANA, 0x04, NANA, 0x00, 0x00, 0x00, EOT}},
566 {EOT}}},
567 {0x0215, "F81804/F81962/F81964/F81966/F81967", {
568 {NOLDN, "Global",
569 {0x02, 0x07, 0x20, 0x21, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29,
570 0x2a, 0x2b, 0x2c, 0x2d, EOT},
571 {NANA, 0x00, 0x15, 0x02, 0x19, 0x34, 0x00, 0x23, 0x02, 0xa0, 0x00,
572 0x00, 0x02, 0x0c, 0x28, EOT},
573 ESEL_27H(bank0, dis)}, /* selectable */
574 {NOLDN, "Global",
575 {0x27, 0x28, 0x2a, 0x2b, 0x2c, EOT},
576 {0x02, 0x00, 0x00, 0x00, 0x00, EOT},
577 ESEL_27H(bank1, dis)}, /* selectable */
578 {NOLDN, "Global",
579 {0x27, 0x28, 0x2a, 0x2b, 0x2c, EOT},
580 {0x02, 0x03, 0x60, 0x00, 0x00, EOT},
581 ESEL_27H(bank2, dis)}, /* selectable */
582 {NOLDN, "Global",
583 {0x27, 0x28, 0x2a, 0x2b, 0x2c, EOT},
584 {0x02, 0x5b, 0x03, 0x00, 0x18, EOT},
585 ESEL_27H(bank3, dis)}, /* selectable */
586 {NOLDN, "Global",
587 {0x27, 0x29, 0x2c, 0x2b, 0x2c, EOT},
588 {0x02, 0x03, 0xe7, NANA, 0x00, EOT},
589 ESEL_27H(bank0, en)}, /* selectable */
590 {0x03, "LPT",
591 {0x30, 0x60, 0x61, 0x70, 0x74, 0xf0, EOT},
592 {NANA, 0x03, 0x78, 0x07, 0x03, 0xc2, EOT}},
593 {0x04, "HWMON",
594 {0x30, 0x60, 0x61, 0x70, EOT},
595 {NANA, 0x02, 0x95, NANA, EOT}},
596 {0x05, "KBC",
597 {0x30, 0x60, 0x61, 0x70, 0x72, 0xfe, EOT},
598 {NANA, 0x00, 0x60, NANA, NANA, 0x00, EOT}},
599 {0x06, "GPIO",
600 {0x30, 0x60, 0x61, 0x70, 0x71, 0x72, 0x73, 0x7e, 0x7f,
601 0xf0, 0xf1, 0xf2, 0xf3, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, /* f0...f8 GPIO0 */
602 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, /* e0...e6 GPIO1 */
603 0xd0, 0xd1, 0xd2, /* d0...d2 GPIO2 */
604 0xc0, 0xc1, 0xc2, 0xc3, /* c0...c3 GPIO3 */
605 0xb0, 0xb1, 0xb2, 0xb3, /* b0...b3 GPIO4 */
606 0xa0, 0xa1, 0xa2, 0xa4, 0xa5, 0xa6, /* a0...c6 GPIO5 */
607 0x90, 0x91, 0x92, 0x93, /* 90...93 GPIO6 */
608 0x80, 0x81, 0x82, 0x83, /* 80...83 GPIO7 */
609 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, /* 88...8e GPIO8 */
610 0x98, 0x99, 0x9a, 0x9b, /* 98...9b GPIO9 */
611 EOT},
612 {NANA, 0x00, 0x60, NANA, NANA, NANA, NANA, 0x00, 0x00,
613 0x00, 0x0f, NANA, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, /* f0...f8 GPIO0 */
614 0x00, 0xff, NANA, 0x00, 0x00, 0xff, 0x00, /* e0...e6 GPIO1 */
615 0x00, 0xff, NANA, /* d0...d2 GPIO2 */
616 0x00, 0xff, NANA, 0x00, /* c0...c3 GPIO3 */
617 0x00, 0xff, NANA, 0x00, /* b0...b3 GPIO4 */
618 0x00, 0xff, NANA, 0x00, 0xff, 0x00, /* a0...c6 GPIO5 */
619 0x00, 0xff, NANA, 0x00, /* 90...93 GPIO6 */
620 0x00, 0xff, NANA, 0x00, /* 80...83 GPIO7 */
621 0x00, 0xff, NANA, 0x00, 0x00, 0xff, 0x00, /* 88...8e GPIO8 */
622 0x00, 0xff, NANA, 0x00, /* 98...9b GPIO9 */
623 EOT}},
624 {0x07, "WDT",
625 {0x30, 0x60, 0x61, 0xf0, 0xf5, 0xf6, 0xfa, EOT},
626 {NANA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, EOT}},
627 {0x0a, "PME, ACPI & ERP",
628 {0x30, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,
629 0xec, 0xed, 0xee, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf8,
630 0xf9, 0xfa, 0xfc, 0xfd, 0xfe, EOT},
631 {NANA, 0x00, 0x0c, 0x8c, 0x13, 0x09, 0xc7, 0x09, 0x63, 0x00, 0x0f,
632 0x14, 0x00, 0x00, 0x00, NANA, 0x00, NANA, 0x07, 0x1c, 0x00, 0x00,
633 0x00, 0x00, 0x07, 0x00, 0x00, EOT}},
634 {0x0f, "SPI Master",
635 {0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, EOT},
636 {0x00, 0x00, 0x00, 0x00, 0x00, 0x03, EOT}},
637 {0x10, "UART1",
638 {0x30, 0x60, 0x61, 0x70, 0xf0, 0xf2, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
639 0xfe, 0xff, EOT},
640 {NANA, 0x03, 0xf8, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
641 0x00, 0xff, EOT}},
642 {0x11, "UART2",
643 {0x30, 0x60, 0x61, 0x70, 0xf0, 0xf2, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
644 0xfe, 0xff, EOT},
645 {NANA, 0x02, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
646 0x00, 0xff, EOT}},
647 {0x12, "UART3",
648 {0x30, 0x60, 0x61, 0x70, 0xf0, 0xf2, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
649 0xfe, 0xff, EOT},
650 {NANA, 0x03, 0xe8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
651 0x00, 0xff, EOT}},
652 {0x13, "UART4",
653 {0x30, 0x60, 0x61, 0x70, 0xf0, 0xf2, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
654 0xfe, 0xff, EOT},
655 {NANA, 0x02, 0xe8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
656 0x00, 0xff, EOT}},
657 {0x14, "UART5",
658 {0x30, 0x60, 0x61, 0x70, 0xf0, 0xf2, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
659 0xfe, 0xff, EOT},
660 {NANA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
661 0x00, 0xff, EOT}},
662 {0x15, "UART6",
663 {0x30, 0x60, 0x61, 0x70, 0xf0, 0xf2, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
664 0xfe, 0xff, EOT},
665 {NANA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
666 0x00, 0xff, EOT}},
667 {EOT}}},
668 {EOT}
671 static const struct superio_registers hwm_table[] = {
672 {0x0110, "F71808A", {
673 {NOLDN, NULL,
674 {0x01, 0x02, 0x03, 0x08, 0x0a, 0x0b, 0x0c, 0x0d,
675 0x0f,
676 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
677 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
678 /* 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
679 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, */
680 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
681 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
682 0x60, 0x61, 0x62, 0x63, 0x64, 0x66, 0x6b, 0x6c,
683 0x6d, 0x6f, 0x7f,
684 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
685 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e,
686 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
687 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d,
688 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x98,
689 0x9b, 0x9c, 0x9e, 0x9f,
690 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
691 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
692 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
693 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
694 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
695 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
696 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xec, 0xed, 0xee,
697 0xef, EOT},
698 {0x03, 0x00, 0x01, 0x4c, 0x00, 0x00, 0x55, 0x00,
699 0x20,
700 NANA, NANA, NANA, NANA, RSVD, RSVD, RSVD, NANA,
701 NANA, RSVD, RSVD, RSVD, RSVD, NANA, NANA, NANA,
702 /* RSVD, RSVD, RSVD, RSVD, RSVD, RSVD, RSVD, RSVD,
703 RSVD, RSVD, RSVD, RSVD, RSVD, RSVD, RSVD, RSVD, */
704 0x44, 0x00, NANA, 0x00, 0x00, 0x00, 0x00, 0x00,
705 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
706 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x40,
707 0x04, 0x00, 0x00,
708 RSVD, RSVD, NANA, RSVD, NANA, RSVD, RSVD, RSVD,
709 NANA, NANA, NANA, NANA, NANA, RSVD, RSVD,
710 RSVD, RSVD, NANA, NANA, NANA, NANA, RSVD, RSVD,
711 RSVD, RSVD, RSVD, RSVD, RSVD, RSVD,
712 0x00, NANA, NANA, 0x00, 0x2e, 0xff, 0x05, 0x44,
713 0x05, 0x55, 0x66, 0x00,
714 0x03, 0xff, 0x00, 0x83, 0x03, 0xff, 0x3c, 0x32,
715 0x28, 0x1e, 0xff, 0xd9, 0xb2, 0x99, 0x80, 0x1d,
716 0x0c, 0x25, 0x00, 0x80, 0x03, 0xff, 0x3c, 0x32,
717 0x28, 0x1e, 0xff, 0xd9, 0xb2, 0x99, 0x80, 0x1e,
718 0x0f, 0xff, RSVD, 0x7f, RSVD, RSVD, RSVD, RSVD,
719 RSVD, RSVD, RSVD, RSVD, RSVD, RSVD, RSVD, 0x00,
720 NANA, NANA, NANA, NANA, NANA, 0x00, 0x01, 0x01,
721 0x00, EOT}},
722 {EOT}}},
723 {0x1010, "F81866", {
724 /* 6.4.2.1 Configuration Setting */
725 {NOLDN, "General",
726 {0x01, 0x02, 0x03, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0f, 0xe0,
727 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xec, 0xed,
728 0xee, 0xef, EOT},
729 {0x03, 0x00, 0x00, 0x4c, 0x00, 0x10, 0x00, 0x55, 0x00, 0x00, 0x00,
730 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
731 0x01, 0x00, EOT}},
732 {NOLDN, "TSI/I2C",
733 {0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xec, 0xed,
734 0xee, 0xef, EOT},
735 {NANA, NANA, NANA, NANA, NANA, NANA, NANA, NANA, NANA, 0x00, 0x00,
736 0x01, 0x00, EOT},
737 ESEL_ECH(temp)}, /* selectable */
738 /* 6.4.2.3 PECI 3.0 & Temperature Setting */
739 {NOLDN, "PECI",
740 {0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a,
741 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, EOT},
742 {0x00, 0x00, RSVD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
743 0x00, 0x00, 0x00, 0x00, 0x00, EOT}},
744 {NOLDN, "Temperature Monitor",
745 {0x60, 0x61, 0x62, 0x63, 0x64, 0x66, 0x6b, 0x6c, 0x6d, 0x6f, 0x70,
746 0x72, 0x73, 0x74, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x80, 0x81, 0x82,
747 0x83, 0x84, 0x85, 0x7f, 0x8e, EOT},
748 {0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x44, 0x04, RSVD, RSVD,
749 RSVD, RSVD, RSVD, RSVD, RSVD, RSVD, RSVD, RSVD, 0x64, 0x55, 0x64,
750 0x55, 0x64, 0x55, 0x00, 0xaa, EOT}},
751 /* 6.4.2.4 Voltage Setting */
752 {NOLDN, "Voltage Monitor",
753 {0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x3f, 0x20, 0x21,
754 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x2d, 0x2e, 0x2f, 0x30, 0x31,
755 0x36, 0x37, 0x38, 0x39, 0x3a, EOT},
756 {0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, RSVD, RSVD,
757 RSVD, RSVD, RSVD, RSVD, RSVD, RSVD, RSVD, RSVD, RSVD, 0x89, 0xf2,
758 0xe2, 0xe1, 0x83, 0x96, 0xff, EOT}},
759 {NOLDN, "FAN Control", /* 6.4.2.5 Fan Control Setting - Control Setting */
760 {0x90, 0x91, 0x92, 0x93, 0x97, 0x98, 0x99, 0x9a, 0x9c, 0x9d, 0x9e,
761 0x9f, EOT},
762 {0x00, RSVD, RSVD, 0x00, 0x00, 0x44, 0x02, 0x00, 0x55, 0x05, 0x66,
763 0x0a, EOT},
765 {NOLDN, "FAN Control",
766 {0x94, 0x95, 0x96, 0x9b, 0x9f, EOT},
767 {0x00, NANA, 0x19, 0x19, 0x0a, EOT},
768 ESEL_9FH(bank0)}, /* selectable */
769 {NOLDN, "FAN Control",
770 {0x94, 0x95, 0x96, 0x9b, 0x9f, EOT},
771 {0x00, 0x00, 0x00, 0x19, 0x0a, EOT},
772 ESEL_9FH(bank1)}, /* selectable */
773 {NOLDN, "FAN1 Monitor", /* 6.4.2.5 Fan Control Setting - FAN 1,2,3 */
774 {0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa,
775 0xab, 0xac, 0xad, 0xae, 0xaf, EOT},
776 {0x0f, 0xff, 0x00, 0x01, 0x03, 0xff, 0x3c, 0x32, 0x28, 0x1e, 0xff,
777 0xd9, 0xb2, 0x99, 0x80, 0x1d, EOT}},
778 {NOLDN, "FAN2 Monitor",
779 {0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba,
780 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, EOT},
781 {0x0f, 0xff, 0x00, 0x01, 0x03, 0xff, 0x3c, 0x32, 0x28, 0x1e, 0xff,
782 0xd9, 0xb2, 0x99, 0x80, 0x1d, EOT}},
783 {NOLDN, "FAN3 Monitor",
784 {0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca,
785 0xcb, 0xcc, 0xcd, 0xce, 0xcf, EOT},
786 {0x0f, 0xff, 0x00, 0x01, 0x03, 0xff, 0x3c, 0x32, 0x28, 0x1e, 0xff,
787 0xd9, 0xb2, 0x99, 0x80, 0x1d, EOT}},
788 {EOT}}},
789 {0x0215, "F81804/F81962/F81964/F81966/F81967", {
790 {NOLDN, "General", /* 5.4.6 Hardware Monitor General Setting & 5.4.13 PECI/TSI/I2C Setting */
791 {0x01, 0x02, 0x03, 0x04, 0x05, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c,
792 0x0d, 0x0e, 0x0f, EOT},
793 {0x03, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x4c, 0x00, 0x00, 0x00, 0x55,
794 0x00, 0x00, 0x02, EOT}},
795 {NOLDN, "PECI Command", /* 5.4.22 PECI Command Setting */
796 {0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a,
797 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, EOT},
798 {0x44, 0x00, NANA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
799 0x00, 0x00, 0x00, 0x00, 0x00, EOT}},
800 {NOLDN, "TSI/MXM", /* 5.4.39 TSI/MXM Temperature */
801 {0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a,
802 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, EOT},
803 {NANA, NANA, NANA, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
804 0x00, 0x00, NANA, 0x01, 0x00, EOT}},
805 {NOLDN, "Temperature Monitor", /* 5.4.56 Temperature Related Register */
806 {0x60, 0x61, 0x62, 0x63, 0x64, 0x66, 0x6b, 0x6c, 0x6d, 0x6f, 0x7f,
807 0x72, 0x74, 0x7a, 0x7b, 0x7e, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85,
808 EOT},
809 {0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x44, 0x04, NANA, 0x00,
810 NANA, NANA, NANA, NANA, NANA, 0x46, 0x3c, 0x64, 0x55, 0x64, 0x55,
811 EOT}},
812 {NOLDN, "Voltage Monitor", /* 5.4.69 Voltage Setting */
813 {0x10, 0x11, 0x12, 0x14, 0x15, 0x16, 0x17, 0x20, 0x21, 0x22, 0x23,
814 0x24, 0x25, 0x26, 0x27, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x36, 0x37,
815 0x38, 0x39, 0x3a, 0x3f, EOT},
816 {0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, NANA, NANA, NANA, NANA,
817 NANA, NANA, NANA, NANA, NANA, NANA, NANA, 0x89, 0xf2, 0xe2, 0xe1,
818 0x83, 0x96, 0xff, 0x00, EOT}},
819 {NOLDN, "FAN Control", /* 5.4.79 General Fan Control Setting */
820 {0x90, 0x91, 0x92, 0x93, 0x94, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b,
821 0x9c, 0x9d, 0x9e, 0x9f, EOT},
822 {0x00, NANA, NANA, 0x00, 0x00, 0x15, 0x00, 0x44, 0x02, 0x00, 0x15,
823 0x55, 0x05, 0x66, 0x0a, EOT},
824 ESEL_9FH(bank0)}, /* selectable */
825 {NOLDN, "FAN Control",
826 {0x94, 0x95, 0x96, 0x97, 0x9a, 0x9b, EOT},
827 {0x00, 0x00, 0x00, 0x00, 0x00, 0x15, EOT},
828 ESEL_9FH(bank1)}, /* selectable */
829 {NOLDN, "FAN1 Monitor", /* 5.4.101 FAN1 Control Register */
830 {0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa,
831 0xab, 0xac, 0xad, 0xae, 0xaf, EOT},
832 {0x0f, 0xff, 0x00, 0x80, 0x03, 0xff, 0x3c, 0x32, 0x28, 0x1e, 0xff,
833 0xd9, 0xb2, 0x99, 0x80, 0x1d, EOT}},
834 {NOLDN, "FAN2 Monitor", /* 5.4.101 FAN1 Control Register */
835 {0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba,
836 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, EOT},
837 {0x0f, 0xff, 0x00, 0x80, 0x03, 0xff, 0x3c, 0x32, 0x28, 0x1e, 0xff,
838 0xd9, 0xb2, 0x99, 0x80, 0x1d, EOT}},
839 {NOLDN, "FAN3 Monitor", /* 5.4.101 FAN1 Control Register */
840 {0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca,
841 0xcb, 0xcc, 0xcd, 0xce, 0xcf, EOT},
842 {0x0f, 0xff, 0x00, 0x80, 0x03, 0xff, 0x3c, 0x32, 0x28, 0x1e, 0xff,
843 0xd9, 0xb2, 0x99, 0x80, 0x1d, EOT}},
844 {EOT}}},
845 {EOT}
848 void probe_idregs_fintek(uint16_t port)
850 uint16_t vid, did, hwmport;
852 probing_for("Fintek", "", port);
854 enter_conf_mode_winbond_fintek_ite_8787(port);
856 did = regval(port, DEVICE_ID_BYTE1_REG);
857 did |= (regval(port, DEVICE_ID_BYTE2_REG) << 8);
859 vid = regval(port, VENDOR_ID_BYTE1_REG);
860 vid |= (regval(port, VENDOR_ID_BYTE2_REG) << 8);
862 if (vid != FINTEK_VENDOR_ID || superio_unknown(reg_table, did)) {
863 if (verbose)
864 printf(NOTFOUND "vid=0x%04x, id=0x%04x\n", vid, did);
865 exit_conf_mode_winbond_fintek_ite_8787(port);
866 return;
869 printf("Found Fintek %s (vid=0x%04x, id=0x%04x) at 0x%x\n",
870 get_superio_name(reg_table, did), vid, did, port);
871 chip_found = 1;
873 dump_superio("Fintek", reg_table, port, did, LDN_SEL);
875 if (extra_dump) {
876 regwrite(port, LDN_SEL, 0x04); /* Select LDN 4 (HWM). */
878 /* Get HWM base address (stored in LDN 4, index 0x60/0x61). */
879 hwmport = regval(port, 0x60) << 8;
880 hwmport |= regval(port, 0x61);
882 /* HWM address register = HWM base address + 5. */
883 hwmport += 5;
885 printf("Hardware monitor (0x%04x)\n", hwmport);
886 dump_superio("Fintek-HWM", hwm_table, hwmport, did, LDN_SEL);
889 exit_conf_mode_winbond_fintek_ite_8787(port);
893 void probe_idregs_fintek_alternative(uint16_t port)
895 uint16_t vid, did;
897 probing_for("Fintek", "", port);
899 enter_conf_mode_fintek_7777(port);
901 did = regval(port, DEVICE_ID_BYTE1_REG);
902 did |= (regval(port, DEVICE_ID_BYTE2_REG) << 8);
904 vid = regval(port, VENDOR_ID_BYTE1_REG);
905 vid |= (regval(port, VENDOR_ID_BYTE2_REG) << 8);
907 if (vid != FINTEK_VENDOR_ID || superio_unknown(reg_table, did)) {
908 if (verbose)
909 printf(NOTFOUND "vid=0x%04x, id=0x%04x\n", vid, did);
910 exit_conf_mode_fintek_7777(port);
911 return;
914 printf("Found Fintek %s (vid=0x%04x, id=0x%04x) at 0x%x\n",
915 get_superio_name(reg_table, did), vid, did, port);
916 chip_found = 1;
918 dump_superio("Fintek", reg_table, port, did, LDN_SEL);
920 exit_conf_mode_fintek_7777(port);
923 void print_fintek_chips(void)
925 print_vendor_chips("Fintek", reg_table);