blob: bc56aaf72ea07bb41995f19978b674516bf2cb40 [file] [log] [blame]
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +00001/*
Uwe Hermannafe83092007-09-28 15:45:43 +00002 * This file is part of the superiotool project.
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +00003 *
4 * Copyright (C) 2007 Uwe Hermann <uwe@hermann-uwe.de>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +000015 */
16
17#include "superiotool.h"
18
Uwe Hermannc3da3662007-09-26 16:14:16 +000019#define DEVICE_ID_REG_OLD 0x09
20
21#define DEVICE_ID_REG 0x20
22#define DEVICE_REV_REG 0x21
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +000023
24/**
25 * The ID entries must be in 0xYYZ format, where YY is the device ID,
26 * and Z is bits 7..4 of the device revision register. We do not match
Uwe Hermannc3da3662007-09-26 16:14:16 +000027 * bits 3..0 of the device revision here (at least for newer Super I/Os).
28 *
29 * But some of the older versions use both bytes (0x20 and 0x21), where
30 * register 0x21 holds the ID and the full 8 bits of 0x21 hold the revision.
31 *
32 * Some other Super I/Os only use bits 3..0 of 0x09 as ID.
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +000033 */
Uwe Hermann246be7d2007-10-31 22:22:11 +000034static const struct superio_registers reg_table[] = {
Uwe Hermann5debf362007-10-04 18:34:36 +000035 /* ID and rev[3..0] */
36 {0x527, "W83977CTF", { /* TODO: Not yet in sensors-detect */
Uwe Hermannc3da3662007-09-26 16:14:16 +000037 {EOT}}},
Andriy Gaponc880a362008-10-19 21:03:41 +000038 {0x52f, "W83977EF/EG", {
39 {NOLDN, NULL,
40 {0x02,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x28,0x2a,
41 0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
42 {RSVD,0x52,MISC,0xff,0xfe,MISC,0x00,MISC,0x00,0x00,
43 0x00,0x00,RSVD,RSVD,RSVD,EOT}},
44 /* Some register defaults depend on the value of PNPCSV. */
45 {0x0, "Floppy",
46 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
47 0xf5,EOT},
48 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
49 0x00,EOT}},
50 {0x1, "Parallel port",
51 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
52 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}},
53 {0x2, "COM1",
54 {0x30,0x60,0x61,0x70,0xf0,EOT},
55 {0x01,0x03,0xf8,0x04,0x00,EOT}},
56 {0x3, "COM2",
57 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
58 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT}},
59 {0x5, "Keyboard",
60 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT},
61 {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x83,EOT}},
62 {0x7, "GPIO 1",
63 {0x30,0x60,0x61,0x62,0x63,0x64,0x65,0x70,0x72,0xe0,
64 0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xf1,EOT},
65 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
66 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,EOT}},
67 {0x8, "GPIO 2",
68 {0x30,0x60,0x61,0x70,0x72,0xe8,0xe9,0xea,0xeb,0xec,
69 0xed,0xf0,0xf1,0xf2,0xf3,0xf4,EOT},
70 {0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,
71 0x01,0x00,RSVD,0x00,0x00,0x00,EOT}},
72 {0xa, "ACPI",
73 {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
74 0xf0,0xf1,0xf3,0xf4,0xf6,0xf7,0xf9,0xfe,0xff,EOT},
75 {0x00,0x00,0x00,0x00,MISC,MISC,MISC,0x00,0x00,0x00,
76 0x00,0x00,0x00,0x00,0x00,0x00,0x00,RSVD,RSVD,EOT}},
Uwe Hermannc3da3662007-09-26 16:14:16 +000077 {EOT}}},
Uwe Hermann5debf362007-10-04 18:34:36 +000078 {0x595, "W83627SF", { /* TODO: Not yet in sensors-detect */
Uwe Hermannc3da3662007-09-26 16:14:16 +000079 {EOT}}},
80 {0x601, "W83697HF/F/HG", { /* No G version? */
Uwe Hermann2c290e32007-09-20 00:00:49 +000081 {NOLDN, NULL,
Uwe Hermannb0ae9762008-10-14 16:34:38 +000082 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x28,0x29,
Uwe Hermann2c290e32007-09-20 00:00:49 +000083 0x2a,EOT},
Uwe Hermannb0ae9762008-10-14 16:34:38 +000084 {0x60,NANA,0xff,0x00,0x00,0x00,0x00,0x00,0x00,
Uwe Hermann2c290e32007-09-20 00:00:49 +000085 MISC,EOT}},
86 /* Some register defaults depend on the value of PNPCSV. */
87 {0x0, "Floppy",
88 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
89 0xf5,EOT},
90 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
91 0x00,EOT}},
92 {0x1, "Parallel port",
93 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
94 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}},
95 {0x2, "COM1",
96 {0x30,0x60,0x61,0x70,0xf0,EOT},
97 {0x01,0x03,0xf8,0x04,0x00,EOT}},
98 {0x3, "COM2",
99 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
100 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT}},
Uwe Hermann07024692007-09-20 22:13:48 +0000101 {0x6, "Consumer IR",
Uwe Hermann2c290e32007-09-20 00:00:49 +0000102 {0x30,0x60,0x61,0x70,EOT},
103 {0x00,0x00,0x00,0x00,EOT}},
Uwe Hermann07024692007-09-20 22:13:48 +0000104 {0x7, "Game port, GPIO 1",
Uwe Hermann2c290e32007-09-20 00:00:49 +0000105 {0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT},
106 {0x00,0x02,0x01,0x00,0x00,0xff,0x00,0x00,EOT}},
Uwe Hermann07024692007-09-20 22:13:48 +0000107 {0x8, "MIDI port, GPIO 5",
Uwe Hermann2c290e32007-09-20 00:00:49 +0000108 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3,
109 0xf4,0xf5,EOT},
110 {0x00,0x03,0x30,0x00,0x00,0x09,0xff,0x00,0x00,0x00,
111 0x00,0x00,EOT}},
Uwe Hermann07024692007-09-20 22:13:48 +0000112 {0x9, "GPIO 2, GPIO 3, GPIO 4",
Uwe Hermann2c290e32007-09-20 00:00:49 +0000113 {0x30,0x60,0x61,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,
114 0xf7,0xf8,0xf5,EOT},
115 {0x00,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,
116 0x00,0x00,0x00,EOT}},
117 {0xa, "ACPI",
118 {0x30,0x70,0xe0,0xe1,0xe2,0xe5,0xe6,0xe7,
119 0xf0,0xf1,0xf3,0xf4,0xf6,0xf7,0xf9,EOT},
120 {0x00,0x00,0x00,0x00,NANA,0x00,0x00,0x00,
121 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
122 {0xb, "Hardware monitor",
123 {0x30,0x60,0x61,0x70,EOT},
124 {0x00,0x00,0x00,0x00,EOT}},
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +0000125 {EOT}}},
Uwe Hermannc3da3662007-09-26 16:14:16 +0000126 {0x610, "W83L517D/D-F", {
127 {EOT}}},
Uwe Hermann5debf362007-10-04 18:34:36 +0000128 {0x708, "W83637HF/HG", {
Uwe Hermannc3da3662007-09-26 16:14:16 +0000129 {EOT}}},
130 {0x828, "W83627THF/THG", { /* We assume rev is bits 3..0 of 0x21. */
David Hendricksc387b0b2007-10-07 19:04:26 +0000131 {NOLDN, NULL,
132 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x28,0x29,0x2a,
133 0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
134 {0x82,NANA,0xff,0x00,MISC,0x00,MISC,0x00,0x00,0x00,
135 MISC,MISC,MISC,0x00,0x00,EOT}},
136 /* Some register defaults depend on the value of PNPCSV. */
137 {0x0, "Floppy",
138 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
139 0xf5,EOT},
140 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
141 0x00,EOT}},
142 {0x1, "Parallel port",
143 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
144 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}},
145 {0x2, "COM1",
146 {0x30,0x60,0x61,0x70,0xf0,EOT},
147 {0x01,0x03,0xf8,0x04,0x00,EOT}},
148 {0x3, "COM2",
149 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
150 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT}},
151 {0x5, "Keyboard",
152 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT},
153 {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x80,EOT}},
154 {0x7, "GPIO 1, GPIO 5, game port, MIDI port",
155 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3,
156 0xf4,0xf5,EOT},
157 {0x00,0x02,0x01,0x03,0x30,0x09,0xff,0x00,0x00,0xff,
158 0x00,0x00,EOT}},
159 {0x8, "GPIO 2",
160 {0x30,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,EOT},
161 {0x00,0xff,0x00,0x00,0x00,RSVD,0x00,0x00,0x00,EOT}},
162 {0x9, "GPIO 3, GPIO 4",
163 {0x30,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,EOT},
164 {0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,EOT}},
165 {0xa, "ACPI",
166 /* Note: Datasheet says 0xe2 can't be read/written. */
167 {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
168 0xf0,0xf1,0xf3,0xf4,0xf6,0xf7,0xf9,0xfe,0xff,EOT},
169 {0x00,0x00,0x00,0x00,MISC,MISC,0x00,0x00,0x00,0x00,
170 0x00,0x00,0x00,0x00,0x00,0x00,0x00,RSVD,RSVD,EOT}},
171 {0xb, "Hardware monitor",
172 {0x30,0x60,0x61,0x70,EOT},
173 {0x00,0x00,0x00,0x00,EOT}},
Uwe Hermannc3da3662007-09-26 16:14:16 +0000174 {EOT}}},
Uwe Hermann5debf362007-10-04 18:34:36 +0000175#if 0
176 {0x85x, "W83687THF", { /* TODO: sensors-detect: 0x85 */
177 {EOT}}},
178#endif
179 {0xa02, "W83627DHG", {
Bingxun Shi34a576f2008-01-19 00:32:07 +0000180 {NOLDN, NULL,
181 {0x02,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
182 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
183 {0x00,0xa0,NANA,0xff,0x00,MISC,0x00,MISC,RSVD,0x50,
184 0x00,0x00,RSVD,0xe2,0x21,0x00,0x00,EOT}},
185 {0x0, "Floppy",
186 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
187 EOT},
188 {0x01,0x03,0xf0,0x06,0x02,0x8e,0x00,0xff,0x00,0x00,
189 EOT}},
190 {0x1, "Parallel port",
191 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
192 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}},
193 {0x2, "COM1",
194 {0x30,0x60,0x61,0x70,0xf0,EOT},
195 {0x01,0x03,0xf8,0x04,0x00,EOT}},
196 {0x3, "COM2",
197 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
198 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT}},
199 {0x5, "Keyboard",
200 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT},
201 {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x83,EOT}},
202 {0x6, "Serial peripheral interface",
203 {0x30,0x62,0x63,EOT},
204 {0x00,0x00,0x00,EOT}},
205 {0x7, "GPIO 6",
206 {0x30,0xf4,0xf5,0xf6,0xf7,EOT},
207 {0x00,0xff,0x00,0x00,0x00,EOT}},
208 {0x8, "WDTO#, PLED",
209 {0x30,0xf5,0xf6,0xf7,EOT},
210 {0x00,0x00,0x00,0x00,EOT}},
211 {0x9, "GPIO 2, GPIO 3, GPIO 4, GPIO 5",
212 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
Prakash Punnoor3af120f2011-03-29 12:02:03 +0000213 0xe9,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xfe,
214 EOT},
215 {0x00,0xff,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,
216 0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,
217 EOT}},
218 {0xa, "ACPI",
219 {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
220 0xe8,0xe9,0xf2,0xf3,0xf4,0xf6,0xf7,0xfe,EOT},
221 {0x00,0x00,0x01,0x00,0xff,0x08,0x00,RSVD,0x1c,0x00,
222 RSVD,RSVD,0x7c,0x00,0x00,0x00,0x00,0x00,EOT}},
223 {0xb, "Hardware monitor",
224 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
225 {0x00,0x00,0x00,0x00,0x81,0x00,0x00,EOT}},
226 {0xc, "PECI, SST",
227 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe8,0xf1,0xfe,0xff,
228 EOT},
229 {0x00,0x48,0x48,0x48,0x48,0x00,0x00,0x48,0x00,0x00,
230 EOT}},
231 {EOT}}},
Frank Rysanekc0c620e2013-04-05 10:44:10 +0200232 {0xa23, "W83627UHG = NCT6627UD", { /* TODO: Not yet in sensors-detect */
233 {NOLDN, NULL, /* CR2B (485) is only valid for chip rev.E */
234 {0x02,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
235 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
236 {0x00,0xa2,NANA,0xff,0xF0,MISC,0x00,MISC,RSVD,0x00,
237 0x00,0x00,0x00,0x02,0x00,0x00,0x00,EOT}},
238 {0x0, "Floppy",
239 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
240 EOT},
241 {0x01,0x03,0xf0,0x06,0x02,0x8e,0x00,0xff,0x00,0x00,
242 EOT}},
243 {0x1, "Parallel port",
244 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
245 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}},
246 {0x2, "UART A",
247 {0x30,0x60,0x61,0x70,0xf0,EOT},
248 {0x01,0x03,0xf8,0x04,0x00,EOT}},
249 {0x3, "UART B",
250 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
251 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT}},
252 {0x5, "Keyboard",
253 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT},
254 {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x83,EOT}},
255 {0x6, "UART C",
256 {0x30,0x60,0x61,0x70,0xf0,EOT},
257 {0x01,0x03,0xE0,0x04,0x00,EOT}},
258 {0x7, "GPIO 3, GPIO 4",
259 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,EOT},
260 {0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,EOT}},
261 {0x8, "WDTO#, PLED, GPIO 5,6 & GPIO Base Address",
262 {0x30,0x60,0x61,
263 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,
264 0xF5,0xF6,0xF7,EOT},
265 {0x02,0x00,0x00,
266 0xFF,0x00,0x00,0x00,0xFF,0x1F,0x00,0x00,
267 0x00,0x00,0x00,EOT}},
268 {0x9, "GPIO 1, GPIO 2 and SUSLED",
269 {0x30,
270 0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
271 0xF3,EOT},
272 {0x00,
273 0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,
274 0x00,EOT}},
275 {0xa, "ACPI",
276 {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
277 0xe8,0xe9,0xf2,0xf3,0xf4,0xf6,0xf7,0xfe,EOT},
278 {0x00,0x00,0x01,0x00,0xff,0x08,0x00,0x00,0x1c,0x00,
279 RSVD,RSVD,0x3e,0x00,0x00,0x00,0x00,0x00,EOT}},
280 {0xb, "Hardware monitor",
281 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
282 {0x00,0x00,0x00,0x00,RSVD,RSVD,0x00,EOT}},
283 {0xc, "PECI, SST",
284 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
285 0xf1,0xf2,0xf3,0xfe,0xff,EOT},
286 {0x00,0x48,0x48,0x48,0x48,0x00,RSVD,RSVD,0x00,
287 0x48,0x50,0x10,0x23,0x5A,EOT}},
288 {0xD, "UART D",
289 {0x30,0x60,0x61,0x70,0xf0,EOT},
290 {0x00,0x02,0xe0,0x03,0x00,EOT}},
291 {0xE, "UART E",
292 {0x30,0x60,0x61,0x70,0xf0,EOT},
293 {0x00,0x03,0xe8,0x04,0x00,EOT}},
294 {0xF, "UART F",
295 {0x30,0x60,0x61,0x70,0xf0,EOT},
296 {0x00,0x02,0xe8,0x03,0x00,EOT}},
Prakash Punnoor3af120f2011-03-29 12:02:03 +0000297 {EOT}}},
298 {0xa51, "W83667HG", {
299 /* See also: http://lists.lm-sensors.org/pipermail/lm-sensors/2008-July/023683.html */
300 {EOT}}},
301 {0xb07, "W83627DHG-P/-PT", {
302 {NOLDN, NULL,
303 {0x02,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
304 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
305 {0x00,0xb0,NANA,0xff,0x00,MISC,0x00,MISC,RSVD,0x50,
306 0x00,0x00,RSVD,0xe2,0x21,0x00,0x00,EOT}},
307 {0x0, "Floppy",
308 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
309 EOT},
310 {0x01,0x03,0xf0,0x06,0x02,0x8e,0x00,0xff,0x00,0x00,
311 EOT}},
312 {0x1, "Parallel port",
313 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
314 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}},
315 {0x2, "COM1",
316 {0x30,0x60,0x61,0x70,0xf0,EOT},
317 {0x01,0x03,0xf8,0x04,0x00,EOT}},
318 {0x3, "COM2",
319 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
320 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT}},
321 {0x5, "Keyboard",
322 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT},
323 {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x83,EOT}},
324 {0x6, "Serial peripheral interface",
325 {0x30,0x62,0x63,EOT},
326 {0x00,0x00,0x00,EOT}},
327 {0x7, "GPIO 6",
328 {0x30,0xf4,0xf5,0xf6,0xf7,0xf8,EOT},
329 {0x00,0xff,0x00,0x00,0x00,0x00,EOT}},
330 {0x8, "WDTO#, PLED",
331 {0x30,0xf5,0xf6,0xf7,EOT},
332 {0x00,0x00,0x00,0x00,EOT}},
333 {0x9, "GPIO 2, GPIO 3, GPIO 4, GPIO 5",
334 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,
Prakash Punnoorfde70252011-03-25 16:54:38 +0000335 0xe9,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,
336 0xf9,0xfa,0xfe,EOT},
Bingxun Shi34a576f2008-01-19 00:32:07 +0000337 {0x00,0xff,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,
338 0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,
Prakash Punnoorfde70252011-03-25 16:54:38 +0000339 0x00,0x00,0x00,EOT}},
Bingxun Shi34a576f2008-01-19 00:32:07 +0000340 {0xa, "ACPI",
341 {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
342 0xe8,0xe9,0xf2,0xf3,0xf4,0xf6,0xf7,0xfe,EOT},
343 {0x00,0x00,0x01,0x00,0xff,0x08,0x00,RSVD,0x1c,0x00,
344 RSVD,RSVD,0x7c,0x00,0x00,0x00,0x00,0x00,EOT}},
345 {0xb, "Hardware monitor",
346 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
347 {0x00,0x00,0x00,0x00,0x81,0x00,0x00,EOT}},
348 {0xc, "PECI, SST",
Prakash Punnoor3af120f2011-03-29 12:02:03 +0000349 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe8,0xe9,0xea,0xec,
350 0xee,0xef,0xf1,0xf2,0xf3,0xfe,0xff,EOT},
351 {0x00,0x48,0x48,0x48,0x48,0x00,0x00,RSVD,0x00,0x00,
352 0x01,0x5a,0x48,0x50,0x10,0x00,0x00,EOT}},
David Bartley5142dcd2010-01-23 21:51:10 +0000353 {EOT}}},
Corey Osgooda6f000c2010-08-17 07:14:44 +0000354 {0xb35, "Nuvoton NCT5571D", {
355 {NOLDN, NULL,
356 {0x02,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,
357 0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
358 {RSVD,0xb3,NANA,0xff,0x00,0x40,0x00,MISC,0xff,0x20,0x00,
359 0x00,0x7f,0x0a,0x08,0x00,MISC,EOT}},
360 {0x2, "COM1",
361 {0x30,0x60,0x61,0x70,0xf0,EOT},
362 {0x01,0x03,0xf8,0x04,0x00,EOT}},
363 {0x5, "Keyboard",
364 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT},
365 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,EOT}},
366 {0x7, "GPIO 6, GPIO 8, GPIO 9",
367 {0x30,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,
368 0xee,0xf4,0xf5,0xf6,0xf7,0xf8,EOT},
369 {0x18,0xef,MISC,0x00,0x00,0xff,MISC,0x00,0x00,RSVD,0x00,
370 0x00,0xff,MISC,0x00,0x00,0x00,EOT}},
371 {0x9, "GPIO 2, GPIO 3, GPIO 5",
372 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,0xea,
373 0xeb,0xf4,0xf5,0xf6,0xf7,0xfe,EOT},
374 {0x05,0xff,MISC,0x00,0x00,0xff,MISC,0x00,0x00,0x00,0x00,
375 0x00,0xff,MISC,0x00,0x00,0x00,EOT}},
376 {0xa, "ACPI",
377 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xf2,
378 0xf3,0xf4,0xf6,0xf7,0xfe,0xff,EOT},
379 {0x01,0x00,0xff,0x00,0x00,0x02,0x1c,0x00,RSVD,0x00,0x7c,
380 0x00,0x00,0x00,0x00,0x00,0x30,EOT}},
381 {0xb, "Hardware monitor",
382 {0x30,0x60,0x61,0x70,0xe0,0xe1,0xe2,0xe3,0xf0,0xf5,EOT},
383 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc1,0x10,EOT}},
384 {0xc, "PECI",
385 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe8,0xe9,0xea,0xec,
386 0xee,0xef,0xf1,0xf2,0xf3,0xfe,0xff,EOT},
387 {0x00,0x48,0x48,0x48,0x48,0x00,0x00,0x00,RSVD,0x00,0x00,
388 0x01,0x5a,0x48,0x50,0x10,0x80,0x01,EOT}},
389 {0xd, "SUSLED",
390 {0xec,EOT},
391 {0x01,EOT}},
392 {0xf, "GPIO Push-Pull/OD Select",
393 {0xe0,0xe1,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xf0,0xf1,
394 0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,
395 0xfd,0xfe,0xff,EOT},
396 {RSVD,0xfd,RSVD,0xf7,0xcb,RSVD,0xff,0xff,0x00,MISC,MISC,
397 MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,
398 MISC,MISC,MISC,EOT}},
399 {EOT}}},
Uwe Hermann5debf362007-10-04 18:34:36 +0000400
401 /* ID and rev */
Uwe Hermannc3da3662007-09-26 16:14:16 +0000402 {0x9771, "W83977F-A/G-A/AF-A/AG-A", {
403 {EOT}}},
Uwe Hermann398b6052007-10-16 21:56:32 +0000404 {0x9777, "W83977AF", {
Uwe Hermann4bdd6432010-05-14 16:40:55 +0000405 /*
406 * W83977AF as found on the Advantech PCM-5820. We weren't able
Uwe Hermann398b6052007-10-16 21:56:32 +0000407 * to find a datasheet (so far) which lists the 0x77 revision,
408 * but the hardware is there in the wild, so detect it...
409 */
410 {EOT}}},
Uwe Hermannc3da3662007-09-26 16:14:16 +0000411 {0x9773, "W83977TF", {
Idwer Vollering92d34342007-10-16 00:34:03 +0000412 {NOLDN, NULL,
413 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x28,0x2a,0x2b,
414 0x2c,0x2d,0x2e,0x2f,EOT},
415 {0x97,0x73,0xff,0xfe,MISC,0x00,MISC,0x00,0x00,0x00,
416 0x00,RSVD,RSVD,RSVD,EOT}},
417 {0x0, "Floppy",
418 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
419 EOT},
420 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00,
421 EOT}},
422 {0x1, "Parallel port",
423 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
424 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}},
425 {0x2, "COM1",
426 {0x30,0x60,0x61,0x70,0xf0,EOT},
427 {0x01,0x03,0xf8,0x04,0x00,EOT}},
428 {0x3, "COM2",
429 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
430 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT}},
431 {0x5, "Keyboard / mouse",
432 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT},
433 {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x83,EOT}},
434 {0x7, "GPIO 1",
435 {0x30,0x60,0x61,0x62,0x63,0x64,0x65,0x70,0x72,0xe0,
436 0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xf1,EOT},
437 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
438 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,EOT}},
439 {0x8, "GPIO 2",
440 {0x30,0x60,0x61,0x70,0x72,0xe8,0xe9,0xea,0xeb,0xec,
441 0xed,0xee,0xf0,0xf1,0xf2,0xf3,0xf4,EOT},
442 {0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,
443 0x01,0x01,0x00,RSVD,0x00,0x00,0x00,EOT}},
444 {0x9, "GPIO 3",
445 {0x30,0x60,0x61,0x62,0x63,0x64,0x65,0x70,0x72,0xe0,
446 0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xf1,EOT},
447 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
448 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,EOT}},
449 {0xa, "ACPI",
450 {0x30,0x60,0x61,0x62,0x63,0x64,0x65,0x70,0xe0,0xe1,
Ioannis Barkas3ba18a672009-06-12 14:20:27 +0000451 0xe2,0xe3,0xe4,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,
Idwer Vollering92d34342007-10-16 00:34:03 +0000452 0xf7,0xfe,0xff,EOT},
453 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
454 NANA,MISC,RSVD,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
455 0x00,RSVD,RSVD,EOT}},
Uwe Hermannc3da3662007-09-26 16:14:16 +0000456 {EOT}}},
457 {0x9774, "W83977ATF", {
458 {EOT}}},
Uwe Hermann5debf362007-10-04 18:34:36 +0000459
Zheng Baocb6c9e02010-12-12 14:40:29 +0000460 {0xb07, "W83527HG", { /* TODO: Not yet in sensors-detect */
Zheng Baoca466b22010-12-14 02:02:34 +0000461 {NOLDN, NULL,
Uwe Hermannd43498d2010-12-20 23:40:23 +0000462 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,
463 0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
464 {0xB0,0x73,0xff,0x00,MISC,0x00,0x00,RSVD,0x50,0x00,
465 0x00,RSVD,0xe2,0x21,0x00,0x00,EOT}},
Zheng Baoca466b22010-12-14 02:02:34 +0000466 {0x5, "Keyboard",
467 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT},
468 {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x83,EOT}},
Uwe Hermannd43498d2010-12-20 23:40:23 +0000469 {0x8, "WDTO#, PLED",
Zheng Baoca466b22010-12-14 02:02:34 +0000470 {0x30,0xf5,0xf6,0xf7,EOT},
471 {0x00,0x00,0x00,0x00,EOT}},
472 {0x9, "GPIO 2, GPIO3, GPIO5",
473 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,
474 0xf0,0xf1,0xf2,0xf3,0xf8,0xf9,0xfa,0xfe,EOT},
475 {0x00,0xff,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,
476 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
477 {0xa, "ACPI",
478 {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
Uwe Hermannd43498d2010-12-20 23:40:23 +0000479 0xe8,0xe9,0xf2,0xf3,0xf4,0xf6,0xf7,0xfe,EOT},
480 {0x00,0x00,0x01,0x00,0xff,0x08,0x00,0x00,0x1c,0x00,
481 RSVD,RSVD,0x7c,0x00,0x00,0x00,0x00,0x00,EOT}},
Zheng Baoca466b22010-12-14 02:02:34 +0000482 {0xb, "Hardware monitor",
Uwe Hermannd43498d2010-12-20 23:40:23 +0000483 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
484 {0x00,0x00,0x00,0x00,0x81,RSVD,0x00,EOT}},
485 {0xc, "PECI",
486 {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe8,0xe9,0xea,0xec,
487 0xfe,0xff,EOT},
488 {0x00,0x48,0x48,0x48,0x48,0x00,0x00,RSVD,0x00,0x00,
489 0x00,0x00,EOT}},
Zheng Baocb6c9e02010-12-12 14:40:29 +0000490 {EOT}}},
Uwe Hermann5debf362007-10-04 18:34:36 +0000491 /* ID only */
Uwe Hermannc3da3662007-09-26 16:14:16 +0000492 {0x52, "W83627HF/F/HG/G", {
Rasmus Wiman409b4f22007-10-05 21:58:03 +0000493 {NOLDN, NULL,
Uwe Hermannb0ae9762008-10-14 16:34:38 +0000494 {0x02,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x28,0x29,
495 0x2a,0x2b,0x2c,0x2e,0x2f,EOT},
496 {0x00,0x52,NANA,0xff,0x00,MISC,0x00,0x00,0x00,0x00,
497 0x7c,0xc0,0x00,0x00,0x00,EOT}},
Rasmus Wiman409b4f22007-10-05 21:58:03 +0000498 {0x0, "Floppy",
499 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
500 0xf5,EOT},
501 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
502 0x00,EOT}},
503 {0x1, "Parallel port",
504 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
505 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}},
506 {0x2, "COM1",
507 {0x30,0x60,0x61,0x70,0xf0,EOT},
508 {0x01,0x03,0xf8,0x04,0x00,EOT}},
509 {0x3, "COM2",
510 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
511 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT}},
512 {0x5, "Keyboard",
513 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT},
514 {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x80,EOT}},
515 {0x6, "Consumer IR",
516 {0x30,0x60,0x61,0x70,EOT},
517 {0x00,0x00,0x00,0x00,EOT}},
518 {0x7, "Game port, MIDI port, GPIO 1",
519 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,EOT},
520 {0x00,0x02,0x01,0x03,0x30,0x09,0xff,0x00,0x00,EOT}},
Michael Gold556e6fb2009-06-26 15:25:04 +0000521 {0x8, "GPIO 2, watchdog timer",
Rasmus Wiman409b4f22007-10-05 21:58:03 +0000522 {0x30,0xf0,0xf1,0xf2,0xf3,0xf5,0xf6,0xf6,0xf7,EOT},
523 {0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
524 {0x9, "GPIO 3",
525 {0x30,0xf0,0xf1,0xf2,0xf3,EOT},
526 {0x00,0xff,0x00,0x00,0x00,EOT}},
527 {0xa, "ACPI",
528 {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
529 0xf0,0xf1,0xf3,0xf4,0xf6,0xf7,0xf9,0xfe,0xff,EOT},
530 {0x00,0x00,0x00,0x00,NANA,NANA,0x00,0x00,0x00,0x00,
531 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}},
532 {0xb, "Hardware monitor",
533 {0x30,0x60,0x61,0x70,0xf0,EOT},
534 {0x00,0x00,0x00,0x00,0x00,EOT}},
Uwe Hermannc3da3662007-09-26 16:14:16 +0000535 {EOT}}},
Idwer Vollering7a90c142007-10-17 23:37:36 +0000536 {0x68, "W83697SF/UF/UG", {
537 /* ID: 0x68 (for W83697SF/UF/UG)
538 * Rev: 0x1X (for W83697SF)
539 * 0x0X (for W83697SF) -- sic!
540 * 0x1X (for W83697UF/UG)
541 */
542 {NOLDN, NULL,
543 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x28,0x29,0x2a,
544 0x2b,0x2c,EOT},
545 {0x68,NANA,0xef,0xfe,MISC,0x00,0x00,0x00,0x00,MISC,
546 0x00,0x30,EOT}},
547 {0x0, "Floppy",
548 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5,
549 EOT},
550 {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00,
551 EOT}},
552 {0x1, "Parallel port",
553 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
554 {0x01,0x03,0x78,0x07,0x03,0x3f,EOT}},
555 {0x2, "COM1",
556 {0x30,0x60,0x61,0x70,0xf0,EOT},
557 {0x01,0x03,0xf8,0x04,0x00,EOT}},
558 {0x3, "COM2",
559 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
560 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT}},
561 {0x7, "Game port, GPIO 1",
562 {0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT},
563 {0x00,0x02,0x01,0x00,0x00,0xff,0x00,0x00,EOT}},
564 {0x8, "MIDI port, GPIO 5",
565 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3,
566 0xf4,0xf5,EOT},
567 {0x00,0x03,0x30,0x00,0x00,0x09,0xff,0x00,0x00,0x00,
568 0x00,0x00,EOT}},
569 {0x9, "GPIO 2, GPIO 3, GPIO 4",
570 {0x30,0x60,0x61,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,
571 0xf7,0xf8,EOT},
572 {0x00,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,
573 0x00,0x00,EOT}},
574 {0xa, "ACPI",
575 {0x30,0x70,0xf0,0xf1,0xf2,0xf3,0xf4,0xf6,0xf7,0xf9,
576 0xfa,EOT},
577 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
578 0x00,EOT}},
579 {0xb, "PWM",
580 {0x30,0x60,0x61,EOT},
581 {0x00,0x00,0x00,EOT}},
582 {0xc, "Smart card",
583 {0x30,0x60,0x61,0x70,0xf0,EOT},
584 {0x00,0x00,0x00,0x00,0x00,EOT}},
585 {0xd, "URC, GPIO 6",
586 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3,
587 0xf4,EOT},
588 {0x00,0x03,0xe8,0x00,0x00,0x00,0x00,0xff,0x00,0x00,
589 0x00,EOT}},
590 {0xe, "URD, GPIO 7",
591 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3,
592 EOT},
593 {0x00,0x02,0xe8,0x00,0x00,0x00,0x00,0xff,0x00,0x00,
594 EOT}},
595 {0xf, "GPIO 8",
596 {0x30,0x60,0x61,0xf0,0xf1,0xf2,EOT},
597 {0x00,0x00,0x00,0xff,0x00,0x00,EOT}},
Uwe Hermanndc34cab2007-10-16 18:15:25 +0000598 {EOT}}},
Uwe Hermannfb348032008-01-19 09:40:17 +0000599 {0x88, "W83627EHF/EF/EHG/EG", {
600 /*
601 * As per datasheet the ID should be 0x886? here.
602 * Not mentioned in the datasheet, but sensors-detect says
603 * 0x8853 is also possible. Also, the ASUS A8V-E Deluxe
604 * (W83627EHF) has an ID of 0x8854 (verified on hardware).
605 * So we now assume all 0x88?? IDs to mean W83627EHF/EF/EHG/EG.
606 */
607 {NOLDN, NULL,
608 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
609 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
610 {0x88,MISC,0xff,0x00,MISC,0x00,MISC,RSVD,0x50,
611 0x04,0x00,RSVD,0x00,0x21,0x00,0x00,EOT}},
612 {0x0, "Floppy",
613 {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
614 0xf5,EOT},
615 {0x01,0x03,0xf0,0x06,0x02,0x8e,0x00,0xff,0x00,
616 0x00,EOT}},
617 {0x1, "Parallel port",
618 {0x30,0x60,0x61,0x70,0x74,0xf0,EOT},
619 {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}},
620 {0x2, "COM1",
621 {0x30,0x60,0x61,0x70,0xf0,EOT},
622 {0x01,0x03,0xf8,0x04,0x00,EOT}},
623 {0x3, "COM2",
624 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
625 {0x01,0x02,0xf8,0x03,0x00,0x00,EOT}},
626 {0x5, "Keyboard",
627 {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT},
628 {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x83,EOT}},
629 {0x6, "Serial flash interface",
630 {0x30,0x62,0x63,EOT},
631 {0x00,0x00,0x00,EOT}},
632 {0x7, "GPIO 1, GPIO 6, game port, MIDI port",
633 {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3,
634 0xf4,0xf5,0xf6,0xf7,EOT},
635 {0x00,0x02,0x01,0x03,0x30,0x09,0xff,0x00,0x00,0x00,
636 0xff,0x00,0x00,0x00,EOT}},
637 {0x8, "WDTO#, PLED",
638 {0x30,0xf5,0xf6,0xf7,EOT},
639 {0x00,0x00,0x00,0x00,EOT}},
640 {0x9, "GPIO 2, GPIO 3, GPIO 4, GPIO 5, SUSLED",
641 {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xf0,0xf1,0xf2,
642 0xf3,0xf4,0xf5,0xf6,0xf7,EOT},
643 {0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,
644 0x00,0xff,0x00,0x00,0x00,EOT}},
645 {0xa, "ACPI",
646 {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
647 0xe8,0xf2,0xf3,0xf4,0xf6,0xf7,EOT},
648 {0x00,0x00,0x01,0x00,0xff,0x08,0x00,RSVD,0x00,0x00,
649 RSVD,0x7c,0x00,0x00,0x00,0x00,EOT}},
650 {0xb, "Hardware monitor",
651 {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT},
652 {0x00,0x00,0x00,0x00,0xc1,0x00,EOT}},
653 {EOT}}},
Uwe Hermann5debf362007-10-04 18:34:36 +0000654
655 /* ID[3..0] */
Uwe Hermannc3da3662007-09-26 16:14:16 +0000656 {0xa, "W83877F", {
657 {EOT}}},
Uwe Hermann588d1662010-01-31 18:48:34 +0000658 {0xb, "W83877AF", {
Uwe Hermann52da5602010-02-04 00:55:06 +0000659 {NOLDN, NULL,
660 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,
661 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,
662 0x14,0x15,0x16,0x17,0x1e,0x20,0x21,0x22,0x23,0x24,
663 0x25,0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,EOT},
664 {0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x0a,
665 0x1f,0x0c,0x28,0xa3,RSVD,RSVD,0x00,0x00,0x00,0x00,
666 0x00,0x00,0x0e,0x00,MISC,MISC,MISC,MISC,MISC,MISC,
667 MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,EOT}},
Uwe Hermann588d1662010-01-31 18:48:34 +0000668 {EOT}}},
Uwe Hermannc3da3662007-09-26 16:14:16 +0000669 {0xc, "W83877TF", {
670 {EOT}}},
Uwe Hermann588d1662010-01-31 18:48:34 +0000671 {0xd, "W83877ATF/ATG", {
Uwe Hermann48cac242007-09-24 23:24:46 +0000672 {EOT}}},
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +0000673 {EOT}
674};
675
Stefan Reinauer7a51e502008-12-01 14:18:57 +0000676static const struct superio_registers hwm_table[] = {
677 {0x828, "W83627THF/THG", {
678 {NOLDN, NULL,
679 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,
680 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,
681 0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,
682 0x1e,0x1f,
683 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,
684 0x2b,0x2c,0x2d,0x2e,0x2f,0x30,0x31,0x32,0x33,0x34,
685 0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,
686 0x3f,
687 0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,
688 0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,EOT},
689 {RSVD,0xff,RSVD,0xff,0x00,0x00,0x00,0x00,0x01,0x01,
690 0x01,0x01,0x3c,0x3c,0x0a,0x0a,RSVD,0xff,0x00,0x00,
691 0x00,0x01,0x01,0x3c,0x43,RSVD,0xff,0xff,RSVD,RSVD,
692 NANA,NANA,
693 NANA,NANA,NANA,NANA,NANA,RSVD,RSVD,NANA,NANA,NANA,
694 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
695 RSVD,RSVD,RSVD,RSVD,NANA,NANA,NANA,NANA,NANA,RSVD,
696 RSVD,
697 0x03,0x00,0x00,0xfe,0xff,RSVD,RSVD,0x5f,NANA,0x03,
698 RSVD,0x44,0x18,0x15,0x80,0x5c,EOT}},
699 {0x0, "Bank 0",
700 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
701 0x5d,0x5e,0x5f,EOT},
702 {NANA,NANA,NANA,NANA,NANA,NANA,0x00,0x80,0x90,0x70,
703 0x00,RSVD,RSVD,EOT}},
704 {0x1, "Bank 1",
705 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,EOT},
706 {NANA,NANA,0x00,0x4b,0x00,0x50,0x00,EOT}},
707 {0x2, "Bank 2",
708 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,EOT},
709 {NANA,NANA,0x00,0x4b,0x00,0x50,0x00,EOT}},
710 {0x4, "Bank 4",
711 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x59,0x5a,
712 0x5b,EOT},
713 {0x00,0xff,RSVD,0x00,0x00,0x00,0x00,0x00,0x00,
714 0x00,EOT}},
715 {0x5, "Bank 5",
716 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,EOT},
717 {NANA,NANA,RSVD,RSVD,NANA,NANA,NANA,NANA,EOT}},
718 {0x6, "Bank 6",
719 {0x50,EOT},
720 {RSVD,EOT}},
721 {EOT}}},
Nico Hubere25984b2013-04-25 15:00:15 +0200722 {0xb07, "W83627DHG-P/-PT", {
723 {NOLDN, NULL,
724 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,
725 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,
726 0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,
727 0x1e,0x1f,EOT},
728 {0x04,0xff,0x04,NANA,0x01,0x00,0x00,0x00,0x01,0x01,
729 0x01,0x01,0x3c,0x3c,0x0a,0x0a,0x04,0xff,0x00,0x00,
730 0x00,0x01,0x01,0x3c,0x43,RSVD,RSVD,RSVD,RSVD,RSVD,
731 RSVD,RSVD,EOT}},
732 {NOLDN, NULL,
733 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,
734 0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,0x30,0x31,0x32,0x33,
735 0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,
736 0x3e,0x3f,EOT},
737 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
738 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
739 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
740 NANA,NANA,EOT}},
741 {NOLDN, NULL,
742 {0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,
743 0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,EOT},
744 {0x03,0x00,0x00,0xff,0xff,0x00,0x3f,0x55,0x2d,0x00,
745 0x00,0x44,0x10,0x95,0x80,0xa3,EOT}},
746 {0x0, "Bank 0",
747 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
748 0x5a,0x5b,0x5c,0x5d,0x5e,0x5f,0x60,0x61,0x62,0x63,
749 0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,
750 0x6e,0x6f,EOT},
751 {RSVD,RSVD,RSVD,RSVD,RSVD,RSVD,0x00,0x80,0xc1,0x70,
752 RSVD,RSVD,RSVD,0x04,0x04,RSVD,0x04,NANA,0x40,0x00,
753 0x01,0x01,0x3c,0xff,0x01,0xff,0x01,0xff,0xff,0xff,
754 0xff,0x00,EOT}},
755 {0x0, "Bank 0 [...]",
756 {0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,
757 0x7a,0x7b,0x7c,0x7d,EOT},
758 {0x00,0x00,0x00,0x00,0x00,0x0e,0x00,0x00,0x00,0x00,
759 0x00,0x00,0x00,NANA,EOT}},
760 {0x1, "Bank 1",
761 {0x50,0x51,0x52,0x53,0x54,0x55,0x56, 0x58,0x59,
762 0x5a,0x5b,0x5c,0x5d,0x5e, EOT},
763 {NANA,NANA,0x00,0x4b,0x00,0x50,0x00, 0x00,0x00,
764 0x00,0x00,0x00,0x00,0x0e, EOT}},
765 {0x2, "Bank 2",
766 {0x50,0x51,0x52,0x53,0x54,0x55,0x56, EOT},
767 {NANA,NANA,0x00,0x4b,0x00,0x50,0x00, EOT}},
768 {0x4, "Bank 4",
769 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
770 0x5a,0x5b,0x5c,0x5d,0x5e,0x5f,EOT},
771 {0x00,0x13,RSVD,0x00,0x00,0x00,0x00,RSVD,RSVD,0x00,
772 0x00,0x00,RSVD,RSVD,RSVD,RSVD,EOT}},
773 {0x5, "Bank 5",
774 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
775 0x5a,0x5b,0x5c,EOT},
776 {NANA,NANA,RSVD,NANA,NANA,NANA,NANA,NANA,RSVD,RSVD,
777 RSVD,RSVD,NANA,EOT}},
778 {0x6, "Bank 6",
779 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
780 0x5a,0x5b,0x5c,0x5d,0x5e,0x5f,EOT},
781 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
782 0x0d,0xff,0xff,0xff,0xff,0xff,EOT}},
783 {EOT}}},
Stefan Reinauer7a51e502008-12-01 14:18:57 +0000784 {EOT}
785};
786
Uwe Hermannc3da3662007-09-26 16:14:16 +0000787static void enter_conf_mode_winbond_88(uint16_t port)
788{
Andriy Gaponb64aa602008-10-28 22:13:38 +0000789 OUTB(0x88, port);
Uwe Hermannc3da3662007-09-26 16:14:16 +0000790}
791
792static void enter_conf_mode_winbond_89(uint16_t port)
793{
Andriy Gaponb64aa602008-10-28 22:13:38 +0000794 OUTB(0x89, port);
Uwe Hermannc3da3662007-09-26 16:14:16 +0000795}
796
797static void enter_conf_mode_winbond_86(uint16_t port)
798{
Andriy Gaponb64aa602008-10-28 22:13:38 +0000799 OUTB(0x86, port);
800 OUTB(0x86, port);
Uwe Hermannc3da3662007-09-26 16:14:16 +0000801}
802
Stefan Reinauerd7ce71d2010-12-30 16:57:58 +0000803static int chip_found_at_port;
804
Uwe Hermann59b99d92007-11-29 02:43:50 +0000805static void probe_idregs_winbond_helper(const char *init, uint16_t port)
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +0000806{
Stefan Reinauer7a51e502008-12-01 14:18:57 +0000807 uint16_t id, hwmport;
Uwe Hermannc3da3662007-09-26 16:14:16 +0000808 uint8_t devid, rev, olddevid;
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +0000809
Uwe Hermann8b8d0392007-10-04 15:23:38 +0000810 probing_for("Winbond", init, port);
811
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +0000812 devid = regval(port, DEVICE_ID_REG);
813 rev = regval(port, DEVICE_REV_REG);
Uwe Hermann8b8d0392007-10-04 15:23:38 +0000814 olddevid = regval(port, DEVICE_ID_REG_OLD) & 0x0f;
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +0000815
Andriy Gaponc880a362008-10-19 21:03:41 +0000816 if (devid == 0x52 && (rev & 0xf0) != 0xf0)
817 id = devid; /* ID only */
818 else if (devid == 0x68 || devid == 0x88)
Uwe Hermannc3da3662007-09-26 16:14:16 +0000819 id = devid; /* ID only */
Uwe Hermann72c05842007-10-15 15:46:59 +0000820 else if ((devid == 0x97) && ((rev & 0xf0) == 0x70))
Uwe Hermannc3da3662007-09-26 16:14:16 +0000821 id = (devid << 8) | rev; /* ID and rev */
Uwe Hermann48cac242007-09-24 23:24:46 +0000822 else
Andriy Gaponc880a362008-10-19 21:03:41 +0000823 id = (devid << 4) | ((rev & 0xf0) >> 4); /* ID and rev[7..4] */
Uwe Hermannc3da3662007-09-26 16:14:16 +0000824
Uwe Hermann588d1662010-01-31 18:48:34 +0000825 if (olddevid >= 0x0a && olddevid <= 0x0d)
Uwe Hermannc3da3662007-09-26 16:14:16 +0000826 id = olddevid & 0x0f; /* ID[3..0] */
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +0000827
828 if (superio_unknown(reg_table, id)) {
Uwe Hermann8b8d0392007-10-04 15:23:38 +0000829 if (verbose)
830 printf(NOTFOUND "id/oldid=0x%02x/0x%02x, rev=0x%02x\n",
831 devid, olddevid, rev);
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +0000832 return;
833 }
834
Uwe Hermann588d1662010-01-31 18:48:34 +0000835 if (olddevid >= 0x0a && olddevid <= 0x0d)
Uwe Hermannc3da3662007-09-26 16:14:16 +0000836 printf("Found Winbond %s (id=0x%02x) at 0x%x\n",
837 get_superio_name(reg_table, id), olddevid, port);
838 else
839 printf("Found Winbond %s (id=0x%02x, rev=0x%02x) at 0x%x\n",
840 get_superio_name(reg_table, id), devid, rev, port);
Uwe Hermanne9d46162007-10-07 20:01:23 +0000841 chip_found = 1;
Stefan Reinauerd7ce71d2010-12-30 16:57:58 +0000842 chip_found_at_port = 1;
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +0000843
Stefan Reinauer7a51e502008-12-01 14:18:57 +0000844 dump_superio("Winbond", reg_table, port, id, LDN_SEL);
845
846 if (extra_dump) {
847 regwrite(port, LDN_SEL, 0x0b); /* Select LDN 0xb (HWM). */
848
849 if ((regval(port, 0x30) & (1 << 0)) != (1 << 0)) {
850 printf("Hardware Monitor disabled or does not exist.\n");
851 return;
852 }
853
854 /* Get HWM base address (stored in LDN 0xb, index 0x60/0x61). */
855 hwmport = regval(port, 0x60) << 8;
856 hwmport |= regval(port, 0x61);
857
858 /* HWM address register = HWM base address + 5. */
859 hwmport += 5;
860
861 printf("Hardware monitor (0x%04x)\n", hwmport);
862 dump_superio("Winbond-HWM", hwm_table, hwmport, id,
863 WINBOND_HWM_SEL);
864 }
Uwe Hermannc3da3662007-09-26 16:14:16 +0000865}
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +0000866
Uwe Hermannc3da3662007-09-26 16:14:16 +0000867void probe_idregs_winbond(uint16_t port)
868{
Stefan Reinauerd7ce71d2010-12-30 16:57:58 +0000869 chip_found_at_port = 0;
870
Uwe Hermannc3da3662007-09-26 16:14:16 +0000871 enter_conf_mode_winbond_88(port);
Uwe Hermannafe83092007-09-28 15:45:43 +0000872 probe_idregs_winbond_helper("(init=0x88) ", port);
Uwe Hermannc3da3662007-09-26 16:14:16 +0000873 exit_conf_mode_winbond_fintek_ite_8787(port);
Uwe Hermannc55bcde2011-06-09 20:56:29 +0200874 if (chip_found_at_port)
875 return;
Uwe Hermannc3da3662007-09-26 16:14:16 +0000876
877 enter_conf_mode_winbond_89(port);
Uwe Hermannafe83092007-09-28 15:45:43 +0000878 probe_idregs_winbond_helper("(init=0x89) ", port);
Uwe Hermannc3da3662007-09-26 16:14:16 +0000879 exit_conf_mode_winbond_fintek_ite_8787(port);
Uwe Hermannc55bcde2011-06-09 20:56:29 +0200880 if (chip_found_at_port)
881 return;
Uwe Hermannc3da3662007-09-26 16:14:16 +0000882
883 enter_conf_mode_winbond_86(port);
Uwe Hermannafe83092007-09-28 15:45:43 +0000884 probe_idregs_winbond_helper("(init=0x86,0x86) ", port);
885 exit_conf_mode_winbond_fintek_ite_8787(port);
Uwe Hermannc55bcde2011-06-09 20:56:29 +0200886 if (chip_found_at_port)
887 return;
Uwe Hermannafe83092007-09-28 15:45:43 +0000888
889 enter_conf_mode_winbond_fintek_ite_8787(port);
890 probe_idregs_winbond_helper("(init=0x87,0x87) ", port);
Uwe Hermannb4db2202007-09-20 23:37:56 +0000891 exit_conf_mode_winbond_fintek_ite_8787(port);
Uwe Hermannc55bcde2011-06-09 20:56:29 +0200892 if (chip_found_at_port)
893 return;
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +0000894}
Robinson P. Tryon552cfb72008-01-15 22:30:55 +0000895
896void print_winbond_chips(void)
897{
898 print_vendor_chips("Winbond", reg_table);
Stefan Reinauer7a51e502008-12-01 14:18:57 +0000899 print_vendor_chips("Winbond-HWM", hwm_table);
Robinson P. Tryon552cfb72008-01-15 22:30:55 +0000900}