Re: [PATCH v3 06/14 RESEND] clk: samsung: clk-pll: Add support for pll_4313

From: Peter Griffin

Date: Fri Nov 20 2026 - 06:08:20 EST


Hi Alim,

On Thu, 19 Nov 2026 at 03:52, Alim Akhtar <alim.akhtar@xxxxxxxxxxx> wrote:
>
> Thanks Peter for review
>
> > -----Original Message-----
> > From: Peter Griffin <peter.griffin@xxxxxxxxxx>
> > Sent: Friday, November 13, 2026 5:58 PM
> > To: Raghav Sharma <raghav.s@xxxxxxxxxxx>
> > Cc: krzk@xxxxxxxxxx; s.nawrocki@xxxxxxxxxxx; cw00.choi@xxxxxxxxxxx;
> > alim.akhtar@xxxxxxxxxxx; sboyd@xxxxxxxxxx; bmasney+clk@xxxxxxxxxx;
> > jbrunet+clk@xxxxxxxxxxxx; robh@xxxxxxxxxx; conor+dt@xxxxxxxxxx; linux-
> > samsung-soc@xxxxxxxxxxxxxxx; linux-clk@xxxxxxxxxxxxxxx;
> > devicetree@xxxxxxxxxxxxxxx; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx; linux-
> > kernel@xxxxxxxxxxxxxxx; is.gandhi@xxxxxxxxxxx; ts.amit@xxxxxxxxxxx;
> > pokala.reddy@xxxxxxxxxxx
> > 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@xxxxxxxxxxx>
> > wrote:
> > >
> > > From: Alim Akhtar <alim.akhtar@xxxxxxxxxxx>
> > >
> > > 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@xxxxxxxxxxx>
> > > Signed-off-by: Raghav Sharma <raghav.s@xxxxxxxxxxx>
> > > ---
> > > 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.

If the register is actually called PLL_CON8_ in the TRM then the
current patch makes sense "as is". It just seemed odd at first reading
that con8 wasn't an offset from con_reg on this SoC.

Thanks,

Peter