Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Claudiu Beznea" <claudiu.beznea+renesas@tuxon.dev>
Cc: wsa+renesas@sang-engineering.com,
	"Vincent Mailhol" <mailhol@kernel.org>,
	robh@kernel.org, "Marc Kleine-Budde" <mkl@pengutronix.de>,
	linux-can@vger.kernel.org,
	"Oleksij Rempel" <o.rempel@pengutronix.de>,
	devicetree@vger.kernel.org,
	"Oliver Hartkopp" <socketcan@hartkopp.net>,
	conor+dt@kernel.org
Subject: Re: [PATCH 1/8] clk: r9a08g045-cpg: Add clocks and resets for CAN-FD
Date: Tue, 07 Jul 2026 10:34:48 +0000	[thread overview]
Message-ID: <20260707103448.A9C2D1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260707102418.1646159-2-claudiu.beznea+renesas@tuxon.dev>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The P4 core clock is registered using an internal enum ID instead of its Device Tree exported ID, rendering it inaccessible to DT consumers.
--

--- Patch [1]: [PATCH 1/8] clk: r9a08g045-cpg: Add clocks and resets for CAN-FD ---
commit 6c9b264ec67002e41ec321d8af3b04f800484a8a
Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

clk: r9a08g045-cpg: Add clocks and resets for CAN-FD
    
Renesas RZ/G3S SoC has a CAN-FD IP. Add clocks and resets for it.

> diff --git a/drivers/clk/renesas/r9a08g045-cpg.c b/drivers/clk/renesas/r9a08g045-cpg.c
> index 1232fec913eb5..34927d1ee4639 100644
> --- a/drivers/clk/renesas/r9a08g045-cpg.c
> +++ b/drivers/clk/renesas/r9a08g045-cpg.c
> @@ -88,6 +88,8 @@ enum clk_ids {
>  	CLK_SEL_PLL4,
>  	CLK_P1_DIV2,
>  	CLK_P3_DIV2,
> +	CLK_P4,

[Severity: High]
Should this clock be exported to the device tree instead of being added as an
internal enum?

Because CLK_P4 is defined after LAST_DT_CORE_CLK in clk_ids, it seems device
tree consumers requesting <&cpg CPG_CORE R9A08G045_CLK_P4> would fail to
probe with -ENOENT.

> +	CLK_P4_DIV2,
>  	CLK_SD0_DIV4,

[ ... ]

> @@ -182,6 +184,8 @@ static const struct cpg_core_clk r9a08g045_core_clks[] __initconst = {
>  		    dtable_1_32, 0, 0, 0, NULL),
>  	DEF_G3S_DIV("P3", R9A08G045_CLK_P3, CLK_PLL3_DIV2_4, DIVPL3C, G3S_DIVPL3C_STS,
>  		    dtable_1_32, 0, 0, 0, NULL),
> +	DEF_FIXED("P4", CLK_P4, CLK_PLL2_DIV2, 1, 5),

[Severity: High]
Looking at the surrounding definitions for P1, P2, P3, and P5 in
r9a08g045_core_clks, they all use their respective R9A08G045_CLK_* macros.

Does P4 need to be registered with the exported R9A08G045_CLK_P4 macro instead
of CLK_P4 to ensure the clock populates correctly at the intended device tree
index?

> +	DEF_FIXED("P4_DIV2", CLK_P4_DIV2, CLK_P4, 1, 2),
>  	DEF_FIXED("P3_DIV2", CLK_P3_DIV2, R9A08G045_CLK_P3, 1, 2),

[ ... ]

> @@ -285,6 +289,10 @@ static const struct rzg2l_mod_clk r9a08g045_mod_clks[] = {
>  					MSTOP(BUS_MCPU2, BIT(5))),
>  	DEF_MOD("scif5_clk_pck",	R9A08G045_SCIF5_CLK_PCK, R9A08G045_CLK_P0, 0x584, 5,
>  					MSTOP(BUS_MCPU3, BIT(4))),
> +	DEF_MOD("canfd_pclk",		R9A08G045_CANFD_PCLK, CLK_P4_DIV2, 0x594, 0,
> +					MSTOP(BUS_MCPU2, BIT(9))),
> +	DEF_MOD("canfd_clk_ram",	R9A08G045_CANFD_CLK_RAM, CLK_P4, 0x594, 1,

[Severity: High]
If P4 is exported as R9A08G045_CLK_P4, should this module clock reference
the exported macro as its parent here in r9a08g045_mod_clks?

> +					MSTOP(BUS_MCPU2, BIT(9))),
>  	DEF_MOD("gpio_hclk",		R9A08G045_GPIO_HCLK, R9A08G045_OSCCLK, 0x598, 0,

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260707102418.1646159-1-claudiu.beznea+renesas@tuxon.dev?part=1

  reply	other threads:[~2026-07-07 10:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-07 10:24 [PATCH 0/8] can: rcar_canfd: Add support for Renesas RZ/G3S Claudiu Beznea
2026-07-07 10:24 ` [PATCH 1/8] clk: r9a08g045-cpg: Add clocks and resets for CAN-FD Claudiu Beznea
2026-07-07 10:34   ` sashiko-bot [this message]
2026-07-09 15:45   ` Geert Uytterhoeven
2026-07-07 10:24 ` [PATCH 2/8] dt-bindings: can: renesas,rcar-canfd: Document RZ/G3S SoC Claudiu Beznea
2026-07-07 10:30   ` sashiko-bot
2026-07-07 16:15     ` Conor Dooley
2026-07-07 16:16   ` Conor Dooley
2026-07-07 10:24 ` [PATCH 3/8] can: rcar_canfd: Fix typos in macro names Claudiu Beznea
2026-07-07 10:24 ` [PATCH 4/8] can: rcar_canfd: Allow the CAN FD clock to be sourced from fck Claudiu Beznea
2026-07-07 10:33   ` sashiko-bot
2026-07-07 10:24 ` [PATCH 5/8] can: rcar_canfd: Do not set registers selecting the CAN mode Claudiu Beznea
2026-07-07 10:53   ` sashiko-bot
2026-07-07 10:24 ` [PATCH 6/8] can: rcar_canfd: Add support for Renesas RZ/G3S Claudiu Beznea
2026-07-07 10:49   ` sashiko-bot
2026-07-07 10:24 ` [PATCH 7/8] arm64: dts: renesas: r9a08g045: Add CAN-FD node Claudiu Beznea
2026-07-07 10:24 ` [PATCH 8/8] arm64: dts: renesas: rzg3s-smarc: Enable CAN-FD Claudiu Beznea
2026-07-07 10:31 ` [PATCH 0/8] can: rcar_canfd: Add support for Renesas RZ/G3S Biju Das

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=20260707103448.A9C2D1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=claudiu.beznea+renesas@tuxon.dev \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=mailhol@kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=o.rempel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=socketcan@hartkopp.net \
    --cc=wsa+renesas@sang-engineering.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