* [PATCH v9 0/4] Enable USB2.0 and TSU on RZ/G3L SMARC EVK
@ 2026-11-25 11:05 Biju Das
2026-11-25 11:05 ` [PATCH v9 1/4] arm64: dts: renesas: r9a08g046: Enable TSU Biju Das
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Biju Das @ 2026-11-25 11:05 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.
This patch series is based on top of [1]
[1] https://lore.kernel.org/all/20261124-sdhi_rzg3l-v3-0-67cdc83b7e48@bp.renesas.com/T/#t
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
Changes in v9:
- Restored usb1_pins to fix over-current condition during boot.
- Link to v8: https://lore.kernel.org/r/20261104-usb_rzg3l-v8-0-ab109c4bd108@bp.renesas.com
Changes in 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 | 49 +++---
2 files changed, 217 insertions(+), 25 deletions(-)
---
base-commit: b086ce5618932e5ee2a0fd5fc759f70ba41ee1b9
change-id: 20261104-usb_rzg3l-16fe5cc8a82d
Best regards,
--
Biju Das <biju.das.jz@bp.renesas.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v9 1/4] arm64: dts: renesas: r9a08g046: Enable TSU
2026-11-25 11:05 [PATCH v9 0/4] Enable USB2.0 and TSU on RZ/G3L SMARC EVK Biju Das
@ 2026-11-25 11:05 ` Biju Das
2026-11-26 10:31 ` Geert Uytterhoeven
2026-11-25 11:05 ` [PATCH v9 2/4] arm64: dts: renesas: r9a08g046: Add USB2.0 host/phy device nodes Biju Das
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Biju Das @ 2026-11-25 11:05 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->v9:
* No change.
v8:
moved from [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 b710f47d3f03..241ba7b5da74 100644
--- a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
@@ -186,6 +186,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>;
};
@@ -196,6 +197,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>;
};
@@ -206,6 +208,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>;
};
@@ -216,6 +219,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>;
};
@@ -381,6 +385,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>;
@@ -1494,6 +1529,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 [flat|nested] 7+ messages in thread
* [PATCH v9 2/4] arm64: dts: renesas: r9a08g046: Add USB2.0 host/phy device nodes
2026-11-25 11:05 [PATCH v9 0/4] Enable USB2.0 and TSU on RZ/G3L SMARC EVK Biju Das
2026-11-25 11:05 ` [PATCH v9 1/4] arm64: dts: renesas: r9a08g046: Enable TSU Biju Das
@ 2026-11-25 11:05 ` Biju Das
2026-11-25 11:05 ` [PATCH v9 3/4] arm64: dts: renesas: r9a08g046: Add USB2.0 function " Biju Das
2026-11-25 11:05 ` [PATCH v9 4/4] arm64: dts: renesas: r9a08g046l48-smarc: Enable USB2.0 support Biju Das
3 siblings, 0 replies; 7+ messages in thread
From: Biju Das @ 2026-11-25 11:05 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>
---
v8->v9:
* No change.
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 241ba7b5da74..b41a813b01b8 100644
--- a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
@@ -1413,24 +1413,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 [flat|nested] 7+ messages in thread
* [PATCH v9 3/4] arm64: dts: renesas: r9a08g046: Add USB2.0 function device nodes
2026-11-25 11:05 [PATCH v9 0/4] Enable USB2.0 and TSU on RZ/G3L SMARC EVK Biju Das
2026-11-25 11:05 ` [PATCH v9 1/4] arm64: dts: renesas: r9a08g046: Enable TSU Biju Das
2026-11-25 11:05 ` [PATCH v9 2/4] arm64: dts: renesas: r9a08g046: Add USB2.0 host/phy device nodes Biju Das
@ 2026-11-25 11:05 ` Biju Das
2026-11-25 11:05 ` [PATCH v9 4/4] arm64: dts: renesas: r9a08g046l48-smarc: Enable USB2.0 support Biju Das
3 siblings, 0 replies; 7+ messages in thread
From: Biju Das @ 2026-11-25 11:05 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>
---
v8->v9:
* No change.
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 b41a813b01b8..682301a38a71 100644
--- a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
@@ -1518,8 +1518,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 [flat|nested] 7+ messages in thread
* [PATCH v9 4/4] arm64: dts: renesas: r9a08g046l48-smarc: Enable USB2.0 support
2026-11-25 11:05 [PATCH v9 0/4] Enable USB2.0 and TSU on RZ/G3L SMARC EVK Biju Das
` (2 preceding siblings ...)
2026-11-25 11:05 ` [PATCH v9 3/4] arm64: dts: renesas: r9a08g046: Add USB2.0 function " Biju Das
@ 2026-11-25 11:05 ` Biju Das
3 siblings, 0 replies; 7+ messages in thread
From: Biju Das @ 2026-11-25 11:05 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.
Port 1 has no OTG pins.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v8->v9:
* Restored usb1_pins to fix over-current condition during boot.
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 | 49 +++++++++++++---------
1 file changed, 29 insertions(+), 20 deletions(-)
diff --git a/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts b/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
index abe0ae7cbc44..c96d742422b3 100644
--- a/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
+++ b/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
@@ -132,18 +132,6 @@ &can_transceiver {
status = "okay";
};
-&ehci0 {
- status = "disabled";
-};
-
-&ehci1 {
- status = "disabled";
-};
-
-&hsusb0 {
- status = "disabled";
-};
-
&i2c2 {
pinctrl-0 = <&i2c2_pins>;
pinctrl-names = "default";
@@ -195,19 +183,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 */
@@ -352,6 +336,16 @@ 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 */
+ };
+
+ usb1_pins: usb1 {
+ pinmux = <RZG3L_PORT_PINMUX(3, 4, 12)>, /* USB21_OVRCUR */
+ <RZG3L_PORT_PINMUX(3, 5, 12)>; /* USB21_VBUSEN */
+ };
};
#if SW_SER0_PMOD
@@ -427,3 +421,18 @@ &ssi0 {
status = "okay";
};
#endif
+
+&usb2_phy0 {
+ pinctrl-0 = <&usb0_pins>;
+ pinctrl-names = "default";
+ vbus-supply = <&usb0_vbus_otg>;
+ status = "okay";
+};
+
+&usb2_phy1 {
+ pinctrl-0 = <&usb1_pins>;
+ pinctrl-names = "default";
+ vbus-supply = <&usb1_vbus_otg>;
+ renesas,no-otg-pins;
+ status = "okay";
+};
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v9 1/4] arm64: dts: renesas: r9a08g046: Enable TSU
2026-11-25 11:05 ` [PATCH v9 1/4] arm64: dts: renesas: r9a08g046: Enable TSU Biju Das
@ 2026-11-26 10:31 ` Geert Uytterhoeven
2026-11-26 11:53 ` Biju Das
0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2026-11-26 10:31 UTC (permalink / raw)
To: Biju Das
Cc: linux-renesas-soc, devicetree, linux-kernel, Biju Das,
Magnus Damm, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Jonathan Cameron, linux-iio
Hi Biju,
Cc IIO
On Wed, Nov 25, 2026, at 12:05, Biju Das wrote:
> 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>
Thanks for your patch!
> --- a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
> @@ -381,6 +385,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>;
<&adc1 8>
You cannot have "channel@8" in the ADC node and magically assume
consumers should refer to this using "<&adc1 0>".
I don't buy your rationale in [1]:
"There is a mapping between internal Linux array index (0) and the actual hardware channel ID (8).
See the code
https://elixir.bootlin.com/linux/v7.3-rc3/source/drivers/iio/adc/rzg2l_adc.c#L354"
This mapping is in the driver, and there is no mention of it in the DT bindings.
This means the driver must be fixed first, too.
> + io-channel-names = "tsu";
> + };
> +
> i2c0: i2c@100ae000 {
> compatible = "renesas,riic-r9a08g046", "renesas,riic-r9a09g057";
> reg = <0 0x100ae000 0 0x400>;
[1] https://lore.kernel.org/TY3PR01MB11346F7B4718113C76B93362986872@TY3PR01MB11346.jpnprd01.prod.outlook.com/
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH v9 1/4] arm64: dts: renesas: r9a08g046: Enable TSU
2026-11-26 10:31 ` Geert Uytterhoeven
@ 2026-11-26 11:53 ` Biju Das
0 siblings, 0 replies; 7+ messages in thread
From: Biju Das @ 2026-11-26 11:53 UTC (permalink / raw)
To: Geert Uytterhoeven, biju.das.au
Cc: linux-renesas-soc, devicetree, linux-kernel, magnus.damm,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jonathan Cameron,
linux-iio
Hi Geert,
Thanks for the feedback.
> -----Original Message-----
> From: Geert Uytterhoeven <geert+renesas@glider.be>
> Sent: 26 November 2026 10:32
> Subject: Re: [PATCH v9 1/4] arm64: dts: renesas: r9a08g046: Enable TSU
>
> Hi Biju,
>
> Cc IIO
>
> On Wed, Nov 25, 2026, at 12:05, Biju Das wrote:
> > 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>
>
> Thanks for your patch!
>
> > --- a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
> > +++ b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
>
> > @@ -381,6 +385,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>;
>
> <&adc1 8>
With the above entries, I get below error as adc1 has a single channel
https://elixir.bootlin.com/linux/v7.4-rc1/source/drivers/iio/inkern.c#L135
[ 15.067383] iio iio:device0: invalid channel index 8
[ 15.083648] ERROR: could not get IIO channel /soc/thermal@108d0000:tsu(0)
[ 15.094096] rzg3s-thermal 108d0000.thermal: error -EINVAL: Failed to get IIO channel!
[ 15.103500] rzg3s-thermal 108d0000.thermal: probe with driver rzg3s-thermal failed with error -22
>
> You cannot have "channel@8" in the ADC node and magically assume consumers should refer to this using
> "<&adc1 0>".
ADC1 has single channel and HW manual says it is ADCR8(A/D conversion result register 8)
That is the reason for channel@8.
You mean I should use channel@0 instead to avoid the above error as a single channel
registered by iio??
channel@0 {
reg = <8>;
}
>
> I don't buy your rationale in [1]:
>
> "There is a mapping between internal Linux array index (0) and the actual hardware channel ID (8).
>
> See the code
> https://elixir.bootlin.com/linux/v7.3-rc3/source/drivers/iio/adc/rzg2l_adc.c#L354"
>
> This mapping is in the driver, and there is no mention of it in the DT bindings.
> This means the driver must be fixed first, too.
OK. You mean I should add custom of_xlate in driver?
Please let me know if you prefer adding .of_xlate to the ADC driver
so we can use <&adc1 8> in the DTS, or keeping <&adc1 0> with the default
simple xlate.
Cheers,
Biju
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-11-26 11:53 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-25 11:05 [PATCH v9 0/4] Enable USB2.0 and TSU on RZ/G3L SMARC EVK Biju Das
2026-11-25 11:05 ` [PATCH v9 1/4] arm64: dts: renesas: r9a08g046: Enable TSU Biju Das
2026-11-26 10:31 ` Geert Uytterhoeven
2026-11-26 11:53 ` Biju Das
2026-11-25 11:05 ` [PATCH v9 2/4] arm64: dts: renesas: r9a08g046: Add USB2.0 host/phy device nodes Biju Das
2026-11-25 11:05 ` [PATCH v9 3/4] arm64: dts: renesas: r9a08g046: Add USB2.0 function " Biju Das
2026-11-25 11:05 ` [PATCH v9 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
all inboxes | Powered by JetHome®