From: sashiko-bot@kernel.org
To: "Biju Das" <biju.das.au@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org,
wsa+renesas@sang-engineering.com
Subject: Re: [PATCH v8 1/4] arm64: dts: renesas: r9a08g046: Enable TSU
Date: Wed, 04 Nov 2026 15:32:15 +0000 [thread overview]
Message-ID: <sashiko-outbox-197508@kernel.org> (raw)
In-Reply-To: <20261104-usb_rzg3l-v8-1-ab109c4bd108@bp.renesas.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] arm64: dts: renesas: r9a08g046: tsu uses ADC index 0 instead of channel 8
- [Low] arm64: dts: renesas: r9a08g046: adc1 and tsu nodes out of unit-address order
--
commit 3f81876bc97a3da87790da10f43f37d051bfeeea
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 along with a CPU thermal zone and cooling maps on r9a08g046.
> diff --git a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
> index f33d5d7468ffa..35046c7dac547 100644
> --- a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
[ ... ]
> @@ -374,6 +378,37 @@ scif5: serial@1004e000 {
> status = "disabled";
> };
>
> + adc1: adc@108c0000 {
> + compatible = "renesas,r9a08g046-adc1";
> + reg = <0 0x108c0000 0 0x10000>;
[Severity: Low]
Should adc1 (adc@108c0000) and tsu (thermal@108d0000) be placed after gpu
(gpu@108b0000) and before cpg (clock-controller@11010000) rather than between
scif5 (the end of the scif0@100ac000 group) and i2c0 (i2c@100ae000) so the
soc child nodes stay in ascending unit-address order?
> + 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]
Should io-channels in the tsu node reference hardware channel 8 (<&adc1 8>)
matching channel@8 under adc1, with rzg2l_adc_iio_info in
drivers/iio/adc/rzg2l_adc.c implementing .fwnode_xlate?
In arch/arm64/boot/dts/renesas/r9a08g046.dtsi, adc1 defines only channel@8
with reg = <8>, matching Documentation/devicetree/bindings/iio/adc/renesas,rzg2l-adc.yaml
and rzg3l_adc1_hw_params in drivers/iio/adc/rzg2l_adc.c. Similarly,
Documentation/devicetree/bindings/thermal/renesas,r9a08g045-tsu.yaml and
arch/arm64/boot/dts/renesas/r9a08g045.dtsi specify io-channels = <&adc 8>.
When rzg3s_thermal_probe() in drivers/thermal/renesas/rzg3s_thermal.c calls
devm_iio_channel_get(dev, "tsu"), __fwnode_iio_channel_get() in
drivers/iio/inkern.c checks for info->fwnode_xlate:
drivers/iio/adc/rzg2l_adc.c:
static const struct iio_info rzg2l_adc_iio_info = {
.read_raw = rzg2l_adc_read_raw,
.read_label = rzg2l_adc_read_label,
};
Because rzg2l_adc_iio_info omits .fwnode_xlate, __fwnode_iio_channel_get()
falls back to __fwnode_iio_simple_xlate(), which treats the io-channels cell
as an array index into indio_dev->channels[] (where num_channels is 1 and
chan_array[0].channel is 8) rather than matching chan->channel.
Does setting io-channels = <&adc1 0> bake the Linux IIO driver's internal
array index into the Device Tree ABI instead of the hardware channel number?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261104-usb_rzg3l-v8-0-ab109c4bd108@bp.renesas.com?part=1
next prev parent reply other threads:[~2026-11-04 15:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 15:15 [PATCH v8 0/4] Enable USB2.0 and TSU on RZ/G3L SMARC EVK Biju Das
2026-11-04 15:15 ` [PATCH v8 1/4] arm64: dts: renesas: r9a08g046: Enable TSU Biju Das
2026-11-04 15:32 ` sashiko-bot [this message]
2026-11-04 15:15 ` [PATCH v8 2/4] arm64: dts: renesas: r9a08g046: Add USB2.0 host/phy device nodes Biju Das
2026-11-04 15:15 ` [PATCH v8 3/4] arm64: dts: renesas: r9a08g046: Add USB2.0 function " Biju Das
2026-11-04 15:15 ` [PATCH v8 4/4] arm64: dts: renesas: r9a08g046l48-smarc: Enable USB2.0 support 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=sashiko-outbox-197508@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=biju.das.au@gmail.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