1 /* SPDX-License-Identifier: GPL-2.0-only */
3 /* The _PTS method (Prepare To Sleep) is called before the OS is
4 * entering a sleep state. The sleep state number is passed in Arg0
9 GP08 = 0 // Disable Bluetooth
12 // NVS has a flag to determine USB policy in S3
14 GP47 = 1 // Enable USB0
16 GP47 = 0 // Disable USB0
19 // NVS has a flag to determine USB policy in S3
21 GP56 = 1 // Enable USB1
23 GP56 = 0 // Disable USB1
27 // NVS has a flag to determine USB policy in S5
29 GP47 = 1 // Enable USB0
31 GP47 = 0 // Disable USB0
34 // NVS has a flag to determine USB policy in S5
36 GP56 = 1 // Enable USB1
38 GP56 = 0 // Disable USB1
43 /* The _WAK method is called on system wakeup */
47 Return(Package(){0,0})
51 OperationRegion (CMOS, SystemIO, 0x70, 0x71)
52 Field (CMOS, ByteAcc, NoLock, Preserve)
58 IndexField (NVRI, NVRD, ByteAcc, NoLock, Preserve)
61 US3B, 8, // USB Controller Reset S3 behavior
64 #define USB_RESET_DISABLE_MAGIC 0xdd
66 /* Disable USB Controller Reset in S3 (defaults to enabled) */
67 Method (USBR, 0, Serialized)
69 US3B = USB_RESET_DISABLE_MAGIC