[PATCH 05/11] drm/sun4i: tcon-top: Route LCD TCONs to the LCD pins

From: Jernej Skrabec

Date: Thu Nov 26 2026 - 16:45:03 EST


TCON TOP selects whether the LCD pins are driven by TCON LCD or TCON TV.
The driver never programs that and relies on the reset value, which
selects TCON LCD. Since the reset is only deasserted, a different value
set by the bootloader would survive and LCD output wouldn't reach the
pins.

Select TCON LCD explicitly, like the vendor driver does. Nothing in the
driver uses TCON TV for the LCD pins.

Signed-off-by: Jernej Skrabec <jernej.skrabec@xxxxxxxxx>
---
drivers/gpu/drm/sun4i/sun8i_tcon_top.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/sun4i/sun8i_tcon_top.c b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c
index 5ea55a2844a7..c7d03c37fd6e 100644
--- a/drivers/gpu/drm/sun4i/sun8i_tcon_top.c
+++ b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c
@@ -226,6 +226,8 @@ static int sun8i_tcon_top_bind(struct device *dev, struct device *master,
goto err_assert_reset;
}

+ /* Route LCD TCONs, not TV TCONs, to the LCD pins */
+ writel(0, regs + TCON_TOP_TCON_TV_SETUP_REG);
writel(0, regs + TCON_TOP_PORT_SEL_REG);
writel(0, regs + TCON_TOP_GATE_SRC_REG);

--
2.43.0