diff --git a/src/soc/intel/jasperlake/acpi/xhci.asl b/src/soc/intel/jasperlake/acpi/xhci.asl index 8ecbe4723d..acaf450336 100644 --- a/src/soc/intel/jasperlake/acpi/xhci.asl +++ b/src/soc/intel/jasperlake/acpi/xhci.asl @@ -2,6 +2,15 @@ #include +/* + * JSL has 8 USB2 ports, so the USB3 PORTSC registers start at + * 0x480 + 8 * 0x10 = 0x500 + */ +#define JSL_PORTSCXUSB3_OFFSET 0x500 + +/* Include UWES method for enabling USB wake */ +#include + /* XHCI Controller 0:14.0 */ Device (XHCI) @@ -10,6 +19,20 @@ Device (XHCI) Name (_PRW, Package () { GPE0_PME_B0, 3 }) + OperationRegion (XPRT, PCI_Config, 0x00, 0x100) + Field (XPRT, AnyAcc, NoLock, Preserve) + { + Offset (0x10), + , 16, + XMEM, 16, /* MEM_BASE */ + } + + Method (_DSW, 3) + { + UWES ((\U2WE & 0xFF), PORTSCN_OFFSET, XMEM) + UWES ((\U3WE & 0x3F ), JSL_PORTSCXUSB3_OFFSET, XMEM) + } + Name (_S3D, 3) /* D3 supported in S3 */ Name (_S0W, 3) /* D3 can wake device in S0 */ Name (_S3W, 3) /* D3 can wake system from S3 */ diff --git a/src/soc/intel/jasperlake/chip.h b/src/soc/intel/jasperlake/chip.h index 2af85e36bb..66ad223167 100644 --- a/src/soc/intel/jasperlake/chip.h +++ b/src/soc/intel/jasperlake/chip.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include