Add support for Intel Panther Point PCH
[coreboot.git] / src / southbridge / intel / bd82x6x / acpi / pch.asl
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2007-2009 coresystems GmbH
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; version 2 of
9  * the License.
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,
19  * MA 02110-1301 USA
20  */
21
22 /* Intel Cougar Point PCH support */
23
24 Scope(\)
25 {
26         // IO-Trap at 0x800. This is the ACPI->SMI communication interface.
27
28         OperationRegion(IO_T, SystemIO, 0x800, 0x10)
29         Field(IO_T, ByteAcc, NoLock, Preserve)
30         {
31                 Offset(0x8),
32                 TRP0, 8         // IO-Trap at 0x808
33         }
34
35         // PCH Power Management Registers, located at PMBASE (0x1f.0 0x40.l)
36         OperationRegion(PMIO, SystemIO, DEFAULT_PMBASE, 0x80)
37         Field(PMIO, ByteAcc, NoLock, Preserve)
38         {
39                 Offset(0x20),   // GPE0_STS
40                 , 16,
41                 GS00, 1,        // GPIO00 SCI/Wake Status
42                 GS01, 1,        // GPIO01 SCI/Wake Status
43                 GS02, 1,        // GPIO02 SCI/Wake Status
44                 GS03, 1,        // GPIO03 SCI/Wake Status
45                 GS04, 1,        // GPIO04 SCI/Wake Status
46                 GS05, 1,        // GPIO05 SCI/Wake Status
47                 GS06, 1,        // GPIO06 SCI/Wake Status
48                 GS07, 1,        // GPIO07 SCI/Wake Status
49                 GS08, 1,        // GPIO08 SCI/Wake Status
50                 GS09, 1,        // GPIO09 SCI/Wake Status
51                 GS10, 1,        // GPIO10 SCI/Wake Status
52                 GS11, 1,        // GPIO11 SCI/Wake Status
53                 GS12, 1,        // GPIO12 SCI/Wake Status
54                 GS13, 1,        // GPIO13 SCI/Wake Status
55                 GS14, 1,        // GPIO14 SCI/Wake Status
56                 GS15, 1,        // GPIO15 SCI/Wake Status
57                 Offset(0x28),   // GPE0_EN
58                 , 16,
59                 GE00, 1,        // GPIO00 SCI/Wake Enable
60                 GE01, 1,        // GPIO01 SCI/Wake Enable
61                 GE02, 1,        // GPIO02 SCI/Wake Enable
62                 GE03, 1,        // GPIO03 SCI/Wake Enable
63                 GE04, 1,        // GPIO04 SCI/Wake Enable
64                 GE05, 1,        // GPIO05 SCI/Wake Enable
65                 GE06, 1,        // GPIO06 SCI/Wake Enable
66                 GE07, 1,        // GPIO07 SCI/Wake Enable
67                 GE08, 1,        // GPIO08 SCI/Wake Enable
68                 GE09, 1,        // GPIO09 SCI/Wake Enable
69                 GE10, 1,        // GPIO10 SCI/Wake Enable
70                 GE11, 1,        // GPIO11 SCI/Wake Enable
71                 GE12, 1,        // GPIO12 SCI/Wake Enable
72                 GE13, 1,        // GPIO13 SCI/Wake Enable
73                 GE14, 1,        // GPIO14 SCI/Wake Enable
74                 GE15, 1,        // GPIO15 SCI/Wake Enable
75                 Offset(0x42),   // General Purpose Control
76                 , 1,            // skip 1 bit
77                 GPEC, 1,        // SWGPE_CTRL
78         }
79
80         // GPIO IO mapped registers (0x1f.0 reg 0x48.l)
81         OperationRegion(GPIO, SystemIO, DEFAULT_GPIOBASE, 0x6c)
82         Field(GPIO, ByteAcc, NoLock, Preserve)
83         {
84                 Offset(0x00),   // GPIO Use Select
85                 GU00, 8,
86                 GU01, 8,
87                 GU02, 8,
88                 GU03, 8,
89                 Offset(0x04),   // GPIO IO Select
90                 GIO0, 8,
91                 GIO1, 8,
92                 GIO2, 8,
93                 GIO3, 8,
94                 Offset(0x0c),   // GPIO Level
95                 GL00, 1,
96                 GP01, 1,
97                 GP02, 1,
98                 GP0e, 1,
99                 GP04, 1,
100                 GP05, 1,
101                 GP06, 1,
102                 GP07, 1,
103                 GP08, 1,
104                 GP09, 1,
105                 GP10, 1,
106                 GP11, 1,
107                 GP12, 1,
108                 GP13, 1,
109                 GP14, 1,
110                 GP15, 1,
111                 GP16, 1,
112                 GP17, 1,
113                 GP18, 1,
114                 GP19, 1,
115                 GP20, 1,
116                 GP21, 1,
117                 GP22, 1,
118                 GP23, 1,
119                 GP24, 1,
120                 GP25, 1,
121                 GP26, 1,
122                 GP27, 1,
123                 GP28, 1,
124                 GP29, 1,
125                 GP30, 1,
126                 GP31, 1,
127                 Offset(0x18),   // GPIO Blink
128                 GB00, 8,
129                 GB01, 8,
130                 GB02, 8,
131                 GB03, 8,
132                 Offset(0x2c),   // GPIO Invert
133                 GIV0, 8,
134                 GIV1, 8,
135                 GIV2, 8,
136                 GIV3, 8,
137                 Offset(0x30),   // GPIO Use Select 2
138                 GU04, 8,
139                 GU05, 8,
140                 GU06, 8,
141                 GU07, 8,
142                 Offset(0x34),   // GPIO IO Select 2
143                 GIO4, 8,
144                 GIO5, 8,
145                 GIO6, 8,
146                 GIO7, 8,
147                 Offset(0x38),   // GPIO Level 2
148                 GP32, 1,
149                 GP33, 1,
150                 GP34, 1,
151                 GP35, 1,
152                 GP36, 1,
153                 GP37, 1,
154                 GP38, 1,
155                 GP39, 1,
156                 GP40, 1,
157                 GP41, 1,
158                 GP42, 1,
159                 GP43, 1,
160                 GP44, 1,
161                 GP45, 1,
162                 GP46, 1,
163                 GP47, 1,
164                 GP48, 1,
165                 GP49, 1,
166                 GP50, 1,
167                 GP51, 1,
168                 GP52, 1,
169                 GP53, 1,
170                 GP54, 1,
171                 GP55, 1,
172                 GP56, 1,
173                 GP57, 1,
174                 GP58, 1,
175                 GP59, 1,
176                 GP60, 1,
177                 GP61, 1,
178                 GP62, 1,
179                 GP63, 1,
180                 Offset(0x40),   // GPIO Use Select 3
181                 GU08, 8,
182                 GU09, 4,
183                 Offset(0x44),   // GPIO IO Select 3
184                 GIO8, 8,
185                 GIO9, 4,
186                 Offset(0x48),   // GPIO Level 3
187                 GP64, 1,
188                 GP65, 1,
189                 GP66, 1,
190                 GP67, 1,
191                 GP68, 1,
192                 GP69, 1,
193                 GP70, 1,
194                 GP71, 1,
195                 GP72, 1,
196                 GP73, 1,
197                 GP74, 1,
198                 GP75, 1,
199         }
200
201
202         // ICH7 Root Complex Register Block. Memory Mapped through RCBA)
203         OperationRegion(RCRB, SystemMemory, DEFAULT_RCBA, 0x4000)
204         Field(RCRB, DWordAcc, Lock, Preserve)
205         {
206                 Offset(0x0000), // Backbone
207                 Offset(0x1000), // Chipset
208                 Offset(0x3000), // Legacy Configuration Registers
209                 Offset(0x3404), // High Performance Timer Configuration
210                 HPAS, 2,        // Address Select
211                 , 5,
212                 HPTE, 1,        // Address Enable
213                 Offset(0x3418), // FD (Function Disable)
214                 , 2,            // Reserved
215                 SATD, 1,        // SATA disable
216                 SMBD, 1,        // SMBUS disable
217                 HDAD, 1,        // Azalia disable
218                 , 2,            // Reserved
219                 ILND, 1,        // Internal LAN disable
220                 US1D, 1,        // UHCI #1 disable
221                 US2D, 1,        // UHCI #2 disable
222                 US3D, 1,        // UHCI #3 disable
223                 US4D, 1,        // UHCI #4 disable
224                 , 2,            // Reserved
225                 LPBD, 1,        // LPC bridge disable
226                 EHCD, 1,        // EHCI disable
227                 Offset(0x341a), // FD Root Ports
228                 RP1D, 1,        // Root Port 1 disable
229                 RP2D, 1,        // Root Port 2 disable
230                 RP3D, 1,        // Root Port 3 disable
231                 RP4D, 1         // Root Port 4 disable
232         }
233
234 }
235
236 // High Definition Audio (Azalia) 0:1b.0
237 #include "audio.asl"
238
239 // PCI Express Ports 0:1c.x
240 #include "pcie.asl"
241
242 // USB 0:1d.0 and 0:1a.0
243 #include "usb.asl"
244
245 // LPC Bridge 0:1f.0
246 #include "lpc.asl"
247
248 // SATA 0:1f.2, 0:1f.5
249 #include "sata.asl"
250
251 // SMBus 0:1f.3
252 #include "smbus.asl"
253
254 Method (_OSC, 4)
255 {
256         /* Check for proper GUID */
257         If (LEqual (Arg0, ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766")))
258         {
259                 /* Let OS control everything */
260                 Return (Arg3)
261         }
262         Else
263         {
264                 /* Unrecognized UUID */
265                 CreateDWordField (Arg3, 0, CDW1)
266                 Or (CDW1, 4, CDW1)
267                 Return (Arg3)
268         }
269 }