Debian Codegraph @

src/soc/intel/alderlake/acpi/tcss_xhci.asl

raw
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2
3 OperationRegion (XPRT, SystemMemory, BASE(_ADR), 0x100)
4 Field (XPRT, ByteAcc, NoLock, Preserve)
5 {
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 */
13 }
14
15 Method (_PS0, 0, Serialized)
16 {
17 If (\_SB.PCI0.TXHC.PMEE == 1) {
18 /* Clear PME_EN of CPU xHCI */
19 \_SB.PCI0.TXHC.PMEE = 0
20 }
21 }
22
23 Method (_PS3, 0, Serialized)
24 {
25 If (\_SB.PCI0.TXHC.PMEE == 0) {
26 /* Set PME_EN of CPU xHCI */
27 \_SB.PCI0.TXHC.PMEE = 1
28 }
29 }
30
31 Method (_S0W, 0x0, NotSerialized)
32 {
33 #if CONFIG(D3COLD_SUPPORT)
34 Return (0x4)
35 #else
36 Return (0x3)
37 #endif // D3COLD_SUPPORT
38 }
39
40 /*
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)
45
46 #if CONFIG(D3COLD_SUPPORT)
47 Method (_PR0)
48 {
49 Return (Package () { \_SB.PCI0.D3C })
50 }
51
52 Method (_PR3)
53 {
54 Return (Package () { \_SB.PCI0.D3C })
55 }
56 #endif // D3COLD_SUPPORT
57
58 /*
59 * XHCI controller _DSM method
60 */
61 Method (_DSM, 4, serialized)
62 {
63 Return (Buffer() { 0 })
64 }
65
66 /*
67 * _SXD and _SXW methods
68 */
69 Method (_S3D, 0, NotSerialized)
70 {
71 Return (3)
72 }
73
74 Method (_S4D, 0, NotSerialized)
75 {
76 Return (3)
77 }
78
79 Method (_S3W, 0, NotSerialized)
80 {
81 Return (3)
82 }
83
84 Method (_S4W, 0, NotSerialized)
85 {
86 Return (3)
87 }
88
89 /*
90 * Power resource for wake
91 */
92 Method (_PRW, 0)
93 {
94 Return (Package() { 0x6D, 4 })
95 }
96
97 /*
98 * Device sleep wake
99 */
100 Method (_DSW, 3)
101 {
102 C2PM (Arg0, Arg1, Arg2, DCPM)
103 /* If entering Sx (Arg1 > 1), need to skip TCSS D3Cold & TBT RTD3/D3Cold. */
104 SD3C = Arg1
105 }
106
107 /*
108 * xHCI Root Hub Device
109 */
110 Device (RHUB)
111 {
112 Name (_ADR, 0)
113
114 /* High Speed Ports */
115 Device (HS01)
116 {
117 Name (_ADR, 0x01)
118 }
119
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 }
137
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 }
154
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 }
171
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 }
188 }