mb/system76/cml-u/dt: Make use of chipset devicetree
[coreboot.git] / src / soc / intel / tigerlake / acpi / tcss_xhci.asl
blobddc5a6665dc02592a33954df490ce5f628ed2471
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 OperationRegion (XPRT, SystemMemory, BASE(_ADR), 0x100)
4 Field (XPRT, ByteAcc, NoLock, Preserve)
6         VDID,  32,
7         Offset(0x74),   /* 0x74, XHCI CFG Power Control And Status */
8         D0D3,  2,       /* 0x74 BIT[1:0] */
9             ,  6,
10         PMEE,  1,       /* PME Enable */
11             ,  6,
12         PMES,  1,       /* PME Status */
15 Method (_PS0, 0, Serialized)
17         If (\_SB.PCI0.TXHC.PMEE == 1) {
18                 /* Clear PME_EN of CPU xHCI */
19                 \_SB.PCI0.TXHC.PMEE = 0
20         }
23 Method (_PS3, 0, Serialized)
25         If (\_SB.PCI0.TXHC.PMEE == 0) {
26                 /* Set PME_EN of CPU xHCI */
27                 \_SB.PCI0.TXHC.PMEE = 1
28         }
31 Method (_S0W, 0x0, NotSerialized)
33 #if CONFIG(D3COLD_SUPPORT)
34         Return (0x4)
35 #else
36         Return (0x3)
37 #endif  // D3COLD_SUPPORT
41  * Variable to skip TCSS/TBT D3 cold; 1+: Skip D3CE, 0 - Enable D3CE
42  * TCSS D3 Cold and TBT RTD3 is only available when system power state is in S0.
43  */
44 Name (SD3C, 0)
46 #if CONFIG(D3COLD_SUPPORT)
47 Method (_PR0)
49         Return (Package () { \_SB.PCI0.D3C })
52 Method (_PR3)
54         Return (Package () { \_SB.PCI0.D3C })
56 #endif  // D3COLD_SUPPORT
59  * XHCI controller _DSM method
60  */
61 Method (_DSM, 4, serialized)
63         Return (Buffer() { 0 })
67  * _SXD and _SXW methods
68  */
69 Method (_S3D, 0, NotSerialized)
71         Return (3)
74 Method (_S4D, 0, NotSerialized)
76         Return (3)
79 Method (_S3W, 0, NotSerialized)
81         Return (3)
84 Method (_S4W, 0, NotSerialized)
86         Return (3)
90  * Power resource for wake
91  */
92 Method (_PRW, 0)
94         Return (Package() { 0x6D, 4 })
98  * Device sleep wake
99  */
100 Method (_DSW, 3)
102         C2PM (Arg0, Arg1, Arg2, DCPM)
103         /* If entering Sx (Arg1 > 1), need to skip TCSS D3Cold & TBT RTD3/D3Cold. */
104         SD3C = Arg1
108  * xHCI Root Hub Device
109  */
110 Device (RHUB)
112         Name (_ADR, 0)
114         /* High Speed Ports */
115         Device (HS01)
116         {
117                 Name (_ADR, 0x01)
118         }
120         /* Super Speed Ports */
121         Device (SS01)
122         {
123                 Name (_ADR, 0x02)
124                 Method (_DSD, 0, NotSerialized)
125                 {
126                         Return( Package ()
127                         {
128                                 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
129                                 Package ()
130                                 {
131                                         Package (2) { "usb4-host-interface", \_SB.PCI0.TDM0 },
132                                         Package (2) { "usb4-port-number", 0 }
133                                 }
134                         })
135                 }
136         }
138         Device (SS02)
139         {
140                 Name (_ADR, 0x03)
141                 Method (_DSD, 0, NotSerialized)
142                 {
143                         Return( Package ()
144                         {
145                                 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
146                                 Package ()
147                                 {
148                                         Package (2) { "usb4-host-interface", \_SB.PCI0.TDM0 },
149                                         Package (2) { "usb4-port-number", 1 }
150                                 }
151                         })
152                 }
153         }
155         Device (SS03)
156         {
157                 Name (_ADR, 0x04)
158                 Method (_DSD, 0, NotSerialized)
159                 {
160                         Return( Package ()
161                         {
162                                 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
163                                 Package ()
164                                 {
165                                         Package (2) { "usb4-host-interface", \_SB.PCI0.TDM1 },
166                                         Package (2) { "usb4-port-number", 0 }
167                                 }
168                         })
169                 }
170         }
172         Device (SS04)
173         {
174                 Name (_ADR, 0x05)
175                 Method (_DSD, 0, NotSerialized)
176                 {
177                         Return( Package ()
178                         {
179                                 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
180                                 Package ()
181                                 {
182                                         Package (2) { "usb4-host-interface", \_SB.PCI0.TDM1 },
183                                         Package (2) { "usb4-port-number", 1 }
184                                 }
185                         })
186                 }
187         }