From: Raghav Sharma <raghav.s@samsung.com>
To: krzk@kernel.org, s.nawrocki@samsung.com, cw00.choi@samsung.com,
peter.griffin@linaro.org, alim.akhtar@samsung.com,
sboyd@kernel.org, bmasney+clk@redhat.com,
jbrunet+clk@baylibre.com, robh@kernel.org, conor+dt@kernel.org,
raghav.s@samsung.com
Cc: linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, is.gandhi@samsung.com,
ts.amit@samsung.com, pokala.reddy@samsung.com
Subject: [PATCH v4 05/14] clk: samsung: clk-pll: Add support for pll_4313
Date: Thu, 3 Dec 2026 20:40:37 +0530 [thread overview]
Message-ID: <20261203151046.1562399-6-raghav.s@samsung.com> (raw)
In-Reply-To: <20261203151046.1562399-1-raghav.s@samsung.com>
From: Alim Akhtar <alim.akhtar@samsung.com>
PLLs 4313 are found in the Exynos8855 SoC and it is similar
to pll_531x except for PLL_CON8 offset, so re-using code for
pll_4313.
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Raghav Sharma <raghav.s@samsung.com>
---
drivers/clk/samsung/clk-pll.c | 11 ++++++++++-
drivers/clk/samsung/clk-pll.h | 1 +
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/samsung/clk-pll.c b/drivers/clk/samsung/clk-pll.c
index 3d837bd74355..7b0756127306 100644
--- a/drivers/clk/samsung/clk-pll.c
+++ b/drivers/clk/samsung/clk-pll.c
@@ -1306,7 +1306,15 @@ static unsigned long samsung_pll531x_recalc_rate(struct clk_hw *hw,
u64 mdiv, fout = parent_rate;
pll_con0 = readl_relaxed(pll->con_reg);
- pll_con8 = readl_relaxed(pll->con_reg + 20);
+ if (pll->type == pll_4313) {
+ /* Offset for PLL_CON8 which hold FDIV different for PLL_4313
+ * which is PLL_LOCKTIME_OFFSET - 0x4
+ */
+ pll_con8 = readl_relaxed(pll->lock_reg - 4);
+ } else {
+ pll_con8 = readl_relaxed(pll->con_reg + 20);
+ }
+
mdiv = (pll_con0 >> PLL531X_MDIV_SHIFT) & PLL531X_MDIV_MASK;
pdiv = (pll_con0 >> PLL531X_PDIV_SHIFT) & PLL531X_PDIV_MASK;
sdiv = (pll_con0 >> PLL531X_SDIV_SHIFT) & PLL531X_SDIV_MASK;
@@ -1729,6 +1737,7 @@ static void __init _samsung_clk_register_pll(struct samsung_clk_provider *ctx,
case pll_309:
case pll_531x:
case pll_4311:
+ case pll_4313:
init.ops = &samsung_pll531x_clk_ops;
break;
case pll_1031x:
diff --git a/drivers/clk/samsung/clk-pll.h b/drivers/clk/samsung/clk-pll.h
index 2457cf47c109..4825e1f5b9db 100644
--- a/drivers/clk/samsung/clk-pll.h
+++ b/drivers/clk/samsung/clk-pll.h
@@ -49,6 +49,7 @@ enum samsung_pll_type {
pll_0718x,
pll_0732x,
pll_4311,
+ pll_4313,
pll_1017x,
pll_1031x,
pll_a9fracm,
--
2.34.1
next prev parent reply other threads:[~2026-12-03 15:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20261203145310epcas5p19b1f51b9777ac211d368dff8022d0497@epcas5p1.samsung.com>
2026-12-03 15:10 ` [PATCH v4 00/14] Add clock support for Exynos8855 SoC Raghav Sharma
[not found] ` <CGME20261203145313epcas5p3accdfc9b0ef003ebf6d609ee5d370993@epcas5p3.samsung.com>
2026-12-03 15:10 ` [PATCH v4 01/14] dt-bindings: clock: exynos8855: add top & peric clock definitions Raghav Sharma
[not found] ` <CGME20261203145317epcas5p257fe406f5042dd691870b016cf6185c3@epcas5p2.samsung.com>
2026-12-03 15:10 ` [PATCH v4 02/14] dt-bindings: clock: exynos8855: add peris " Raghav Sharma
[not found] ` <CGME20261203145319epcas5p3ed60b864c3b73421c79dec17243e9a87@epcas5p3.samsung.com>
2026-12-03 15:10 ` [PATCH v4 03/14] dt-bindings: clock: exynos8855: add hsi " Raghav Sharma
[not found] ` <CGME20261203145322epcas5p36e801a7df36ff9031d57cd259ac777ae@epcas5p3.samsung.com>
2026-12-03 15:10 ` [PATCH v4 04/14] dt-bindings: clock: exynos8855: add usb " Raghav Sharma
[not found] ` <CGME20261203145325epcas5p4cbe000c2566285b42739adc780ed2812@epcas5p4.samsung.com>
2026-12-03 15:10 ` Raghav Sharma [this message]
[not found] ` <CGME20261203145328epcas5p4c699a3fee113e30710e551324ba255c5@epcas5p4.samsung.com>
2026-12-03 15:10 ` [PATCH v4 06/14] clk: samsung: exynos8855: add block top clock support Raghav Sharma
[not found] ` <CGME20261203145330epcas5p332fdabee390cab483d23aa1a83ef5855@epcas5p3.samsung.com>
2026-12-03 15:10 ` [PATCH v4 07/14] clk: samsung: exynos8855: add block peric clock Raghav Sharma
[not found] ` <CGME20261203145333epcas5p350dec97f0172073655b88ad9b9d5a4a8@epcas5p3.samsung.com>
2026-12-03 15:10 ` [PATCH v4 08/14] clk: samsung: exynos8855: add block peris clock support Raghav Sharma
[not found] ` <CGME20261203145336epcas5p15df887955fa75c8fa2d41fc0790703e2@epcas5p1.samsung.com>
2026-12-03 15:10 ` [PATCH v4 09/14] clk: samsung: exynos8855: add block hsi " Raghav Sharma
[not found] ` <CGME20261203145339epcas5p27cf8fb949b914b019a1ea9659814497b@epcas5p2.samsung.com>
2026-12-03 15:10 ` [PATCH v4 10/14] clk: samsung: exynos8855: add block usb " Raghav Sharma
[not found] ` <CGME20261203145342epcas5p33d1d376a2aaa484a69fc80cb8b05402a@epcas5p3.samsung.com>
2026-12-03 15:10 ` [PATCH v4 11/14] arm64: dts: exynos8855: add cmu_top & cmu_peric clock DT nodes Raghav Sharma
[not found] ` <CGME20261203145344epcas5p4fb7c062128062bc1c74ac2db5f095878@epcas5p4.samsung.com>
2026-12-03 15:10 ` [PATCH v4 12/14] arm64: dts: exynos8855: add cmu_peris " Raghav Sharma
[not found] ` <CGME20261203145347epcas5p4eafb659b5f90098ad8f6c2f1658c838a@epcas5p4.samsung.com>
2026-12-03 15:10 ` [PATCH v4 13/14] arm64: dts: exynos8855: add cmu_hsi " Raghav Sharma
[not found] ` <CGME20261203145350epcas5p2944fcf2b928542251af44998ec9e8f55@epcas5p2.samsung.com>
2026-12-03 15:10 ` [PATCH v4 14/14] arm64: dts: exynos8855: add cmu_usb " Raghav Sharma
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=20261203151046.1562399-6-raghav.s@samsung.com \
--to=raghav.s@samsung.com \
--cc=alim.akhtar@samsung.com \
--cc=bmasney+clk@redhat.com \
--cc=conor+dt@kernel.org \
--cc=cw00.choi@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=is.gandhi@samsung.com \
--cc=jbrunet+clk@baylibre.com \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=peter.griffin@linaro.org \
--cc=pokala.reddy@samsung.com \
--cc=robh@kernel.org \
--cc=s.nawrocki@samsung.com \
--cc=sboyd@kernel.org \
--cc=ts.amit@samsung.com \
/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
all inboxes | Powered by JetHome®