From: Roman Stratiienko <r.stratiienko@gmail.com>
To: samuel@sholland.org
Cc: mturquette@baylibre.com, sboyd@kernel.org, mripard@kernel.org,
wens@csie.org, jernej.skrabec@gmail.com,
linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org,
Roman Stratiienko <r.stratiienko@gmail.com>
Subject: [RFC] ccu-sun50i-h6: Bump-up DDR0 PLL to 1800MHz
Date: Sun, 10 Jul 2022 20:52:14 +0300 [thread overview]
Message-ID: <20220710175214.544748-1-r.stratiienko@gmail.com> (raw)
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
next reply other threads:[~2022-07-10 17:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-10 17:52 Roman Stratiienko [this message]
2022-07-10 18:47 ` [RFC] ccu-sun50i-h6: Bump-up DDR0 PLL to 1800MHz Jernej Škrabec
2022-07-10 22:54 ` Andre Przywara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220710175214.544748-1-r.stratiienko@gmail.com \
--to=r.stratiienko@gmail.com \
--cc=jernej.skrabec@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=mripard@kernel.org \
--cc=mturquette@baylibre.com \
--cc=samuel@sholland.org \
--cc=sboyd@kernel.org \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox