From: sashiko-bot@kernel.org
To: Prabhakar <prabhakar.csengg@gmail.com>
Cc: wsa+renesas@sang-engineering.com, robh@kernel.org,
devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 2/4] arm64: dts: renesas: r9a09g056: Add ADC nodes
Date: Tue, 29 Sep 2026 13:13:30 +0000 [thread overview]
Message-ID: <20260929131331.68CB01F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260929124829.237997-3-prabhakar.mahadev-lad.rj@bp.renesas.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] arm64: dts: undefined CPG module clocks and reset IDs in ADC nodes
- [High] arm64: dts: adc1 and adc2 nodes incorrectly share adc0 clocks and resets
- [Medium] arm64: dts: missing #io-channel-cells property in ADC nodes
--
commit 227934acdf450f4bc0b48d576add5c164d83a5ed
Author: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
arm64: dts: renesas: r9a09g056: Add ADC nodes
This commit adds three ADC device nodes (adc0, adc1, and adc2) to the
Renesas RZ/V2N SoC device tree.
> diff --git a/arch/arm64/boot/dts/renesas/r9a09g056.dtsi b/arch/arm64/boot/dts/renesas/r9a09g056.dtsi
> index 77c2221a9e2a3..f03855f705312 100644
> --- a/arch/arm64/boot/dts/renesas/r9a09g056.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r9a09g056.dtsi
> @@ -626,6 +626,150 @@ wdt1: watchdog@14400000 {
> status = "disabled";
> };
>
> + adc0: adc@11c00000 {
> + compatible = "renesas,r9a09g056-adc", "renesas,r9a09g057-adc";
> + reg = <0 0x11c00000 0 0x400>;
> + interrupts = <GIC_SPI 918 IRQ_TYPE_EDGE_RISING>,
> + <GIC_SPI 919 IRQ_TYPE_EDGE_RISING>,
> + <GIC_SPI 920 IRQ_TYPE_EDGE_RISING>,
> + <GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 247 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-names = "adi", "gbadi", "gcadi",
> + "cmpai", "cmpbi";
> + clocks = <&cpg CPG_MOD 0x108>, <&cpg CPG_MOD 0x107>;
> + clock-names = "adclk", "pclk";
> + resets = <&cpg 0xf6>;
[Severity: High]
Are these CPG module clock IDs (0x107, 0x108) and reset ID (0xf6) defined
in the r9a09g056-cpg.c clock driver?
If they are not implemented, the rzg2l_adc driver will fail to probe or
infinitely defer when it calls clk_get() and
devm_reset_control_get_exclusive_deasserted() during probe.
> + power-domains = <&cpg>;
> + dmas = <&dmac0 0x24c8>, <&dmac1 0x24c8>, <&dmac2 0x24c8>,
> + <&dmac3 0x24c8>, <&dmac4 0x24c8>;
> + dma-names = "rx", "rx", "rx", "rx", "rx";
> + status = "disabled";
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
[Severity: Medium]
Should there be an #io-channel-cells = <1>; property defined here?
Without it, the ADC nodes cannot function as IIO providers via device tree
phandles. Any consumer driver trying to reference the ADC via an io-channels
property will fail to parse when calling iio_channel_get() to look up its
provider.
[ ... ]
> + adc1: adc@11c02800 {
[ ... ]
> + clocks = <&cpg CPG_MOD 0x108>, <&cpg CPG_MOD 0x107>;
> + clock-names = "adclk", "pclk";
> + resets = <&cpg 0xf6>;
[ ... ]
> + adc2: adc@11c02c00 {
[ ... ]
> + clocks = <&cpg CPG_MOD 0x108>, <&cpg CPG_MOD 0x107>;
> + clock-names = "adclk", "pclk";
> + resets = <&cpg 0xf6>;
[Severity: High]
Do adc1 and adc2 use the exact same clocks and reset lines as adc0?
Since the rzg2l_adc driver requests exclusive reset lines via
devm_reset_control_get_exclusive_deasserted(), probing adc1 and adc2 will
fail with -EBUSY because adc0 already holds the exclusive reset line.
If they were shared instead, resetting one active ADC instance would
inadvertently reset the others, leading to state corruption.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260929124829.237997-1-prabhakar.mahadev-lad.rj@bp.renesas.com?part=2
next prev parent reply other threads:[~2026-09-29 13:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 12:48 [PATCH 0/4] Add ADC support for RZ/V2H(P) and RZ/V2N SoCs Prabhakar
2026-09-29 12:48 ` [PATCH 1/4] arm64: dts: renesas: r9a09g057: Add ADC node Prabhakar
2026-09-29 12:48 ` [PATCH 2/4] arm64: dts: renesas: r9a09g056: Add ADC nodes Prabhakar
2026-09-29 13:13 ` sashiko-bot [this message]
2026-09-29 12:48 ` [PATCH 3/4] arm64: dts: renesas: r9a09g057h44-rzv2h-evk: Enable ADC Prabhakar
2026-09-29 12:48 ` [PATCH 4/4] arm64: dts: renesas: r9a09g056n48-rzv2n-evk: " Prabhakar
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=20260929131331.68CB01F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=prabhakar.csengg@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.