All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Biju Das" <biju.das.jz@bp.renesas.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org,
	wsa+renesas@sang-engineering.com, conor+dt@kernel.org
Subject: Re: [PATCH v3 8/8] arm64: dts: renesas: r9a08g046: Enable TSU
Date: Tue, 22 Sep 2026 04:44:01 +0000	[thread overview]
Message-ID: <20260922044402.02C321F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260922042707.116378-9-biju.das.jz@bp.renesas.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] arm64: dts: io-channels specifier uses software array index instead of hardware channel
--

commit e43366f80cfffd32ae026b33a6ad6c170b125e78
Author: Biju Das <biju.das.jz@bp.renesas.com>

arm64: dts: renesas: r9a08g046: Enable TSU

This commit adds cooling cells to CPU nodes and describes the ADC1 and
TSU nodes to establish a CPU thermal zone. It configures passive and
critical trip points along with cooling maps for thermal mitigation.

> 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
[ ... ]
> @@ -270,6 +274,37 @@ scif5: serial@1004e000 {
>  			status = "disabled";
>  		};
>  
> +		adc1: adc@108c0000 {
> +			compatible = "renesas,r9a08g046-adc1";
[ ... ]
> +			#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>;

[Severity: Medium]
Does this io-channels property correctly map to the hardware channel, or does
it bake a Linux-specific software index into the device tree?

In the tsu node of arch/arm64/boot/dts/renesas/r9a08g046.dtsi, the ADC node
explicitly defines channel 8 (channel@8), but this property uses index 0.
This violates DT principles by encoding the driver's internal software array
index rather than the physical hardware channel ID.

Because the rzg2l_adc driver currently lacks a fwnode_xlate callback, it
falls back to __fwnode_iio_simple_xlate(). The driver populates
indio_dev->channels with the single active DT channel, so
indio_dev->num_channels is 1. If the DT correctly specified <&adc1 8>, the
fallback translator would fail since 8 >= 1.

Does bypassing this failure by using <&adc1 0> introduce a brittle dependency
on the subnode order that will silently break the TSU if other channels are
ever added?

> +			io-channel-names = "tsu";
> +		};

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260922042707.116378-1-biju.das.jz@bp.renesas.com?part=8

  reply	other threads:[~2026-09-22  4:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22  4:26 [PATCH v3 0/8] Add Renesas RZ/G3L TSU support Biju Das
2026-09-22  4:26 ` [PATCH v3 1/8] clk: renesas: r9a08g046: Add TSU,ADC1 clocks and reset Biju Das
2026-09-23 10:09   ` Geert Uytterhoeven
2026-09-23 10:23     ` Biju Das
2026-09-22  4:26 ` [PATCH v3 2/8] dt-bindings: thermal: r9a08g045-tsu: Document RZ/G3L TSU Biju Das
2026-09-22  4:26 ` [PATCH v3 3/8] thermal/drivers/renesas/rzg3s: Convert calibration defaults to per-SoC match data Biju Das
2026-09-22  4:26 ` [PATCH v3 4/8] thermal/drivers/renesas/rzg3s: Add RZ/G3L TSU support Biju Das
2026-09-22  4:26 ` [PATCH v3 5/8] dt-bindings: iio: adc: renesas,rzg2l-adc: Document RZ/G3L ADC for TSU Biju Das
2026-09-28  6:05   ` Krzysztof Kozlowski
2026-09-28  6:25     ` Biju Das
2026-09-28  6:27       ` Krzysztof Kozlowski
2026-09-28  6:32         ` Biju Das
2026-09-28  7:53   ` Krzysztof Kozlowski
2026-09-22  4:26 ` [PATCH v3 6/8] iio: adc: rzg2l_adc: Rename num_channels to max_channels Biju Das
2026-09-22 14:33   ` Geert Uytterhoeven
2026-09-23  8:21     ` Biju Das
2026-09-25  2:55       ` Jonathan Cameron
2026-09-25  3:55         ` Biju Das
2026-09-27 18:06     ` Jonathan Cameron
2026-09-22  4:26 ` [PATCH v3 7/8] iio: adc: rzg2l_adc: Add RZ/G3L ADC support for TSU Biju Das
2026-09-22  4:41   ` sashiko-bot
2026-09-22  5:47     ` Biju Das
2026-09-22  4:27 ` [PATCH v3 8/8] arm64: dts: renesas: r9a08g046: Enable TSU Biju Das
2026-09-22  4:44   ` sashiko-bot [this message]
2026-09-22  5:07     ` 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=20260922044402.02C321F000FF@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 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.