blob: fce860d2e21b015ec3fba037cb0d25b366530a4b [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}}},
Elyes HAOUASb9585c52018-05-29 22:23:48 +0200232 {0xa23, "W83627UHG = NCT6627UD", { /* TODO: Not yet in sensors-detect */
233 {NOLDN, NULL, /* CR2B (485) is only valid for chip rev.E */
Frank Rysanekc0c620e2013-04-05 10:44:10 +0200234 {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}}},
Arthur Heymans4cd95ec2016-12-25 15:26:44 +0100722 {0xa02, "W83627DHG", {
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, /* Value RAM */
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,MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,
739 MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,
740 MISC,MISC,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,RSVD,0x07,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,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,EOT}},
755 {0x1, "Bank 1",
756 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,EOT},
757 {NANA,NANA,0x00,0x4b,0x00,0x50,0x00,EOT}},
758 {0x2, "Bank 2",
759 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,EOT},
760 {NANA,NANA,0x00,0x4b,0x00,0x50,0x00,EOT}},
761 {0x4, "Bank 4",
762 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
763 0x5a,0x5b,0x5c,0x5d,0x5e,0x5f,EOT},
764 {0x00,0x13,RSVD,0x00,0x00,0x00,0x00,RSVD,RSVD,0x00,
765 0x00,0x00,RSVD,RSVD,RSVD,RSVD,EOT}},
766 {0x5, "Bank 5", /* Value RAM 2 */
767 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
768 0x5a,0x5b,0x5c,EOT},
769 {NANA,NANA,RSVD,NANA,MISC,MISC,MISC,MISC,RSVD,RSVD,
770 RSVD,RSVD,MISC,EOT}},
771 {0x6, "Bank 6",
772 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,EOT},
773 {RSVD,RSVD,RSVD,RSVD,RSVD,RSVD,RSVD,RSVD,EOT}},
774 {EOT}}},
Arthur Heymans072a69e2016-11-17 08:56:09 +0100775 {0x88, "W83627EHF/EF/EHG/EG", {
776 {NOLDN, NULL,
777 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,
778 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,
779 0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,
780 0x1e,0x1f,EOT},
781 {0x04,0xff,0x04,0xff,0x01,0x00,0x00,0x00,0x01,0x01,
782 0x01,0x01,0x3c,0x3c,0x0a,0x0a,0x04,0xff,0x00,0x00,
783 0x00,0x01,0x01,0x3c,0x43,RSVD,RSVD,RSVD,RSVD,RSVD,
784 RSVD,RSVD,EOT}},
785 {NOLDN, NULL, /* Value RAM */
786 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,
787 0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,0x30,0x31,0x32,0x33,
788 0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,
789 0x3e,0x3f,EOT},
790 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
791 NANA,MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,
792 MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,
793 MISC,NANA,EOT}},
794 {NOLDN, NULL,
795 {0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,
796 0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,EOT},
797 {0x03,0x00,0x00,0xde,0xff,RSVD,0x07,0x55,0x2d,RSVD,
798 0x64,0x44,0x10,0x15,0x80,0x5c,EOT}},
799 {0x0, "Bank 0",
800 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
801 0x5a,0x5b,0x5c,0x5d,0x5e,0x5f,0x60,0x61,0x62,0x63,
802 0x64,0x65,0x66,0x67,0x68,0x69,0x6a,EOT},
803 {RSVD,RSVD,RSVD,RSVD,RSVD,RSVD,0x00,0x80,0xa1,0x70,
804 RSVD,RSVD,RSVD,0x00,RSVD,RSVD,0x04,0xff,0x40,0x00,
805 0x01,0x01,0x3c,0xff,0x01,0xff,0x01,EOT}},
806 {0x1, "Bank 1",
807 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,EOT},
808 {NANA,NANA,0x00,0x4b,0x00,0x50,0x00,EOT}},
809 {0x2, "Bank 2",
810 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,EOT},
811 {NANA,NANA,0x00,0x4b,0x00,0x50,0x00,EOT}},
812 {0x4, "Bank 4",
813 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
814 0x5a,0x5b,0x5c,0x5d,EOT},
815 {0x00,0x00,RSVD,0x00,0x00,0x00,0x00,RSVD,RSVD,0x00,
816 0x00,0x00,RSVD,RSVD,EOT}},
817 {0x5, "Bank 5", /* Value RAM 2 */
818 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
819 0x5a,0x5b,0x5c,EOT},
820 {NANA,NANA,RSVD,RSVD,MISC,MISC,MISC,MISC,MISC,MISC,
821 RSVD,RSVD,MISC,EOT}},
822 {0x6, "Bank 6",
823 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,EOT},
824 {RSVD,RSVD,RSVD,RSVD,RSVD,RSVD,RSVD,RSVD,EOT}},
825 {EOT}}},
Nico Hubere25984b2013-04-25 15:00:15 +0200826 {0xb07, "W83627DHG-P/-PT", {
827 {NOLDN, NULL,
828 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,
829 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,
830 0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,
831 0x1e,0x1f,EOT},
832 {0x04,0xff,0x04,NANA,0x01,0x00,0x00,0x00,0x01,0x01,
833 0x01,0x01,0x3c,0x3c,0x0a,0x0a,0x04,0xff,0x00,0x00,
834 0x00,0x01,0x01,0x3c,0x43,RSVD,RSVD,RSVD,RSVD,RSVD,
835 RSVD,RSVD,EOT}},
836 {NOLDN, NULL,
837 {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,
838 0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,0x30,0x31,0x32,0x33,
839 0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,
840 0x3e,0x3f,EOT},
841 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
842 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
843 NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,
844 NANA,NANA,EOT}},
845 {NOLDN, NULL,
846 {0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,
847 0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,EOT},
848 {0x03,0x00,0x00,0xff,0xff,0x00,0x3f,0x55,0x2d,0x00,
849 0x00,0x44,0x10,0x95,0x80,0xa3,EOT}},
850 {0x0, "Bank 0",
851 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
852 0x5a,0x5b,0x5c,0x5d,0x5e,0x5f,0x60,0x61,0x62,0x63,
853 0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,
854 0x6e,0x6f,EOT},
855 {RSVD,RSVD,RSVD,RSVD,RSVD,RSVD,0x00,0x80,0xc1,0x70,
856 RSVD,RSVD,RSVD,0x04,0x04,RSVD,0x04,NANA,0x40,0x00,
857 0x01,0x01,0x3c,0xff,0x01,0xff,0x01,0xff,0xff,0xff,
858 0xff,0x00,EOT}},
859 {0x0, "Bank 0 [...]",
860 {0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,
861 0x7a,0x7b,0x7c,0x7d,EOT},
862 {0x00,0x00,0x00,0x00,0x00,0x0e,0x00,0x00,0x00,0x00,
863 0x00,0x00,0x00,NANA,EOT}},
864 {0x1, "Bank 1",
865 {0x50,0x51,0x52,0x53,0x54,0x55,0x56, 0x58,0x59,
866 0x5a,0x5b,0x5c,0x5d,0x5e, EOT},
867 {NANA,NANA,0x00,0x4b,0x00,0x50,0x00, 0x00,0x00,
868 0x00,0x00,0x00,0x00,0x0e, EOT}},
869 {0x2, "Bank 2",
870 {0x50,0x51,0x52,0x53,0x54,0x55,0x56, EOT},
871 {NANA,NANA,0x00,0x4b,0x00,0x50,0x00, EOT}},
872 {0x4, "Bank 4",
873 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
874 0x5a,0x5b,0x5c,0x5d,0x5e,0x5f,EOT},
875 {0x00,0x13,RSVD,0x00,0x00,0x00,0x00,RSVD,RSVD,0x00,
876 0x00,0x00,RSVD,RSVD,RSVD,RSVD,EOT}},
877 {0x5, "Bank 5",
878 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
879 0x5a,0x5b,0x5c,EOT},
880 {NANA,NANA,RSVD,NANA,NANA,NANA,NANA,NANA,RSVD,RSVD,
881 RSVD,RSVD,NANA,EOT}},
882 {0x6, "Bank 6",
883 {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,
884 0x5a,0x5b,0x5c,0x5d,0x5e,0x5f,EOT},
885 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
886 0x0d,0xff,0xff,0xff,0xff,0xff,EOT}},
887 {EOT}}},
Stefan Reinauer7a51e502008-12-01 14:18:57 +0000888 {EOT}
889};
890
Uwe Hermannc3da3662007-09-26 16:14:16 +0000891static void enter_conf_mode_winbond_88(uint16_t port)
892{
Andriy Gaponb64aa602008-10-28 22:13:38 +0000893 OUTB(0x88, port);
Uwe Hermannc3da3662007-09-26 16:14:16 +0000894}
895
896static void enter_conf_mode_winbond_89(uint16_t port)
897{
Andriy Gaponb64aa602008-10-28 22:13:38 +0000898 OUTB(0x89, port);
Uwe Hermannc3da3662007-09-26 16:14:16 +0000899}
900
901static void enter_conf_mode_winbond_86(uint16_t port)
902{
Andriy Gaponb64aa602008-10-28 22:13:38 +0000903 OUTB(0x86, port);
904 OUTB(0x86, port);
Uwe Hermannc3da3662007-09-26 16:14:16 +0000905}
906
Stefan Reinauerd7ce71d2010-12-30 16:57:58 +0000907static int chip_found_at_port;
908
Uwe Hermann59b99d92007-11-29 02:43:50 +0000909static void probe_idregs_winbond_helper(const char *init, uint16_t port)
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +0000910{
Stefan Reinauer7a51e502008-12-01 14:18:57 +0000911 uint16_t id, hwmport;
Uwe Hermannc3da3662007-09-26 16:14:16 +0000912 uint8_t devid, rev, olddevid;
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +0000913
Uwe Hermann8b8d0392007-10-04 15:23:38 +0000914 probing_for("Winbond", init, port);
915
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +0000916 devid = regval(port, DEVICE_ID_REG);
917 rev = regval(port, DEVICE_REV_REG);
Uwe Hermann8b8d0392007-10-04 15:23:38 +0000918 olddevid = regval(port, DEVICE_ID_REG_OLD) & 0x0f;
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +0000919
Andriy Gaponc880a362008-10-19 21:03:41 +0000920 if (devid == 0x52 && (rev & 0xf0) != 0xf0)
921 id = devid; /* ID only */
922 else if (devid == 0x68 || devid == 0x88)
Uwe Hermannc3da3662007-09-26 16:14:16 +0000923 id = devid; /* ID only */
Uwe Hermann72c05842007-10-15 15:46:59 +0000924 else if ((devid == 0x97) && ((rev & 0xf0) == 0x70))
Uwe Hermannc3da3662007-09-26 16:14:16 +0000925 id = (devid << 8) | rev; /* ID and rev */
Uwe Hermann48cac242007-09-24 23:24:46 +0000926 else
Andriy Gaponc880a362008-10-19 21:03:41 +0000927 id = (devid << 4) | ((rev & 0xf0) >> 4); /* ID and rev[7..4] */
Uwe Hermannc3da3662007-09-26 16:14:16 +0000928
Uwe Hermann588d1662010-01-31 18:48:34 +0000929 if (olddevid >= 0x0a && olddevid <= 0x0d)
Uwe Hermannc3da3662007-09-26 16:14:16 +0000930 id = olddevid & 0x0f; /* ID[3..0] */
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +0000931
932 if (superio_unknown(reg_table, id)) {
Uwe Hermann8b8d0392007-10-04 15:23:38 +0000933 if (verbose)
934 printf(NOTFOUND "id/oldid=0x%02x/0x%02x, rev=0x%02x\n",
935 devid, olddevid, rev);
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +0000936 return;
937 }
938
Uwe Hermann588d1662010-01-31 18:48:34 +0000939 if (olddevid >= 0x0a && olddevid <= 0x0d)
Uwe Hermannc3da3662007-09-26 16:14:16 +0000940 printf("Found Winbond %s (id=0x%02x) at 0x%x\n",
941 get_superio_name(reg_table, id), olddevid, port);
942 else
943 printf("Found Winbond %s (id=0x%02x, rev=0x%02x) at 0x%x\n",
944 get_superio_name(reg_table, id), devid, rev, port);
Uwe Hermanne9d46162007-10-07 20:01:23 +0000945 chip_found = 1;
Stefan Reinauerd7ce71d2010-12-30 16:57:58 +0000946 chip_found_at_port = 1;
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +0000947
Stefan Reinauer7a51e502008-12-01 14:18:57 +0000948 dump_superio("Winbond", reg_table, port, id, LDN_SEL);
949
950 if (extra_dump) {
951 regwrite(port, LDN_SEL, 0x0b); /* Select LDN 0xb (HWM). */
952
953 if ((regval(port, 0x30) & (1 << 0)) != (1 << 0)) {
954 printf("Hardware Monitor disabled or does not exist.\n");
955 return;
956 }
957
958 /* Get HWM base address (stored in LDN 0xb, index 0x60/0x61). */
959 hwmport = regval(port, 0x60) << 8;
960 hwmport |= regval(port, 0x61);
961
962 /* HWM address register = HWM base address + 5. */
963 hwmport += 5;
964
965 printf("Hardware monitor (0x%04x)\n", hwmport);
966 dump_superio("Winbond-HWM", hwm_table, hwmport, id,
967 WINBOND_HWM_SEL);
968 }
Uwe Hermannc3da3662007-09-26 16:14:16 +0000969}
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +0000970
Uwe Hermannc3da3662007-09-26 16:14:16 +0000971void probe_idregs_winbond(uint16_t port)
972{
Stefan Reinauerd7ce71d2010-12-30 16:57:58 +0000973 chip_found_at_port = 0;
974
Uwe Hermannc3da3662007-09-26 16:14:16 +0000975 enter_conf_mode_winbond_88(port);
Uwe Hermannafe83092007-09-28 15:45:43 +0000976 probe_idregs_winbond_helper("(init=0x88) ", port);
Uwe Hermannc3da3662007-09-26 16:14:16 +0000977 exit_conf_mode_winbond_fintek_ite_8787(port);
Uwe Hermannc55bcde2011-06-09 20:56:29 +0200978 if (chip_found_at_port)
979 return;
Uwe Hermannc3da3662007-09-26 16:14:16 +0000980
981 enter_conf_mode_winbond_89(port);
Uwe Hermannafe83092007-09-28 15:45:43 +0000982 probe_idregs_winbond_helper("(init=0x89) ", port);
Uwe Hermannc3da3662007-09-26 16:14:16 +0000983 exit_conf_mode_winbond_fintek_ite_8787(port);
Uwe Hermannc55bcde2011-06-09 20:56:29 +0200984 if (chip_found_at_port)
985 return;
Uwe Hermannc3da3662007-09-26 16:14:16 +0000986
987 enter_conf_mode_winbond_86(port);
Uwe Hermannafe83092007-09-28 15:45:43 +0000988 probe_idregs_winbond_helper("(init=0x86,0x86) ", port);
989 exit_conf_mode_winbond_fintek_ite_8787(port);
Uwe Hermannc55bcde2011-06-09 20:56:29 +0200990 if (chip_found_at_port)
991 return;
Uwe Hermannafe83092007-09-28 15:45:43 +0000992
993 enter_conf_mode_winbond_fintek_ite_8787(port);
994 probe_idregs_winbond_helper("(init=0x87,0x87) ", port);
Uwe Hermannb4db2202007-09-20 23:37:56 +0000995 exit_conf_mode_winbond_fintek_ite_8787(port);
Uwe Hermannc55bcde2011-06-09 20:56:29 +0200996 if (chip_found_at_port)
997 return;
Uwe Hermann7e7e9ac2007-09-19 15:52:23 +0000998}
Robinson P. Tryon552cfb72008-01-15 22:30:55 +0000999
1000void print_winbond_chips(void)
1001{
1002 print_vendor_chips("Winbond", reg_table);
Stefan Reinauer7a51e502008-12-01 14:18:57 +00001003 print_vendor_chips("Winbond-HWM", hwm_table);
Robinson P. Tryon552cfb72008-01-15 22:30:55 +00001004}