* [PATCH V2 0/2] Add Clock and Reset for TCON LCD
@ 2025-02-13 17:22 Chris Morgan
2025-02-13 17:22 ` [PATCH V2 1/2] dt-bindings: clock: sun50i-h616-ccu: Add LCD TCON clk and reset Chris Morgan
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Chris Morgan @ 2025-02-13 17:22 UTC (permalink / raw)
To: linux-sunxi
Cc: devicetree, linux-clk, p.zabel, conor+dt, krzk+dt, robh, samuel,
jernej.skrabec, wens, sboyd, mturquette, ryan, Chris Morgan
From: Chris Morgan <macromorgan@hotmail.com>
Add the required resets and clocks used by the display engine TCON for
LCD output. This is required for LCD output for the DE33 which is
currently pending acceptance into mainline.
Note that while the clock is exposed on the T507, H616, and H700 the
H616 does not expose the LCD controller that requires these clocks.
https://lore.kernel.org/linux-sunxi/67acd970.050a0220.1eb03a.101e@mx.google.com/
Changes since V1:
- Updated commit message to note that the H616 has this clock, but not
the LCD controller that uses this clock.
Chris Morgan (2):
dt-bindings: clock: sun50i-h616-ccu: Add LCD TCON clk and reset
clk: sunxi-ng: h616: Add clock/reset for LCD TCON
drivers/clk/sunxi-ng/ccu-sun50i-h616.c | 24 +++++++++++++++++++++
drivers/clk/sunxi-ng/ccu-sun50i-h616.h | 2 +-
include/dt-bindings/clock/sun50i-h616-ccu.h | 4 ++++
include/dt-bindings/reset/sun50i-h616-ccu.h | 2 ++
4 files changed, 31 insertions(+), 1 deletion(-)
--
2.43.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH V2 1/2] dt-bindings: clock: sun50i-h616-ccu: Add LCD TCON clk and reset
2025-02-13 17:22 [PATCH V2 0/2] Add Clock and Reset for TCON LCD Chris Morgan
@ 2025-02-13 17:22 ` Chris Morgan
2025-02-13 17:22 ` [PATCH V2 2/2] clk: sunxi-ng: h616: Add clock/reset for LCD TCON Chris Morgan
2025-02-22 13:36 ` (subset) [PATCH V2 0/2] Add Clock and Reset for TCON LCD Chen-Yu Tsai
2 siblings, 0 replies; 6+ messages in thread
From: Chris Morgan @ 2025-02-13 17:22 UTC (permalink / raw)
To: linux-sunxi
Cc: devicetree, linux-clk, p.zabel, conor+dt, krzk+dt, robh, samuel,
jernej.skrabec, wens, sboyd, mturquette, ryan, Chris Morgan,
Krzysztof Kozlowski
From: Chris Morgan <macromorgan@hotmail.com>
Add the required clock and reset bindings for the LCD TCON.
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
include/dt-bindings/clock/sun50i-h616-ccu.h | 4 ++++
include/dt-bindings/reset/sun50i-h616-ccu.h | 2 ++
2 files changed, 6 insertions(+)
diff --git a/include/dt-bindings/clock/sun50i-h616-ccu.h b/include/dt-bindings/clock/sun50i-h616-ccu.h
index ebb146ab7f8c..6889405f9fec 100644
--- a/include/dt-bindings/clock/sun50i-h616-ccu.h
+++ b/include/dt-bindings/clock/sun50i-h616-ccu.h
@@ -113,5 +113,9 @@
#define CLK_BUS_HDCP 127
#define CLK_PLL_SYSTEM_32K 128
#define CLK_BUS_GPADC 129
+#define CLK_TCON_LCD0 130
+#define CLK_BUS_TCON_LCD0 131
+#define CLK_TCON_LCD1 132
+#define CLK_BUS_TCON_LCD1 133
#endif /* _DT_BINDINGS_CLK_SUN50I_H616_H_ */
diff --git a/include/dt-bindings/reset/sun50i-h616-ccu.h b/include/dt-bindings/reset/sun50i-h616-ccu.h
index ed177c04afdd..81b1eba2a7f7 100644
--- a/include/dt-bindings/reset/sun50i-h616-ccu.h
+++ b/include/dt-bindings/reset/sun50i-h616-ccu.h
@@ -67,5 +67,7 @@
#define RST_BUS_HDCP 58
#define RST_BUS_KEYADC 59
#define RST_BUS_GPADC 60
+#define RST_BUS_TCON_LCD0 61
+#define RST_BUS_TCON_LCD1 62
#endif /* _DT_BINDINGS_RESET_SUN50I_H616_H_ */
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH V2 2/2] clk: sunxi-ng: h616: Add clock/reset for LCD TCON
2025-02-13 17:22 [PATCH V2 0/2] Add Clock and Reset for TCON LCD Chris Morgan
2025-02-13 17:22 ` [PATCH V2 1/2] dt-bindings: clock: sun50i-h616-ccu: Add LCD TCON clk and reset Chris Morgan
@ 2025-02-13 17:22 ` Chris Morgan
2025-02-16 10:02 ` Ryan Walklin
2025-02-20 16:52 ` Jernej Škrabec
2025-02-22 13:36 ` (subset) [PATCH V2 0/2] Add Clock and Reset for TCON LCD Chen-Yu Tsai
2 siblings, 2 replies; 6+ messages in thread
From: Chris Morgan @ 2025-02-13 17:22 UTC (permalink / raw)
To: linux-sunxi
Cc: devicetree, linux-clk, p.zabel, conor+dt, krzk+dt, robh, samuel,
jernej.skrabec, wens, sboyd, mturquette, ryan, Chris Morgan,
Andre Przywara
From: Chris Morgan <macromorgan@hotmail.com>
Add the required clock and reset which is used for the LCD TCON. Please
note that these clocks are exposed on the T507, H616, and H700; however
the H616 does not expose an LCD controller for which these clocks are
needed.
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
---
drivers/clk/sunxi-ng/ccu-sun50i-h616.c | 24 ++++++++++++++++++++++++
drivers/clk/sunxi-ng/ccu-sun50i-h616.h | 2 +-
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-h616.c b/drivers/clk/sunxi-ng/ccu-sun50i-h616.c
index 190816c35da9..40ab6873b797 100644
--- a/drivers/clk/sunxi-ng/ccu-sun50i-h616.c
+++ b/drivers/clk/sunxi-ng/ccu-sun50i-h616.c
@@ -645,6 +645,20 @@ static const char * const tcon_tv_parents[] = { "pll-video0",
"pll-video0-4x",
"pll-video1",
"pll-video1-4x" };
+static SUNXI_CCU_MUX_WITH_GATE(tcon_lcd0_clk, "tcon-lcd0",
+ tcon_tv_parents, 0xb60,
+ 24, 3, /* mux */
+ BIT(31), /* gate */
+ CLK_SET_RATE_PARENT);
+static SUNXI_CCU_MUX_WITH_GATE(tcon_lcd1_clk, "tcon-lcd1",
+ tcon_tv_parents, 0xb64,
+ 24, 3, /* mux */
+ BIT(31), /* gate */
+ CLK_SET_RATE_PARENT);
+static SUNXI_CCU_GATE(bus_tcon_lcd0_clk, "bus-tcon-lcd0", "ahb3",
+ 0xb7c, BIT(0), 0);
+static SUNXI_CCU_GATE(bus_tcon_lcd1_clk, "bus-tcon-lcd1", "ahb3",
+ 0xb7c, BIT(1), 0);
static SUNXI_CCU_MP_WITH_MUX_GATE(tcon_tv0_clk, "tcon-tv0",
tcon_tv_parents, 0xb80,
0, 4, /* M */
@@ -855,8 +869,12 @@ static struct ccu_common *sun50i_h616_ccu_clks[] = {
&hdmi_cec_clk.common,
&bus_hdmi_clk.common,
&bus_tcon_top_clk.common,
+ &tcon_lcd0_clk.common,
+ &tcon_lcd1_clk.common,
&tcon_tv0_clk.common,
&tcon_tv1_clk.common,
+ &bus_tcon_lcd0_clk.common,
+ &bus_tcon_lcd1_clk.common,
&bus_tcon_tv0_clk.common,
&bus_tcon_tv1_clk.common,
&tve0_clk.common,
@@ -989,8 +1007,12 @@ static struct clk_hw_onecell_data sun50i_h616_hw_clks = {
[CLK_HDMI_CEC] = &hdmi_cec_clk.common.hw,
[CLK_BUS_HDMI] = &bus_hdmi_clk.common.hw,
[CLK_BUS_TCON_TOP] = &bus_tcon_top_clk.common.hw,
+ [CLK_TCON_LCD0] = &tcon_lcd0_clk.common.hw,
+ [CLK_TCON_LCD1] = &tcon_lcd1_clk.common.hw,
[CLK_TCON_TV0] = &tcon_tv0_clk.common.hw,
[CLK_TCON_TV1] = &tcon_tv1_clk.common.hw,
+ [CLK_BUS_TCON_LCD0] = &bus_tcon_lcd0_clk.common.hw,
+ [CLK_BUS_TCON_LCD1] = &bus_tcon_lcd1_clk.common.hw,
[CLK_BUS_TCON_TV0] = &bus_tcon_tv0_clk.common.hw,
[CLK_BUS_TCON_TV1] = &bus_tcon_tv1_clk.common.hw,
[CLK_TVE0] = &tve0_clk.common.hw,
@@ -1062,6 +1084,8 @@ static const struct ccu_reset_map sun50i_h616_ccu_resets[] = {
[RST_BUS_HDMI] = { 0xb1c, BIT(16) },
[RST_BUS_HDMI_SUB] = { 0xb1c, BIT(17) },
[RST_BUS_TCON_TOP] = { 0xb5c, BIT(16) },
+ [RST_BUS_TCON_LCD0] = { 0xb7c, BIT(16) },
+ [RST_BUS_TCON_LCD1] = { 0xb7c, BIT(17) },
[RST_BUS_TCON_TV0] = { 0xb9c, BIT(16) },
[RST_BUS_TCON_TV1] = { 0xb9c, BIT(17) },
[RST_BUS_TVE_TOP] = { 0xbbc, BIT(16) },
diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-h616.h b/drivers/clk/sunxi-ng/ccu-sun50i-h616.h
index a75803b49f6a..7056f293a8e0 100644
--- a/drivers/clk/sunxi-ng/ccu-sun50i-h616.h
+++ b/drivers/clk/sunxi-ng/ccu-sun50i-h616.h
@@ -51,6 +51,6 @@
#define CLK_BUS_DRAM 56
-#define CLK_NUMBER (CLK_BUS_GPADC + 1)
+#define CLK_NUMBER (CLK_BUS_TCON_LCD1 + 1)
#endif /* _CCU_SUN50I_H616_H_ */
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH V2 2/2] clk: sunxi-ng: h616: Add clock/reset for LCD TCON
2025-02-13 17:22 ` [PATCH V2 2/2] clk: sunxi-ng: h616: Add clock/reset for LCD TCON Chris Morgan
@ 2025-02-16 10:02 ` Ryan Walklin
2025-02-20 16:52 ` Jernej Škrabec
1 sibling, 0 replies; 6+ messages in thread
From: Ryan Walklin @ 2025-02-16 10:02 UTC (permalink / raw)
To: Chris Morgan, linux-sunxi
Cc: devicetree, linux-clk, p.zabel, Conor Dooley, Krzysztof Kozlowski,
Rob Herring, Samuel Holland, Jernej Skrabec, Chen-Yu Tsai,
Stephen Boyd, Michael Turquette, Chris Morgan, Andre Przywara
On Fri, 14 Feb 2025, at 6:22 AM, Chris Morgan wrote:
> From: Chris Morgan <macromorgan@hotmail.com>
>
> Add the required clock and reset which is used for the LCD TCON. Please
> note that these clocks are exposed on the T507, H616, and H700; however
> the H616 does not expose an LCD controller for which these clocks are
> needed.
>
> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Hi Chris,
Thanks for these! Can confirm that these two patches along with the recently posted DE33 [1] and H616 DT patch series [2] allow LCD display output on the RG35XX.
Tested-by: Ryan Walklin <ryan@testtoast.com>
Regards,
Ryan
1. https://lore.kernel.org/linux-sunxi/20250216085432.6373-2-ryan@testtoast.com
2. https://lore.kernel.org/linux-sunxi/20250216092827.15444-1-ryan@testtoast.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V2 2/2] clk: sunxi-ng: h616: Add clock/reset for LCD TCON
2025-02-13 17:22 ` [PATCH V2 2/2] clk: sunxi-ng: h616: Add clock/reset for LCD TCON Chris Morgan
2025-02-16 10:02 ` Ryan Walklin
@ 2025-02-20 16:52 ` Jernej Škrabec
1 sibling, 0 replies; 6+ messages in thread
From: Jernej Škrabec @ 2025-02-20 16:52 UTC (permalink / raw)
To: linux-sunxi, Chris Morgan
Cc: devicetree, linux-clk, p.zabel, conor+dt, krzk+dt, robh, samuel,
wens, sboyd, mturquette, ryan, Chris Morgan, Andre Przywara
Dne četrtek, 13. februar 2025 ob 18:22:48 Srednjeevropski standardni čas je Chris Morgan napisal(a):
> From: Chris Morgan <macromorgan@hotmail.com>
>
> Add the required clock and reset which is used for the LCD TCON. Please
> note that these clocks are exposed on the T507, H616, and H700; however
> the H616 does not expose an LCD controller for which these clocks are
> needed.
>
> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Actually, also LVDS reset is missing, but it can be introduced with follow
up patch.
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Best regards,
Jernej
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: (subset) [PATCH V2 0/2] Add Clock and Reset for TCON LCD
2025-02-13 17:22 [PATCH V2 0/2] Add Clock and Reset for TCON LCD Chris Morgan
2025-02-13 17:22 ` [PATCH V2 1/2] dt-bindings: clock: sun50i-h616-ccu: Add LCD TCON clk and reset Chris Morgan
2025-02-13 17:22 ` [PATCH V2 2/2] clk: sunxi-ng: h616: Add clock/reset for LCD TCON Chris Morgan
@ 2025-02-22 13:36 ` Chen-Yu Tsai
2 siblings, 0 replies; 6+ messages in thread
From: Chen-Yu Tsai @ 2025-02-22 13:36 UTC (permalink / raw)
To: linux-sunxi, Chris Morgan
Cc: devicetree, linux-clk, p.zabel, conor+dt, krzk+dt, robh, samuel,
jernej.skrabec, sboyd, mturquette, ryan, Chris Morgan
On Thu, 13 Feb 2025 11:22:46 -0600, Chris Morgan wrote:
> From: Chris Morgan <macromorgan@hotmail.com>
>
> Add the required resets and clocks used by the display engine TCON for
> LCD output. This is required for LCD output for the DE33 which is
> currently pending acceptance into mainline.
>
> Note that while the clock is exposed on the T507, H616, and H700 the
> H616 does not expose the LCD controller that requires these clocks.
>
> [...]
Applied to clk-for-6.15 in git@github.com:linux-sunxi/linux-sunxi.git, thanks!
[2/2] clk: sunxi-ng: h616: Add clock/reset for LCD TCON
commit: 730feeaea72f1260548e57d35dd49603cd86a7e4
Best regards,
--
Chen-Yu Tsai <wens@csie.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-02-22 13:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-13 17:22 [PATCH V2 0/2] Add Clock and Reset for TCON LCD Chris Morgan
2025-02-13 17:22 ` [PATCH V2 1/2] dt-bindings: clock: sun50i-h616-ccu: Add LCD TCON clk and reset Chris Morgan
2025-02-13 17:22 ` [PATCH V2 2/2] clk: sunxi-ng: h616: Add clock/reset for LCD TCON Chris Morgan
2025-02-16 10:02 ` Ryan Walklin
2025-02-20 16:52 ` Jernej Škrabec
2025-02-22 13:36 ` (subset) [PATCH V2 0/2] Add Clock and Reset for TCON LCD Chen-Yu Tsai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).