* [PATCH v8 0/4] Enable USB2.0 and TSU on RZ/G3L SMARC EVK
@ 2026-11-04 15:15 Biju Das
2026-11-04 15:15 ` [PATCH v8 1/4] arm64: dts: renesas: r9a08g046: Enable TSU Biju Das
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Biju Das @ 2026-11-04 15:15 UTC (permalink / raw)
To: Geert Uytterhoeven, Magnus Damm, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-renesas-soc, devicetree, linux-kernel, Biju Das
Hi all,
This patch series aims to enable USB2.0 Host/Function and
TSU on RZ/G3L SMARC EVK.
To: Geert Uytterhoeven <geert+renesas@glider.be>
To: Magnus Damm <magnus.damm@gmail.com>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
Cc: linux-renesas-soc@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
v8:
* Moved patches from [1] and [2]
* Replaced place holders.
* Updated commit header.
* Dropped redundant nodes from board dts as it is defined in common
board dtsi
* Dropped usb1_pins.
[1] https://lore.kernel.org/all/20260812141940.246223-1-biju.das.jz@bp.renesas.com/
[2] https://lore.kernel.org/all/20260925061617.127349-1-biju.das.jz@bp.renesas.com/
---
Biju Das (4):
arm64: dts: renesas: r9a08g046: Enable TSU
arm64: dts: renesas: r9a08g046: Add USB2.0 host/phy device nodes
arm64: dts: renesas: r9a08g046: Add USB2.0 function device nodes
arm64: dts: renesas: r9a08g046l48-smarc: Enable USB2.0 support
arch/arm64/boot/dts/renesas/r9a08g046.dtsi | 193 ++++++++++++++++++++-
arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts | 42 ++---
2 files changed, 210 insertions(+), 25 deletions(-)
---
base-commit: d6bcfc94eb4da6e089c5473970cd96727292fd97
change-id: 20261104-usb_rzg3l-16fe5cc8a82d
Best regards,
--
Biju Das <biju.das.jz@bp.renesas.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v8 1/4] arm64: dts: renesas: r9a08g046: Enable TSU
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 ` Biju Das
2026-11-04 15:32 ` sashiko-bot
2026-11-04 15:15 ` [PATCH v8 2/4] arm64: dts: renesas: r9a08g046: Add USB2.0 host/phy device nodes Biju Das
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Biju Das @ 2026-11-04 15:15 UTC (permalink / raw)
To: Geert Uytterhoeven, Magnus Damm, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-renesas-soc, devicetree, linux-kernel, Biju Das
From: Biju Das <biju.das.jz@bp.renesas.com>
Add #cooling-cells to the CPU nodes, and describe the ADC1 (used
exclusively by the TSU) and TSU nodes along with a CPU thermal zone
using passive and critical trip points, with CPU frequency cooling
maps for thermal mitigation.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v8:
movedvfrom [1]
[1] https://lore.kernel.org/all/20260925061617.127349-8-biju.das.jz@bp.renesas.com/
---
arch/arm64/boot/dts/renesas/r9a08g046.dtsi | 66 ++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
index f33d5d7468ff..35046c7dac54 100644
--- a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
@@ -179,6 +179,7 @@ cpu0: cpu@0 {
next-level-cache = <&L3_CA55>;
enable-method = "psci";
clocks = <&cpg CPG_CORE R9A08G046_CLK_IC0>;
+ #cooling-cells = <2>;
operating-points-v2 = <&cluster0_opp>;
};
@@ -189,6 +190,7 @@ cpu1: cpu@100 {
next-level-cache = <&L3_CA55>;
enable-method = "psci";
clocks = <&cpg CPG_CORE R9A08G046_CLK_IC1>;
+ #cooling-cells = <2>;
operating-points-v2 = <&cluster0_opp>;
};
@@ -199,6 +201,7 @@ cpu2: cpu@200 {
next-level-cache = <&L3_CA55>;
enable-method = "psci";
clocks = <&cpg CPG_CORE R9A08G046_CLK_IC2>;
+ #cooling-cells = <2>;
operating-points-v2 = <&cluster0_opp>;
};
@@ -209,6 +212,7 @@ cpu3: cpu@300 {
next-level-cache = <&L3_CA55>;
enable-method = "psci";
clocks = <&cpg CPG_CORE R9A08G046_CLK_IC3>;
+ #cooling-cells = <2>;
operating-points-v2 = <&cluster0_opp>;
};
@@ -374,6 +378,37 @@ scif5: serial@1004e000 {
status = "disabled";
};
+ 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";
+ };
+
i2c0: i2c@100ae000 {
compatible = "renesas,riic-r9a08g046", "renesas,riic-r9a09g057";
reg = <0 0x100ae000 0 0x400>;
@@ -1382,6 +1417,37 @@ stmmac_axi_setup: stmmac-axi-config {
snps,blen = <16 8 4 0 0 0 0>;
};
+ thermal-zones {
+ cpu-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <250>;
+ thermal-sensors = <&tsu>;
+
+ cooling-maps {
+ map0 {
+ trip = <&target>;
+ cooling-device = <&cpu0 0 3>, <&cpu1 0 3>,
+ <&cpu2 0 3>, <&cpu3 0 3>;
+ contribution = <1024>;
+ };
+ };
+
+ trips {
+ sensor_crit: sensor-crit {
+ temperature = <120000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+
+ target: trip-point {
+ temperature = <95000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+ };
+ };
+ };
+
timer {
compatible = "arm,armv8-timer";
interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v8 2/4] arm64: dts: renesas: r9a08g046: Add USB2.0 host/phy device nodes
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:15 ` 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
3 siblings, 0 replies; 6+ messages in thread
From: Biju Das @ 2026-11-04 15:15 UTC (permalink / raw)
To: Geert Uytterhoeven, Magnus Damm, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-renesas-soc, devicetree, linux-kernel, Biju Das
From: Biju Das <biju.das.jz@bp.renesas.com>
Add USB2.0 device nodes to the RZ/G3L (r9a08g046) SoC DTSI, covering
the USB PHY controller, OHCI/EHCI host controllers, and USB2 PHYs for
both ports.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v7->v8:
* Replaced place holders.
v6->v7:
* Updated commit header
v5->v6:
* No change
v4->v5:
* Dropped renesas,sysc-pwrrdy property.
v3->v4:
* No change
v2->v3:
* No change
v1->v2:
* Updated commit description.
* Added regulators group node and its children.
---
arch/arm64/boot/dts/renesas/r9a08g046.dtsi | 92 ++++++++++++++++++++++++++++--
1 file changed, 88 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
index 35046c7dac54..4df290c9937d 100644
--- a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
@@ -1301,24 +1301,108 @@ queue3 {
};
};
+ phyrst: usbphy-ctrl@11e00000 {
+ compatible = "renesas,r9a08g046-usbphy-ctrl";
+ reg = <0 0x11e00000 0 0x10000>;
+ clocks = <&cpg CPG_MOD R9A08G046_USB_PCLK>;
+ resets = <&cpg R9A08G046_USB_PRESETN>;
+ power-domains = <&cpg>;
+ #reset-cells = <1>;
+ status = "disabled";
+
+ regulators {
+ usb0_vbus_otg: vbus0 {
+ regulator-name = "usb0_vbus";
+ };
+
+ usb1_vbus_otg: vbus1 {
+ regulator-name = "usb1_vbus";
+ };
+ };
+ };
+
ohci0: usb@11e10000 {
+ compatible = "generic-ohci";
reg = <0 0x11e10000 0 0x100>;
- /* placeholder */
+ interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD R9A08G046_USB_PCLK>,
+ <&cpg CPG_MOD R9A08G046_USB_U2H0_HCLK>;
+ resets = <&phyrst 0>,
+ <&cpg R9A08G046_USB_U2H0_HRESETN>;
+ phys = <&usb2_phy0 1>;
+ phy-names = "usb";
+ power-domains = <&cpg>;
+ status = "disabled";
};
ohci1: usb@11e90000 {
+ compatible = "generic-ohci";
reg = <0 0x11e90000 0 0x100>;
- /* placeholder */
+ interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD R9A08G046_USB_PCLK>,
+ <&cpg CPG_MOD R9A08G046_USB_U2H1_HCLK>;
+ resets = <&phyrst 1>,
+ <&cpg R9A08G046_USB_U2H1_HRESETN>;
+ phys = <&usb2_phy1 1>;
+ phy-names = "usb";
+ power-domains = <&cpg>;
+ status = "disabled";
};
ehci0: usb@11e10100 {
+ compatible = "generic-ehci";
reg = <0 0x11e10100 0 0x100>;
- /* placeholder */
+ interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD R9A08G046_USB_PCLK>,
+ <&cpg CPG_MOD R9A08G046_USB_U2H0_HCLK>;
+ resets = <&phyrst 0>,
+ <&cpg R9A08G046_USB_U2H0_HRESETN>;
+ phys = <&usb2_phy0 2>;
+ phy-names = "usb";
+ companion = <&ohci0>;
+ power-domains = <&cpg>;
+ status = "disabled";
};
ehci1: usb@11e90100 {
+ compatible = "generic-ehci";
reg = <0 0x11e90100 0 0x100>;
- /* placeholder */
+ interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD R9A08G046_USB_PCLK>,
+ <&cpg CPG_MOD R9A08G046_USB_U2H1_HCLK>;
+ resets = <&phyrst 1>,
+ <&cpg R9A08G046_USB_U2H1_HRESETN>;
+ phys = <&usb2_phy1 2>;
+ phy-names = "usb";
+ companion = <&ohci1>;
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ usb2_phy0: usb-phy@11e10200 {
+ compatible = "renesas,usb2-phy-r9a08g046";
+ reg = <0 0x11e10200 0 0x700>;
+ interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD R9A08G046_USB_PCLK>,
+ <&cpg CPG_MOD R9A08G046_USB_U2H0_HCLK>;
+ resets = <&phyrst 0>,
+ <&cpg R9A08G046_USB_U2H0_HRESETN>;
+ #phy-cells = <1>;
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ usb2_phy1: usb-phy@11e90200 {
+ compatible = "renesas,usb2-phy-r9a08g046";
+ reg = <0 0x11e90200 0 0x700>;
+ interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD R9A08G046_USB_PCLK>,
+ <&cpg CPG_MOD R9A08G046_USB_U2H1_HCLK>;
+ resets = <&phyrst 1>,
+ <&cpg R9A08G046_USB_U2H1_HRESETN>;
+ #phy-cells = <1>;
+ power-domains = <&cpg>;
+ status = "disabled";
};
hsusb0: usb@11e30000 {
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v8 3/4] arm64: dts: renesas: r9a08g046: Add USB2.0 function device nodes
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:15 ` [PATCH v8 2/4] arm64: dts: renesas: r9a08g046: Add USB2.0 host/phy device nodes Biju Das
@ 2026-11-04 15:15 ` Biju Das
2026-11-04 15:15 ` [PATCH v8 4/4] arm64: dts: renesas: r9a08g046l48-smarc: Enable USB2.0 support Biju Das
3 siblings, 0 replies; 6+ messages in thread
From: Biju Das @ 2026-11-04 15:15 UTC (permalink / raw)
To: Geert Uytterhoeven, Magnus Damm, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-renesas-soc, devicetree, linux-kernel, Biju Das
From: Biju Das <biju.das.jz@bp.renesas.com>
Add USB2.0 function device nodes to the RZ/G3L (r9a08g046) SoC DTSI.
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v7->v8:
* Replaced place holders.
v7:
* Moved the patch from [1]
* Collected the tag.
[1] https://lore.kernel.org/all/20260707145135.247565-3-biju.das.jz@bp.renesas.com/
---
arch/arm64/boot/dts/renesas/r9a08g046.dtsi | 35 +++++++++++++++++++++++++++++-
1 file changed, 34 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
index 4df290c9937d..7e379f6ab837 100644
--- a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
@@ -1406,8 +1406,41 @@ usb2_phy1: usb-phy@11e90200 {
};
hsusb0: usb@11e30000 {
+ compatible = "renesas,usbhs-r9a08g046",
+ "renesas,rzg2l-usbhs";
reg = <0 0x11e30000 0 0x10000>;
- /* placeholder */
+ interrupts = <GIC_SPI 123 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD R9A08G046_USB_PCLK>,
+ <&cpg CPG_MOD R9A08G046_USB_U2P0_EXR_CPUCLK>;
+ resets = <&phyrst 0>,
+ <&cpg R9A08G046_USB_U2P0_EXL_SYSRST>;
+ renesas,buswait = <7>;
+ phys = <&usb2_phy0 3>;
+ phy-names = "usb";
+ power-domains = <&cpg>;
+ status = "disabled";
+ };
+
+ hsusb1: usb@11eb0000 {
+ compatible = "renesas,usbhs-r9a08g046",
+ "renesas,rzg2l-usbhs";
+ reg = <0 0x11eb0000 0 0x10000>;
+ interrupts = <GIC_SPI 127 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD R9A08G046_USB_PCLK>,
+ <&cpg CPG_MOD R9A08G046_USB_U2P1_EXR_CPUCLK>;
+ resets = <&phyrst 1>,
+ <&cpg R9A08G046_USB_U2P1_EXL_SYSRST>;
+ renesas,buswait = <7>;
+ phys = <&usb2_phy1 3>;
+ phy-names = "usb";
+ power-domains = <&cpg>;
+ status = "disabled";
};
pcie: pcie@11e40000 {
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v8 4/4] arm64: dts: renesas: r9a08g046l48-smarc: Enable USB2.0 support
2026-11-04 15:15 [PATCH v8 0/4] Enable USB2.0 and TSU on RZ/G3L SMARC EVK Biju Das
` (2 preceding siblings ...)
2026-11-04 15:15 ` [PATCH v8 3/4] arm64: dts: renesas: r9a08g046: Add USB2.0 function " Biju Das
@ 2026-11-04 15:15 ` Biju Das
3 siblings, 0 replies; 6+ messages in thread
From: Biju Das @ 2026-11-04 15:15 UTC (permalink / raw)
To: Geert Uytterhoeven, Magnus Damm, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-renesas-soc, devicetree, linux-kernel, Biju Das
From: Biju Das <biju.das.jz@bp.renesas.com>
Enable USB2.0 Host/Function on the RZ/G3L SMARC EVK board.
Drop the explicit "disabled" overrides for the OHCI, EHCI and HSUSB
nodes, as they are disabled by default in the SoC DTSI. Enable the USB
PHY controller and both USB2 PHYs, with VBUS supplies, and add the USB0
pin control (OVRCUR/VBUSEN). Port 1 has no OTG pins.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v7->v8:
* Updated commit header.
* Dropped redundant nodes from board dts as it is defined in common
board dtsi
* Dropped usb1_pins.
v6->v7:
* Moved the patch.
* dr_mode changed to 'host' as function is not enabled yet.
v5->v6:
* No change.
v4->v5:
* No change.
v3->v4:
* No change.
v2->v3:
* No change.
v1->v2:
* Updated commit description.
---
arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts | 42 +++++++++++-----------
1 file changed, 22 insertions(+), 20 deletions(-)
diff --git a/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts b/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
index 68d7b579e352..9ffaead2c6be 100644
--- a/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
+++ b/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
@@ -71,18 +71,6 @@ codec_dai: codec {
#endif
};
-&ehci0 {
- status = "disabled";
-};
-
-&ehci1 {
- status = "disabled";
-};
-
-&hsusb0 {
- status = "disabled";
-};
-
&i2c2 {
pinctrl-0 = <&i2c2_pins>;
pinctrl-names = "default";
@@ -134,19 +122,15 @@ &keys {
#endif
};
-&ohci0 {
- status = "disabled";
-};
-
-&ohci1 {
- status = "disabled";
-};
-
&pcie {
pinctrl-0 = <&pcie_pins>;
pinctrl-names = "default";
};
+&phyrst {
+ status = "okay";
+};
+
&pinctrl {
audio_clk_pins: audio-clock {
pinmux = <RZG3L_PORT_PINMUX(H, 4, 6)>, /* AUDIO_CLK_B */
@@ -217,6 +201,11 @@ ssi0_pins: ssi0 {
<RZG3L_PORT_PINMUX(H, 2, 9)>, /* SSIF0_RCK */
<RZG3L_PORT_PINMUX(H, 3, 9)>; /* SSIF0_TXD */
};
+
+ usb0_pins: usb0 {
+ pinmux = <RZG3L_PORT_PINMUX(3, 0, 12)>, /* USB20_OVRCUR */
+ <RZG3L_PORT_PINMUX(3, 1, 12)>; /* USB20_VBUSEN */
+ };
};
#if SW_SER0_PMOD
@@ -277,3 +266,16 @@ &ssi0 {
status = "okay";
};
#endif
+
+&usb2_phy0 {
+ pinctrl-0 = <&usb0_pins>;
+ pinctrl-names = "default";
+ vbus-supply = <&usb0_vbus_otg>;
+ status = "okay";
+};
+
+&usb2_phy1 {
+ vbus-supply = <&usb1_vbus_otg>;
+ renesas,no-otg-pins;
+ status = "okay";
+};
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v8 1/4] arm64: dts: renesas: r9a08g046: Enable TSU
2026-11-04 15:15 ` [PATCH v8 1/4] arm64: dts: renesas: r9a08g046: Enable TSU Biju Das
@ 2026-11-04 15:32 ` sashiko-bot
0 siblings, 0 replies; 6+ messages in thread
From: sashiko-bot @ 2026-11-04 15:32 UTC (permalink / raw)
To: Biju Das; +Cc: devicetree, robh, conor+dt, wsa+renesas
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-11-04 15:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox