sunxi-6.12: tcon (timing controller), enable HDMI for H616/H618 SOC

Signed-off-by: The-going <48602507+The-going@users.noreply.github.com>
This commit is contained in:
Stephen Graf
2025-02-23 20:37:39 +03:00
committed by Igor
parent ca483bc22b
commit b43219e9ac
3 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
From 86ef31fcb116682d399b9723a7ab66c87e6f2cc5 Mon Sep 17 00:00:00 2001
From: Stephen Graf <stephen.graf@gmail.com>
Date: Tue, 18 Feb 2025 05:12:44 +0000
Subject: add TCON global control reg for pad selection
Signed-off-by: Stephen Graf <stephen.graf@gmail.com>
---
drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 ++++
drivers/gpu/drm/sun4i/sun4i_tcon.h | 1 +
2 files changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
index af67bf2e6e09..88984572f5c5 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
@@ -1308,6 +1308,10 @@ static int sun4i_tcon_bind(struct device *dev, struct device *master,
goto err_free_dclk;
}
+ regmap_update_bits(tcon->regs, SUN4I_TCON_GCTL_REG,
+ SUN4I_TCON_GCTL_PAD_SEL,
+ SUN4I_TCON_GCTL_PAD_SEL);
+
if (tcon->quirks->has_channel_0) {
/*
* If we have an LVDS panel connected to the TCON, we should
diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.h b/drivers/gpu/drm/sun4i/sun4i_tcon.h
index bd4abc90062b..e8d28bad4060 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.h
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.h
@@ -19,6 +19,7 @@
#define SUN4I_TCON_GCTL_REG 0x0
#define SUN4I_TCON_GCTL_TCON_ENABLE BIT(31)
+#define SUN4I_TCON_GCTL_PAD_SEL BIT(1)
#define SUN4I_TCON_GCTL_IOMAP_MASK BIT(0)
#define SUN4I_TCON_GCTL_IOMAP_TCON1 (1 << 0)
#define SUN4I_TCON_GCTL_IOMAP_TCON0 (0 << 0)
--
2.35.3

View File

@@ -286,6 +286,7 @@
patches.drm/drm-sun4i-de33-fmt-add-Display-Engine-3.3-DE33-support.patch
patches.drm/drm-sun4i-de33-csc-add-Display-Engine-3.3-DE33-support.patch
patches.drm/drm-sun4i-add-sun50i-h616-hdmi-phy-support.patch
patches.drm/add-TCON-global-control-reg-for-pad-selection.patch
################################################################################
#

View File

@@ -30,3 +30,4 @@
patches.drm/drm-sun4i-de33-fmt-add-Display-Engine-3.3-DE33-support.patch
patches.drm/drm-sun4i-de33-csc-add-Display-Engine-3.3-DE33-support.patch
patches.drm/drm-sun4i-add-sun50i-h616-hdmi-phy-support.patch
patches.drm/add-TCON-global-control-reg-for-pad-selection.patch