From: Alexander Shiyan <eagle.alexander923@gmail.com>
To: barebox@lists.infradead.org
Cc: Alexander Shiyan <eagle.alexander923@gmail.com>
Subject: [PATCH 4/4] clk: rockchip: Return twice the configured rate for pll_rk3588_ddr
Date: Fri, 4 Dec 2026 15:34:58 +0300 [thread overview]
Message-ID: <20261204123458.3787582-5-eagle.alexander923@gmail.com> (raw)
In-Reply-To: <20261204123458.3787582-1-eagle.alexander923@gmail.com>
The RK3576 PPLL is registered as pll_rk3588_ddr, which shares the RK3588
register layout but runs at twice the configured rate. Barebox enabled
the type for the ops selection, yet recalc_rate still returned the
unmodified value, so PPLL consumers, including the PCIe and MPHY reference
dividers, saw half of the real clock.
Multiply the recalculated rate by two for this PLL type.
Ported from Linux commit e781bffc2967 ("clk: rockchip: Add new pll type
pll_rk3588_ddr").
Fixes: 81b2c56c7e9d ("ARM: Initial support for Rockchip RK3576")
Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
---
drivers/clk/rockchip/clk-pll.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/rockchip/clk-pll.c b/drivers/clk/rockchip/clk-pll.c
index 1268ec0589..77012f795e 100644
--- a/drivers/clk/rockchip/clk-pll.c
+++ b/drivers/clk/rockchip/clk-pll.c
@@ -923,7 +923,10 @@ static unsigned long rockchip_rk3588_pll_recalc_rate(struct clk_hw *hw, unsigned
}
rate64 = rate64 >> cur.s;
- return (unsigned long)rate64;
+ if (pll->type == pll_rk3588_ddr)
+ return (unsigned long)rate64 * 2;
+ else
+ return (unsigned long)rate64;
}
static int rockchip_rk3588_pll_set_params(struct rockchip_clk_pll *pll,
--
2.56.1
prev parent reply other threads:[~2026-12-04 12:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 12:34 [PATCH 0/4] clk: rockchip: Fix RK3588/RK3576 fractional PLL handling Alexander Shiyan
2026-12-04 12:34 ` [PATCH 1/4] clk: rockchip: Fix the fractional part denominator on RK3588/RK3576 PLLs Alexander Shiyan
2026-12-04 12:34 ` [PATCH 2/4] clk: rockchip: Treat fractional PLL coefficient as two's complement Alexander Shiyan
2026-12-04 12:34 ` [PATCH 3/4] clk: rockchip: Use two's complement coefficients in RK3588/RK3576 PLL tables Alexander Shiyan
2026-12-04 12:34 ` Alexander Shiyan [this message]
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=20261204123458.3787582-5-eagle.alexander923@gmail.com \
--to=eagle.alexander923@gmail.com \
--cc=barebox@lists.infradead.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 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.