summaryrefslogtreecommitdiff
path: root/src/soc/intel/tigerlake/acpi/tcss_xhci.asl
blob: c32deed8c3925b29145d338af19b73ab866c8ce5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
/*
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

OperationRegion (XPRT, SystemMemory, BASE(_ADR), 0x100)
Field (XPRT, ByteAcc, NoLock, Preserve)
{
	VDID,  32,
	Offset(0x74),   /* 0x74, XHCI CFG Power Control And Status */
	D0D3,  2,       /* 0x74 BIT[1:0] */
	    ,  6,
	PMEE,  1,       /* PME Enable */
	    ,  6,
	PMES,  1,       /* PME Status */
}

Method (_PS0, 0, Serialized)
{
	If (\_SB.PCI0.TXHC.PMEE == 1) {
		/* Clear PME_EN of CPU xHCI */
		\_SB.PCI0.TXHC.PMEE = 0
	}
}

Method (_PS3, 0, Serialized)
{
	If (\_SB.PCI0.TXHC.PMEE == 0) {
		/* Set PME_EN of CPU xHCI */
		\_SB.PCI0.TXHC.PMEE = 1
	}
}

Method (_S0W, 0x0, NotSerialized)
{
	Return (0x4)
}

/*
 * Variable to skip TCSS/TBT D3 cold; 1+: Skip D3CE, 0 - Enable D3CE
 * TCSS D3 Cold and TBT RTD3 is only available when system power state is in S0.
 */
Name (SD3C, 0)

Method (_PR0)
{
	Return (Package () { \_SB.PCI0.D3C })
}

Method (_PR3)
{
	Return (Package () { \_SB.PCI0.D3C })
}

/*
 * XHCI controller _DSM method
 */
Method (_DSM, 4, serialized)
{
	Return (Buffer() { 0 })
}

/*
 * _SXD and _SXW methods
 */
Method (_S3D, 0, NotSerialized)
{
	Return (3)
}

Method (_S4D, 0, NotSerialized)
{
	Return (3)
}

Method (_S3W, 0, NotSerialized)
{
	Return (3)
}

Method (_S4W, 0, NotSerialized)
{
	Return (3)
}

/*
 * Power resource for wake
 */
Method (_PRW, 0)
{
	Return (Package() { 0x6D, 4 })
}

/*
 * Device sleep wake
 */
Method (_DSW, 3)
{
	C2PM (Arg0, Arg1, Arg2, DCPM)
	/* If entering Sx (Arg1 > 1), need to skip TCSS D3Cold & TBT RTD3/D3Cold. */
	SD3C = Arg1
}

/*
 * xHCI Root Hub Device
 */
Device (RHUB)
{
	Name (_ADR, Zero)

	/* High Speed Ports */
	Device (HS01)
	{
		Name (_ADR, 0x01)
	}

	/* Super Speed Ports */
	Device (SS01)
	{
		Name (_ADR, 0x02)
		Method (_DSD, 0, NotSerialized)
		{
			Return( Package ()
			{
				ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
				Package ()
				{
					Package (2) { "usb4-host-interface", \_SB.PCI0.TDM0 },
					Package (2) { "usb4-port-number", 0 }
				}
			})
		}
	}

	Device (SS02)
	{
		Name (_ADR, 0x03)
		Method (_DSD, 0, NotSerialized)
		{
			Return( Package ()
			{
				ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
				Package ()
				{
					Package (2) { "usb4-host-interface", \_SB.PCI0.TDM0 },
					Package (2) { "usb4-port-number", 1 }
				}
			})
		}
	}

	Device (SS03)
	{
		Name (_ADR, 0x04)
		Method (_DSD, 0, NotSerialized)
		{
			Return( Package ()
			{
				ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
				Package ()
				{
					Package (2) { "usb4-host-interface", \_SB.PCI0.TDM1 },
					Package (2) { "usb4-port-number", 0 }
				}
			})
		}
	}

	Device (SS04)
	{
		Name (_ADR, 0x05)
		Method (_DSD, 0, NotSerialized)
		{
			Return( Package ()
			{
				ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
				Package ()
				{
					Package (2) { "usb4-host-interface", \_SB.PCI0.TDM1 },
					Package (2) { "usb4-port-number", 1 }
				}
			})
		}
	}
}