blob: 21d77fd9317ca4e837eb252d768e23ba8a44996a [file] [log] [blame]
Patrick Georgi7333a112020-05-08 20:48:04 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
David Hendrickse1822d92010-07-22 22:56:44 +00002
3#include "superiotool.h"
4
5#define DEVICE_ID_REG 0x20 /* Super I/O ID (SID) / family */
6#define DEVICE_REV_REG 0x27 /* Super I/O revision ID (SRID) */
7
Michał Żygowskib33ee1d2022-04-26 17:48:27 +02008static uint8_t regread(uint16_t port, uint8_t reg)
9{
10 OUTB(reg, port);
11 return INB(port + 1);
12}
13
14/* For Nuvoton EC space */
15static void set_page(uint16_t port, uint8_t page)
16{
17 /*
18 * INDEX reg can be written if PAGE reg is not 0xff
19 * PAGE reg can be written if value or writing data is 0xff
20 */
21 OUTB(0xff, port);
22 OUTB(page, port);
23}
24
25static void dump_page_index_data(uint16_t iobase)
26{
27 uint16_t i,j ;
28
29 for (i = 0; i < 255; i++) {
30 printf("Page %d:\n", i);
31 for (j = 0; j < 256; j++) {
32 if (j % 16 == 0)
33 printf("\n%02x: ", j);
34 /* PAGE must be selected before each data read */
35 set_page(iobase, i);
36 printf("%02x ", regread(iobase + 1, j));
37 }
38 printf("\n");
39 }
40 printf("\n");
41}
42
David Hendrickse1822d92010-07-22 22:56:44 +000043static const struct superio_registers reg_table[] = {
44 {0xfc, "WPCE775x / NPCE781x", {
45 {NOLDN, NULL,
46 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
47 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
Stefan Reinauer5a4ae822011-04-22 23:10:35 +000048 {0xfc,0x11,RSVD,RSVD,RSVD,0x00,0x00,MISC,0x00,
David Hendrickse1822d92010-07-22 22:56:44 +000049 0x04,RSVD,RSVD,RSVD,0x00,RSVD,RSVD,EOT}},
50 {0x03, "CIR Port (CIRP)", /* where supported */
51 {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
52 {0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}},
53 {0x04, "Mobile System Wake-Up Control Config (MSWC)",
54 {0x30,0x60,0x61,0x70,0x71,0x74,0x75,EOT},
55 {0x00,0x00,0x00,0x00,0x03,0x04,0x04,EOT}},
56 {0x05, "Mouse config (KBC)",
57 {0x30,0x70,0x71,0x74,0x75,EOT},
58 {0x00,0x0c,0x03,0x04,0x04,EOT}},
59 {0x06, "Keyboard config (KBC)",
60 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,EOT},
61 {0x00,0x00,0x60,0x00,0x64,0x01,0x03,0x04,0x04,EOT}},
62 {0x0f, "Shared memory (SHM)",
63 {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,0xf2,
64 0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,EOT},
65 {0x00,0x00,0x00,0x00,0x00,0x04,0x04,MISC,0x07,RSVD,
66 RSVD,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
67 {0x11, "Power management I/F Channel 1 (PM1)",
68 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,EOT},
69 {0x00,0x00,0x62,0x00,0x66,0x01,0x03,0x04,0x04,EOT}},
70 {0x12, "Power management I/F Channel 2 (PM2)",
71 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,EOT},
72 {0x00,0x00,0x68,0x00,0x6c,0x01,0x03,0x04,0x04,EOT}},
73 {0x15, "Enhanced Wake On CIR (EWOC)",
74 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,EOT},
75 {0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x04,0x04,EOT}},
76 {0x17, "Power Management I/F Channel 3 (PM3)",
77 {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,EOT},
78 {0x00,0x00,0x6a,0x00,0x6e,0x01,0x03,0x04,0x04,EOT}},
79 {0x1a, "Serial Port with Fast Infrared Port (FIR)",
80 {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
81 {0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}},
82 {EOT}}},
Zheng Bao6d816462010-12-31 01:38:45 +000083 {0x1a, "WPCM450", {
84 {EOT}}},
Nicholas Chin3d2a6f42022-11-06 12:18:20 -070085 {0xc73a, "NCT6685D/NCT6686D", {
86 {NOLDN, "Global Configuration",
87 {0x10,0x11,0x13,0x14,0x15,0x1a,0x1b,0x1d,0x1e,
88 0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,
89 0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2f,EOT},
90 {0xff,0xff,0x00,0x00,0x00,0x00,0x10,0x00,0x00,
91 0x00,0xc7,0x3a,0x00,0x80,0x67,0x01,0x00,0x3e,
92 0x00,0x03,0x0f,0x00,0x00,0x00,MISC,EOT}},
93 {0x01, "Parallel Port",
94 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
95 {0x00,0x00,0x00,0x00,0x00,0x3f,EOT}},
96 {0x02, "UART A",
97 {0x30,0x60,0x61,0x70,0xf0,EOT},
98 {0x00,0x00,0x00,0x00,0x00,EOT}},
99 {0x03, "UART B, IR",
100 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
101 {0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
102 {0x05, "Keyboard Controller",
103 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT},
104 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,EOT}},
105 {0x06, "CIR",
106 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT},
107 {0x00,0x00,0x00,0x00,0x08,0x09,0x32,0x00,EOT}},
108 {0x07, "GPIO0-7",
109 {0x30,0x60,0x61,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,
110 0xe6,0xe7,0xe8,0xe9,0xeb,0xec,0xed,0xee,0xef,0xf0,
111 0xf1,EOT},
112 {0x00,0x00,0x00,0x00,NANA,NANA,NANA,NANA,NANA,NANA,
113 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
114 0x01,EOT}},
115 {0x08, "PORT80 UART",
116 {0xe0,0xe1,0xe2,0xe3,0xe4,EOT},
117 {0x80,0x00,0x00,0x10,0x00,EOT}},
118 {0x09, "GPIO8-9, GPIO1-8 Alternate Function",
119 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
120 0xe9,0xea,0xeb,0xec,0xed,0xee,0xef,EOT},
121 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
122 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
123 {0x0a, "ACPI",
124 {0x30,0x60,0x61,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe6,
125 0xe7,0xe8,0xea,0xeb,0xec,0xee,0xf0,0xf1,0xf2,0xf3,
126 0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,EOT},
127 {0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
128 0xef,0x80,0x2e,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
129 0x0d,0x0d,0x01,0x00,0x04,0x00,0x00,0x00,0x04,EOT}},
130 {0x0b, "EC",
131 {0x30,0x60,0x61,0x70,0xe0,0xe3,0xe4,EOT},
132 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
133 {0x0c, "RTC",
134 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
135 0xe9,0xea,0xeb,0xec,0xed,0xee,0xef,0xf0,EOT},
136 {0x00,NANA,NANA,NANA,NANA,NANA,NANA,NANA,0x00,0x00,
137 0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x80,EOT}},
138 {0x0d, "Deep Sleep, Power Fault",
139 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
140 0xf0,0xf1,0xf3,EOT},
141 {0xa0,0x20,0x04,0x05,0x6e,0x00,0x00,0x00,0x88,0x77,
142 0x70,0xaa,0x01,EOT}},
143 {0x0e, "TACHIN/PWMOUT Assignment",
144 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,
145 0xea,0xeb,EOT},
146 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
147 0x00,0x00,EOT}},
148 {0x0f, "Function Register",
149 {0xe3,0xe4,0xe5,0xe8,0xe9,0xea,EOT},
150 {0x80,0x01,0x00,0x00,0x00,0x00,EOT}},
151 {EOT}}},
Michał Żygowskib33ee1d2022-04-26 17:48:27 +0200152 {0xd592, "NCT6687D-W", {
153 {NOLDN, "Global Configuration",
154 {0x10,0x11,0x13,0x14,0x15,0x1a,0x1b,0x1d,0x1e,
155 0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,
156 0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2f,EOT},
157 {0xff,0xff,0x00,0x00,0x00,0x00,0x10,0x00,0x00,
158 0x00,0xd5,0x92,0x00,0x80,0x67,0x01,0x00,0x3e,
159 0x00,0x03,0x0f,0x00,0x00,0x00,MISC,EOT}},
Michał Żygowskib205c5d2022-10-23 12:01:23 +0200160 {0x01, "Parallel Port",
Michał Żygowskib33ee1d2022-04-26 17:48:27 +0200161 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
162 {0x00,0x00,0x00,0x00,0x00,0x3f,EOT}},
163 {0x02, "UART A",
164 {0x30,0x60,0x61,0x70,0xf0,EOT},
165 {0x00,0x00,0x00,0x00,0x00,EOT}},
166 {0x03, "UART B, IR",
167 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
168 {0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
169 {0x05, "Keyboard Controller",
170 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT},
171 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,EOT}},
172 {0x06, "CIR",
173 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT},
174 {0x00,0x00,0x00,0x00,0x08,0x09,0x32,0x00,EOT}},
175 {0x07, "GPIO0-7",
176 {0x30,0x60,0x61,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,
177 0xe6,0xe7,0xe8,0xe9,0xeb,0xec,0xed,0xee,0xef,0xf0,
178 0xf1,EOT},
179 {0x00,0x00,0x00,0x00,NANA,NANA,NANA,NANA,NANA,NANA,
180 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
181 0x01,EOT}},
182 {0x08, "PORT80 UART",
183 {0xe0,0xe1,0xe2,0xe3,0xe4,EOT},
184 {0x80,0x00,0x00,0x10,0x00,EOT}},
185 {0x09, "GPIO8-9, GPIO1-8 Alternate Function",
186 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
187 0xe9,0xea,0xeb,0xec,0xed,0xee,0xef,EOT},
188 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
189 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
190 {0x0a, "ACPI",
191 {0x30,0x60,0x61,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe6,
192 0xe7,0xe8,0xea,0xeb,0xec,0xee,0xf0,0xf1,0xf2,0xf3,
193 0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,EOT},
194 {0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
195 0xef,0x80,0x2e,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
196 0x0d,0x0d,0x01,0x00,0x04,0x00,0x00,0x00,0x04,EOT}},
197 {0x0b, "EC",
198 {0x30,0x60,0x61,0x70,0xe0,0xe3,0xe4,EOT},
199 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
200 {0x0c, "RTC",
201 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
202 0xe9,0xea,0xeb,0xec,0xed,0xee,0xef,0xf0,EOT},
203 {0x00,NANA,NANA,NANA,NANA,NANA,NANA,NANA,0x00,0x00,
204 0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x80,EOT}},
205 {0x0d, "Deep Sleep, Power Fault",
206 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
207 0xf0,0xf1,0xf3,EOT},
208 {0xa0,0x20,0x04,0x05,0x6e,0x00,0x00,0x00,0x88,0x77,
209 0x70,0xaa,0x01,EOT}},
210 {0x0e, "TACHIN/PWMOUT Assignment",
211 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,
212 0xea,0xeb,EOT},
213 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
214 0x00,0x00,EOT}},
215 {0x0f, "Function Register",
216 {0xe3,0xe4,0xe5,0xe8,0xe9,0xea,EOT},
217 {0x80,0x01,0x00,0x00,0x00,0x00,EOT}},
218 {EOT}}},
Guenter Roeck975ffc22012-06-29 12:22:51 -0700219 {0xb472, "NCT6775F (A)", {
220 {NOLDN, NULL,
221 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
222 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
223 {0xb4,0x72,0xff,0x78,0x40,0x00,0x00,0x7d,0x00,
224 0x00,0x58,0x77,0xfc,0x04,0x00,MISC,EOT}},
225 {0x00, "FDC",
226 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
227 0xf5,EOT},
228 {0x03,0x03,0xf0,0x06,0x02,0x8e,0x00,0xff,0x00,
229 0x00,EOT}},
230 {0x01, "Parallel Port",
231 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
232 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}},
233 {0x02, "UART A",
234 {0x30,0x60,0x61,0x70,0xf0,EOT},
235 {0x01,0x03,0xf8,0x04,0x00,EOT}},
236 {0x03, "UART B, IR",
237 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
238 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT}},
239 {0x05, "Keyboard Controller",
240 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT},
241 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,EOT}},
242 {0x06, "CIR",
243 {0x30,0x60,0x61,0x70,EOT},
244 {0x00,0x00,0x00,0x00,EOT}},
245 {0x07, "GPIO6, GPIO7, GPIO8, GPIO9",
246 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
247 0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xf4,0xf5,
248 0xf6,0xf7,0xf8,EOT},
249 {0x18,0xff,0x00,0x00,0x00,0xef,0x00,0x00,0x00,
250 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,
251 0x00,0x00,0x00,EOT}},
252 {0x08, "WDT1, GPIO0, GPIO1",
253 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xf0,
254 0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,EOT},
255 {0x00,0xff,0x00,0x00,0x00,0x00,0xff,
256 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
257 {0x09, "GPIO2, GPIO3, GPIO4, GPIO5",
258 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
259 0xe8,0xe9,0xea,0xeb,0xee,0xf0,0xf1,0xf2,0xf4,
260 0xf5,0xf6,0xf7,0xfe,EOT},
261 {0x05,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,
262 0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0xff,
263 0x00,0x00,0x00,0x00,EOT}},
264 {0x0a, "ACPI",
265 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
266 0xe8,0xe9,0xea,0xeb,0xed,0xf2,0xf3,0xf4,0xf6,
267 0xf7,0xfe,EOT},
268 {0x00,0x01,0x00,0x00,0x00,0x00,0x02,0x1c,0x00,
269 0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,
270 0x20,0x00,EOT}},
271 {0x0b, "Hardware Monitor, Front Panel LED",
272 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,
273 0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,
274 0xfc,0xfd,0xfe,
275 EOT},
276 {0x00,0x00,0x00,0x00,0x00,0x00,0xc1,0x00,0x00,
277 0x00,0x00,0x10,0x00,0x87,0x47,0x00,0x00,0x00,
278 0x00,0x00,0x00,
279 EOT}},
280 {0x0c, "PECI, SST",
281 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,
282 0xee,0xef,0xf1,0xf2,0xf3,0xfa,EOT},
283 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0f,
284 0x47,0x5b,0x40,0x50,0x10,0x00,EOT}},
285 {0x0d, "VID, VIDDAC, BUSSEL",
286 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xeb,
287 0xec,0xed,0xee,0xef,0xf3,0xf4,0xf5,0xf6,0xf7,
288 0xf8,0xf9,EOT},
289 {0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x14,
290 0x01,0x00,0x88,0x00,0x00,0x00,0x00,0x07,0x00,
291 0x00,0x00,EOT}},
292 {0x0e, "CIR WAKE-UP",
293 {0x30,0x60,0x61,0x70,EOT},
294 {0x00,0x00,0x00,0x00,EOT}},
295 {0x0f, "GPIO Push-Pull or Open-drain",
296 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
297 0xe9,0xf0,0xf2,0xf3,0xf4,0xf8,0xfe,EOT},
298 {0xff,0xff,0xf7,0xff,0xfb,0xcb,0xff,0xff,0xff,
299 0xff,0x00,0x00,0x00,0x00,0x70,0xff,EOT}},
300 {EOT}}},
Felix Held3ad6ff12015-05-31 20:37:04 +0200301 {0xb473, "NCT6775F (B) / NCT5572D (B) (not all LDNs supported)", {
Guenter Roeck975ffc22012-06-29 12:22:51 -0700302 {NOLDN, NULL,
303 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
304 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
305 {0xb4,0x73,0xff,0x78,0x40,0x00,0x00,0x7d,0x00,
306 0x00,0x58,0x77,0xfc,0x04,0x00,MISC,EOT}},
307 {0x00, "FDC",
308 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
309 0xf5,EOT},
310 {0x03,0x03,0xf0,0x06,0x02,0x8e,0x00,0xff,0x00,
311 0x00,EOT}},
312 {0x01, "Parallel Port",
313 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
314 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}},
315 {0x02, "UART A",
316 {0x30,0x60,0x61,0x70,0xf0,EOT},
317 {0x01,0x03,0xf8,0x04,0x00,EOT}},
318 {0x03, "UART B, IR",
319 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
320 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT}},
321 {0x05, "Keyboard Controller",
322 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT},
323 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,EOT}},
324 {0x06, "CIR",
325 {0x30,0x60,0x61,0x70,EOT},
326 {0x00,0x00,0x00,0x00,EOT}},
327 {0x07, "GPIO6, GPIO7, GPIO8, GPIO9",
328 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
329 0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xf4,0xf5,
330 0xf6,0xf7,0xf8,EOT},
331 {0x18,0xff,0x00,0x00,0x00,0xef,0x00,0x00,0x00,
332 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,
333 0x00,0x00,0x00,EOT}},
334 {0x08, "WDT1, GPIO0, GPIO1",
335 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xf0,
336 0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,EOT},
337 {0x00,0xff,0x00,0x00,0x00,0x00,0xff,
338 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
339 {0x09, "GPIO2, GPIO3, GPIO4, GPIO5",
340 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
341 0xe8,0xe9,0xea,0xeb,0xee,0xf0,0xf1,0xf2,0xf4,
342 0xf5,0xf6,0xf7,0xfe,EOT},
343 {0x05,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,
344 0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0xff,
345 0x00,0x00,0x00,0x00,EOT}},
346 {0x0a, "ACPI",
347 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
348 0xe8,0xe9,0xea,0xeb,0xed,0xf2,0xf3,0xf4,0xf6,
349 0xf7,0xfe,EOT},
350 {0x00,0x01,0x00,0x00,0x00,0x00,0x02,0x1c,0x00,
351 0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,
352 0x20,0x00,EOT}},
353 {0x0b, "Hardware Monitor, Front Panel LED",
354 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,
355 0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,
356 0xfc,0xfd,0xfe,
357 EOT},
358 {0x00,0x00,0x00,0x00,0x00,0x00,0xc1,0x00,0x00,
359 0x00,0x00,0x10,0x00,0x87,0x47,0x00,0x00,0x00,
360 0x00,0x00,0x00,
361 EOT}},
362 {0x0c, "PECI, SST",
363 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,
364 0xee,0xef,0xf1,0xf2,0xf3,0xfa,EOT},
365 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0f,
366 0x47,0x5b,0x40,0x50,0x10,0x00,EOT}},
367 {0x0d, "VID, VIDDAC, BUSSEL",
368 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xeb,
369 0xec,0xed,0xee,0xef,0xf3,0xf4,0xf5,0xf6,0xf7,
370 0xf8,0xf9,EOT},
371 {0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x14,
372 0x01,0x00,0x88,0x00,0x00,0x00,0x00,0x07,0x00,
373 0x00,0x00,EOT}},
374 {0x0e, "CIR WAKE-UP",
375 {0x30,0x60,0x61,0x70,EOT},
376 {0x00,0x00,0x00,0x00,EOT}},
377 {0x0f, "GPIO Push-Pull or Open-drain",
378 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
379 0xe9,0xf0,0xf2,0xf3,0xf4,0xf8,0xfe,EOT},
380 {0xff,0xff,0xf7,0xff,0xfb,0xcb,0xff,0xff,0xff,
381 0xff,0x00,0x00,0x00,0x00,0x70,0xff,EOT}},
382 {EOT}}},
Stefan Reinauer3187d022011-04-22 23:12:40 +0000383 {0xc332, "NCT6776F (B)", {
384 {NOLDN, NULL,
385 {0x10,0x11,0x13,0x14,0x16,0x17,0x18,0x19,0x1a,
386 0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,
387 0x24,0x25,0x26,0x27,0x28,0x2a,0x2b,0x2c,0x2d,
388 0x2e,0x2f,EOT},
389 {0xff,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0xf0,
390 0x78,0x00,0x00,0xff,0xff,0xc3,0x32,0xff,0x00,
391 0x64,0x00,MISC,0x00,0x00,0xc0,0x00,0x81,0x00,
392 0x00,MISC,EOT}},
393 {0x00, "FDC",
394 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
395 0xf5,EOT},
396 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
397 0x00,EOT}},
398 {0x01, "Parallel Port",
399 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
400 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}},
401 {0x02, "UART A",
402 {0x30,0x60,0x61,0x70,0xf0,0xf2,EOT},
403 {0x01,0x03,0xf8,0x04,0x00,0x00,EOT}},
404 {0x03, "UART B, IR",
405 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
406 {0x01,0x02,0xf8,0x03,0x00,0x00,0x00,EOT}},
407 {0x05, "Keyboard Controller",
408 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT},
409 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,EOT}},
410 {0x06, "CIR",
411 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT},
412 {0x00,0x00,0x00,0x00,0x08,0x09,0x32,0x00,EOT}},
413 {0x07, "GPIO6, GPIO7, GPIO8, GPIO9",
414 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
415 0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xf4,0xf5,
416 0xf6,0xf7,0xf8,EOT},
417 {0x03,0xff,0x00,0x00,0x00,0xef,0x00,0x00,0x00,
418 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,
419 0x00,0x00,0x00,EOT}},
420 {0x08, "WDT1, GPIO0, GPIO1, GPIOA",
421 {0x30,0x60,0x61,0xe0,0xe1,0xe2,0xe3,0xe4,0xf0,
422 0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,EOT},
423 {0x02,0x00,0x00,0xff,0x00,0x00,0x00,0xef,0xff,
424 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
425 {0x09, "GPIO2, GPIO3, GPIO4, GPIO5",
426 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
427 0xe8,0xe9,0xea,0xeb,0xee,0xf0,0xf1,0xf2,0xf4,
428 0xf5,0xf6,0xf7,0xfe,EOT},
429 {0x04,0xdf,0x00,0x00,0x00,0xff,0x00,0x00,0x00,
430 0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0xff,
431 0x00,0x00,0x00,0x00,EOT}},
432 {0x0a, "ACPI",
433 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,
434 0xee,0xf0,0xf2,0xf3,0xf4,0xf6,0xf7,0xfe,EOT},
435 {0x01,0x00,0x00,0x00,0x00,0x02,0x1c,0x00,0x00,
436 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,EOT}},
437 {0x0b, "Hardware Monitor, Front Panel LED",
438 {0x30,0x60,0x61,0x62,0x63,0x70,0xe0,0xe1,0xe2,
439 0xf0,0xf1,0xf2,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,
440 EOT},
441 {0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x7f,0xff,
442 0x00,0x00,0x00,0x10,0x00,0x87,0x47,0x00,0x00,
443 EOT}},
444 {0x0d, "VID",
445 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe9,0xee,
446 0xef,0xf0,0xf4,0xf5,EOT},
447 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,
448 0x00,0x00,0x00,0x00,EOT}},
449 {0x0e, "CIR WAKE-UP",
450 {0x30,0x60,0x61,0x70,EOT},
451 {0x00,0x00,0x00,0x00,EOT}},
452 {0x0f, "GPIO Push-Pull or Open-drain",
453 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
454 0xe9,0xf0,0xf1,0xf2,EOT},
455 {0xff,0xdf,0xff,0xfe,0xf6,0xff,0xff,0xd3,0xff,
456 0x9f,0x00,0x00,0x00,EOT}},
457 {0x14, "SVID",
458 {0xe0,0xe1,0xe3,0xe4,EOT},
459 {0x00,0x80,0x00,0x00,EOT}},
460 {0x16, "Deep Sleep",
461 {0x30,0xe0,0xe1,0xe2,EOT},
462 {0x20,0x20,0x04,0x05,EOT}},
463 {0x17, "GPIOA",
464 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,EOT},
465 {0x01,0x00,0x00,0x00,0x01,0x00,EOT}},
466 {EOT}}},
Felix Held5eabe252014-12-16 14:47:51 +0100467 {0xc333, "NCT6776F/D (C)", {
Stefan Reinauer3187d022011-04-22 23:12:40 +0000468 {NOLDN, NULL,
469 {0x10,0x11,0x13,0x14,0x16,0x17,0x18,0x19,0x1a,
470 0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,
471 0x24,0x25,0x26,0x27,0x28,0x2a,0x2b,0x2c,0x2d,
472 0x2e,0x2f,EOT},
473 {0xff,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0xf0,
474 0x78,0x00,0x00,0xff,0xff,0xc3,0x33,0xff,0x00,
475 0x64,0x00,MISC,0x00,0x00,0xc0,0x00,0x81,0x00,
476 0x00,MISC,EOT}},
477 {0x00, "FDC",
478 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
479 0xf5,EOT},
480 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
481 0x00,EOT}},
482 {0x01, "Parallel Port",
483 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
484 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}},
485 {0x02, "UART A",
486 {0x30,0x60,0x61,0x70,0xf0,0xf2,EOT},
487 {0x01,0x03,0xf8,0x04,0x00,0x00,EOT}},
488 {0x03, "UART B, IR",
489 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
490 {0x01,0x02,0xf8,0x03,0x00,0x00,0x00,EOT}},
491 {0x05, "Keyboard Controller",
492 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT},
493 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,EOT}},
494 {0x06, "CIR",
495 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT},
496 {0x00,0x00,0x00,0x00,0x08,0x09,0x32,0x00,EOT}},
497 {0x07, "GPIO6, GPIO7, GPIO8, GPIO9",
498 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
499 0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xf4,0xf5,
500 0xf6,0xf7,0xf8,EOT},
501 {0x03,0xff,0x00,0x00,0x00,0xef,0x00,0x00,0x00,
502 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,
503 0x00,0x00,0x00,EOT}},
504 {0x08, "WDT1, GPIO0, GPIO1, GPIOA",
505 {0x30,0x60,0x61,0xe0,0xe1,0xe2,0xe3,0xe4,0xf0,
506 0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,EOT},
Felix Held4a699d12014-12-16 14:43:36 +0100507 {0x02,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0xff,
Stefan Reinauer3187d022011-04-22 23:12:40 +0000508 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
509 {0x09, "GPIO2, GPIO3, GPIO4, GPIO5",
510 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
511 0xe8,0xe9,0xea,0xeb,0xee,0xf0,0xf1,0xf2,0xf4,
512 0xf5,0xf6,0xf7,0xfe,EOT},
513 {0x04,0xdf,0x00,0x00,0x00,0xff,0x00,0x00,0x00,
514 0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0xff,
515 0x00,0x00,0x00,0x00,EOT}},
516 {0x0a, "ACPI",
517 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,
518 0xee,0xf0,0xf2,0xf3,0xf4,0xf6,0xf7,0xfe,EOT},
519 {0x01,0x00,0x00,0x00,0x00,0x02,0x1c,0x00,0x00,
Felix Held4a699d12014-12-16 14:43:36 +0100520 0x00,0x00,0x5c,0x00,0x00,0x00,0xc0,0x00,EOT}},
Stefan Reinauer3187d022011-04-22 23:12:40 +0000521 {0x0b, "Hardware Monitor, Front Panel LED",
522 {0x30,0x60,0x61,0x62,0x63,0x70,0xe0,0xe1,0xe2,
523 0xf0,0xf1,0xf2,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,
524 EOT},
525 {0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x7f,0xff,
526 0x00,0x00,0x00,0x10,0x00,0x87,0x47,0x00,0x00,
527 EOT}},
528 {0x0d, "VID",
529 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe9,0xee,
530 0xef,0xf0,0xf4,0xf5,EOT},
531 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,
532 0x00,0x00,0x00,0x00,EOT}},
533 {0x0e, "CIR WAKE-UP",
534 {0x30,0x60,0x61,0x70,EOT},
535 {0x00,0x00,0x00,0x00,EOT}},
536 {0x0f, "GPIO Push-Pull or Open-drain",
537 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
538 0xe9,0xf0,0xf1,0xf2,EOT},
539 {0xff,0xdf,0xff,0xfe,0xf6,0xff,0xff,0xd3,0xff,
540 0x9f,0x00,0x00,0x00,EOT}},
541 {0x14, "SVID",
542 {0xe0,0xe1,0xe3,0xe4,EOT},
543 {0x00,0x80,0x00,0x00,EOT}},
544 {0x16, "Deep Sleep",
545 {0x30,0xe0,0xe1,0xe2,EOT},
546 {0x20,0x20,0x04,0x05,EOT}},
547 {0x17, "GPIOA",
548 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,EOT},
549 {0x01,0x00,0x00,0x00,0x01,0x00,EOT}},
550 {EOT}}},
Guenter Roeck975ffc22012-06-29 12:22:51 -0700551 {0xc562, "NCT6779D", {
552 {NOLDN, NULL,
553 {0x10,0x11,0x13,0x14,0x1a,0x1b,0x1c,0x1d,0x20,
554 0x21,0x22,0x24,0x25,0x26,0x27,0x28,0x2a,0x2b,
555 0x2c,0x2f,EOT},
556 {0xff,0xff,0x00,0x00,0x30,0x70,0x10,0x00,0xc5,
557 0x62,0xff,0x04,0x00,MISC,0x00,0x00,0xc0,0x00,
558 0x01,MISC,EOT}},
559 {0x01, "Parallel Port",
560 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
561 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}},
562 {0x02, "UART A",
563 {0x30,0x60,0x61,0x70,0xf0,0xf2,EOT},
564 {0x01,0x03,0xf8,0x04,0x00,0x00,EOT}},
565 {0x03, "UART B, IR",
566 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
567 {0x01,0x02,0xf8,0x03,0x00,0x00,0x00,EOT}},
568 {0x05, "Keyboard Controller",
569 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT},
570 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,EOT}},
571 {0x06, "CIR",
572 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT},
573 {0x00,0x00,0x00,0x00,0x08,0x09,0x32,0x00,EOT}},
574 {0x07, "GPIO6, GPIO7, GPIO8",
575 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
576 0xec,0xed,0xf4,0xf5,0xf6,0xf7,0xf8,EOT},
577 {0x0f,0x00,0x00,0x00,0xff,0x00,0x00,0x00,
578 0x00,0x00,0xff,0x00,0x00,0x00,0x00,EOT}},
579 {0x08, "WDT1, GPIO0, GPIO1",
580 {0x30,0x60,0x61,0xe0,0xe1,0xe2,0xe3,0xe4,0xf0,
581 0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,EOT},
582 {0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0xff,
583 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
584 {0x09, "GPIO1, GPIO2, GPIO3, GPIO4, GPIO5, GPIO6, GPIO7, GPIO8",
585 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
586 0xe8,0xe9,0xea,0xeb,0xee,0xf0,0xf1,0xf2,0xf4,
587 0xf5,0xf6,0xf7,0xfe,EOT},
588 {0x00,0xff,0x00,0x00,0x00,0x7f,0x00,0x00,0x00,
589 0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0xff,
590 0x00,0x00,0x00,0x00,EOT}},
591 {0x0a, "ACPI",
592 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,
593 0xee,0xf0,0xf2,0xf3,0xf4,0xf6,0xf7,0xfe,EOT},
594 {0x01,0x00,0x00,0x00,0x00,0x02,0x1c,0x00,0x00,
595 0x00,0x10,0x5c,0x00,0x00,0x00,0xc0,0x00,EOT}},
596 {0x0b, "Hardware Monitor, Front Panel LED",
597 {0x30,0x60,0x61,0x62,0x63,0x70,0xe0,0xe1,0xe2,
598 0xe4,0xf0,0xf1,0xf2,0xf5,0xf6,0xf7,0xf8,0xf9,
599 0xfa,EOT},
600 {0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x7f,0xff,
601 0xff,0x00,0x00,0x00,0x10,0x00,0x87,0x47,0x00,
602 0x00,EOT}},
603 {0x0d, "WDT1",
604 {0xf0,EOT},
605 {0x00,EOT}},
606 {0x0e, "CIR WAKE-UP",
607 {0x30,0x60,0x61,0x70,EOT},
608 {0x00,0x00,0x00,0x00,EOT}},
609 {0x0f, "GPIO Push-Pull or Open-drain",
610 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,
611 0xf0,0xf1,0xf2,EOT},
612 {0xff,0xff,0x7f,0xff,0xff,0xff,0x0f,0xff,0xff,
613 0x9d,0x00,0x00,EOT}},
614 {0x14, "Port 80 UART",
615 {0xe0,0xe1,0xe2,0xe3,0xe4,EOT},
616 {0x80,0x00,0x00,0x10,0x00,EOT}},
617 {0x16, "Deep Sleep",
618 {0x30,0xe0,0xe1,0xe2,EOT},
619 {0x20,0x20,0x04,0x05,EOT}},
620 {EOT}}},
Roberto Muñoz Gómez15a53c62016-03-31 17:03:53 +0200621 {0xc452, "NCT6102D / NCT6106D", {
622 {NOLDN, NULL,
623 {0x07,0x10,0x11,0x13,0x14,0x1a,0x1b,0x20,0x21,0x22,0x24,0x25,0x26,0x27,0x28,0x29,0x2a,0x2f,EOT},
624 {0x00,0xff,0xff,0x00,0x00,0xcc,0x03,0x10,0x61,0x7F,0x00,0x00,MISC,0x00,0x00,0xf0,0x00,MISC,EOT}},
625 {0x00, "FDC",
626 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,EOT},
627 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00,EOT}},
628 {0x01, "PRT",
629 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
630 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}},
631 {0x02, "UART A",
632 {0x30,0x60,0x61,0x70,0xf0,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,EOT},
633 {0x01,0x03,0xf8,0x04,0x00,0x00,0x00,0xff,0xff,0x02,0x00,0x00,EOT}},
634 {0x03, "UART B",
635 {0x30,0x60,0x61,0x70,0xf0,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,EOT},
636 {0x01,0x02,0xf8,0x03,0x00,0x00,0x00,0xff,0xff,0x02,0x00,0x00,EOT}},
637 {0x05, "Keyboard Controller (KBC)",
638 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT},
639 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,EOT}},
640 {0x06, "CIR",
641 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT},
642 {0x00,0x00,0x00,0x00,0x08,0x09,0x32,0x00,EOT}},
643 {0x07, "GPIO",
644 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xef,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff,EOT},
645 {0xdf,0xff,0x00,0x00,0x00,0xef,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x02,0x00,0x00,0x00,EOT}},
646 {0x08, "GPIO,WDT1",
647 {0x30,0x60,0x61,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xf0,0xf1,0xf2,EOT},
648 {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,EOT}},
649 {0x09, "GPIO",
650 {0xe0,0xe1,0xe2,EOT},
651 {0x00,0x00,0x00,EOT}},
652 {0x0a, "ACPI",
653 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xfa,EOT},
654 {0x01,0x00,0x00,0x00,0x00,0x02,0x1c,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,EOT}},
655 {0x0b, "Hardware Monitor, Front Panel LED",
656 {0x30,0x60,0x61,0x62,0x63,0x70,0xe0,0xe1,0xe2,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,EOT},
657 {0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x7f,0xff,0x00,0x00,0x00,0x00,0x00,0x87,0x47,0x00,EOT}},
658 {0x0d, "WDT2",
659 {0xe0,0xe1,0xe2,0xe3,0xe4,EOT},
660 {0x00,0x32,0x14,0x00,0x00,EOT}},
661 {0x0e, "CIR WAKE-UP",
662 {0x30,0x60,0x61,0x70,0xe0,0xe1,EOT},
663 {0x00,0x00,0x00,0x00,0x25,0x00,EOT}},
664 {0x0f, "GPIO Push-Pull or Open-drain",
665 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xf0,0xf1,0xf2,EOT},
666 {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x9d,0x00,0x00,EOT}},
667 {0x10, "UARTC",
668 {0x30,0x60,0x61,0x70,0xf0,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,EOT},
669 {0x00,0x03,0x00,0x04,0x00,0x00,0x00,0xff,0xff,0x02,0x00,0x00,EOT}},
670 {0x11, "UARTD",
671 {0x30,0x60,0x61,0x70,0xf0,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,EOT},
672 {0x00,0x02,0x00,0x03,0x00,0x00,0x00,0xff,0xff,0x02,0x00,0x00,EOT}},
673 {0x12, "UARTE",
674 {0x30,0x60,0x61,0x70,0xf0,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,EOT},
675 {0x00,0x03,0xe8,0x04,0x00,0x00,0x00,0xff,0xff,0x02,0x00,0x00,EOT}},
676 {0x13, "UARTF",
677 {0x30,0x60,0x61,0x70,0xf0,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,EOT},
678 {0x00,0x02,0xe8,0x03,0x00,0x00,0x00,0xff,0xff,0x02,0x00,0x00,EOT}},
679 {0x14, "PORT80 IR",
680 {0x30,0x60,0x61,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xf0,0xf1,EOT},
681 {0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x10,0x00,0x00,0x00,EOT}},
682 {0x15, "FADING LED",
683 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,EOT},
684 {0x00,0x3f,0x01,0x11,0x11,0x02,0x00,0x00,0x01,0x00,EOT}},
685 {0x16, "Deep Sleep",
686 {0x30,0xe0,0xe1,0xe2,EOT},
687 {0x20,0x20,0x04,0x05,EOT}},
688 {EOT}}},
Omar Pakker312e9f52016-06-18 15:33:43 +0200689 {0xc803, "NCT6791D", {
690 {NOLDN, NULL,
691 {0x07,0x10,0x11,0x13,0x14,0x1a,0x1b,0x1c,0x1d,0x20,0x21,0x22,0x24,0x25,0x26,0x27,0x28,0x2a,0x2b,0x2c,0x2d,0x2f,EOT},
692 {0x00,0xff,0xff,0x00,0x00,0x30,0x70,0x10,0x00,0xc8,0x03,0xff,0x04,0x00,MISC,0x00,0x00,0xc0,0x00,0x01,0x00,MISC,EOT}},
693 {0x01, "Parallel Port",
694 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
695 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}},
696 {0x02, "UART A",
697 {0x30,0x60,0x61,0x70,0xf0,0xf2,EOT},
698 {0x01,0x03,0xf8,0x04,0x00,0x00,EOT}},
699 {0x03, "UART B, IR",
700 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
701 {0x01,0x02,0xf8,0x03,0x00,0x00,0x00,EOT}},
702 {0x05, "Keyboard Controller",
703 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT},
704 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,EOT}},
705 {0x06, "Consumer IR",
706 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT},
707 {0x00,0x00,0x00,0x00,0x08,0x09,0x32,0x00,EOT}},
708 {0x07, "GPIO 6, GPIO 7, GPIO 8",
709 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xec,0xed,0xf4,0xf5,0xf6,0xf7,0xf8,EOT},
Nico Huber03d92982021-01-08 17:10:17 +0100710 {0x00,0x7f,NANA,0x00,NANA,0xff,NANA,0x00,NANA,0x00,0x00,0xff,NANA,0x00,NANA,0x00,EOT}},
Omar Pakker312e9f52016-06-18 15:33:43 +0200711 {0x08, "WDT1, WDT_MEM, GPIO 0, GPIO 1",
712 {0x30,0x60,0x61,0xe0,0xe1,0xe2,0xe3,0xe4,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfe,0xff,EOT},
Nico Huber03d92982021-01-08 17:10:17 +0100713 {0x00,0x00,0x00,0xff,NANA,0x00,NANA,0x00,0xff,NANA,0x00,NANA,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
Omar Pakker312e9f52016-06-18 15:33:43 +0200714 {0x09, "GPIO 2, GPIO 3, GPIO 4, GPIO 5",
715 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xee,0xf0,0xf1,0xf2,0xf4,0xf5,0xf6,0xf7,0xfe,EOT},
Nico Huber03d92982021-01-08 17:10:17 +0100716 {0x00,0xff,NANA,0x00,NANA,0x7f,NANA,0x00,NANA,NANA,0x00,0x00,0x00,0x00,0xff,NANA,0x00,0xff,NANA,0x00,NANA,0x00,EOT}},
Omar Pakker312e9f52016-06-18 15:33:43 +0200717 {0x0a, "ACPI",
718 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,0xec,0xed,0xee,0xf0,0xf2,0xf3,0xf4,0xf6,0xf7,0xfc,0xfe,EOT},
719 {0x01,0x00,0x00,0x00,0x00,0x02,0x1a,0x00,0x00,0x00,0x00,0x00,0x10,0x5c,0x00,0x00,0x00,0xc0,0x00,0x00,EOT}},
720 {0x0b, "Hardware Monitor, Front Panel LED",
721 {0x30,0x60,0x61,0x62,0x63,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe6,0xe7,0xf0,0xf1,0xf2,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,EOT},
722 {0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x7f,0xff,0xff,0xff,0x08,0xff,0x00,0x00,0x00,0x10,0x00,0x87,0x47,0x00,0x00,0x00,EOT}},
723 {0x0d, "BCLK, WDT2, WDT_MEM",
724 {0xe0,0xe1,0xe7,0xe8,0xeb,0xed,0xf0,0xf3,EOT},
725 {0x00,MISC,0x00,0x32,0x14,0x00,0x00,0x00,EOT}},
726 {0x0e, "CIR Wake-Up",
727 {0x30,0x60,0x61,0x70,EOT},
728 {0x00,0x00,0x00,0x00,EOT}},
729 {0x0f, "GPIO Push-Pull or Open-Drain selection",
730 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,0xf0,0xf1,0xf2,EOT},
731 {0xff,0xff,0x7f,0xff,0xff,0xff,0x0f,0xff,0xff,0x9d,0x00,0x00,EOT}},
732 {0x14, "Port 80 UART",
733 {0xe0,0xe1,0xe2,0xe3,0xe4,EOT},
734 {0x80,0x00,0x00,0x10,0x00,EOT}},
735 {0x16, "Deep Sleep",
736 {0x30,0xe0,0xe1,0xe2,0xe3,EOT},
737 {0x20,0x20,0x04,0x05,0x01,EOT}},
738 {EOT}}},
Clayffa033e2021-01-05 00:29:29 -0600739 {0xd451, "NCT6797D (experimental)", {
740 {NOLDN, NULL,
741 {0x07,0x10,0x11,0x13,0x14,0x1a,0x1b,0x1c,0x1d,0x20,0x21,0x22,0x24,0x25,0x26,0x27,0x28,0x2a,0x2b,0x2c,0x2d,0x2f,EOT},
742 {0x00,0xff,0xff,0x00,0x00,0x30,0x70,0x10,0x00,0xc8,0x03,0xff,0x04,0x00,MISC,0x00,0x00,0xc0,0x00,0x01,0x00,MISC,EOT}},
743 {0x01, "Parallel Port",
744 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
745 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}},
746 {0x02, "UART A",
747 {0x30,0x60,0x61,0x70,0xf0,0xf2,EOT},
748 {0x01,0x03,0xf8,0x04,0x00,0x00,EOT}},
749 {0x03, "UART B, IR",
750 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
751 {0x01,0x02,0xf8,0x03,0x00,0x00,0x00,EOT}},
752 {0x05, "Keyboard Controller",
753 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT},
754 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,EOT}},
755 {0x06, "Consumer IR",
756 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT},
757 {0x00,0x00,0x00,0x00,0x08,0x09,0x32,0x00,EOT}},
758 {0x07, "GPIO 6, GPIO 7, GPIO 8",
759 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xec,0xed,0xf4,0xf5,0xf6,0xf7,0xf8,EOT},
760 {0x00,0x7f,NANA,0x00,NANA,0xff,NANA,0x00,NANA,0x00,0x00,0xff,NANA,0x00,NANA,0x00,EOT}},
761 {0x08, "WDT1, WDT_MEM, GPIO 0, GPIO 1",
762 {0x30,0x60,0x61,0xe0,0xe1,0xe2,0xe3,0xe4,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfe,0xff,EOT},
763 {0x00,0x00,0x00,0xff,NANA,0x00,NANA,0x00,0xff,NANA,0x00,NANA,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
764 {0x09, "GPIO 2, GPIO 3, GPIO 4, GPIO 5",
765 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xee,0xf0,0xf1,0xf2,0xf4,0xf5,0xf6,0xf7,0xfe,EOT},
766 {0x00,0xff,NANA,0x00,NANA,0x7f,NANA,0x00,NANA,NANA,0x00,0x00,0x00,0x00,0xff,NANA,0x00,0xff,NANA,0x00,NANA,0x00,EOT}},
767 {0x0a, "ACPI",
768 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,0xec,0xed,0xee,0xf0,0xf2,0xf3,0xf4,0xf6,0xf7,0xfc,0xfe,EOT},
769 {0x01,0x00,0x00,0x00,0x00,0x02,0x1a,0x00,0x00,0x00,0x00,0x00,0x10,0x5c,0x00,0x00,0x00,0xc0,0x00,0x00,EOT}},
770 {0x0b, "Hardware Monitor, Front Panel LED",
771 {0x30,0x60,0x61,0x62,0x63,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe6,0xe7,0xf0,0xf1,0xf2,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,EOT},
772 {0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x7f,0xff,0xff,0xff,0x08,0xff,0x00,0x00,0x00,0x10,0x00,0x87,0x47,0x00,0x00,0x00,EOT}},
773 {0x0d, "BCLK, WDT2, WDT_MEM",
774 {0xe0,0xe1,0xe7,0xe8,0xeb,0xed,0xf0,0xf3,EOT},
775 {0x00,MISC,0x00,0x32,0x14,0x00,0x00,0x00,EOT}},
776 {0x0e, "CIR Wake-Up",
777 {0x30,0x60,0x61,0x70,EOT},
778 {0x00,0x00,0x00,0x00,EOT}},
779 {0x0f, "GPIO Push-Pull or Open-Drain selection",
780 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,0xf0,0xf1,0xf2,EOT},
781 {0xff,0xff,0x7f,0xff,0xff,0xff,0x0f,0xff,0xff,0x9d,0x00,0x00,EOT}},
782 {0x14, "Port 80 UART",
783 {0xe0,0xe1,0xe2,0xe3,0xe4,EOT},
784 {0x80,0x00,0x00,0x10,0x00,EOT}},
785 {0x16, "Deep Sleep",
786 {0x30,0xe0,0xe1,0xe2,0xe3,EOT},
787 {0x20,0x20,0x04,0x05,0x01,EOT}},
788 {EOT}}},
Pavel Sayekatcc480092019-06-13 19:43:14 +0600789 {0xd121, "NCT5539D", {
790 {NOLDN, NULL,
791 {0x10,0x11,0x13,0x14,0x1a,0x1b,0x1c,0x1d,0x22,0x24,
792 0x25,0x26,0x27,0x28,0x2a,0x2b,0x2c,0x2d,0x2f,EOT},
793 {0xff,0xff,0x00,0x00,0x30,0x50,0x10,0x00,0xff,0x04,
794 0x00,MISC,0x03,0x00,0xc0,0x00,0x01,MISC,MISC,EOT}},
795 {0x02, "UART A",
796 {0x30,0x60,0x61,0x70,0xf0,0xf2,EOT},
797 {0x01,0x03,0xf8,0x04,0x00,0x00,EOT}},
798 {0x05, "Keyboard Controller",
799 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT},
800 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,EOT}},
Pavel Sayekat40dc75e2019-06-30 11:38:07 +0600801 {0x06, "Consumer IR",
Pavel Sayekatcc480092019-06-13 19:43:14 +0600802 {0x30,0x60,0x61,0x70,EOT},
803 {0x00,0x00,0x00,0x00,EOT}},
804 {0x07, "GPIO 7, GPIO 8",
805 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xec,0xed,EOT},
806 {0x00,0xff,NANA,0x00,NANA,0xff,NANA,0x00,NANA,0x00,0x00,EOT}},
807 {0x08, "WDT1, WDT3, GPIO 0, KBC P20",
808 {0x30,0x60,0x61,0xe0,0xe1,0xe2,0xe3,0xe4,0xf5,0xf6,
809 0xf7,0xf8,0xf9,0xfa,0xfe,0xff,EOT},
810 {0x00,0x00,0x00,0xff,NANA,0x00,NANA,0x00,0x00,0x00,
811 0x00,0x00,0x00,0x00,0x00, 0x00,EOT}},
812 {0x09, "GPIO 2, GPIO 3, GPIO 4, GPIO 5",
813 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
814 0xe9,0xea,0xeb,0xee, 0xf0,0xf1,0xf2,0xf4,0xf5,0xf6,0xf7,EOT},
815 {0x00,0xff,NANA,0x00,NANA,0x7f,NANA,0x00,NANA,NANA,
816 0x00,0x00,0x00,0x00,0xff,NANA,0x00,0xff,NANA,0x00,NANA,EOT}},
817 {0x0a, "ACPI",
818 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,0xec,
819 0xed,0xee,0xf0,0xf1,0xf2,0xf3,0xf6,0xf7,0xfc,EOT},
820 {0x01,0x00,0x00,0x00,0x00,0x02,0x1a,0x00,0x00,0x00,
821 0x01,0x00,0x10,0x48,0x5c,0x00,0x00,0xc0,0x80,EOT}},
822 {0x0b, "Hardware Monitor, Front Panel LED",
823 {0x30,0x60,0x61,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,
824 0xe6,0xe7,0xec,0xed,0xf0,0xf1,0xf2,0xf6,0xf7,0xf8,
825 0xf9,0xfa,0xfb,0xfc,EOT},
826 {0x00,0x00,0x00,0x00,0x7f,0x7f,0x7f,0x7f,0x7f,0xa8,
827 0x08,0x7f,0x00,0x81,0x00,0x00,0x00,0x00,0x87,0x47,
828 0x00,0x00,0x00,0x02,EOT}},
Pavel Sayekat40dc75e2019-06-30 11:38:07 +0600829 {0x0d, "WDT2",
Pavel Sayekatcc480092019-06-13 19:43:14 +0600830 {0xe7,0xe8,0xeb,0xed,0xf0,0xf3,EOT},
831 {0x10,0x32,0x14,0x00,0x00,0x00,EOT}},
832 {0x0e, "CIR Wake-Up",
833 {0x30,0x60,0x61,0x70,EOT},
834 {0x00,0x00,0x00,0x00,EOT}},
835 {0x0f, "GPIO Push-Pull or Open-Drain selection",
836 {0xe1,0xe2,0xe3,0xe4,0xe6,0xe7,0xe9,EOT},
837 {0xff,0x7f,0xff,0xff,0xff,0xff,0xff,EOT}},
838 {0x11, "GPIO, RI PSOUT Wake-Up Status",
839 {0xe1,0xe2,0xe9,EOT},
840 {0x00,0x00,0x00,EOT}},
841 {0x12, "SW Error Control",
842 {0xe1,0xe7,0xea,0xeb,0xec,EOT},
843 {0x00,0x00,0x10,0x00,0x00,EOT}},
844 {0x15, "Fading LED",
845 {0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,EOT},
846 {0xff,0x7f,0x00,0x56,0x56,0x17,0x00,0x0f,0x10,EOT}},
847 {0x16, "Deep Sleep",
848 {0x30,0xe0,0xe1,0xe2,0xe3,EOT},
849 {0xa0,0x20,0x04,0x05,0x01,EOT}},
850 {EOT}}},
David Hendrickse1822d92010-07-22 22:56:44 +0000851 {EOT}
852};
853
Michał Żygowskib33ee1d2022-04-26 17:48:27 +0200854static void dump_nct6687d_gpios(uint16_t port)
855{
856 uint8_t group, sel;
857
858 const char *gpio_groups[] ={
859 "0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
860 "Reserved", /* Does not exist */
861 "EN0", /* Enhance 0 */
862 "EN1", /* Enhance 1 */
863 };
864
865 /* Used by reg at 0xd offset to select which registers to reflect */
866 const char *gpio_sel[] ={
867 "GPIO Data",
868 "GPIO Interrupt Enable",
869 "GPIO Status",
870 "GPIO I/O Control",
871 "GPIO Inversion Control",
872 "GPIO PP/OD Control",
873 "GPIO Interrupt Type",
874 "GPIO Output Data Reflection",
875 "GPIO Internal Pull Down Control",
876 "GPIO Reset Source Control",
877 "Reserved",
878 /* Below are valid only for GPIO Enhance Group 0 and 1 */
879 "GPIO De-bounce Clock Option",
880 "GPIO De-bounce Type 0",
881 "GPIO De-bounce Type 1",
882 "GPIO De-bounce Time Option 0",
883 "GPIO De-bounce Time Option 1",
884 };
885
886 enter_conf_mode_winbond_fintek_ite_8787(port);
887 regwrite(port, LDN_SEL, 0x07);
888
889 printf("\nDumping GPIO configuration...\n\n");
890
891 printf("%-35s", "GPIO Group");
892 for (group = 0; group < ARRAY_SIZE(gpio_groups); group++) {
893 if (group == 10)
894 continue;
895 printf("%-5s", gpio_groups[group]);
896 }
897
898 printf("\n");
899
900 for (sel = 0; sel < ARRAY_SIZE(gpio_sel); sel++) {
901 if (sel == 10)
902 continue;
903 printf("%-35s", gpio_sel[sel]);
904 for (group = 0; group < ARRAY_SIZE(gpio_groups); group++) {
905 if (group == 10)
906 continue;
907 /* Select GPIO group */
908 regwrite(port, 0xf0, group);
909 if (group < 11 && sel > 10)
910 printf("XX ");
911 else
912 /* GPIO registers start at LDN 7 offset 0xe0 */
913 printf("%02x ", regval(port, 0xe0 + sel));
914 }
915 printf("\n");
916 }
917
918 printf("\n");
919 exit_conf_mode_winbond_fintek_ite_8787(port);
920}
921
David Hendrickse1822d92010-07-22 22:56:44 +0000922void probe_idregs_nuvoton(uint16_t port)
923{
924 uint8_t sid, srid;
Stefan Reinauer3187d022011-04-22 23:12:40 +0000925 uint16_t chip_id = 0;
926 uint8_t chip_rev = 0;
Guenter Roeck21856ee2012-06-29 12:24:57 -0700927 uint16_t iobase = 0;
928 int i;
Stefan Reinauer3187d022011-04-22 23:12:40 +0000929
930 /* Probe for the 16bit IDs first to avoid collisions */
931 probing_for("Nuvoton", "", port);
932 enter_conf_mode_winbond_fintek_ite_8787(port);
933 chip_id = (regval(port, DEVICE_ID_REG) << 8) |
934 regval(port, DEVICE_ID_REG + 1);
Guenter Roeck21856ee2012-06-29 12:24:57 -0700935 regwrite(port, LDN_SEL, 0x0b);
936 iobase = (regval(port, 0x60) << 8) | (regval(port, 0x61) & ~7);
Stefan Reinauer3187d022011-04-22 23:12:40 +0000937
938 exit_conf_mode_winbond_fintek_ite_8787(port);
939
940 if (!superio_unknown(reg_table, chip_id)) {
941 printf("Found Nuvoton %s (id=0x%02x) at 0x%x\n",
942 get_superio_name(reg_table, chip_id), chip_id, port);
943 chip_found = 1;
Florian Zumbiehld3590612011-11-02 09:46:34 +0100944 enter_conf_mode_winbond_fintek_ite_8787(port);
Stefan Reinauer3187d022011-04-22 23:12:40 +0000945 dump_superio("Nuvoton", reg_table, port, chip_id, LDN_SEL);
Florian Zumbiehld3590612011-11-02 09:46:34 +0100946 exit_conf_mode_winbond_fintek_ite_8787(port);
Guenter Roeck21856ee2012-06-29 12:24:57 -0700947 goto extra;
Stefan Reinauer5ff7c132011-10-31 12:56:45 -0700948 }
Stefan Reinauer3187d022011-04-22 23:12:40 +0000949
950 if (verbose)
951 printf(NOTFOUND "chip_id=0x%04x\n", chip_id);
David Hendrickse1822d92010-07-22 22:56:44 +0000952
953 probing_for("Nuvoton", "(sid=0xfc) ", port);
954
955 sid = regval(port, DEVICE_ID_REG);
956 srid = regval(port, DEVICE_REV_REG);
957
958 if (sid == 0xfc) { /* WPCE775xL family */
959 /*
960 * bits 7-5: Chip ID
961 * bits 4-0: Chip revision
962 */
963 chip_id = srid >> 5;
964 chip_rev = srid & 0x1f;
965 }
966
967 if (superio_unknown(reg_table, sid)) {
968 if (verbose)
969 printf(NOTFOUND
970 "sid=0x%02x, id=0x%02x, rev=0x%02x\n", sid,
971 chip_id, chip_rev);
972 return;
973 }
974
975 printf("Found Nuvoton %s (id=0x%02x, rev=0x%02x) at 0x%x\n",
976 get_superio_name(reg_table, sid), chip_id, chip_rev, port);
977 chip_found = 1;
David Hendrickse1822d92010-07-22 22:56:44 +0000978 dump_superio("Nuvoton", reg_table, port, sid, LDN_SEL);
Guenter Roeck21856ee2012-06-29 12:24:57 -0700979
980extra:
981 if (extra_dump && iobase) {
982 switch (chip_id & 0xfff0) {
983 case 0xb470: /* NCT6775F */
984 for (i = 0; i < 7; i++)
985 dump_data(iobase + 5, i);
986 dump_data(iobase + 5, 0xa);
987 dump_data(iobase + 5, 0xc);
988 dump_data(iobase + 5, 0xd);
989 break;
990 case 0xc330: /* NCT6776F */
991 for (i = 0; i < 8; i++)
992 dump_data(iobase + 5, i);
993 break;
994 case 0xc560: /* NCT6779D */
995 for (i = 0; i < 10; i++)
996 dump_data(iobase + 5, i);
997 break;
Michał Żygowskib33ee1d2022-04-26 17:48:27 +0200998 case 0xd590: /* NCT6687D-W */
999 dump_nct6687d_gpios(port);
1000 /* One can use the APCI/BIOS register set, although the
1001 * resulting data is still the same when using software
1002 * register set.
1003 * printf("EC I/O base for ACPI/BIOS: 0x%x\n", iobase);
1004 * dump_page_index_data(iobase);
1005 */
1006 printf("EC I/O base for software: 0x%x\n", iobase + 4);
1007 dump_page_index_data(iobase + 4);
1008 break;
Guenter Roeck21856ee2012-06-29 12:24:57 -07001009 }
1010 }
David Hendrickse1822d92010-07-22 22:56:44 +00001011}
1012
1013void print_nuvoton_chips(void)
1014{
1015 print_vendor_chips("Nuvoton", reg_table);
1016}