1 /* SPDX-License-Identifier: GPL-2.0-only */
6 Name(_PRW, Package() { 0xb, 3 })
9 Device (HS01) { Name (_ADR, 1) }
10 Device (HS02) { Name (_ADR, 2) }
11 Device (HS03) { Name (_ADR, 3) }
12 Device (HS04) { Name (_ADR, 4) }
13 Device (HS05) { Name (_ADR, 5) }
14 Device (HS06) { Name (_ADR, 6) }
15 Device (HS07) { Name (_ADR, 7) }
16 Device (HS08) { Name (_ADR, 8) }
19 Name(_PR0, Package() { P0U2 }) /* Indicate support for D0 */
20 Name(_PR3, Package() { P3U2 }) /* Indicate support for D3cold */
38 Name(_ADR, 0x00100000)
39 Name(_PRW, Package() { 0xb, 3 })
40 Device (SS01) { Name (_ADR, 1) }
41 Device (SS02) { Name (_ADR, 2) }
42 Device (SS03) { Name (_ADR, 3) }
44 Name(_PR0, Package() { P0U3 }) /* Indicate support for D0 */
45 Name(_PR3, Package() { P3U3 }) /* Indicate support for D3cold */
65 PowerResource(P0U3, 0, 0) {
76 PowerResource(P3U3, 0, 0) {
90 PowerResource(P0U2, 0, 0) {
101 PowerResource(P3U2, 0, 0) {
114 OperationRegion(EHMC, SystemMemory, EH10, 0x100)
115 Field(EHMC, DwordAcc, NoLock, Preserve)
122 Method(U2D3,0, Serialized)
142 while (Local0 != 0) {
148 if (U3TD == 0x03) { /* Shutdown USB2 PLL */
155 Method(U2D0,0, Serialized)
165 while (Local0 != 0x7) {
188 Method(LXFW,3, Serialized) //Load Xhci FirmWare
190 FWLM = 1 /* Firmware Load Mode */
191 ROAM = Arg0 /* ROM/RAM */
194 FPLS = 1 /* Firmware Preload Start */
195 Local0 = FPLC /* Firmware Preload Complete */
202 Method(U3D3,0, Serialized)
207 PGA3 |= 0x20 /* SwUsb3SlpShutdown */
209 while (!Local0) { /* wait for it to complete */
212 UD3P = 1 /* U3P_D3Cold_PWRDN */
214 U3PD = 0 /* PwrOnDev */
216 while (Local0) { /* RstBState, RefClkOkState, PwrRstBState */
220 U3TD = 0x3 /* TargetedDeviceState */
222 U3RP = 1 /* USB3_RefClk_Pwdn */
224 if (U2TD == 0x3) { /* If EHCI targeted in D3cold */
225 PGA3 &= 0x9f /* SwUsb2S5RstB */
226 U2RP = 1 /* USB2_RefClk_Pwdn */
228 U3PG = 0 /* XhcPwrGood */
229 U3PS = 1 /* Usb3PowerSel */
233 Method(U3D0,0, Serialized)
235 U3PS = 0 /* Usb3PowerSel */
236 U3PG = 1 /* XhcPwrGood */
243 PGA3 = Local0 /* SwUsb2S5RstB */
245 U3TD = 0 /* TargetedDeviceState */
246 U3PD = 1 /* PwrOnDev */
248 Local0 = U3DS /* wait for RstBState, RefClkOkState, PwrRstBState */
249 while (Local0 != 0x7) {
253 Local0 = U3PY /* USB3 PHY Lock */
258 U3PR = 0 /* U3P_RESTORE_RESET */
260 Local0 = AUSS /* AutoSizeStart */
265 while (Local0 != 1) {
274 U3PR = 1 /* U3P_RESTORE_RESET */
275 UD3P = 0 /* U3P_D3Cold_PWRDN */
276 U3TD = 1 /* TargetedDeviceState */
279 Name (SVBF, Buffer (0x1000) {0}) /* length from FchCarrizo.asl, new fields */
280 CreateDWordField(SVBF, 0x000, S000) /* will be easier to add from there */
281 CreateDWordField(SVBF, 0x004, S004)
282 CreateDWordField(SVBF, 0x008, S008)
283 CreateDWordField(SVBF, 0x00C, S00C)
284 CreateDWordField(SVBF, 0x018, S018)
285 CreateDWordField(SVBF, 0x01C, S01C)
286 CreateDWordField(SVBF, 0x020, S020)
287 CreateDWordField(SVBF, 0x030, S030)
288 CreateDWordField(SVBF, 0x118, S118)
289 CreateDWordField(SVBF, 0x158, S158)
290 CreateDWordField(SVBF, 0x198, S198)
291 CreateDWordField(SVBF, 0x1D8, S1D8)
292 CreateDWordField(SVBF, 0x300, S300)
293 CreateDWordField(SVBF, 0x304, S304)
294 CreateDWordField(SVBF, 0x308, S308)
295 CreateDWordField(SVBF, 0x30C, S30C)
296 CreateDWordField(SVBF, 0x310, S310)
297 CreateDWordField(SVBF, 0x428, S428)
298 CreateDWordField(SVBF, 0x438, S438)
299 CreateDWordField(SVBF, 0x43C, S43C)
300 CreateDWordField(SVBF, 0x458, S458)
301 CreateDWordField(SVBF, 0x468, S468)
302 CreateDWordField(SVBF, 0x46C, S46C)
303 CreateDWordField(SVBF, 0x470, S470)
304 CreateDWordField(SVBF, 0x480, S480)
305 CreateDWordField(SVBF, 0x484, S484)
306 CreateDWordField(SVBF, 0x488, S488)
307 CreateDWordField(SVBF, 0x48C, S48C)
308 CreateDWordField(SVBF, 0x730, EHID) /* EHCI SSID */
309 CreateDWordField(SVBF, 0x734, XHID) /* XHCI SSID */
310 CreateByteField(SVBF, 0x740, ES54) /* EHCI PCIx54 */
311 CreateByteField(SVBF, 0x741, ES64) /* EHCI PCIx64 */
312 CreateDWordField(SVBF, 0x7B0, SSIM) /* EHCI SIM BIT */