Remove whitespace.
[coreboot.git] / src / mainboard / msi / ms7135 / dsdt.asl
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2004 Nick Barker <Nick.Barker9@btinternet.com>
5  * Copyright (C) 2007, 2008 Rudolf Marek <r.marek@assembler.cz>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; version 2 of 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, MA  02110-1301 USA
19  */
20
21 /*
22  * ISA portions taken from QEMU acpi-dsdt.dsl.
23  */
24
25 DefinitionBlock ("DSDT.aml", "DSDT", 1, "CORE  ", "CB-DSDT ", 1)
26 {
27         #include "northbridge/amd/amdk8/util.asl"
28
29         /* For now only define 2 power states:
30          *  - S0 which is fully on
31          *  - S5 which is soft off
32          * Any others would involve declaring the wake up methods.
33          */
34         Name (\_S0, Package () { 0x00, 0x00, 0x00, 0x00 })
35         Name (\_S5, Package () { 0x07, 0x00, 0x00, 0x00 })
36
37         Name (PICM, 0x00)
38         Method (_PIC, 1, Serialized) {
39                 Store (Arg0, PICM)
40         }
41
42         /* Root of the bus hierarchy */
43         Scope (\_SB)
44         {
45                 /* Top PCI device (CK804) */
46                 Device (PCI0)
47                 {
48                         Name (_HID, EisaId ("PNP0A03"))
49                         Name (_ADR, 0x00)
50                         Name (_UID, 0x00)
51                         Name (_BBN, 0x00)
52
53                         External (BUSN)
54                         External (MMIO)
55                         External (PCIO)
56                         External (SBLK)
57                         External (TOM1)
58                         External (HCLK)
59                         External (SBDN)
60                         External (HCDN)
61
62                         Method (_CRS, 0, NotSerialized)
63                         {
64                                 Name (BUF0, ResourceTemplate ()
65                                 {
66                                         IO (Decode16,
67                                         0x0CF8, // Address Range Minimum
68                                         0x0CF8, // Address Range Maximum
69                                         0x01,   // Address Alignment
70                                         0x08,   // Address Length
71                                         )
72                                         WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
73                                         0x0000, // Address Space Granularity
74                                         0x0000, // Address Range Minimum
75                                         0x0CF7, // Address Range Maximum
76                                         0x0000, // Address Translation Offset
77                                         0x0CF8, // Address Length
78                                         ,, , TypeStatic)
79                                 })
80                                 /* Methods bellow use SSDT to get actual MMIO regs
81                                    The IO ports are from 0xd00, optionally an VGA,
82                                    otherwise the info from MMIO is used.
83                                    \_SB.GXXX(node, link)
84                                  */
85                                 Concatenate (\_SB.GMEM (0x00, \_SB.PCI0.SBLK), BUF0, Local1)
86                                 Concatenate (\_SB.GIOR (0x00, \_SB.PCI0.SBLK), Local1, Local2)
87                                 Concatenate (\_SB.GWBN (0x00, \_SB.PCI0.SBLK), Local2, Local3)
88                                 Return (Local3)
89                         }
90
91 #include "southbridge/nvidia/ck804/acpi/ck804.asl"
92
93                         /* PCI Routing Table */
94                         Name (_PRT, Package () {
95                                 Package (0x04) { 0x0001FFFF, 0x00, \_SB.PCI0.LLAS, 0x00 },
96                                 Package (0x04) { 0x0001FFFF, 0x01, \_SB.PCI0.LLAS, 0x00 },
97                                 Package (0x04) { 0x0002FFFF, 0x00, \_SB.PCI0.LUOH, 0x00 },
98                                 Package (0x04) { 0x0002FFFF, 0x01, \_SB.PCI0.LUEH, 0x00 },
99                                 Package (0x04) { 0x0004FFFF, 0x00, \_SB.PCI0.LAUD, 0x00 },
100                                 Package (0x04) { 0x0004FFFF, 0x01, \_SB.PCI0.LMOD, 0x00 },
101                                 Package (0x04) { 0x0006FFFF, 0x00, \_SB.PCI0.LPA0, 0x00 },
102                                 Package (0x04) { 0x0007FFFF, 0x00, \_SB.PCI0.LSA0, 0x00 },
103                                 Package (0x04) { 0x0008FFFF, 0x00, \_SB.PCI0.LSA1, 0x00 },
104
105                                 Package (0x04) { 0x0009FFFF, 0x00, \_SB.PCI0.LNKA, 0x00 },
106                                 Package (0x04) { 0x0009FFFF, 0x01, \_SB.PCI0.LNKB, 0x00 },
107                                 Package (0x04) { 0x0009FFFF, 0x02, \_SB.PCI0.LNKC, 0x00 },
108                                 Package (0x04) { 0x0009FFFF, 0x03, \_SB.PCI0.LNKD, 0x00 },
109
110                                 Package (0x04) { 0x000AFFFF, 0x00, \_SB.PCI0.LEMA, 0x00 },
111
112                                 Package (0x04) { 0x000BFFFF, 0x00, \_SB.PCI0.LNKA, 0x00 },
113                                 Package (0x04) { 0x000BFFFF, 0x01, \_SB.PCI0.LNKB, 0x00 },
114                                 Package (0x04) { 0x000BFFFF, 0x02, \_SB.PCI0.LNKC, 0x00 },
115                                 Package (0x04) { 0x000BFFFF, 0x03, \_SB.PCI0.LNKD, 0x00 },
116
117                                 Package (0x04) { 0x000CFFFF, 0x00, \_SB.PCI0.LNKA, 0x00 },
118                                 Package (0x04) { 0x000CFFFF, 0x01, \_SB.PCI0.LNKB, 0x00 },
119                                 Package (0x04) { 0x000CFFFF, 0x02, \_SB.PCI0.LNKC, 0x00 },
120                                 Package (0x04) { 0x000CFFFF, 0x03, \_SB.PCI0.LNKD, 0x00 },
121
122                                 Package (0x04) { 0x000DFFFF, 0x00, \_SB.PCI0.LNKD, 0x00 },
123                                 Package (0x04) { 0x000DFFFF, 0x01, \_SB.PCI0.LNKA, 0x00 },
124                                 Package (0x04) { 0x000DFFFF, 0x02, \_SB.PCI0.LNKB, 0x00 },
125                                 Package (0x04) { 0x000DFFFF, 0x03, \_SB.PCI0.LNKC, 0x00 },
126
127                                 Package (0x04) { 0x000EFFFF, 0x00, \_SB.PCI0.LNKC, 0x00 },
128                                 Package (0x04) { 0x000EFFFF, 0x01, \_SB.PCI0.LNKD, 0x00 },
129                                 Package (0x04) { 0x000EFFFF, 0x02, \_SB.PCI0.LNKA, 0x00 },
130                                 Package (0x04) { 0x000EFFFF, 0x03, \_SB.PCI0.LNKB, 0x00 },
131                         })
132
133                         Device (PCIC)
134                         {
135                                 Name (_ADR, 0x00090000)
136                                 Name (_UID, 0x00)
137                                 Name (_PRT, Package () {
138                                         /* AGR slot */
139                                         Package (0x04) { 0x0000FFFF, 0x00, 0x00, 0x10 },
140                                         Package (0x04) { 0x0000FFFF, 0x01, 0x00, 0x10 },
141                                         Package (0x04) { 0x0000FFFF, 0x02, 0x00, 0x10 },
142                                         Package (0x04) { 0x0000FFFF, 0x03, 0x00, 0x10 },
143                                 })
144                         }
145
146                         /* 2:00 PCIe x1 */
147                         Device (PEX1)
148                         {
149                                 Name (_ADR, 0x000d0000)
150                                 Name (_UID, 0x00)
151                         }
152
153                         /* 3:00 PCIe x16 */
154                         Device (PEX0)
155                         {
156                                 Name (_ADR, 0x000e0000)
157                                 Name (_UID, 0x00)
158                         }
159
160                         Device (LPC) {
161                                 Name (_HID, EisaId ("PNP0A05"))
162                                 Name (_ADR, 0x00010000)
163
164                                 OperationRegion (CF44, PCI_Config, 0x44, 0x04)
165                                 Field (CF44, ByteAcc, NoLock, Preserve)
166                                 {
167                                         ETBA, 32,
168                                 }
169
170                                 /* PS/2 keyboard (seems to be important for WinXP install) */
171                                 Device (KBD)
172                                 {
173                                         Name (_HID, EisaId ("PNP0303"))
174                                         Method (_STA, 0, NotSerialized)
175                                         {
176                                                 Return (0x0f)
177                                         }
178                                         Method (_CRS, 0, NotSerialized)
179                                         {
180                                                 Name (TMP, ResourceTemplate () {
181                                                         IO (Decode16, 0x0060, 0x0060, 0x01, 0x01)
182                                                         IO (Decode16, 0x0064, 0x0064, 0x01, 0x01)
183                                                         IRQNoFlags () {1}
184                                                 })
185                                                 Return (TMP)
186                                         }
187                                 }
188
189                                 /* PS/2 mouse */
190                                 Device (MOU)
191                                 {
192                                         Name (_HID, EisaId ("PNP0F13"))
193                                         Method (_STA, 0, NotSerialized)
194                                         {
195                                                 Return (0x0f)
196                                         }
197                                         Method (_CRS, 0, NotSerialized)
198                                         {
199                                                 Name (TMP, ResourceTemplate () {
200                                                         IRQNoFlags () {12}
201                                                 })
202                                                 Return (TMP)
203                                         }
204                                 }
205
206                                 /* Parallel port */
207                                 Device (LP0)
208                                 {
209                                         Name (_HID, EisaId ("PNP0400")) // "PNP0401" for ECP
210                                         Method (_STA, 0, NotSerialized)
211                                         {
212                                                 Return (0x0f)
213                                         }
214                                         Method (_CRS, 0, NotSerialized)
215                                         {
216                                                 Name (TMP, ResourceTemplate () {
217                                                         FixedIO (0x0378, 0x10)
218                                                         IRQNoFlags () {7}
219                                                 })
220                                                 Return (TMP)
221                                         }
222                                 }
223
224                                 /* Floppy controller */
225                                 Device (FDC0)
226                                 {
227                                         Name (_HID, EisaId ("PNP0700"))
228                                         Method (_STA, 0, NotSerialized)
229                                         {
230                                                 Return (0x0f)
231                                         }
232                                         Method (_CRS, 0, NotSerialized)
233                                         {
234                                                 Name (BUF0, ResourceTemplate () {
235                                                         FixedIO (0x03F0, 0x08)
236                                                         IRQNoFlags () {6}
237                                                         DMA (Compatibility, NotBusMaster, Transfer8) {2}
238                                                 })
239                                                 Return (BUF0)
240                                         }
241                                 }
242 #if 0
243                                 Device (HPET)
244                                 {
245                                         Name (_HID, EisaId ("PNP0103"))
246                                         Name (CRS, ResourceTemplate ()
247                                         {
248                                                 Memory32Fixed (ReadOnly,
249                                                 0x00000000,
250                                                 0x00001000,
251                                                 _Y02)
252                                         })
253                                         Method (_STA, 0, NotSerialized)
254                                         {
255                                                 Return (0x0F)
256                                         }
257                                         Method (_CRS, 0, NotSerialized)
258                                         {
259                                                 CreateDWordField (CRS, \_SB.PCI0.LPC.HPET._Y02._BAS, HPT)
260                                                 Store (ETBA, HPT)
261                                                 Return (CRS)
262                                         }
263
264                                 }
265 #endif
266                         }
267                 }
268         }
269 }