2 * This file is part of the coreboot project.
4 * Copyright (C) 2008 Uwe Hermann <uwe@hermann-uwe.de>
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.
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.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 #ifndef SUPERIO_WINBOND_W83627DHG_W83627DHG_H
22 #define SUPERIO_WINBOND_W83627DHG_W83627DHG_H
24 #define W83627DHG_FDC 0 /* Floppy */
25 #define W83627DHG_PP 1 /* Parallel port */
26 #define W83627DHG_SP1 2 /* Com1 */
27 #define W83627DHG_SP2 3 /* Com2 */
28 #define W83627DHG_KBC 5 /* PS/2 keyboard & mouse */
29 #define W83627DHG_SPI 6 /* Serial peripheral interface */
30 #define W83627DHG_WDTO_PLED 8 /* WDTO#, PLED */
31 #define W83627DHG_ACPI 10 /* ACPI */
32 #define W83627DHG_HWM 11 /* Hardware monitor */
33 #define W83627DHG_PECI_SST 12 /* PECI, SST */
35 /* The following are handled using "virtual LDNs" (hence the _V suffix). */
36 #define W83627DHG_GPIO6_V 7 /* GPIO6 */
37 #define W83627DHG_GPIO2345_V 9 /* GPIO2, GPIO3, GPIO4, GPIO5 */
40 * Virtual devices sharing the enables are encoded as follows:
41 * VLDN = baseLDN[7:0] | [10:8] bitpos of enable in 0x30 of baseLDN
44 /* GPIO6 has bit 3 as enable (instead of bit 0 as usual). */
45 #define W83627DHG_GPIO6 ((3 << 8) | W83627DHG_GPIO6_V)
47 #define W83627DHG_GPIO2 ((0 << 8) | W83627DHG_GPIO2345_V)
48 #define W83627DHG_GPIO3 ((1 << 8) | W83627DHG_GPIO2345_V)
49 #define W83627DHG_GPIO4 ((2 << 8) | W83627DHG_GPIO2345_V)
50 #define W83627DHG_GPIO5 ((3 << 8) | W83627DHG_GPIO2345_V)
52 /* Note: There is no GPIO1 on the W83627DHG as per datasheet. */