]> git.proxmox.com Git - mirror_edk2.git/blob - Vlv2DeviceRefCodePkg/AcpiTablesPCAT/PchXhci.asl
914209f668756ea0a54c27095b380762efaafc09
[mirror_edk2.git] / Vlv2DeviceRefCodePkg / AcpiTablesPCAT / PchXhci.asl
1 /**************************************************************************;
2 ;* *;
3 ;* *;
4 ;* Intel Corporation - ACPI Reference Code for the Haswell *;
5 ;* Family of Customer Reference Boards. *;
6 ;* *;
7 ;* *;
8 ;* Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved *;
9 ;
10 ; SPDX-License-Identifier: BSD-2-Clause-Patent
11 ;
12 ;* *;
13 ;* *;
14 ;**************************************************************************/
15
16 //scope is \_SB.PCI0.XHC
17 Device(XHC1)
18 {
19 Name(_ADR, 0x00140000) //Device 20, Function 0
20
21 //When it is in Host mode, USH core is connected to USB3 microAB(USB3 P1 and USB2 P0)
22 Name (_DDN, "Baytrail XHCI controller (CCG core/Host only)" )
23
24 Method(XDEP, 0)
25 {
26 If(LEqual(OSYS,2013))
27 {
28 Name(_DEP, Package(0x1)
29 {
30 PEPD
31 })
32 }
33 }
34
35 Name (_STR, Unicode ("Baytrail XHCI controller (CCG core/Host only)"))
36 Name(_PRW, Package() {0xD,4})
37
38 Method(_PSW,1)
39 {
40 If (LAnd (PMES, PMEE)) {
41 Store (0, PMEE)
42 Store (1, PMES)
43 }
44 }
45
46 OperationRegion (PMEB, PCI_Config, 0x74, 0x04) // Power Management Control/Status
47 Field (PMEB, WordAcc, NoLock, Preserve)
48 {
49 , 8,
50 PMEE, 1, //bit8 PME_En
51 , 6,
52 PMES, 1 //bit15 PME_Status
53 }
54
55 Method(_STA, 0)
56 {
57 If(LNotEqual(XHCI, 0)) //NVS variable controls present of XHCI controller
58 {
59 Return (0xF)
60 } Else
61 {
62 Return (0x0)
63 }
64 }
65
66 OperationRegion(XPRT,PCI_Config,0xD0,0x10)
67 Field(XPRT,DWordAcc,NoLock,Preserve) //usbx_top.doc.xml
68 {
69 PR2, 32, //bit[8:0] USB2HCSEL
70 PR2M, 32, //bit[8:0] USB2HCSELM
71 PR3, 32, //bit[3:0] USB3SSEN
72 PR3M, 32 //bit[3:0] USB3SSENM
73 }
74
75 Device(RHUB)
76 {
77 Name(_ADR, Zero) //address 0 is reserved for root hub
78
79 //
80 // Super Speed Ports - must match _UPC declarations of the coresponding Full Speed Ports.
81 // Paired with Port 1
82 Device(SSP1)
83 {
84 Name(_ADR, 0x07)
85
86 Method(_UPC,0,Serialized)
87 {
88 Name(UPCP, Package()
89 {
90 0xFF, // Port is connectable if non-zero
91 0x06, // USB3 uAB connector
92 0x00,
93 0x00
94 })
95 Return(UPCP)
96 }
97
98 Method(_PLD,0,Serialized)
99 {
100 Name(PLDP, Package() //pls check ACPI 5.0 section 6.1.8
101 {
102 Buffer(0x14)
103 {
104 //31:0 - Bit[6:0]=2 revision is 0x2, Bit[7]=1 Ignore Color Bit[31:8]=0 RGB color is ignored
105 0x82, 0x00, 0x00, 0x00,
106 //63:32 - Bit[47:32]=0 width: 0x0000 Bit[63:48]=0 Height:0x0000
107 0x00, 0x00, 0x00, 0x00,
108 //95:64 - bit[66:64]=b'011 visiable/docking/no lid bit[69:67]=b'001 bottom panel bit[71:70]=b'01 Center bit[73:72]=b'01 Center
109 // bit[77:74]=6 Horizontal Trapezoid bit[78]=0 bit[86:79]=0 bit[94:87]='0 no group info' bit[95]=0 not a bay
110 0x4B, 0x19, 0x00, 0x00,
111 //127:96 -bit[96]=1 Ejectable bit[97]=1 OSPM Ejection required Bit[105:98]=0 no Cabinet Number
112 // bit[113:106]=0 no Card cage Number bit[114]=0 no reference shape Bit[118:115]=0 no rotation Bit[123:119]=0 no order
113 0x03, 0x00, 0x00, 0x00,
114 //159:128 Vert. and Horiz. Offsets not supplied
115 0xFF, 0xFF, 0xFF, 0xFF
116 }
117 })
118 Return (PLDP)
119 }
120 }
121 //
122 // High Speed Ports
123 // pair port with port 7 (SS)
124 // The UPC declarations for LS/FS/HS and SS ports that are paired to form a USB3.0 compatible connector.
125 // A "pair" is defined by two ports that declare _PLDs with identical Panel, Vertical Position, Horizontal Postion, Shape, Group Orientation
126 // and Group Token
127 Device(HS01)
128 {
129 Name(_ADR, 0x01)
130
131 Method(_UPC,0,Serialized)
132 {
133 Name(UPCP, Package() { 0xFF,0x06,0x00,0x00 })
134 Return(UPCP)
135 }
136
137 Method(_PLD,0,Serialized)
138 {
139 Name(PLDP, Package() //pls check ACPI 5.0 section 6.1.8
140 {
141 Buffer(0x14)
142 {
143 //31:0 - Bit[6:0]=2 revision is 0x2, Bit[7]=1 Ignore Color Bit[31:8]=0 RGB color is ignored
144 0x82, 0x00, 0x00, 0x00,
145 //63:32 - Bit[47:32]=0 width: 0x0000 Bit[63:48]=0 Height:0x0000
146 0x00, 0x00, 0x00, 0x00,
147 //95:64 - bit[66:64]=b'011 visiable/docking/no lid bit[69:67]=b'001 bottom panel bit[71:70]=b'01 Center bit[73:72]=b'01 Center
148 // bit[77:74]=6 Horizontal Trapezoid bit[78]=0 bit[86:79]=0 bit[94:87]='0 no group info' bit[95]=0 not a bay
149 0x4B, 0x19, 0x00, 0x00,
150 //127:96 -bit[96]=1 Ejectable bit[97]=1 OSPM Ejection required Bit[105:98]=0 no Cabinet Number
151 // bit[113:106]=0 no Card cage Number bit[114]=0 no reference shape Bit[118:115]=0 no rotation Bit[123:119]=0 no order
152 0x03, 0x00, 0x00, 0x00,
153 //159:128 Vert. and Horiz. Offsets not supplied
154 0xFF, 0xFF, 0xFF, 0xFF
155 }
156 })
157 Return (PLDP)
158 }
159 }//end of HS01
160
161 // USB2 Type-A/USB2 only
162 // EHCI debug capable
163 Device(HS02)
164 {
165 Name(_ADR, 0x02) // 0 is for root hub so physical port index starts from 1 (it is port1 in schematic)
166
167 Method(_UPC,0,Serialized)
168 {
169 Name(UPCP, Package()
170 {
171 0xFF, // connectable
172 0xFF, //
173 0x00,
174 0x00
175 })
176
177 Return(UPCP)
178 }
179
180 Method(_PLD,0,Serialized)
181 {
182 Name(PLDP, Package()
183 {
184 Buffer(0x14)
185 {
186 //31:0 - Bit[6:0]=2 revision is 0x2, Bit[7]=1 Ignore Color Bit[31:8]=0 RGB color is ignored
187 0x82, 0x00, 0x00, 0x00,
188 //63:32 - Bit[47:32]=0 width: 0x0000 Bit[63:48]=0 Height:0x0000
189 0x00, 0x00, 0x00, 0x00,
190 //95:64 - bit[66:64]=b'011 visiable/docking/no lid bit[69:67]=b'001 bottom panel bit[71:70]=b'01 Center bit[73:72]=b'00 Left
191 // bit[77:74]=2 Square bit[78]=0 bit[86:79]=0 bit[94:87]='0 no group info' bit[95]=0 not a bay
192 0x4B, 0x08, 0x00, 0x00,
193 //127:96 -bit[96]=1 Ejectable bit[97]=1 OSPM Ejection required Bit[105:98]=0 no Cabinet Number
194 // bit[113:106]=0 no Card cage Number bit[114]=0 no reference shape Bit[118:115]=0 no rotation Bit[123:119]=0 no order
195 0x03, 0x00, 0x00, 0x00,
196 //159:128 Vert. and Horiz. Offsets not supplied
197 0xFF, 0xFF, 0xFF, 0xFF
198 }
199 })
200
201 Return (PLDP)
202 }
203 }//end of HS02
204 // high speed port 3
205 Device(HS03)
206 {
207 Name(_ADR, 0x03)
208
209 Method(_UPC,0,Serialized)
210 {
211 Name(UPCP, Package()
212 {
213 0xFF, // connectable
214 0xFF,
215 0x00,
216 0x00
217 })
218
219 Return(UPCP)
220 }
221
222 Method(_RMV, 0) // for XHCICV debug purpose
223 {
224 Return(0x0)
225 }
226
227 Method(_PLD,0,Serialized)
228 {
229 Name(PLDP, Package()
230 {
231 Buffer(0x14)
232 {
233 //31:0 - Bit[6:0]=2 revision is 0x2, Bit[7]=1 Ignore Color Bit[31:8]=0 RGB color is ignored
234 0x82, 0x00, 0x00, 0x00,
235 //63:32 - Bit[47:32]=0 width: 0x0000 Bit[63:48]=0 Height:0x0000
236 0x00, 0x00, 0x00, 0x00,
237 //95:64 - bit[66:64]=b'000 not Visible/no docking/no lid bit[69:67]=6 (b'110) unknown(Vertical Position and Horizontal Position will be ignored)
238 // bit[71:70]=b'00 Vertical Position ignore bit[73:72]=b'00 Horizontal Position ignore
239 // bit[77:74]=2 Square bit[78]=0 bit[86:79]=0 bit[94:87]='0 no group info' bit[95]=0 not a bay
240 0x30, 0x08, 0x00, 0x00,
241 //127:96 -bit[96]=0 not Ejectable bit[97]=0 OSPM Ejection not required Bit[105:98]=0 no Cabinet Number
242 // bit[113:106]=0 no Card cage Number bit[114]=0 no reference shape Bit[118:115]=0 no rotation Bit[123:119]=0 no order
243 0x00, 0x00, 0x00, 0x00,
244 //159:128 Vert. and Horiz. Offsets not supplied
245 0xFF, 0xFF, 0xFF, 0xFF
246 }
247 })
248 Return (PLDP)
249 }
250 }
251
252 Device(HS04)
253 {
254 Name(_ADR, 0x04)
255
256 Method(_UPC,0,Serialized)
257 {
258 Name(UPCP, Package()
259 {
260 0xFF, //connectable
261 0xFF, //Proprietary connector (FPC connector)
262 0x00,
263 0x00
264 })
265
266 Return(UPCP)
267 }
268 Method(_PLD,0,Serialized)
269 {
270 Name(PLDP, Package()
271 {
272 Buffer(0x14)
273 {
274 //31:0 - Bit[6:0]=2 revision is 0x2, Bit[7]=1 Ignore Color Bit[31:8]=0 RGB color is ignored
275 0x82, 0x00, 0x00, 0x00,
276 //63:32 - Bit[47:32]=0 width: 0x0000 Bit[63:48]=0 Height:0x0000
277 0x00, 0x00, 0x00, 0x00,
278 //95:64 - bit[66:64]=b'000 not Visible/no docking/no lid bit[69:67]=6 (b'110) unknown(Vertical Position and Horizontal Position will be ignored)
279 // bit[71:70]=b'00 Vertical Position ignore bit[73:72]=b'00 Horizontal Position ignore
280 // bit[77:74]=2 Square bit[78]=0 bit[86:79]=0 bit[94:87]='0 no group info' bit[95]=0 not a bay
281 0x30, 0x08, 0x00, 0x00,
282 //127:96 -bit[96]=0 not Ejectable bit[97]=0 OSPM Ejection not required Bit[105:98]=0 no Cabinet Number
283 // bit[113:106]=0 no Card cage Number bit[114]=0 no reference shape Bit[118:115]=0 no rotation Bit[123:119]=0 no order
284 0x00, 0x00, 0x00, 0x00,
285 //159:128 Vert. and Horiz. Offsets not supplied
286 0xFF, 0xFF, 0xFF, 0xFF
287 }
288 })
289
290 Return (PLDP)
291 }
292 }
293
294
295 Device(HSC1) // USB2 HSIC 01
296 {
297 Name(_ADR, 0x05)
298
299 Method(_UPC,0,Serialized)
300 {
301 Name(UPCP, Package()
302 {
303 0xFF, //connectable
304 0xFF, //Proprietary connector (FPC connector)
305 0x00,
306 0x00
307 })
308
309 Return(UPCP)
310 }
311 Method(_PLD,0,Serialized)
312 {
313 Name(PLDP, Package()
314 {
315 Buffer(0x14)
316 {
317 //31:0 - Bit[6:0]=2 revision is 0x2, Bit[7]=1 Ignore Color Bit[31:8]=0 RGB color is ignored
318 0x82, 0x00, 0x00, 0x00,
319 //63:32 - Bit[47:32]=0 width: 0x0000 Bit[63:48]=0 Height:0x0000
320 0x00, 0x00, 0x00, 0x00,
321 //95:64 - bit[66:64]=b'000 not Visible/no docking/no lid bit[69:67]=6 (b'110) unknown(Vertical Position and Horizontal Position will be ignored)
322 // bit[71:70]=b'00 Vertical Position ignore bit[73:72]=b'00 Horizontal Position ignore
323 // bit[77:74]=2 Square bit[78]=0 bit[86:79]=0 bit[94:87]='0 no group info' bit[95]=0 not a bay
324 0x30, 0x08, 0x00, 0x00,
325 //127:96 -bit[96]=0 not Ejectable bit[97]=0 OSPM Ejection not required Bit[105:98]=0 no Cabinet Number
326 // bit[113:106]=0 no Card cage Number bit[114]=0 no reference shape Bit[118:115]=0 no rotation Bit[123:119]=0 no order
327 0x00, 0x00, 0x00, 0x00,
328 //159:128 Vert. and Horiz. Offsets not supplied
329 0xFF, 0xFF, 0xFF, 0xFF
330 }
331 })
332 Return (PLDP)
333 }
334 }
335
336 Device(HSC2) // USB2 HSIC 02
337 {
338 Name(_ADR, 0x06)
339
340 Method(_UPC,0,Serialized)
341 {
342 Name(UPCP, Package()
343 {
344 0xFF, //connectable
345 0xFF, //Proprietary connector (FPC connector)
346 0x00,
347 0x00
348 })
349
350 Return(UPCP)
351 }
352 Method(_PLD,0,Serialized)
353 {
354 Name(PLDP, Package()
355 {
356 Buffer(0x14)
357 {
358 //31:0 - Bit[6:0]=2 revision is 0x2, Bit[7]=1 Ignore Color Bit[31:8]=0 RGB color is ignored
359 0x82, 0x00, 0x00, 0x00,
360 //63:32 - Bit[47:32]=0 width: 0x0000 Bit[63:48]=0 Height:0x0000
361 0x00, 0x00, 0x00, 0x00,
362 //95:64 - bit[66:64]=b'000 not Visible/no docking/no lid bit[69:67]=6 (b'110) unknown(Vertical Position and Horizontal Position will be ignored)
363 // bit[71:70]=b'00 Vertical Position ignore bit[73:72]=b'00 Horizontal Position ignore
364 // bit[77:74]=2 Square bit[78]=0 bit[86:79]=0 bit[94:87]='0 no group info' bit[95]=0 not a bay
365 0x30, 0x08, 0x00, 0x00,
366 //127:96 -bit[96]=0 not Ejectable bit[97]=0 OSPM Ejection not required Bit[105:98]=0 no Cabinet Number
367 // bit[113:106]=0 no Card cage Number bit[114]=0 no reference shape Bit[118:115]=0 no rotation Bit[123:119]=0 no order
368 0x00, 0x00, 0x00, 0x00,
369 //159:128 Vert. and Horiz. Offsets not supplied
370 0xFF, 0xFF, 0xFF, 0xFF
371 }
372 })
373 Return (PLDP)
374 }
375 }
376 } //end of root hub
377
378 } // end of XHC1
379