soc/intel/tigerlake: Add platform wide _OSC capabilities for USB4

This change adds Platform-Wide _OSC capabilities for native USB4
support. There is Engineering Change Request (ECR) with _OSC addition
for OSPM USB support. ACPI section 6.2.11.1.13 is modified with bit 18
as native USB4 support. The OS sets this bit to indicate support for
an OSPM-native USB4 Connection Manager which handles USB4 connection
events and link management. The OS use the _OSC mechanism and the bit
defined in this ECR to obtain configuration and connection management
capabilities of USB4 connections. This change also fixs the byte index
for the DWord-addressable field CDW3 from the capabilities buffer.

BUG=b:140645231
TEST=Check Type C device all ports connection/enumeration with SW CM.

Signed-off-by: John Zhao <john.zhao@intel.com>
Change-Id: I1b561ea5a0a6b440cca3152cc150f31abf7766ad
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42821
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
This commit is contained in:
John Zhao 2020-06-24 23:08:01 -07:00 committed by Patrick Georgi
parent a65afdb833
commit c47e314753
1 changed files with 41 additions and 25 deletions

View File

@ -139,38 +139,54 @@ Scope (\_SB)
Method (_OSC, 4, Serialized)
{
/*
* Operating System Capabilities for USB4
* Arg0: UUID = {23A0D13A-26AB-486C-9C5F-0FFA525A575A}
* Arg1: Revision ID = 1
* Arg2: Count of entries (DWORD) in Arg3 (Integer): 3
* Arg3: DWORD capabilities buffer:
* First DWORD: The standard definition bits are used to return errors.
* Second DWORD: OSPM support field for USB4, bits [31:0] reserved.
* Third DWORD: OSPM control field for USB4.
* bit 0: USB tunneling
* bit 1: DisplayPort tunneling
* bit 2: PCIe tunneling
* bit 3: Inter-domain USB4 internet protocol
* bit 31:4: reserved
* Return: The platform acknowledges the capabilities buffer by returning
* a buffer of DWORD of the same length. Masked/Cleared bits in the
* control field indicate that the platform does not permit OSPM
* control of the respectively capabilities or features.
*/
Name (CTRL, 0) /* Control field value */
CreateDWordField (Arg3, 0, CDW1)
If (Arg0 == ToUUID("23A0D13A-26AB-486C-9C5F-0FFA525A575A")) {
CreateDWordField (Arg3, 2, CDW3)
CTRL = CDW3
If (Arg0 == ToUUID("0811B06E-4A27-44F9-8D60-3CBBC22E7B48")) {
/* Platform-Wide _OSC Capabilities
* Arg0: UUID = {0811B06E-4A27-44F9-8D60-3CBBC22E7B48}
* Arg1: Revision ID = 1
* Arg2: Count of entries (DWORD) in Arge3 (Integer): 3
* Arg3: DWORD capabilities buffer:
* First DWORD: The standard definition bits are used to return errors.
* Second DWORD: See ACPI specification Platform-Wide _OSC Capabilities
* DWORD2 table for Bits 0-17. Bit 18 is newly defined as native USB4
* support. The OS sets this bit to indicate support for an OSPM-native
* USB4 Connection Manager which handles USB4 connection events and
* link management.
*/
If (Arg1 != REVISION_ID) {
CDW1 |= UNRECOGNIZED_REVISION
}
Return (Arg3)
} ElseIf (Arg0 == ToUUID("23A0D13A-26AB-486C-9C5F-0FFA525A575A")) {
/*
* Operating System Capabilities for USB4
* Arg0: UUID = {23A0D13A-26AB-486C-9C5F-0FFA525A575A}
* Arg1: Revision ID = 1
* Arg2: Count of entries (DWORD) in Arg3 (Integer): 3
* Arg3: DWORD capabilities buffer:
* First DWORD: The standard definition bits are used to return errors.
* Second DWORD: OSPM support field for USB4, bits [31:0] reserved.
* Third DWORD: OSPM control field for USB4.
* bit 0: USB tunneling
* bit 1: DisplayPort tunneling
* bit 2: PCIe tunneling
* bit 3: Inter-domain USB4 internet protocol
* bit 31:4: reserved
* Return: The platform acknowledges the capabilities buffer by
* returning a buffer of DWORD of the same length. Masked/Cleared bits
* in the control field indicate that the platform does not permit OSPM
* control of the respectively capabilities or features.
*/
CreateDWordField (Arg3, 8, CDW3)
Local0 = CDW3
If (Arg1 != REVISION_ID) {
CDW1 |= UNRECOGNIZED_REVISION
Return (Arg3)
}
CTRL |= USB_TUNNELING | DISPLAY_PORT_TUNNELING | PCIE_TUNNELING |
Local0 |= USB_TUNNELING | DISPLAY_PORT_TUNNELING | PCIE_TUNNELING |
INTER_DOMAIN_USB4_INTERNET_PROTOCOL
CDW3 = CTRL
CDW3 = Local0
Return (Arg3)
} Else {
CDW1 |= UNRECOGNIZED_UUID