From: "Alim Akhtar" <alim.akhtar@samsung.com>
To: "'Peter Griffin'" <peter.griffin@linaro.org>,
"'Raghav Sharma'" <raghav.s@samsung.com>
Cc: <krzk@kernel.org>, <s.nawrocki@samsung.com>,
<cw00.choi@samsung.com>, <sboyd@kernel.org>,
<bmasney+clk@redhat.com>, <jbrunet+clk@baylibre.com>,
<robh@kernel.org>, <conor+dt@kernel.org>,
<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: RE: [PATCH v3 06/14 RESEND] clk: samsung: clk-pll: Add support for pll_4313
Date: Thu, 19 Nov 2026 09:22:38 +0530 [thread overview]
Message-ID: <002901dd77d9$6ddef600$499ce200$@samsung.com> (raw)
In-Reply-To: <CADrjBPoR7_LDZmxC_bOFigvqDaagVihmybfX5AdvSPr9-FVb8w@mail.gmail.com>
Thanks Peter for review
> -----Original Message-----
> From: Peter Griffin <peter.griffin@linaro.org>
> Sent: Friday, November 13, 2026 5:58 PM
> To: Raghav Sharma <raghav.s@samsung.com>
> Cc: krzk@kernel.org; s.nawrocki@samsung.com; cw00.choi@samsung.com;
> alim.akhtar@samsung.com; sboyd@kernel.org; bmasney+clk@redhat.com;
> jbrunet+clk@baylibre.com; robh@kernel.org; conor+dt@kernel.org; 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: Re: [PATCH v3 06/14 RESEND] clk: samsung: clk-pll: Add support for
> pll_4313
>
> Hi Raghav,
>
> On Fri, 13 Nov 2026 at 10:53, Raghav Sharma <raghav.s@samsung.com>
> wrote:
> >
> > 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 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);
> > + }
> > +
>
> This starts to feel a bit hacky (pll_con8 register being referenced as an offset
> from lock_reg). Is the register really called pll_con8 on 8855? Or is it called
> something else, but happens to contain fdiv?
>
Yes, it is named as PLL_CON8_* on 8855, and contain fdiv bit.
> I think something like this would look cleaner:
>
> u32 fdiv_reg;
Historically SFR name was used to match with databook naming convention.
Few lines below it does indicate indeed pll_con8 contains fdiv.
fdiv = (pll_con8 & PLL531X_FDIV_MASK);
I am ok with taking this suggestion.
Only thing is should we change pll_con0 as well together, or in a separate top-up patch?
>
> if (pll->type == pll_4313) {
> /* fdiv in <insert name> register
> fdiv_reg = readl_relaxed(pll->lock_reg - 4);
> } else {
> /* fdiv in pll_con8 register */
> fdiv_reg = readl_relaxed(pll->con_reg + 20);
> }
>
> regards,
>
> Peter
next prev parent reply other threads:[~2026-11-19 3:53 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20261113104829epcas5p13695795bc337b89816b05eec610a0dba@epcas5p1.samsung.com>
2026-11-13 11:05 ` [PATCH v3 00/14 RESEND] Add clock support for Exynos8855 SoC Raghav Sharma
2026-11-13 11:05 ` [PATCH v3 01/14 RESEND] dt-bindings: soc: samsung: Exynos8855 SYSREG compatibles Raghav Sharma
2026-11-13 10:57 ` Peter Griffin
2026-11-16 10:01 ` (subset) " Krzysztof Kozlowski
2026-11-13 11:06 ` [PATCH v3 02/14 RESEND] dt-bindings: clock: exynos8855: add top & peric clock definitions Raghav Sharma
2026-11-13 11:01 ` Peter Griffin
2026-11-13 11:06 ` [PATCH v3 03/14 RESEND] dt-bindings: clock: exynos8855: add peris " Raghav Sharma
2026-11-13 11:25 ` Peter Griffin
2026-11-13 11:06 ` [PATCH v3 04/14 RESEND] dt-bindings: clock: exynos8855: add hsi " Raghav Sharma
2026-11-13 11:02 ` Peter Griffin
2026-11-13 11:06 ` [PATCH v3 05/14 RESEND] dt-bindings: clock: exynos8855: add usb " Raghav Sharma
2026-11-13 11:03 ` Peter Griffin
2026-11-13 11:06 ` [PATCH v3 06/14 RESEND] clk: samsung: clk-pll: Add support for pll_4313 Raghav Sharma
2026-11-13 12:27 ` Peter Griffin
2026-11-19 3:52 ` Alim Akhtar [this message]
2026-11-13 11:06 ` [PATCH v3 07/14 RESEND] clk: samsung: exynos8855: add block top and peric clock support Raghav Sharma
2026-11-13 12:06 ` Peter Griffin
2026-11-13 11:06 ` [PATCH v3 08/14 RESEND] clk: samsung: exynos8855: add block peris " Raghav Sharma
2026-11-13 12:54 ` Peter Griffin
2026-11-13 11:06 ` [PATCH v3 09/14 RESEND] clk: samsung: exynos8855: add block hsi " Raghav Sharma
2026-11-13 11:06 ` [PATCH v3 10/14 RESEND] clk: samsung: exynos8855: add block usb " Raghav Sharma
2026-11-13 13:03 ` Peter Griffin
2026-11-13 11:06 ` [PATCH v3 11/14 RESEND] arm64: dts: exynos8855: add cmu_top & cmu_peric clock DT nodes Raghav Sharma
2026-11-13 12:59 ` Peter Griffin
2026-11-13 11:06 ` [PATCH v3 12/14 RESEND] arm64: dts: exynos8855: add cmu_peris " Raghav Sharma
2026-11-13 13:00 ` Peter Griffin
2026-11-13 11:06 ` [PATCH v3 13/14 RESEND] arm64: dts: exynos8855: add cmu_hsi " Raghav Sharma
2026-11-13 13:01 ` Peter Griffin
2026-11-13 11:06 ` [PATCH v3 14/14 RESEND] arm64: dts: exynos8855: add cmu_usb " Raghav Sharma
2026-11-13 13:01 ` Peter Griffin
2026-11-16 10:01 ` (subset) [PATCH v3 00/14 RESEND] Add clock support for Exynos8855 SoC Krzysztof Kozlowski
2026-11-16 10:02 ` Krzysztof Kozlowski
2026-11-16 18:06 ` Peter Griffin
2026-11-18 8:23 ` Krzysztof Kozlowski
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='002901dd77d9$6ddef600$499ce200$@samsung.com' \
--to=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=raghav.s@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