From: sashiko-bot@kernel.org
To: "Biju Das" <biju.das.jz@bp.renesas.com>
Cc: wsa+renesas@sang-engineering.com, robh@kernel.org,
devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v2 8/8] arm64: dts: renesas: r9a08g046: Enable TSU
Date: Fri, 18 Sep 2026 15:22:55 +0000 [thread overview]
Message-ID: <20260918152256.3C2221F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260918150730.122056-9-biju.das.jz@bp.renesas.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt: io-channels hardcodes Linux array index instead of hardware ID
--
commit 43dcf56f74f46f025839610adda743ab502b8711
Author: Biju Das <biju.das.jz@bp.renesas.com>
arm64: dts: renesas: r9a08g046: Enable TSU
This commit adds cooling cells to the CPU nodes and describes the ADC1 and TSU
nodes to enable thermal mitigation. It also sets up a CPU thermal zone with
passive and critical trip points.
> diff --git a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
> index c63a857f0e5b0..a2f6718c0043a 100644
> --- a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
[ ... ]
> + adc1: adc@108c0000 {
> + compatible = "renesas,r9a08g046-adc1";
> + reg = <0 0x108c0000 0 0x10000>;
> + interrupts = <GIC_SPI 378 IRQ_TYPE_EDGE_RISING>;
> + clocks = <&cpg CPG_MOD R9A08G046_ADC1_ADCLK>,
> + <&cpg CPG_MOD R9A08G046_ADC1_PCLK>;
> + clock-names = "adclk", "pclk";
> + resets = <&cpg R9A08G046_ADC1_PRESETN>,
> + <&cpg R9A08G046_ADC1_ADRST_N>;
> + reset-names = "presetn", "adrst-n";
> + power-domains = <&cpg>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + #io-channel-cells = <1>;
> +
> + channel@8 {
> + reg = <8>;
> + };
> + };
> +
> + tsu: thermal@108d0000 {
> + compatible = "renesas,r9a08g046-tsu";
> + reg = <0 0x108d0000 0 0x10000>;
> + clocks = <&cpg CPG_MOD R9A08G046_TSU_PCLK>;
> + resets = <&cpg R9A08G046_TSU_PRESETN>;
> + power-domains = <&cpg>;
> + #thermal-sensor-cells = <0>;
> + io-channels = <&adc1 0>;
> + io-channel-names = "tsu";
[Severity: Medium]
Does this hardcode an internal Linux array index (0) instead of the actual
hardware channel ID (8)?
Since channel@8 is the only defined channel in the adc1 node, it currently
sits at index 0 in the driver's array, which masks the issue.
If a future device tree update enables another channel (like channel@0),
would the array shift so index 0 points to the wrong physical channel? This
looks like it could cause the CPU to read incorrect thermal data and break
thermal mitigation.
> + };
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260918150730.122056-1-biju.das.jz@bp.renesas.com?part=8
next prev parent reply other threads:[~2026-09-18 15:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 15:07 [PATCH v2 0/8] Add Renesas RZ/G3L TSU support Biju Das
2026-09-18 15:07 ` [PATCH v2 2/8] dt-bindings: thermal: r9a08g045-tsu: Document RZ/G3L TSU Biju Das
2026-09-20 17:39 ` Jonathan Cameron
2026-09-18 15:07 ` [PATCH v2 5/8] dt-bindings: iio: adc: renesas,rzg2l-adc: Make '#io-channel-cells' required for R9A08G045 Biju Das
2026-09-25 1:53 ` Rob Herring (Arm)
2026-09-18 15:07 ` [PATCH v2 6/8] dt-bindings: iio: adc: renesas,rzg2l-adc: Document RZ/G3L ADC for TSU Biju Das
2026-09-20 17:39 ` Jonathan Cameron
2026-09-21 2:03 ` Biju Das
2026-09-21 3:29 ` Jonathan Cameron
2026-09-21 4:50 ` Biju Das
2026-09-18 15:07 ` [PATCH v2 7/8] iio: adc: rzg2l_adc: Add RZ/G3L ADC support " Biju Das
2026-09-18 15:07 ` [PATCH v2 8/8] arm64: dts: renesas: r9a08g046: Enable TSU Biju Das
2026-09-18 15:22 ` sashiko-bot [this message]
2026-09-18 15:40 ` 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=20260918152256.3C2221F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=biju.das.jz@bp.renesas.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox