2ead33f02a414192f6c5b13b17dd5b97c59e6f8f
[coreboot.git] / src / southbridge / intel / i82801ax / i82801ax.h
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2007 Corey Osgood <corey.osgood@gmail.com>
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.
15  *
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
19  */
20
21 #ifndef SOUTHBRIDGE_INTEL_I82801AX_I82801AX_H
22 #define SOUTHBRIDGE_INTEL_I82801AX_I82801AX_H
23
24 #if !defined(__PRE_RAM__)
25 #include "chip.h"
26 extern void i82801ax_enable(device_t dev);
27 #endif
28
29 #define PCI_DMA_CFG             0x90
30 #define SERIRQ_CNTL             0x64
31 #define GEN_CNTL                0xd0
32 #define GEN_STS                 0xd4
33 #define RTC_CONF                0xd8
34 #define GEN_PMCON_3             0xa4
35
36 #define PMBASE                  0x40
37 #define PMBASE_ADDR             0x0400 /* ACPI Base Address Register */
38 #define ACPI_CNTL               0x44
39 #define BIOS_CNTL               0x4E
40 #define GPIO_BASE_ICH0_5        0x58 /* LPC GPIO Base Addr. Reg. (ICH0-ICH5) */
41 #define GPIO_BASE_ICH6_9        0x48 /* LPC GPIO Base Address Register (ICH6-ICH9) */
42 #define GPIO_CNTL_ICH0_5        0x5C /* LPC GPIO Control Register (ICH0-ICH5) */
43 #define GPIO_CNTL_ICH6_9        0x4C /* LPC GPIO Control Register (ICH6-ICH9) */
44
45 #define PIRQA_ROUT              0x60
46 #define PIRQB_ROUT              0x61
47 #define PIRQC_ROUT              0x62
48 #define PIRQD_ROUT              0x63
49 #define PIRQE_ROUT              0x68
50 #define PIRQF_ROUT              0x69
51 #define PIRQG_ROUT              0x6A
52 #define PIRQH_ROUT              0x6B
53
54 #define FUNC_DIS                0xF2
55
56 #define COM_DEC                 0xE0 /* LPC I/F Communication Port Decode Ranges (ICH0-ICH5) */
57 #define LPC_IO_DEC              0x80 /* IO Decode Ranges Register (ICH6-ICH9) */
58 #define LPC_EN_ICH0_5           0xE6 /* LPC IF Enables Register (ICH0-ICH5) */
59 #define LPC_EN_ICH6_9           0x82 /* LPC IF Enables Register (ICH6-ICH9) */
60
61 #define SBUS_NUM                0x19
62 #define SUB_BUS_NUM             0x1A
63 #define SMLT                    0x1B
64 #define IOBASE                  0x1C
65 #define IOLIM                   0x1D
66 #define MEMBASE                 0x20
67 #define MEMLIM                  0x22
68 #define CNF                     0x50
69 #define MTT                     0x70
70 #define PCI_MAST_STS            0x82
71
72 #define TCOBASE                 0x60 /* TCO Base Address Register */
73 #define TCO1_CNT                0x08 /* TCO1 Control Register */
74
75 /* GEN_PMCON_3 bits */
76 #define RTC_BATTERY_DEAD        (1 << 2)
77 #define RTC_POWER_FAILED        (1 << 1)
78 #define SLEEP_AFTER_POWER_FAIL  (1 << 0)
79
80 /* PCI Configuration Space (D31:F1) */
81 #define IDE_TIM_PRI             0x40    /* IDE timings, primary */
82 #define IDE_TIM_SEC             0x42    /* IDE timings, secondary */
83
84 /* IDE_TIM bits */
85 #define IDE_DECODE_ENABLE       (1 << 15)
86
87 /* PCI Configuration Space (D31:F3) */
88 #define SMB_BASE                0x20
89 #define HOSTC                   0x40
90
91 /* HOSTC bits */
92 #define I2C_EN                  (1 << 2)
93 #define SMB_SMI_EN              (1 << 1)
94 #define HST_EN                  (1 << 0)
95
96 /* SMBus I/O bits.
97  * TODO: Does it matter where we put the SMBus IO base, as long as we keep
98  * consistent and don't interfere with anything else?
99  */
100 /* #define SMBUS_IO_BASE 0x1000 */
101 #define SMBUS_IO_BASE           0x0f00
102
103 #define SMBHSTSTAT              0x0
104 #define SMBHSTCTL               0x2
105 #define SMBHSTCMD               0x3
106 #define SMBXMITADD              0x4
107 #define SMBHSTDAT0              0x5
108 #define SMBHSTDAT1              0x6
109 #define SMBBLKDAT               0x7
110 #define SMBTRNSADD              0x9
111 #define SMBSLVDATA              0xa
112 #define SMLINK_PIN_CTL          0xe
113 #define SMBUS_PIN_CTL           0xf
114
115 #define SMBUS_TIMEOUT           (10 * 1000 * 100)
116
117 /* HPET, if present */
118 #define HPET_ADDR               0xfed00000
119
120 #endif                          /* SOUTHBRIDGE_INTEL_I82801AX_I82801AX_H */