blob: e4f3784ec9b624213a860e22c133e6fb9e95bbba [file] [log] [blame]
Zheng Bao9db833b2009-12-28 09:59:44 +00001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2000 AG Electronics Ltd.
5 * Copyright (C) 2003-2004 Linux Networx
Uwe Hermann340fa932010-11-10 14:53:36 +00006 * Copyright (C) 2004 Tyan
Zheng Bao9db833b2009-12-28 09:59:44 +00007 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
Zheng Bao9db833b2009-12-28 09:59:44 +000017 */
18
Edward O'Callaghanbeb0f262014-04-29 13:09:50 +100019#ifndef SUPERIO_WINBOND_W83627HF_H
20#define SUPERIO_WINBOND_W83627HF_H
Stefan Reinauerbb33fbe2010-05-18 16:24:07 +000021
Ronald G. Minnich142babf2004-03-12 16:54:31 +000022#define W83627HF_FDC 0 /* Floppy */
Uwe Hermann340fa932010-11-10 14:53:36 +000023#define W83627HF_PP 1 /* Parallel port */
Ronald G. Minnich142babf2004-03-12 16:54:31 +000024#define W83627HF_SP1 2 /* Com1 */
25#define W83627HF_SP2 3 /* Com2 */
Uwe Hermann340fa932010-11-10 14:53:36 +000026#define W83627HF_KBC 5 /* PS/2 keyboard & mouse */
Ronald G. Minnich142babf2004-03-12 16:54:31 +000027#define W83627HF_CIR 6
28#define W83627HF_GAME_MIDI_GPIO1 7
29#define W83627HF_GPIO2 8
30#define W83627HF_GPIO3 9
31#define W83627HF_ACPI 10
Uwe Hermann340fa932010-11-10 14:53:36 +000032#define W83627HF_HWM 11 /* Hardware monitor */
Yinghai Lu13f1c2a2005-07-08 02:49:49 +000033
Zheng Bao9db833b2009-12-28 09:59:44 +000034/* #define W83627HF_GPIO_DEV PNP_DEV(0x2e, W83627HF_GPIO) */
35/* #define W83627HF_XBUS_DEV PNP_DEV(0x2e, W83627HF_XBUS) */
Yinghai Lu13f1c2a2005-07-08 02:49:49 +000036
37#define W83627HF_GPSEL 0xf0
38#define W83627HF_GPCFG1 0xf1
39#define W83627HF_GPEVR 0xf2
40#define W83627HF_GPCFG2 0xf3
41#define W83627HF_EXTCFG 0xf4
Myles Watsoncee94382008-10-02 19:21:30 +000042#define W83627HF_IOEXT1A 0xf5
43#define W83627HF_IOEXT1B 0xf6
44#define W83627HF_IOEXT2A 0xf7
45#define W83627HF_IOEXT2B 0xf8
Yinghai Lu13f1c2a2005-07-08 02:49:49 +000046
47#define W83627HF_GPDO_0 0x00
48#define W83627HF_GPDI_0 0x01
49#define W83627HF_GPDO_1 0x02
50#define W83627HF_GPDI_1 0x03
51#define W83627HF_GPEVEN_1 0x04
52#define W83627HF_GPEVST_1 0x05
53#define W83627HF_GPDO_2 0x06
54#define W83627HF_GPDI_2 0x07
55#define W83627HF_GPDO_3 0x08
56#define W83627HF_GPDI_3 0x09
57#define W83627HF_GPDO_4 0x0a
58#define W83627HF_GPDI_4 0x0b
59#define W83627HF_GPEVEN_4 0x0c
60#define W83627HF_GPEVST_4 0x0d
61#define W83627HF_GPDO_5 0x0e
62#define W83627HF_GPDI_5 0x0f
63#define W83627HF_GPDO_6 0x10
Myles Watsoncee94382008-10-02 19:21:30 +000064#define W83627HF_GPDO_7A 0x11
65#define W83627HF_GPDO_7B 0x12
66#define W83627HF_GPDO_7C 0x13
67#define W83627HF_GPDO_7D 0x14
68#define W83627HF_GPDI_7A 0x15
69#define W83627HF_GPDI_7B 0x16
70#define W83627HF_GPDI_7C 0x17
71#define W83627HF_GPDI_7D 0x18
Yinghai Lu13f1c2a2005-07-08 02:49:49 +000072
73#define W83627HF_XIOCNF 0xf0
Myles Watsoncee94382008-10-02 19:21:30 +000074#define W83627HF_XIOBA1H 0xf1
75#define W83627HF_XIOBA1L 0xf2
Yinghai Lu13f1c2a2005-07-08 02:49:49 +000076#define W83627HF_XIOSIZE1 0xf3
Myles Watsoncee94382008-10-02 19:21:30 +000077#define W83627HF_XIOBA2H 0xf4
78#define W83627HF_XIOBA2L 0xf5
Yinghai Lu13f1c2a2005-07-08 02:49:49 +000079#define W83627HF_XIOSIZE2 0xf6
80#define W83627HF_XMEMCNF1 0xf7
81#define W83627HF_XMEMCNF2 0xf8
Myles Watsoncee94382008-10-02 19:21:30 +000082#define W83627HF_XMEMBAH 0xf9
83#define W83627HF_XMEMBAL 0xfa
Yinghai Lu13f1c2a2005-07-08 02:49:49 +000084#define W83627HF_XMEMSIZE 0xfb
85#define W83627HF_XIRQMAP1 0xfc
86#define W83627HF_XIRQMAP2 0xfd
87#define W83627HF_XBIMM 0xfe
88#define W83627HF_XBBSL 0xff
89
90#define W83627HF_XBCNF 0x00
91#define W83627HF_XZCNF0 0x01
92#define W83627HF_XZCNF1 0x02
93#define W83627HF_XIRQC0 0x04
94#define W83627HF_XIRQC1 0x05
95#define W83627HF_XIRQC2 0x06
96#define W83627HF_XIMA0 0x08
97#define W83627HF_XIMA1 0x09
98#define W83627HF_XIMA2 0x0a
99#define W83627HF_XIMA3 0x0b
100#define W83627HF_XIMD 0x0c
101#define W83627HF_XZCNF2 0x0d
102#define W83627HF_XZCNF3 0x0e
103#define W83627HF_XZM0 0x0f
104#define W83627HF_XZM1 0x10
105#define W83627HF_XZM2 0x11
106#define W83627HF_XZM3 0x12
107#define W83627HF_HAP0 0x13
108#define W83627HF_HAP1 0x14
109#define W83627HF_XSCNF 0x15
110#define W83627HF_XWBCNF 0x16
Stefan Reinauer95bf86b2010-04-30 20:30:47 +0000111
Edward O'Callaghanbeb0f262014-04-29 13:09:50 +1000112#include <arch/io.h>
Stefan Reinauer95bf86b2010-04-30 20:30:47 +0000113
Edward O'Callaghan85836c22014-07-09 20:26:25 +1000114void w83627hf_set_clksel_48(pnp_devfn_t dev);
115void w83627hf_enable_serial(pnp_devfn_t dev, u16 iobase);
Edward O'Callaghanbeb0f262014-04-29 13:09:50 +1000116
117#endif /* SUPERIO_WINBOND_W83627HF_H */