Support Intel SCH (Poulsbo) and add iwave/iWRainbowG6 board
[coreboot.git] / src / southbridge / intel / sch / acpi / lpc.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 LPC Bus Device  - 0:1f.0
23
24 Device (LPCB)
25 {
26         Name(_ADR, 0x001f0000)
27
28         OperationRegion(LPC0, PCI_Config, 0x00, 0x100)
29         Field (LPC0, AnyAcc, NoLock, Preserve)
30         {
31                 Offset (0x40),
32                 PMBS,   16,     // PMBASE
33                 Offset (0x60),  // Interrupt Routing Registers
34                 PRTA,   8,
35                 PRTB,   8,
36                 PRTC,   8,
37                 PRTD,   8,
38                 Offset (0x68),
39                 PRTE,   8,
40                 PRTF,   8,
41                 PRTG,   8,
42                 PRTH,   8,
43
44                 Offset (0x80),  // IO Decode Ranges
45                 IOD0,   8,
46                 IOD1,   8,
47
48                 Offset (0xf0),  // RCBA
49                 RCEN,   1,
50                 ,       13,
51                 RCBA,   18,
52         }
53
54 //      #include "../../../southbridge/intel/sch/acpi/irqlinks.asl"
55         #include "irqlinks.asl"
56
57         #include "acpi/ec.asl"
58
59         Device (DMAC)           // DMA Controller
60         {
61                 Name(_HID, EISAID("PNP0200"))
62                 Name(_CRS, ResourceTemplate()
63                 {
64                         IO (Decode16, 0x00, 0x00, 0x01, 0x20)
65                         IO (Decode16, 0x81, 0x81, 0x01, 0x11)
66                         IO (Decode16, 0x93, 0x93, 0x01, 0x0d)
67                         IO (Decode16, 0xc0, 0xc0, 0x01, 0x20)
68                         DMA (Compatibility, NotBusMaster, Transfer8_16) { 4 }
69                 })
70         }
71
72         Device (FWH)            // Firmware Hub
73         {
74                 Name (_HID, EISAID("INT0800"))
75                 Name (_CRS, ResourceTemplate()
76                 {
77                         Memory32Fixed(ReadOnly, 0xff000000, 0x01000000)
78                 })
79         }
80
81         Device (HPET)
82         {
83                 Name (_HID, EISAID("PNP0103"))
84                 Name (_CID, 0x010CD041)
85
86                 Name(BUF0, ResourceTemplate()
87                 {
88                         Memory32Fixed(ReadOnly, 0xfed00000, 0x400, FED0)
89                 })
90
91                 Method (_STA, 0)        // Device Status
92                 {
93                         If (HPTE) {
94                                 // Note: Ancient versions of Windows don't want
95                                 // to see the HPET in order to work right
96                                 If (LGreaterEqual(OSYS, 2001)) {
97                                         Return (0xf)    // Enable and show device
98                                 } Else {
99                                         Return (0xb)    // Enable and don't show device
100                                 }
101                         }
102
103                         Return (0x0)    // Not enabled, don't show.
104                 }
105
106                 Method (_CRS, 0, Serialized) // Current resources
107                 {
108                         If (HPTE) {
109                                 CreateDWordField(BUF0, \_SB.PCI0.LPCB.HPET.FED0._BAS, HPT0)
110                                 If (Lequal(HPAS, 1)) {
111                                         Store(0xfed01000, HPT0)
112                                 }
113
114                                 If (Lequal(HPAS, 2)) {
115                                         Store(0xfed02000, HPT0)
116                                 }
117
118                                 If (Lequal(HPAS, 3)) {
119                                         Store(0xfed03000, HPT0)
120                                 }
121                         }
122
123                         Return (BUF0)
124                 }
125         }
126
127         Device(PIC)     // 8259 Interrupt Controller
128         {
129                 Name(_HID,EISAID("PNP0000"))
130                 Name(_CRS, ResourceTemplate()
131                 {
132                         IO (Decode16, 0x20, 0x20, 0x01, 0x02)
133                         IO (Decode16, 0x24, 0x24, 0x01, 0x02)
134                         IO (Decode16, 0x28, 0x28, 0x01, 0x02)
135                         IO (Decode16, 0x2c, 0x2c, 0x01, 0x02)
136                         IO (Decode16, 0x30, 0x30, 0x01, 0x02)
137                         IO (Decode16, 0x34, 0x34, 0x01, 0x02)
138                         IO (Decode16, 0x38, 0x38, 0x01, 0x02)
139                         IO (Decode16, 0x3c, 0x3c, 0x01, 0x02)
140                         IO (Decode16, 0xa0, 0xa0, 0x01, 0x02)
141                         IO (Decode16, 0xa4, 0xa4, 0x01, 0x02)
142                         IO (Decode16, 0xa8, 0xa8, 0x01, 0x02)
143                         IO (Decode16, 0xac, 0xac, 0x01, 0x02)
144                         IO (Decode16, 0xb0, 0xb0, 0x01, 0x02)
145                         IO (Decode16, 0xb4, 0xb4, 0x01, 0x02)
146                         IO (Decode16, 0xb8, 0xb8, 0x01, 0x02)
147                         IO (Decode16, 0xbc, 0xbc, 0x01, 0x02)
148                         IO (Decode16, 0x4d0, 0x4d0, 0x01, 0x02)
149                         IRQNoFlags () { 2 }
150                 })
151         }
152
153         Device(MATH)    // FPU
154         {
155                 Name (_HID, EISAID("PNP0C04"))
156                 Name (_CRS, ResourceTemplate()
157                 {
158                         IO (Decode16, 0xf0, 0xf0, 0x01, 0x01)
159                         IRQNoFlags() { 13 }
160                 })
161         }
162
163         Device(LDRC)    // LPC device: Resource consumption
164         {
165                 Name (_HID, EISAID("PNP0C02"))
166                 Name (_UID, 2)
167                 Name (_CRS, ResourceTemplate()
168                 {
169                         IO (Decode16, 0x2e, 0x2e, 0x1, 0x02)            // First SuperIO
170                         IO (Decode16, 0x4e, 0x4e, 0x1, 0x02)            // Second SuperIO
171                         IO (Decode16, 0x61, 0x61, 0x1, 0x01)            // NMI Status
172                         IO (Decode16, 0x63, 0x63, 0x1, 0x01)            // CPU Reserved
173                         IO (Decode16, 0x65, 0x65, 0x1, 0x01)            // CPU Reserved
174                         IO (Decode16, 0x67, 0x67, 0x1, 0x01)            // CPU Reserved
175                         IO (Decode16, 0x80, 0x80, 0x1, 0x01)            // Port 80 Post
176                         IO (Decode16, 0x92, 0x92, 0x1, 0x01)            // CPU Reserved
177                         IO (Decode16, 0xb2, 0xb2, 0x1, 0x02)            // SWSMI
178                         // IO (Decode16, 0x680, 0x680, 0x1, 0x70)       // IO ???
179                         IO (Decode16, 0x800, 0x800, 0x1, 0x10)          // ACPI I/O trap
180                         IO (Decode16, 0x0500, 0x0500, 0x1, 0x80)        // ICH7-M ACPI
181                         IO (Decode16, 0x0480, 0x0480, 0x1, 0x40)        // ICH7-M GPIO
182                         // IO (Decode16, 0x1640, 0x1640, 0x1, 0x10)     // IO ???
183                 })
184         }
185
186         Device (RTC)    // Real Time Clock
187         {
188                 Name (_HID, EISAID("PNP0B00"))
189                 Name (_CRS, ResourceTemplate()
190                 {
191                         IO (Decode16, 0x70, 0x70, 1, 8)
192                         IRQNoFlags() { 8 }
193                 })
194         }
195
196         Device (TIMR)   // Intel 8254 timer
197         {
198                 Name(_HID, EISAID("PNP0100"))
199                 Name(_CRS, ResourceTemplate()
200                 {
201                         IO (Decode16, 0x40, 0x40, 0x01, 0x04)
202                         IO (Decode16, 0x50, 0x50, 0x10, 0x04)
203                         IRQNoFlags() {0}
204                 })
205         }
206
207         #include "acpi/superio.asl"
208
209         Device (PS2K)           // Keyboard
210         {
211                 Name(_HID, EISAID("PNP0303"))
212                 Name(_CID, EISAID("PNP030B"))
213
214                 Name(_CRS, ResourceTemplate()
215                 {
216                         IO (Decode16, 0x60, 0x60, 0x01, 0x01)
217                         IO (Decode16, 0x64, 0x64, 0x01, 0x01)
218                         IRQ (Edge, ActiveHigh, Exclusive) { 0x01 } // IRQ 1
219                 })
220
221                 Method (_STA, 0)
222                 {
223                         Return (0xf)
224                 }
225         }
226
227         Device (PS2M)           // Mouse
228         {
229                 Name(_HID, EISAID("PNP0F13"))
230                 Name(_CRS, ResourceTemplate()
231                 {
232                         IRQ (Edge, ActiveHigh, Exclusive) { 0x0c } // IRQ 12
233                 })
234
235                 Method(_STA, 0)
236                 {
237                         Return (0xf)
238                 }
239         }
240
241         Device (FDC0)           // Floppy controller
242         {
243                 Name (_HID, EisaId ("PNP0700"))
244                 Method (_STA, 0, NotSerialized)
245                 {
246                         Return (0x0f) // FIXME
247                 }
248
249                 Name(_CRS, ResourceTemplate()
250                 {
251                         IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
252                         IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
253                         IRQNoFlags () {6}
254                         DMA (Compatibility, NotBusMaster, Transfer8) {2}
255                 })
256
257                 Name(_PRS, ResourceTemplate()
258                 {
259                         IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
260                         IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
261                         IRQNoFlags () {6}
262                         DMA (Compatibility, NotBusMaster, Transfer8) {2}
263                 })
264
265         }
266 }