blob: bb8c3218c344fe2da56158a86f5993ae6ebe94de [file] [log] [blame]
Kyösti Mälkki91162702011-11-03 15:22:01 +02001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2011 Kyösti Mälkki <kyosti.malkki@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; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20Device (USB0)
21{
22 Name (_ADR, 0x001D0000)
23 Name (_PRW, Package () { 0x03, 0x05 })
24
25 OperationRegion (USBS, PCI_Config, 0x00, 0x0100)
26 Field (USBS, ByteAcc, NoLock, Preserve)
27 {
28 Offset (0xC4), URES, 8
29 }
30}
31
32Device (USB1)
33{
34 Name (_ADR, 0x001D0001)
35 Name (_PRW, Package () { 0x04, 0x05 })
36 OperationRegion (USBS, PCI_Config, 0x00, 0x0100)
37 Field (USBS, ByteAcc, NoLock, Preserve)
38 {
39 Offset (0xC4), URES, 8
40 }
41}
42
43Device (USB2)
44{
45 Name (_ADR, 0x001D0002)
46 Name (_PRW, Package () { 0x0C, 0x05 })
47 OperationRegion (USBS, PCI_Config, 0x00, 0x0100)
48 Field (USBS, ByteAcc, NoLock, Preserve)
49 {
50 Offset (0xC4), URES, 8
51 }
52}
53
54Device (USB3)
55{
56 Name (_ADR, 0x001D0007)
57 Name (_PRW, Package () { 0x0D, 0x05 }) /* PME_B0_STS any 0:1d or 0:1f device */
58 OperationRegion (USBS, PCI_Config, 0x00, 0x0100)
59 Field (USBS, ByteAcc, NoLock, Preserve)
60 {
61 Offset (0xC4), URES, 8
62 }
63}
64
65Device(PCI5)
66{
67 Name (_ADR, 0x001E0000)
68 Name (_PRW, Package () { 0x0B, 0x05 }) /* PME# _STS */
69 Name (_PRT, Package() {
70 Package() { 0x0003ffff, 0, 0, 20 },
71 Package() { 0x0003ffff, 1, 0, 21 },
72 Package() { 0x0003ffff, 2, 0, 22 },
73 Package() { 0x0003ffff, 3, 0, 23 },
74 })
75}
76
77Device (ICH0)
78{
79 Name (_ADR, 0x001F0000)
80 OperationRegion (D310, PCI_Config, 0x00, 0xFF)
81 Field (D310, ByteAcc, NoLock, Preserve)
82 {
83 Offset (0x40), PBAR, 16,
84 Offset (0x58), GBAR, 16,
85 }
86
87 OperationRegion (ACPI, SystemIO, 0x0400, 0xC0)
88 Field (ACPI, ByteAcc, NoLock, Preserve)
89 {
90 Offset (0x00), PS1L,8, PS1H,8, PE1L,8, PE1H,8,
91 Offset (0x28), GS0L,8, GS0H,8, GSPL,8, GSPH,8,
92 Offset (0x2C), GE0L,8, GE0H,8, GEPL,8, GEPH,8,
93 Offset (0xB8), GPLV,8
94 }
95
96 Name (MSBF, ResourceTemplate ()
97 {
98 /* IOAPIC 0 */
99 Memory32Fixed (ReadWrite, 0xFEC00000, 0x00001000,)
100
101 IO (Decode16, 0x0, 0x0, 0x80, 0x0, PMIO)
102 IO (Decode16, 0x0, 0x0, 0x40, 0x0, GPIO)
103
104 /* 8254 legacy irq */
105 IO (Decode16, 0x04D0, 0x04D0, 0x02, 0x02,)
106
107 /* reset generator */
108 IO (Decode16, 0x0092, 0x0092, 0x01, 0x01, )
109 })
110
111 Method (_CRS, 0, NotSerialized)
112 {
113 CreateWordField (MSBF, \_SB_.PCI0.ICH0.PMIO._MIN, IOA1)
114 CreateWordField (MSBF, \_SB_.PCI0.ICH0.PMIO._MAX, IOA2)
115 CreateByteField (MSBF, \_SB_.PCI0.ICH0.PMIO._LEN, IOAL)
116
117 Store (PBAR, Local0)
118 If ( Land(Local0, 0x01) )
119 {
120 And (Local0, 0xFFFE, Local0)
121 Store (Local0, IOA1)
122 Store (Local0, IOA2)
123 Store (0x80, IOAL)
124 } Else {
125 Store (0x00, IOAL)
126 }
127
128 CreateWordField (MSBF, \_SB_.PCI0.ICH0.GPIO._MIN, IOS1)
129 CreateWordField (MSBF, \_SB_.PCI0.ICH0.GPIO._MAX, IOS2)
130 CreateByteField (MSBF, \_SB_.PCI0.ICH0.GPIO._LEN, IOSL)
131
132 Store (GBAR, Local0)
133 If ( Land(Local0, 0x01) ) {
134 And (Local0, 0xFFFE, Local0)
135 Store (Local0, IOS1)
136 Store (Local0, IOS2)
137 Store (0x40, IOSL)
138 } Else {
139 Store (0x00, IOSL)
140 }
141 Return (MSBF)
142 }
143
144 Device (FWH)
145 {
146 Name (_HID, EisaId ("PNP0C02"))
147 Name (_UID, 0x01)
148
149
150 Name (MSBG, ResourceTemplate () {
151 Memory32Fixed (ReadOnly, 0xFFF00000, 0x00080000,)
152 Memory32Fixed (ReadOnly, 0xFFF80000, 0x00080000,)
153 })
154
155 Method (_CRS, 0, NotSerialized)
156 {
157 Return (MSBG)
158 }
159 }
160
161 Device (SMSC)
162 {
163 Name (_HID, EisaId ("PNP0C02"))
164 Name (_UID, 0x02)
165 #include "acpi/superio.asl"
166 }
167
168}
169
170
171