John Zhao has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/44347 )
Change subject: soc/intel/tigerlake: Add USB4 _DSM for retimer firmware upgrade support ......................................................................
soc/intel/tigerlake: Add USB4 _DSM for retimer firmware upgrade support
There is need to upgrade retimer firmware even if USB4 link is not up. This change adds USB4 _DSM method to support retimer firmware upgrade. The retimer force power GPIO state is queried and set accordingly.
BUG=b:162528868 TEST=Built and booted to kernel successfully on Volteer and TGLRVP. TBD with kernel driver update to validate retimer firmware upgrade.
Signed-off-by: John Zhao john.zhao@intel.com Change-Id: I34006972124fa7b04380410669b0cb5051c4f518 --- M src/soc/intel/tigerlake/acpi/tcss_dma.asl 1 file changed, 75 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/47/44347/1
diff --git a/src/soc/intel/tigerlake/acpi/tcss_dma.asl b/src/soc/intel/tigerlake/acpi/tcss_dma.asl index da2e8fe..39d55e9 100644 --- a/src/soc/intel/tigerlake/acpi/tcss_dma.asl +++ b/src/soc/intel/tigerlake/acpi/tcss_dma.asl @@ -105,7 +105,81 @@ ) }
+/* + * Retimer Device Specific Method + * + * Arg0: UUID (set to 61788900-c470-42bb-80f0-23a313864593) + * Arg1: Revision ID (set to 1) + * Arg2: Function Index + * 0: Query command implemented + * 1: Query force power enable state + * 2: Set force power state + * 0x3 - 0xffff: Reserved + * Arg3: A package containing parameters for the function specified + * by the UUID, revsion ID and functon index. + */ Method (_DSM, 4, Serialized) { - Return (Buffer() { 0 }) + Name (PWR, 0) + If (Arg0 == ToUUID("61788900-c470-42bb-80f0-23a313864593")) { + switch (ToInteger(Arg2)) { + /* + * Function Index: 0 - Standard query + * Return: Bitmask of supported functions + */ + case (0) { + If (Arg1 == 1) { + /* Support all functions */ + Return (Buffer() { 0x07 }) + } + + /* Only support query if unknown revision */ + Return (Buffer() { 0x01 }) + } + + /* + * Function Index: 1 - Query force power state + * Arg3: Empty package + * Return: 0 - if force power is disabled + * 1 - if force power is enabled + */ + case (1) { + Return (PWR) + } + + /* + * Function Index: 2 - Set force power state + * Arg3: A package consisting a single integer + * 0: Turn off power + * 1: Turn on powe + * Return: 0 + */ + case (2) { + CreateDWordField (Arg3, 0, CDW1) + If (CDW1 == PWR) { + /* Already in the state */ + Return (0) + } + + If (CDW1 == 0) { + /* Turn off power to the retimer */ + CTXS(RT_FORCE_PWR) + } ElseIf (CDW1 == 1) { + /* Turn on power to the retimer */ + STXS(RT_FORCE_PWR) + } Else { + Return (0) + } + + PWR = CDW1 + Return (0) + } + + Default { + Return (Buffer() { 0 }) + } + } + } Else { + Return (Buffer() { 0 }) + } }
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44347 )
Change subject: soc/intel/tigerlake: Add USB4 _DSM for retimer firmware upgrade support ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/c/coreboot/+/44347/1/src/soc/intel/tigerlake/acp... File src/soc/intel/tigerlake/acpi/tcss_dma.asl:
https://review.coreboot.org/c/coreboot/+/44347/1/src/soc/intel/tigerlake/acp... PS1, Line 119: * by the UUID, revsion ID and functon index. 'revsion' may be misspelled - perhaps 'revision'?
https://review.coreboot.org/c/coreboot/+/44347/1/src/soc/intel/tigerlake/acp... PS1, Line 119: * by the UUID, revsion ID and functon index. 'functon' may be misspelled - perhaps 'function'?
John Zhao has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44347 )
Change subject: soc/intel/tigerlake: Add USB4 _DSM for retimer firmware upgrade support ......................................................................
Patch Set 2:
(2 comments)
This change is ready for review.
https://review.coreboot.org/c/coreboot/+/44347/1/src/soc/intel/tigerlake/acp... File src/soc/intel/tigerlake/acpi/tcss_dma.asl:
https://review.coreboot.org/c/coreboot/+/44347/1/src/soc/intel/tigerlake/acp... PS1, Line 119: * by the UUID, revsion ID and functon index.
'functon' may be misspelled - perhaps 'function'?
done
https://review.coreboot.org/c/coreboot/+/44347/1/src/soc/intel/tigerlake/acp... PS1, Line 119: * by the UUID, revsion ID and functon index.
'revsion' may be misspelled - perhaps 'revision'?
done