2 * This file is part of the superiotool project.
4 * Copyright (C) 2010 Google Inc.
5 * Written by David Hendricks <dhendrix@google.com> for Nuvoton Technology Corp.
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 DEVICE_ID_REG 0x20 /* Super I/O ID (SID) / family */
21 #define DEVICE_REV_REG 0x27 /* Super I/O revision ID (SRID) */
23 static const struct superio_registers reg_table
[] = {
24 {0xfc, "WPCE775x / NPCE781x", {
26 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
27 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT
},
28 {0xfc,0x11,RSVD
,RSVD
,RSVD
,0x00,0x00,MISC
,0x00,
29 0x04,RSVD
,RSVD
,RSVD
,0x00,RSVD
,RSVD
,EOT
}},
30 {0x03, "CIR Port (CIRP)", /* where supported */
31 {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT
},
32 {0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT
}},
33 {0x04, "Mobile System Wake-Up Control Config (MSWC)",
34 {0x30,0x60,0x61,0x70,0x71,0x74,0x75,EOT
},
35 {0x00,0x00,0x00,0x00,0x03,0x04,0x04,EOT
}},
36 {0x05, "Mouse config (KBC)",
37 {0x30,0x70,0x71,0x74,0x75,EOT
},
38 {0x00,0x0c,0x03,0x04,0x04,EOT
}},
39 {0x06, "Keyboard config (KBC)",
40 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,EOT
},
41 {0x00,0x00,0x60,0x00,0x64,0x01,0x03,0x04,0x04,EOT
}},
42 {0x0f, "Shared memory (SHM)",
43 {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,0xf2,
44 0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,EOT
},
45 {0x00,0x00,0x00,0x00,0x00,0x04,0x04,MISC
,0x07,RSVD
,
46 RSVD
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT
}},
47 {0x11, "Power management I/F Channel 1 (PM1)",
48 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,EOT
},
49 {0x00,0x00,0x62,0x00,0x66,0x01,0x03,0x04,0x04,EOT
}},
50 {0x12, "Power management I/F Channel 2 (PM2)",
51 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,EOT
},
52 {0x00,0x00,0x68,0x00,0x6c,0x01,0x03,0x04,0x04,EOT
}},
53 {0x15, "Enhanced Wake On CIR (EWOC)",
54 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,EOT
},
55 {0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x04,0x04,EOT
}},
56 {0x17, "Power Management I/F Channel 3 (PM3)",
57 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,EOT
},
58 {0x00,0x00,0x6a,0x00,0x6e,0x01,0x03,0x04,0x04,EOT
}},
59 {0x1a, "Serial Port with Fast Infrared Port (FIR)",
60 {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT
},
61 {0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT
}},
65 {0xb472, "NCT6775F (A)", {
67 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
68 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT
},
69 {0xb4,0x72,0xff,0x78,0x40,0x00,0x00,0x7d,0x00,
70 0x00,0x58,0x77,0xfc,0x04,0x00,MISC
,EOT
}},
72 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
74 {0x03,0x03,0xf0,0x06,0x02,0x8e,0x00,0xff,0x00,
76 {0x01, "Parallel Port",
77 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT
},
78 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT
}},
80 {0x30,0x60,0x61,0x70,0xf0,EOT
},
81 {0x01,0x03,0xf8,0x04,0x00,EOT
}},
83 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT
},
84 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT
}},
85 {0x05, "Keyboard Controller",
86 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT
},
87 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,EOT
}},
89 {0x30,0x60,0x61,0x70,EOT
},
90 {0x00,0x00,0x00,0x00,EOT
}},
91 {0x07, "GPIO6, GPIO7, GPIO8, GPIO9",
92 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
93 0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xf4,0xf5,
95 {0x18,0xff,0x00,0x00,0x00,0xef,0x00,0x00,0x00,
96 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,
98 {0x08, "WDT1, GPIO0, GPIO1",
99 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xf0,
100 0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,EOT
},
101 {0x00,0xff,0x00,0x00,0x00,0x00,0xff,
102 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT
}},
103 {0x09, "GPIO2, GPIO3, GPIO4, GPIO5",
104 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
105 0xe8,0xe9,0xea,0xeb,0xee,0xf0,0xf1,0xf2,0xf4,
106 0xf5,0xf6,0xf7,0xfe,EOT
},
107 {0x05,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,
108 0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0xff,
109 0x00,0x00,0x00,0x00,EOT
}},
111 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
112 0xe8,0xe9,0xea,0xeb,0xed,0xf2,0xf3,0xf4,0xf6,
114 {0x00,0x01,0x00,0x00,0x00,0x00,0x02,0x1c,0x00,
115 0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,
117 {0x0b, "Hardware Monitor, Front Panel LED",
118 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,
119 0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,
122 {0x00,0x00,0x00,0x00,0x00,0x00,0xc1,0x00,0x00,
123 0x00,0x00,0x10,0x00,0x87,0x47,0x00,0x00,0x00,
127 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,
128 0xee,0xef,0xf1,0xf2,0xf3,0xfa,EOT
},
129 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0f,
130 0x47,0x5b,0x40,0x50,0x10,0x00,EOT
}},
131 {0x0d, "VID, VIDDAC, BUSSEL",
132 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xeb,
133 0xec,0xed,0xee,0xef,0xf3,0xf4,0xf5,0xf6,0xf7,
135 {0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x14,
136 0x01,0x00,0x88,0x00,0x00,0x00,0x00,0x07,0x00,
138 {0x0e, "CIR WAKE-UP",
139 {0x30,0x60,0x61,0x70,EOT
},
140 {0x00,0x00,0x00,0x00,EOT
}},
141 {0x0f, "GPIO Push-Pull or Open-drain",
142 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
143 0xe9,0xf0,0xf2,0xf3,0xf4,0xf8,0xfe,EOT
},
144 {0xff,0xff,0xf7,0xff,0xfb,0xcb,0xff,0xff,0xff,
145 0xff,0x00,0x00,0x00,0x00,0x70,0xff,EOT
}},
147 {0xb473, "NCT6775F (B) / NCT5572D (B) (not all LDNs supported)", {
149 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
150 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT
},
151 {0xb4,0x73,0xff,0x78,0x40,0x00,0x00,0x7d,0x00,
152 0x00,0x58,0x77,0xfc,0x04,0x00,MISC
,EOT
}},
154 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
156 {0x03,0x03,0xf0,0x06,0x02,0x8e,0x00,0xff,0x00,
158 {0x01, "Parallel Port",
159 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT
},
160 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT
}},
162 {0x30,0x60,0x61,0x70,0xf0,EOT
},
163 {0x01,0x03,0xf8,0x04,0x00,EOT
}},
165 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT
},
166 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT
}},
167 {0x05, "Keyboard Controller",
168 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT
},
169 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,EOT
}},
171 {0x30,0x60,0x61,0x70,EOT
},
172 {0x00,0x00,0x00,0x00,EOT
}},
173 {0x07, "GPIO6, GPIO7, GPIO8, GPIO9",
174 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
175 0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xf4,0xf5,
177 {0x18,0xff,0x00,0x00,0x00,0xef,0x00,0x00,0x00,
178 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,
179 0x00,0x00,0x00,EOT
}},
180 {0x08, "WDT1, GPIO0, GPIO1",
181 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xf0,
182 0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,EOT
},
183 {0x00,0xff,0x00,0x00,0x00,0x00,0xff,
184 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT
}},
185 {0x09, "GPIO2, GPIO3, GPIO4, GPIO5",
186 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
187 0xe8,0xe9,0xea,0xeb,0xee,0xf0,0xf1,0xf2,0xf4,
188 0xf5,0xf6,0xf7,0xfe,EOT
},
189 {0x05,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,
190 0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0xff,
191 0x00,0x00,0x00,0x00,EOT
}},
193 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
194 0xe8,0xe9,0xea,0xeb,0xed,0xf2,0xf3,0xf4,0xf6,
196 {0x00,0x01,0x00,0x00,0x00,0x00,0x02,0x1c,0x00,
197 0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,
199 {0x0b, "Hardware Monitor, Front Panel LED",
200 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,
201 0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,
204 {0x00,0x00,0x00,0x00,0x00,0x00,0xc1,0x00,0x00,
205 0x00,0x00,0x10,0x00,0x87,0x47,0x00,0x00,0x00,
209 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,
210 0xee,0xef,0xf1,0xf2,0xf3,0xfa,EOT
},
211 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0f,
212 0x47,0x5b,0x40,0x50,0x10,0x00,EOT
}},
213 {0x0d, "VID, VIDDAC, BUSSEL",
214 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xeb,
215 0xec,0xed,0xee,0xef,0xf3,0xf4,0xf5,0xf6,0xf7,
217 {0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x14,
218 0x01,0x00,0x88,0x00,0x00,0x00,0x00,0x07,0x00,
220 {0x0e, "CIR WAKE-UP",
221 {0x30,0x60,0x61,0x70,EOT
},
222 {0x00,0x00,0x00,0x00,EOT
}},
223 {0x0f, "GPIO Push-Pull or Open-drain",
224 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
225 0xe9,0xf0,0xf2,0xf3,0xf4,0xf8,0xfe,EOT
},
226 {0xff,0xff,0xf7,0xff,0xfb,0xcb,0xff,0xff,0xff,
227 0xff,0x00,0x00,0x00,0x00,0x70,0xff,EOT
}},
229 {0xc332, "NCT6776F (B)", {
231 {0x10,0x11,0x13,0x14,0x16,0x17,0x18,0x19,0x1a,
232 0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,
233 0x24,0x25,0x26,0x27,0x28,0x2a,0x2b,0x2c,0x2d,
235 {0xff,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0xf0,
236 0x78,0x00,0x00,0xff,0xff,0xc3,0x32,0xff,0x00,
237 0x64,0x00,MISC
,0x00,0x00,0xc0,0x00,0x81,0x00,
240 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
242 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
244 {0x01, "Parallel Port",
245 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT
},
246 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT
}},
248 {0x30,0x60,0x61,0x70,0xf0,0xf2,EOT
},
249 {0x01,0x03,0xf8,0x04,0x00,0x00,EOT
}},
251 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT
},
252 {0x01,0x02,0xf8,0x03,0x00,0x00,0x00,EOT
}},
253 {0x05, "Keyboard Controller",
254 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT
},
255 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,EOT
}},
257 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT
},
258 {0x00,0x00,0x00,0x00,0x08,0x09,0x32,0x00,EOT
}},
259 {0x07, "GPIO6, GPIO7, GPIO8, GPIO9",
260 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
261 0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xf4,0xf5,
263 {0x03,0xff,0x00,0x00,0x00,0xef,0x00,0x00,0x00,
264 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,
265 0x00,0x00,0x00,EOT
}},
266 {0x08, "WDT1, GPIO0, GPIO1, GPIOA",
267 {0x30,0x60,0x61,0xe0,0xe1,0xe2,0xe3,0xe4,0xf0,
268 0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,EOT
},
269 {0x02,0x00,0x00,0xff,0x00,0x00,0x00,0xef,0xff,
270 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT
}},
271 {0x09, "GPIO2, GPIO3, GPIO4, GPIO5",
272 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
273 0xe8,0xe9,0xea,0xeb,0xee,0xf0,0xf1,0xf2,0xf4,
274 0xf5,0xf6,0xf7,0xfe,EOT
},
275 {0x04,0xdf,0x00,0x00,0x00,0xff,0x00,0x00,0x00,
276 0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0xff,
277 0x00,0x00,0x00,0x00,EOT
}},
279 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,
280 0xee,0xf0,0xf2,0xf3,0xf4,0xf6,0xf7,0xfe,EOT
},
281 {0x01,0x00,0x00,0x00,0x00,0x02,0x1c,0x00,0x00,
282 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,EOT
}},
283 {0x0b, "Hardware Monitor, Front Panel LED",
284 {0x30,0x60,0x61,0x62,0x63,0x70,0xe0,0xe1,0xe2,
285 0xf0,0xf1,0xf2,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,
287 {0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x7f,0xff,
288 0x00,0x00,0x00,0x10,0x00,0x87,0x47,0x00,0x00,
291 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe9,0xee,
292 0xef,0xf0,0xf4,0xf5,EOT
},
293 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,
294 0x00,0x00,0x00,0x00,EOT
}},
295 {0x0e, "CIR WAKE-UP",
296 {0x30,0x60,0x61,0x70,EOT
},
297 {0x00,0x00,0x00,0x00,EOT
}},
298 {0x0f, "GPIO Push-Pull or Open-drain",
299 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
300 0xe9,0xf0,0xf1,0xf2,EOT
},
301 {0xff,0xdf,0xff,0xfe,0xf6,0xff,0xff,0xd3,0xff,
302 0x9f,0x00,0x00,0x00,EOT
}},
304 {0xe0,0xe1,0xe3,0xe4,EOT
},
305 {0x00,0x80,0x00,0x00,EOT
}},
307 {0x30,0xe0,0xe1,0xe2,EOT
},
308 {0x20,0x20,0x04,0x05,EOT
}},
310 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,EOT
},
311 {0x01,0x00,0x00,0x00,0x01,0x00,EOT
}},
313 {0xc333, "NCT6776F/D (C)", {
315 {0x10,0x11,0x13,0x14,0x16,0x17,0x18,0x19,0x1a,
316 0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,
317 0x24,0x25,0x26,0x27,0x28,0x2a,0x2b,0x2c,0x2d,
319 {0xff,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0xf0,
320 0x78,0x00,0x00,0xff,0xff,0xc3,0x33,0xff,0x00,
321 0x64,0x00,MISC
,0x00,0x00,0xc0,0x00,0x81,0x00,
324 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
326 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
328 {0x01, "Parallel Port",
329 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT
},
330 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT
}},
332 {0x30,0x60,0x61,0x70,0xf0,0xf2,EOT
},
333 {0x01,0x03,0xf8,0x04,0x00,0x00,EOT
}},
335 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT
},
336 {0x01,0x02,0xf8,0x03,0x00,0x00,0x00,EOT
}},
337 {0x05, "Keyboard Controller",
338 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT
},
339 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,EOT
}},
341 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT
},
342 {0x00,0x00,0x00,0x00,0x08,0x09,0x32,0x00,EOT
}},
343 {0x07, "GPIO6, GPIO7, GPIO8, GPIO9",
344 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
345 0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xf4,0xf5,
347 {0x03,0xff,0x00,0x00,0x00,0xef,0x00,0x00,0x00,
348 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,
349 0x00,0x00,0x00,EOT
}},
350 {0x08, "WDT1, GPIO0, GPIO1, GPIOA",
351 {0x30,0x60,0x61,0xe0,0xe1,0xe2,0xe3,0xe4,0xf0,
352 0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,EOT
},
353 {0x02,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0xff,
354 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT
}},
355 {0x09, "GPIO2, GPIO3, GPIO4, GPIO5",
356 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
357 0xe8,0xe9,0xea,0xeb,0xee,0xf0,0xf1,0xf2,0xf4,
358 0xf5,0xf6,0xf7,0xfe,EOT
},
359 {0x04,0xdf,0x00,0x00,0x00,0xff,0x00,0x00,0x00,
360 0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0xff,
361 0x00,0x00,0x00,0x00,EOT
}},
363 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,
364 0xee,0xf0,0xf2,0xf3,0xf4,0xf6,0xf7,0xfe,EOT
},
365 {0x01,0x00,0x00,0x00,0x00,0x02,0x1c,0x00,0x00,
366 0x00,0x00,0x5c,0x00,0x00,0x00,0xc0,0x00,EOT
}},
367 {0x0b, "Hardware Monitor, Front Panel LED",
368 {0x30,0x60,0x61,0x62,0x63,0x70,0xe0,0xe1,0xe2,
369 0xf0,0xf1,0xf2,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,
371 {0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x7f,0xff,
372 0x00,0x00,0x00,0x10,0x00,0x87,0x47,0x00,0x00,
375 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe9,0xee,
376 0xef,0xf0,0xf4,0xf5,EOT
},
377 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,
378 0x00,0x00,0x00,0x00,EOT
}},
379 {0x0e, "CIR WAKE-UP",
380 {0x30,0x60,0x61,0x70,EOT
},
381 {0x00,0x00,0x00,0x00,EOT
}},
382 {0x0f, "GPIO Push-Pull or Open-drain",
383 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
384 0xe9,0xf0,0xf1,0xf2,EOT
},
385 {0xff,0xdf,0xff,0xfe,0xf6,0xff,0xff,0xd3,0xff,
386 0x9f,0x00,0x00,0x00,EOT
}},
388 {0xe0,0xe1,0xe3,0xe4,EOT
},
389 {0x00,0x80,0x00,0x00,EOT
}},
391 {0x30,0xe0,0xe1,0xe2,EOT
},
392 {0x20,0x20,0x04,0x05,EOT
}},
394 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,EOT
},
395 {0x01,0x00,0x00,0x00,0x01,0x00,EOT
}},
397 {0xc562, "NCT6779D", {
399 {0x10,0x11,0x13,0x14,0x1a,0x1b,0x1c,0x1d,0x20,
400 0x21,0x22,0x24,0x25,0x26,0x27,0x28,0x2a,0x2b,
402 {0xff,0xff,0x00,0x00,0x30,0x70,0x10,0x00,0xc5,
403 0x62,0xff,0x04,0x00,MISC
,0x00,0x00,0xc0,0x00,
405 {0x01, "Parallel Port",
406 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT
},
407 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT
}},
409 {0x30,0x60,0x61,0x70,0xf0,0xf2,EOT
},
410 {0x01,0x03,0xf8,0x04,0x00,0x00,EOT
}},
412 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT
},
413 {0x01,0x02,0xf8,0x03,0x00,0x00,0x00,EOT
}},
414 {0x05, "Keyboard Controller",
415 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT
},
416 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,EOT
}},
418 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT
},
419 {0x00,0x00,0x00,0x00,0x08,0x09,0x32,0x00,EOT
}},
420 {0x07, "GPIO6, GPIO7, GPIO8",
421 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
422 0xec,0xed,0xf4,0xf5,0xf6,0xf7,0xf8,EOT
},
423 {0x0f,0x00,0x00,0x00,0xff,0x00,0x00,0x00,
424 0x00,0x00,0xff,0x00,0x00,0x00,0x00,EOT
}},
425 {0x08, "WDT1, GPIO0, GPIO1",
426 {0x30,0x60,0x61,0xe0,0xe1,0xe2,0xe3,0xe4,0xf0,
427 0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,EOT
},
428 {0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0xff,
429 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT
}},
430 {0x09, "GPIO1, GPIO2, GPIO3, GPIO4, GPIO5, GPIO6, GPIO7, GPIO8",
431 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
432 0xe8,0xe9,0xea,0xeb,0xee,0xf0,0xf1,0xf2,0xf4,
433 0xf5,0xf6,0xf7,0xfe,EOT
},
434 {0x00,0xff,0x00,0x00,0x00,0x7f,0x00,0x00,0x00,
435 0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0xff,
436 0x00,0x00,0x00,0x00,EOT
}},
438 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,
439 0xee,0xf0,0xf2,0xf3,0xf4,0xf6,0xf7,0xfe,EOT
},
440 {0x01,0x00,0x00,0x00,0x00,0x02,0x1c,0x00,0x00,
441 0x00,0x10,0x5c,0x00,0x00,0x00,0xc0,0x00,EOT
}},
442 {0x0b, "Hardware Monitor, Front Panel LED",
443 {0x30,0x60,0x61,0x62,0x63,0x70,0xe0,0xe1,0xe2,
444 0xe4,0xf0,0xf1,0xf2,0xf5,0xf6,0xf7,0xf8,0xf9,
446 {0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x7f,0xff,
447 0xff,0x00,0x00,0x00,0x10,0x00,0x87,0x47,0x00,
452 {0x0e, "CIR WAKE-UP",
453 {0x30,0x60,0x61,0x70,EOT
},
454 {0x00,0x00,0x00,0x00,EOT
}},
455 {0x0f, "GPIO Push-Pull or Open-drain",
456 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,
458 {0xff,0xff,0x7f,0xff,0xff,0xff,0x0f,0xff,0xff,
459 0x9d,0x00,0x00,EOT
}},
460 {0x14, "Port 80 UART",
461 {0xe0,0xe1,0xe2,0xe3,0xe4,EOT
},
462 {0x80,0x00,0x00,0x10,0x00,EOT
}},
464 {0x30,0xe0,0xe1,0xe2,EOT
},
465 {0x20,0x20,0x04,0x05,EOT
}},
470 void probe_idregs_nuvoton(uint16_t port
)
473 uint16_t chip_id
= 0;
474 uint8_t chip_rev
= 0;
478 /* Probe for the 16bit IDs first to avoid collisions */
479 probing_for("Nuvoton", "", port
);
480 enter_conf_mode_winbond_fintek_ite_8787(port
);
481 chip_id
= (regval(port
, DEVICE_ID_REG
) << 8) |
482 regval(port
, DEVICE_ID_REG
+ 1);
483 regwrite(port
, LDN_SEL
, 0x0b);
484 iobase
= (regval(port
, 0x60) << 8) | (regval(port
, 0x61) & ~7);
486 exit_conf_mode_winbond_fintek_ite_8787(port
);
488 if (!superio_unknown(reg_table
, chip_id
)) {
489 printf("Found Nuvoton %s (id=0x%02x) at 0x%x\n",
490 get_superio_name(reg_table
, chip_id
), chip_id
, port
);
492 enter_conf_mode_winbond_fintek_ite_8787(port
);
493 dump_superio("Nuvoton", reg_table
, port
, chip_id
, LDN_SEL
);
494 exit_conf_mode_winbond_fintek_ite_8787(port
);
499 printf(NOTFOUND
"chip_id=0x%04x\n", chip_id
);
501 probing_for("Nuvoton", "(sid=0xfc) ", port
);
503 sid
= regval(port
, DEVICE_ID_REG
);
504 srid
= regval(port
, DEVICE_REV_REG
);
506 if (sid
== 0xfc) { /* WPCE775xL family */
509 * bits 4-0: Chip revision
512 chip_rev
= srid
& 0x1f;
515 if (superio_unknown(reg_table
, sid
)) {
518 "sid=0x%02x, id=0x%02x, rev=0x%02x\n", sid
,
523 printf("Found Nuvoton %s (id=0x%02x, rev=0x%02x) at 0x%x\n",
524 get_superio_name(reg_table
, sid
), chip_id
, chip_rev
, port
);
526 dump_superio("Nuvoton", reg_table
, port
, sid
, LDN_SEL
);
529 if (extra_dump
&& iobase
) {
530 switch (chip_id
& 0xfff0) {
531 case 0xb470: /* NCT6775F */
532 for (i
= 0; i
< 7; i
++)
533 dump_data(iobase
+ 5, i
);
534 dump_data(iobase
+ 5, 0xa);
535 dump_data(iobase
+ 5, 0xc);
536 dump_data(iobase
+ 5, 0xd);
538 case 0xc330: /* NCT6776F */
539 for (i
= 0; i
< 8; i
++)
540 dump_data(iobase
+ 5, i
);
542 case 0xc560: /* NCT6779D */
543 for (i
= 0; i
< 10; i
++)
544 dump_data(iobase
+ 5, i
);
550 void print_nuvoton_chips(void)
552 print_vendor_chips("Nuvoton", reg_table
);