mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "raghav.s" <raghav.s@samsung.com>
To: krzk@kernel.org, s.nawrocki@samsung.com, cw00.choi@samsung.com,
	peter.griffin@linaro.org, alim.akhtar@samsung.com,
	mturquette@baylibre.com, sboyd@kernel.org, bmasney@redhat.com,
	robh@kernel.org, conor+dt@kernel.org
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, hajun.sung@samsung.com,
	raghav.s@samsung.com, is.gandhi@samsung.com, ts.amit@samsung.com,
	pokala.reddy@samsung.com
Subject: [PATCH 01/13] clk: samsung: clk-pll: Add supoprt for pll_4313
Date: Tue, 28 Jul 2026 17:40:59 +0530	[thread overview]
Message-ID: <20260728121111.2077860-2-raghav.s@samsung.com> (raw)
In-Reply-To: <20260728121111.2077860-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 CON8 offset, so re-using code for
pll_4313

Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: raghav.s <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 e74552846ba3..b7605aa3c647 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;
@@ -1728,6 +1736,7 @@ static void __init _samsung_clk_register_pll(struct samsung_clk_provider *ctx,
 		break;
 	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 d6eb3246611b..ad47dd7b3ed2 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


  parent reply	other threads:[~2026-07-28 11:52 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20260728115239epcas5p218bc69194dc55a5087c363816396cd5e@epcas5p2.samsung.com>
2026-07-28 12:10 ` [PATCH 00/13] Add clock support for Exynos8855 SoC raghav.s
     [not found]   ` <CGME20260728115245epcas5p2ffe1f7c31c6dd85161445d61a94e82e6@epcas5p2.samsung.com>
2026-07-28 12:10     ` raghav.s [this message]
2026-07-28 11:58       ` [PATCH 01/13] clk: samsung: clk-pll: Add supoprt for pll_4313 Krzysztof Kozlowski
2026-07-31  6:28         ` Raghav Sharma
     [not found]   ` <CGME20260728115248epcas5p2862d181151a8635b63d4dd8d174fd7a3@epcas5p2.samsung.com>
2026-07-28 12:11     ` [PATCH 02/13] dt-bindings: clock: exynos8855: add top & peric clock definitions raghav.s
     [not found]   ` <CGME20260728115251epcas5p19aaf5fc01e0f847bc2adcec67bebda3a@epcas5p1.samsung.com>
2026-07-28 12:11     ` [PATCH 03/13] clk: samsung: exynos8855: add block top and peric clock support raghav.s
2026-07-29 12:38       ` Uwe Kleine-König
2026-07-31  6:29         ` Raghav Sharma
2026-08-07 16:37       ` Peter Griffin
     [not found]   ` <CGME20260728115256epcas5p38cbcfe68218d08301d237705388e6e62@epcas5p3.samsung.com>
2026-07-28 12:11     ` [PATCH 04/13] arm64: dts: exynos8855: add cmu_top & cmu_peric clock DT nodes raghav.s
2026-07-28 11:59       ` Krzysztof Kozlowski
2026-07-28 12:23         ` Alim Akhtar
2026-07-28 12:24           ` Krzysztof Kozlowski
2026-07-28 12:58             ` Alim Akhtar
     [not found]   ` <CGME20260728115300epcas5p35dc4bce1b09a4d989170e67eb5d6a752@epcas5p3.samsung.com>
2026-07-28 12:11     ` [PATCH 05/13] dt-bindings: clock: exynos8855: add peris clock definitions raghav.s
     [not found]   ` <CGME20260728115305epcas5p4394f65825a0a04aa7d2bd5068507e8ca@epcas5p4.samsung.com>
2026-07-28 12:11     ` [PATCH 06/13] clk: samsung: exynos8855: add block peris clock support raghav.s
2026-07-28 12:00       ` Krzysztof Kozlowski
2026-07-31 10:08         ` Raghav Sharma
     [not found]   ` <CGME20260728115308epcas5p12e93dfef5637137f3ed159ebc2e9bd8e@epcas5p1.samsung.com>
2026-07-28 12:11     ` [PATCH 07/13] arm64: dts: exynos8855: add cmu_peris clock DT nodes raghav.s
     [not found]   ` <CGME20260728115311epcas5p17024be4c0b89d7186f6e9bfc811733dc@epcas5p1.samsung.com>
2026-07-28 12:11     ` [PATCH 08/13] dt-bindings: clock: exynos8855: add hsi clock definitions raghav.s
     [not found]   ` <CGME20260728115314epcas5p28e12e88f1dbae36f7dff07501301e4ad@epcas5p2.samsung.com>
2026-07-28 12:11     ` [PATCH 09/13] clk: samsung: exynos8855: add block hsi clock support raghav.s
     [not found]   ` <CGME20260728115317epcas5p1ddf7db929ab923b9c22cf1a455edcb0f@epcas5p1.samsung.com>
2026-07-28 12:11     ` [PATCH 10/13] arm64: dts: exynos8855: add cmu_hsi clock DT nodes raghav.s
     [not found]   ` <CGME20260728115320epcas5p2513ae3cae8e7919a178d6b34bb206c2b@epcas5p2.samsung.com>
2026-07-28 12:11     ` [PATCH 11/13] dt-bindings: clock: exynos8855: add usb clock definitions raghav.s
     [not found]   ` <CGME20260728115323epcas5p3b4a6147d08051df05c8223e75546aa88@epcas5p3.samsung.com>
2026-07-28 12:11     ` [PATCH 12/13] clk: samsung: exynos8855: add block usb clock support raghav.s
     [not found]   ` <CGME20260728115326epcas5p333e4a5d4d0777a1d064565b5c2c400d3@epcas5p3.samsung.com>
2026-07-28 12:11     ` [PATCH 13/13] arm64: dts: exynos8855: add cmu_usb clock DT nodes raghav.s

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=20260728121111.2077860-2-raghav.s@samsung.com \
    --to=raghav.s@samsung.com \
    --cc=alim.akhtar@samsung.com \
    --cc=bmasney@redhat.com \
    --cc=conor+dt@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hajun.sung@samsung.com \
    --cc=is.gandhi@samsung.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=mturquette@baylibre.com \
    --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®