All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] ccu-sun50i-h6: Bump-up DDR0 PLL to 1800MHz
@ 2022-07-10 17:52 ` Roman Stratiienko
  0 siblings, 0 replies; 6+ messages in thread
From: Roman Stratiienko @ 2022-07-10 17:52 UTC (permalink / raw)
  To: samuel
  Cc: mturquette, sboyd, mripard, wens, jernej.skrabec, linux-clk,
	linux-arm-kernel, linux-sunxi, linux-kernel, Roman Stratiienko

While debugging complex animated composition cases  I noticed a glitch
which as it turned-out eventually was caused by lack of memory bandwidth.

I can't find a DRAMC manual to check what input frequency must be
supplied to avoid exceeding the 800MHz LPDDR3 which is installed on
my orangepi3 board. But the system is running stable so far.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
---
 drivers/clk/sunxi-ng/ccu-sun50i-h6.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-h6.c b/drivers/clk/sunxi-ng/ccu-sun50i-h6.c
index 750368a86b8b6..abdde80307993 100644
--- a/drivers/clk/sunxi-ng/ccu-sun50i-h6.c
+++ b/drivers/clk/sunxi-ng/ccu-sun50i-h6.c
@@ -1203,6 +1203,17 @@ static int sun50i_h6_ccu_probe(struct platform_device *pdev)
 	val &= ~GENMASK(3, 0);
 	writel(val, reg + gpu_clk.common.reg);
 
+	/*
+	 * Increase DDR0 PLL from 1488(default) to 1800MHz.
+	 * (DE3.0 require higher memory bandwidth while displaying
+	 * complex composition at 1920x1080@60FPS)
+	 */
+
+	val = readl(reg + SUN50I_H6_PLL_DDR0_REG);
+	val &= ~GENMASK(15, 0);
+	val |= 74 << 8;
+	writel(val, reg + SUN50I_H6_PLL_DDR0_REG);
+
 	/* Enable the lock bits on all PLLs */
 	for (i = 0; i < ARRAY_SIZE(pll_regs); i++) {
 		val = readl(reg + pll_regs[i]);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-07-10 22:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-10 17:52 [RFC] ccu-sun50i-h6: Bump-up DDR0 PLL to 1800MHz Roman Stratiienko
2022-07-10 17:52 ` Roman Stratiienko
2022-07-10 18:47 ` Jernej Škrabec
2022-07-10 18:47   ` Jernej Škrabec
2022-07-10 22:54   ` Andre Przywara
2022-07-10 22:54     ` Andre Przywara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.