gma adl: Add missing Alder Lake TC bits
Add some missing ADL-P handling and workarounds for TC ports.
* Ownership is handled in DDI_BUF_CTL (Need_TC_PHY_Ownership).
* Additional "Loadgen" selection is needed in DKL PHY
configuration (Need_TC_Loadgen_Select).
* Explicit blocking of TC cold state is not needed (Block_TC_Cold).
* A workaround is needed to avoid PHYs hanging when switching from
TBT mode to DP-alt/legacy mode (Need_TBT_DP_Alt_Switch_Wa).
This is based on work by several authors that was originally
squashed into another commit:
https://review.coreboot.org/c/libgfxinit/+/67801/
Change-Id: I32fd558c27f4f9658aea799f1b6c679be4d31feb
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/libgfxinit/+/507
Reviewed-by: Thomas Heijligen <src@posteo.de>
Tested-by: Ada SPARK <gnatbot@sourcearcade.org>
diff --git a/common/tigerlake/hw-gfx-gma-port_detect.adb b/common/tigerlake/hw-gfx-gma-port_detect.adb
index 9c8c27b..3e9c605 100644
--- a/common/tigerlake/hw-gfx-gma-port_detect.adb
+++ b/common/tigerlake/hw-gfx-gma-port_detect.adb
@@ -117,10 +117,12 @@
-- In order to avoid keeping track of the state and constantly
-- blocking and unblocking, we just block it once at the beginning
-- and leave it that way.
- Connectors.TC.TC_Cold_Request (Connectors.TC.Block, Success);
- if not Success then
- Debug.Put_Line ("Failed to block TCCOLD, Type-C will not work!");
- return;
+ if Config.Block_TC_Cold then
+ Connectors.TC.TC_Cold_Request (Connectors.TC.Block, Success);
+ if not Success then
+ Debug.Put_Line ("Failed to block TCCOLD, Type-C will not work!");
+ return;
+ end if;
end if;
end Initialize;