gma: Re-structure TC port types
The `USBC1_DP/_HDMI' names did not draw an accurate picture. If
they are implemented as legacy ports (for HDMI always the case),
they don't show as USBC in schematics, the OS or anywhere else.
We also couldn't tell if a `USBCx_DP' was implemented as legacy
or USB-C.
We split them by actual, physical connector type now: HDMI, DP,
and USBC (for DP-Alt mode). The `_TCx' suffixes should provide
an idea where they are connected to a socket or SoC.
Tiger Lake and seemingly Alder Lake use the first 4 TC register
sets only. Hence we keep only 4 respective TC ports for now.
Also, as any of the 3 Combo-PHYs (DP1..3) can be used as eDP, we
map that to the port, that is used with the first set of panel-
control lines. This should hopefully match most board designs.
Change-Id: If9755fe8e1f9252e6e77e22fe910964ad3c3743b
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.sourcearcade.org/c/libgfxinit/+/456
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: Nico Huber <nico.h@gmx.de>
diff --git a/common/hw-gfx-gma.ads b/common/hw-gfx-gma.ads
index c05f4f1..4771dbe 100644
--- a/common/hw-gfx-gma.ads
+++ b/common/hw-gfx-gma.ads
@@ -72,27 +72,28 @@
DP1,
DP2,
DP3,
- HDMI1, -- or DVI
- HDMI2, -- or DVI
- HDMI3, -- or DVI
+ DP_TC1, -- DP_TC ports use Type-C lanes to
+ DP_TC2, -- implement physical DP or DP++ ports.
+ DP_TC3,
+ DP_TC4,
+ HDMI1, -- HDMI ports share lanes with their DP siblings.
+ HDMI2, -- They can also be implemented as DVI.
+ HDMI3,
+ HDMI_TC1, -- HDMI_TC use Type-C lanes to implement
+ HDMI_TC2, -- physical HDMI, DVI or the HDMI part of DP++.
+ HDMI_TC3,
+ HDMI_TC4,
Analog,
- USBC1_DP,
- USBC2_DP,
- USBC3_DP,
- USBC4_DP,
- USBC5_DP,
- USBC6_DP,
- USBC1_HDMI,
- USBC2_HDMI,
- USBC3_HDMI,
- USBC4_HDMI,
- USBC5_HDMI,
- USBC6_HDMI);
+ USBC1, -- Type-C lanes used to implement
+ USBC2, -- physical USB-C ports with DP Alt Mode.
+ USBC3,
+ USBC4);
subtype Active_Port_Type is Port_Type
range Port_Type'Succ (Disabled) .. Port_Type'Last;
subtype Internal_Port_Type is Port_Type range LVDS .. eDP;
- subtype Combo_Port_Type is Port_Type range DP1 .. HDMI3;
- subtype USBC_Port_Type is Port_Type range USBC1_DP .. USBC6_HDMI;
+ subtype Physical_DP_Ports is Port_Type range DP1 .. DP_TC4;
+ subtype Physical_HDMI_Ports is Port_Type range HDMI1 .. HDMI_TC4;
+ subtype Physical_USBC_Ports is Port_Type range USBC1 .. USBC4;
type Cursor_Mode is (No_Cursor, ARGB_Cursor);
type Cursor_Size is (Cursor_64x64, Cursor_128x128, Cursor_256x256);