ACPI implementation for i945, ICH7, Kontron 986LCD-M
[coreboot.git] / src / southbridge / intel / i82801gx / acpi / ich7_usb.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 i82801G USB support */
23
24 // USB Controller 0:1d.0
25
26 Device (USB1)
27 {
28         Name(_ADR, 0x001d0000)
29         
30         OperationRegion(U01P, PCI_Config, 0, 256)
31         Field(U01P, DWordAcc, NoLock, Preserve)
32         {
33                 Offset(0xc4),
34                 U1WE, 2         // USB Wake Enable
35         }
36
37         Name (_PRW, Package(){ 3, 4 }) // Power Resources for Wake
38         
39         Method (_PSW, 1)        // Power State Wake method
40         {
41                 // USB Controller can wake OS from Sleep State
42                 If (Arg0) {
43                         Store (3, U1WE)
44                 } Else {
45                         Store (0, U1WE)
46                 }
47         }
48
49         // Leave USB ports on for to allow Wake from USB
50
51         Method(_S3D,0)  // Highest D State in S3 State
52         {
53                 Return (2)
54         }
55
56         Method(_S4D,0)  // Highest D State in S4 State
57         {
58                 Return (2)
59         }
60 }
61
62
63 // USB Controller 0:1d.1
64
65 Device (USB2)
66 {
67         Name(_ADR, 0x001d0001)
68         
69         OperationRegion(U02P, PCI_Config, 0, 256)
70         Field(U02P, DWordAcc, NoLock, Preserve)
71         {
72                 Offset(0xc4),
73                 U2WE, 2         // USB Wake Enable
74         }
75
76         Name (_PRW, Package(){ 3, 4 }) // Power Resources for Wake
77         
78         Method (_PSW, 1)        // Power State Wake method
79         {
80                 // USB Controller can wake OS from Sleep State
81                 If (Arg0) {
82                         Store (3, U2WE)
83                 } Else {
84                         Store (0, U2WE)
85                 }
86         }
87
88         // Leave USB ports on for to allow Wake from USB
89
90         Method(_S3D,0)  // Highest D State in S3 State
91         {
92                 Return (2)
93         }
94
95         Method(_S4D,0)  // Highest D State in S4 State
96         {
97                 Return (2)
98         }
99
100 }
101
102
103 // USB Controller 0:1d.2
104
105 Device (USB3)
106 {
107         Name(_ADR, 0x001d0002)
108         
109         OperationRegion(U03P, PCI_Config, 0, 256)
110         Field(U03P, DWordAcc, NoLock, Preserve)
111         {
112                 Offset(0xc4),
113                 U3WE, 2         // USB Wake Enable
114         }
115
116         Name (_PRW, Package(){ 3, 4 }) // Power Resources for Wake
117         
118         Method (_PSW, 1)        // Power State Wake method
119         {
120                 // USB Controller can wake OS from Sleep State
121                 If (Arg0) {
122                         Store (3, U3WE)
123                 } Else {
124                         Store (0, U3WE)
125                 }
126         }
127
128         // Leave USB ports on for to allow Wake from USB
129
130         Method(_S3D,0)  // Highest D State in S3 State
131         {
132                 Return (2)
133         }
134
135         Method(_S4D,0)  // Highest D State in S4 State
136         {
137                 Return (2)
138         }
139
140 }
141
142
143 // USB Controller 0:1d.3
144
145 Device (USB4)
146 {
147         Name(_ADR, 0x001d0003)
148         
149         OperationRegion(U04P, PCI_Config, 0, 256)
150         Field(U04P, DWordAcc, NoLock, Preserve)
151         {
152                 Offset(0xc4),
153                 U4WE, 2         // USB Wake Enable
154         }
155
156         Name (_PRW, Package(){ 3, 4 }) // Power Resources for Wake
157         
158         Method (_PSW, 1)        // Power State Wake method
159         {
160                 // USB Controller can wake OS from Sleep State
161                 If (Arg0) {
162                         Store (3, U4WE)
163                 } Else {
164                         Store (0, U4WE)
165                 }
166         }
167
168         // Leave USB ports on for to allow Wake from USB
169
170         Method(_S3D,0)  // Highest D State in S3 State
171         {
172                 Return (2)
173         }
174
175         Method(_S4D,0)  // Highest D State in S4 State
176         {
177                 Return (2)
178         }
179
180 }
181
182
183 // EHCI Controller 0:1d.7
184
185 Device (EHC1)
186 {
187         Name(_ADR, 0x001d0007)
188         
189         Name (_PRW, Package(){ 13, 4 }) // Power Resources for Wake
190         
191         // Leave USB ports on for to allow Wake from USB
192
193         Method(_S3D,0)  // Highest D State in S3 State
194         {
195                 Return (2)
196         }
197
198         Method(_S4D,0)  // Highest D State in S4 State
199         {
200                 Return (2)
201         }
202
203         Device (HUB7)
204         {
205                 Name (_ADR, 0x00000000)
206
207                 // How many are there?
208                 Device (PRT1) { Name (_ADR, 1) } // USB Port 0
209                 Device (PRT2) { Name (_ADR, 2) } // USB Port 1
210                 Device (PRT3) { Name (_ADR, 3) } // USB Port 2
211                 Device (PRT4) { Name (_ADR, 4) } // USB Port 3
212                 Device (PRT5) { Name (_ADR, 5) } // USB Port 4
213                 Device (PRT6) { Name (_ADR, 6) } // USB Port 5
214         }
215 }
216
217