RE: [PATCH v3 08/14 RESEND] clk: samsung: exynos8855: add block peris clock support
From: Alim Akhtar
Date: Thu Nov 26 2026 - 12:35:37 EST
> -----Original Message-----
> From: Peter Griffin <peter.griffin@xxxxxxxxxx>
> Sent: Friday, November 13, 2026 6:24 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 08/14 RESEND] clk: samsung: exynos8855: add block
> peris clock support
>
> Hi Raghav,
>
> On Fri, 13 Nov 2026 at 10:54, Raghav Sharma <raghav.s@xxxxxxxxxxx>
> wrote:
> >
> > Register compatible and cmu_info data to support clocks.
> > CMU_PERIS, this provides clocks for PERIS
> >
> > Co-developed-by: Alim Akhtar <alim.akhtar@xxxxxxxxxxx>
> > Signed-off-by: Alim Akhtar <alim.akhtar@xxxxxxxxxxx>
> > Signed-off-by: Raghav Sharma <raghav.s@xxxxxxxxxxx>
> > ---
> > drivers/clk/samsung/clk-exynos8855.c | 97
> > ++++++++++++++++++++++++++++
> > 1 file changed, 97 insertions(+)
> >
> > diff --git a/drivers/clk/samsung/clk-exynos8855.c
> > b/drivers/clk/samsung/clk-exynos8855.c
> > index dcf58f2459b0..12b5ae54b560 100644
> > --- a/drivers/clk/samsung/clk-exynos8855.c
> > +++ b/drivers/clk/samsung/clk-exynos8855.c
> > @@ -18,7 +18,9 @@
> > /* NOTE: Must be equal to the last clock ID increased by one */
> > #define CLKS_NR_TOP (CLKCMU_DOUT_G3D_HTU + 1)
> > #define CLKS_NR_PERIC (CLK_GOUT_USI_PERIC + 1)
> > +#define CLKS_NR_PERIS (CLK_GOUT_WDT1_PERIS + 1)
> >
> > +#define EXYNOS8855_PERIS_GATE_DBG_OFFSET 0x2004
> > #define EXYNOS8855_PERIC_GATE_DBG_OFFSET 0x2024
> > #define EXYNOS8855_TOP_GATE_DBG_OFFSET 0x20A0
> >
> > @@ -1092,6 +1094,98 @@ static const struct samsung_cmu_info
> peric_cmu_info __initconst = {
> > .memclk_offset = EXYNOS8855_MEMCLK_OFFSET,
> > };
> >
> > +/* ---- CMU_PERIS
> > +--------------------------------------------------------- */
> > +
> > +/* Register Offset definitions for CMU_PERIS (0x10030000) */
> > +#define CMU_PERIS_PLL_CON0_MUX_CLKCMU_PERIS_NOC_USER
> 0x600
> > +#define CMU_PERIS_CLK_CON_MUX_CLK_PERIS_GIC 0x1000
> > +#define CMU_PERIS_PLL_CON0_MUX_CLK_PERIS_GIC_USER
> 0x610
> > +#define CMU_PERIS_CLK_CON_DIV_CLK_PERIS_NOCP 0x1800
> > +#define CMU_PERIS_CLK_CON_DIV_CLK_PERIS_OTP 0x1804
> > +#define
> CMU_PERIS_CLK_CON_GAT_BLK_PERIS_UID_CMU_PERIS_IPCLKPORT_PCLK
> 0x201c
> > +#define
> CMU_PERIS_CLK_CON_GAT_BLK_PERIS_UID_SYSREG_PERIS_IPCLKPORT_P
> CLK 0x2040
> > +#define
> CMU_PERIS_CLK_CON_GAT_BLK_PERIS_UID_WDT0_IPCLKPORT_PCLK
> 0x2048
> > +#define
> CMU_PERIS_CLK_CON_GAT_BLK_PERIS_UID_WDT1_IPCLKPORT_PCLK
> 0x204c
> > +#define CMU_PERIS_CONTROLLER_OPTION0_CMU_CTRL 0x800
> > +
> > +static const unsigned long peris_clk_regs[] __initconst = {
> > + CMU_PERIS_PLL_CON0_MUX_CLKCMU_PERIS_NOC_USER,
> > + CMU_PERIS_CLK_CON_MUX_CLK_PERIS_GIC,
> > + CMU_PERIS_PLL_CON0_MUX_CLK_PERIS_GIC_USER,
> > + CMU_PERIS_CLK_CON_DIV_CLK_PERIS_NOCP,
> > + CMU_PERIS_CLK_CON_DIV_CLK_PERIS_OTP,
> > +
> CMU_PERIS_CLK_CON_GAT_BLK_PERIS_UID_CMU_PERIS_IPCLKPORT_PCLK,
> > +
> CMU_PERIS_CLK_CON_GAT_BLK_PERIS_UID_SYSREG_PERIS_IPCLKPORT_P
> CLK,
> > +
> CMU_PERIS_CLK_CON_GAT_BLK_PERIS_UID_WDT0_IPCLKPORT_PCLK,
> > +
> CMU_PERIS_CLK_CON_GAT_BLK_PERIS_UID_WDT1_IPCLKPORT_PCLK,
> > + CMU_PERIS_CONTROLLER_OPTION0_CMU_CTRL,
> > +};
>
> Same comment about preserving register state from the bootloader when
> powering off/on PERIS block.
>
> > +
> > +/* List of parent clocks for Muxes in CMU_PERIS */
> > +PNAME(mout_clkcmu_peris_noc_user_p) = { "oscclk",
> > +"dout_clkcmu_peris_noc" };
> > +PNAME(mout_clk_peris_gic_p) = { "oscclk",
> > +"mout_clkcmu_peris_gic_user" };
> > +PNAME(mout_clkcmu_peris_gic_user_p) = { "oscclk",
> > +"dout_clkcmu_peris_gic" };
> > +
> > +static const struct samsung_mux_clock peris_mux_clks[] __initconst = {
> > + MUX(CLK_MOUT_PERIS_NOC_USER, "mout_clkcmu_peris_noc_user",
> > + mout_clkcmu_peris_noc_user_p,
> CMU_PERIS_PLL_CON0_MUX_CLKCMU_PERIS_NOC_USER, 4, 1),
> > + MUX(CLK_MOUT_PERIS_GIC, "mout_clk_peris_gic",
> > + mout_clk_peris_gic_p,
> CMU_PERIS_CLK_CON_MUX_CLK_PERIS_GIC, 0, 1),
> > + MUX(CLK_MOUT_PERIS_GIC_USER, "mout_clkcmu_peris_gic_user",
> > + mout_clkcmu_peris_gic_user_p,
> > +CMU_PERIS_PLL_CON0_MUX_CLK_PERIS_GIC_USER, 4, 1), };
> > +
> > +static const struct samsung_div_clock peris_div_clks[] __initconst = {
> > + DIV(CLK_DOUT_PERIS_NOCP, "dout_clkcmu_peris_nocp",
> > + "mout_clkcmu_peris_noc_user",
> CMU_PERIS_CLK_CON_DIV_CLK_PERIS_NOCP,
> > + 0, 4),
> > + DIV(CLK_DOUT_PERIS_OTP, "dout_clkcmu_peris_otp",
> > + "oscclk", CMU_PERIS_CLK_CON_DIV_CLK_PERIS_OTP,
> > + 0, 4),
> > +};
> > +
> > +static const struct samsung_gate_clock peris_gate_clks[] __initconst = {
> > + GATE(CLK_GOUT_CMU_PERIS, "gout_cmu_peris",
> > + "dout_clkcmu_peris_nocp",
> > +
> CMU_PERIS_CLK_CON_GAT_BLK_PERIS_UID_CMU_PERIS_IPCLKPORT_PCLK,
> > + 21, 0, 0),
> > + GATE(CLK_GOUT_SYSREG_PERIS, "gout_sysreg_peris",
> > + "dout_clkcmu_peris_nocp",
> > +
> CMU_PERIS_CLK_CON_GAT_BLK_PERIS_UID_SYSREG_PERIS_IPCLKPORT_P
> CLK,
> > + 21, 0, 0),
> > + GATE(CLK_GOUT_WDT0_PERIS, "gout_wdt0_peris",
> > + "dout_clkcmu_peris_nocp",
> > +
> CMU_PERIS_CLK_CON_GAT_BLK_PERIS_UID_WDT0_IPCLKPORT_PCLK,
> > + 21, 0, 0),
> > + GATE(CLK_GOUT_WDT1_PERIS, "gout_wdt1_peris",
> > + "dout_clkcmu_peris_nocp",
> > +
> CMU_PERIS_CLK_CON_GAT_BLK_PERIS_UID_WDT1_IPCLKPORT_PCLK,
> > + 21, 0, 0),
>
> The Linux clock name strings look wrong here. It looks like you've generally
> followed the clk-gs101 clock name mangling in this series so it should be
> "gout_<block-name>_<IP-clock-name>, but you have "gout_IP-
> clock_name>-<block-name>". I know there is some "name diversity" in-tree
> for various SoCs, but with new SoCs using auto clocks I would like to keep the
> naming scheme following a similar style to clk-gs101.
>
> Also I guess with auto clocks now enabled from the start you may never
> need to expose all the CMU bus clocks, but I worry a bit you may have
> mangled the names here a bit too much. If you do need to expose extra
> gates you might get name collisions. For example in clk-gs101 we have both
>
> gout_apm_apm_usi0_uart_ipclk
> gout_apm_apm_usi0_uart_pclk
>
> So we kept the _pclk suffix in the Linux name to avoid a name collision.
>
Thanks for review, will change to gout_<block-name>_<IP-clock-name> convention
> Thanks,
>
> Peter