Add support to switch LSPCON modes
LSPCON is a level shifter and protocol converter chip. It is principally
used to convert DisplayPort into HDMI 2.0, since some Intel iGPUs do not
have native HDMI 2.0 support. The chip defaults to LS mode, in which the
display engine has to generate an HDMI-protocol signal, which the LSPCON
converts from DisplayPort signal levels to HDMI signal levels.
Add code to detect LSPCON chips and put them in protocol-converter mode.
This way, the LSPCON behaves like a regular DisplayPort sink. This needs
to be done before any DPCD accesses, because the LSPCON does not respond
to DPCD accesses in level-shifter mode.
Tested on Purism Librem Mini v1 (WHL-U), HDMI port can now light up.
Change-Id: Idfa9bdff47a6591000cd5092d64a4cd4f8dbdc8d
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/libgfxinit/+/51133
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
diff --git a/common/Makefile.inc b/common/Makefile.inc
index b1ed074..2d18703 100644
--- a/common/Makefile.inc
+++ b/common/Makefile.inc
@@ -1,6 +1,8 @@
gfxinit-y += hw-gfx-dp_aux_ch.adb
gfxinit-y += hw-gfx-dp_aux_ch.ads
gfxinit-y += hw-gfx-dp_defs.ads
+gfxinit-y += hw-gfx-dp_dual_mode.adb
+gfxinit-y += hw-gfx-dp_dual_mode.ads
gfxinit-y += hw-gfx-dp_info.adb
gfxinit-y += hw-gfx-dp_info.ads
gfxinit-y += hw-gfx-dp_training.adb
@@ -17,6 +19,7 @@
gfxinit-y += hw-gfx-gma-dp_aux_ch.ads
gfxinit-y += hw-gfx-gma-dp_aux_request.adb
gfxinit-y += hw-gfx-gma-dp_aux_request.ads
+gfxinit-y += hw-gfx-gma-dp_dual_mode.ads
gfxinit-y += hw-gfx-gma-dp_info.ads
gfxinit-y += hw-gfx-gma-i2c.adb
gfxinit-y += hw-gfx-gma-i2c.ads