* [PATCH v3 1/9] dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/G3L support
2026-07-07 14:36 [PATCH v3 0/9] Add RZ/G3L USB2.0 host support Biju
@ 2026-07-07 14:36 ` Biju
2026-07-07 14:44 ` sashiko-bot
2026-07-07 14:36 ` [PATCH v3 2/9] dt-bindings: phy: renesas,usb2-phy: Document RZ/G3L PHY bindings Biju
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Biju @ 2026-07-07 14:36 UTC (permalink / raw)
To: Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm
Cc: Biju Das, devicetree, linux-kernel, linux-renesas-soc,
Prabhakar Mahadev Lad, Biju Das, Conor Dooley
From: Biju Das <biju.das.jz@bp.renesas.com>
Document Renesas RZ/G3L (r9a08g046) USB PHY controller bindings.
The RZ/G3L USB PHY block is similar to RZ/G3S but differs in that each
port has its own OTG controller, whereas RZ/G3S only has one on port 1.
To reflect this, RZ/G3L uses a regulators sub-node with per-port vbus0
and vbus1 entries instead of the single regulator-vbus property used
by other compatible SoCs.
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v2->v3:
* Replaced items->enum
* Collected tag.
v1->v2:
* Updated commit description.
* Added enum instead of const in the compatible section.
* Dropped regulator1-vbus and added a regulators group node.
* Updated schema check.
---
.../reset/renesas,rzg2l-usbphy-ctrl.yaml | 48 +++++++++++++++++--
1 file changed, 45 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml b/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml
index c83469a1b379..06e003218d2a 100644
--- a/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml
+++ b/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml
@@ -16,13 +16,16 @@ description:
properties:
compatible:
oneOf:
+ - enum:
+ - renesas,r9a08g045-usbphy-ctrl # RZ/G3S
+ - renesas,r9a08g046-usbphy-ctrl # RZ/G3L
+
- items:
- enum:
- renesas,r9a07g043-usbphy-ctrl # RZ/G2UL and RZ/Five
- renesas,r9a07g044-usbphy-ctrl # RZ/G2{L,LC}
- renesas,r9a07g054-usbphy-ctrl # RZ/V2L
- const: renesas,rzg2l-usbphy-ctrl
- - const: renesas,r9a08g045-usbphy-ctrl # RZ/G3S
reg:
maxItems: 1
@@ -50,6 +53,28 @@ properties:
$ref: /schemas/regulator/regulator.yaml#
unevaluatedProperties: false
+ regulators:
+ type: object
+ description:
+ list of vbus regulators provided by this controller.
+
+ properties:
+ vbus0:
+ type: object
+ description: Port 1 USB VBUS regulator
+ $ref: /schemas/regulator/regulator.yaml#
+ unevaluatedProperties: false
+
+ vbus1:
+ type: object
+ description: Port 2 USB VBUS regulator
+ $ref: /schemas/regulator/regulator.yaml#
+ unevaluatedProperties: false
+
+ required:
+ - vbus0
+ - vbus1
+
renesas,sysc-pwrrdy:
description:
The system controller PWRRDY indicates to the USB PHY if the power supply
@@ -71,14 +96,15 @@ required:
- resets
- power-domains
- '#reset-cells'
- - regulator-vbus
allOf:
- if:
properties:
compatible:
contains:
- const: renesas,r9a08g045-usbphy-ctrl
+ enum:
+ - renesas,r9a08g045-usbphy-ctrl
+ - renesas,r9a08g046-usbphy-ctrl
then:
required:
- renesas,sysc-pwrrdy
@@ -86,6 +112,22 @@ allOf:
properties:
renesas,sysc-pwrrdy: false
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: renesas,r9a08g046-usbphy-ctrl
+ then:
+ properties:
+ regulator-vbus: false
+ required:
+ - regulators
+ else:
+ properties:
+ regulators: false
+ required:
+ - regulator-vbus
+
additionalProperties: false
examples:
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v3 1/9] dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/G3L support
2026-07-07 14:36 ` [PATCH v3 1/9] dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/G3L support Biju
@ 2026-07-07 14:44 ` sashiko-bot
0 siblings, 0 replies; 8+ messages in thread
From: sashiko-bot @ 2026-07-07 14:44 UTC (permalink / raw)
To: Biju; +Cc: conor+dt, robh, wsa+renesas, devicetree
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The newly added `regulators` object node is missing the `additionalProperties: false` constraint.
--
--- Patch [1]: [PATCH v3 1/9] dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/G3L support ---
commit 13d2a223ee35259aa34d58ec5e02e2fa9d54297b
Author: Biju Das <biju.das.jz@bp.renesas.com>
dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/G3L support
Document Renesas RZ/G3L (r9a08g046) USB PHY controller bindings.
The RZ/G3L USB PHY block uses a regulators sub-node with per-port vbus0
and vbus1 entries instead of the single regulator-vbus property used
by other compatible SoCs.
> diff --git a/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml b/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml
> index c83469a1b379a..06e003218d2a8 100644
> --- a/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml
> +++ b/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml
[ ... ]
> @@ -50,6 +53,28 @@ properties:
> $ref: /schemas/regulator/regulator.yaml#
> unevaluatedProperties: false
>
> + regulators:
> + type: object
> + description:
> + list of vbus regulators provided by this controller.
> +
[Severity: Low]
Is the additionalProperties: false constraint missing here?
Without this constraint, device tree schema validation will silently accept
undocumented or malformed properties (like typos in vbus names) inside the
regulators node, as the parent object doesn't strictly forbid them.
> + properties:
> + vbus0:
> + type: object
> + description: Port 1 USB VBUS regulator
> + $ref: /schemas/regulator/regulator.yaml#
> + unevaluatedProperties: false
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260707143646.245177-1-biju.das.jz@bp.renesas.com?part=1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3 2/9] dt-bindings: phy: renesas,usb2-phy: Document RZ/G3L PHY bindings
2026-07-07 14:36 [PATCH v3 0/9] Add RZ/G3L USB2.0 host support Biju
2026-07-07 14:36 ` [PATCH v3 1/9] dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/G3L support Biju
@ 2026-07-07 14:36 ` Biju
2026-07-07 14:36 ` [PATCH v3 8/9] arm64: dts: renesas: r9a08g046: Add USB2.0 device nodes Biju
2026-07-07 14:36 ` [PATCH v3 9/9] arm64: dts: renesas: r9a08g046l48-smarc: Add USB2.0 support Biju
3 siblings, 0 replies; 8+ messages in thread
From: Biju @ 2026-07-07 14:36 UTC (permalink / raw)
To: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm
Cc: Biju Das, Neil Armstrong, Yoshihiro Shimoda, linux-phy,
devicetree, linux-kernel, linux-renesas-soc,
Prabhakar Mahadev Lad, Biju Das, Krzysztof Kozlowski
From: Biju Das <biju.das.jz@bp.renesas.com>
Add device tree binding support for the RZ/G3L (r9a08g046) USB2 PHY.
The RZ/G3L USB PHY is almost identical to the RZ/G3S USB PHY, the
difference being 2 OTG blocks on RZ/G3L compared to 1 on RZ/G3S.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v2->v3:
* No change
v1->v2:
* Collected tag.
---
Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml b/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml
index 9740e5b335f9..d6b9d08ceec6 100644
--- a/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml
@@ -16,6 +16,7 @@ properties:
- enum:
- renesas,usb2-phy-r8a77470 # RZ/G1C
- renesas,usb2-phy-r9a08g045 # RZ/G3S
+ - renesas,usb2-phy-r9a08g046 # RZ/G3L
- renesas,usb2-phy-r9a09g057 # RZ/V2H(P)
- items:
@@ -132,6 +133,7 @@ allOf:
enum:
- renesas,usb2-phy-r9a09g057
- renesas,usb2-phy-r9a08g045
+ - renesas,usb2-phy-r9a08g046
- renesas,rzg2l-usb2-phy
then:
properties:
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH v3 8/9] arm64: dts: renesas: r9a08g046: Add USB2.0 device nodes
2026-07-07 14:36 [PATCH v3 0/9] Add RZ/G3L USB2.0 host support Biju
2026-07-07 14:36 ` [PATCH v3 1/9] dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/G3L support Biju
2026-07-07 14:36 ` [PATCH v3 2/9] dt-bindings: phy: renesas,usb2-phy: Document RZ/G3L PHY bindings Biju
@ 2026-07-07 14:36 ` Biju
2026-07-07 14:54 ` sashiko-bot
2026-07-07 14:36 ` [PATCH v3 9/9] arm64: dts: renesas: r9a08g046l48-smarc: Add USB2.0 support Biju
3 siblings, 1 reply; 8+ messages in thread
From: Biju @ 2026-07-07 14:36 UTC (permalink / raw)
To: Geert Uytterhoeven, Magnus Damm, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Biju Das, linux-renesas-soc, devicetree, linux-kernel,
Prabhakar Mahadev Lad, 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>
---
v1->v2:
* Updated commit description.
* Added regulators group node and its children.
---
arch/arm64/boot/dts/renesas/r9a08g046.dtsi | 105 +++++++++++++++++++++
1 file changed, 105 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
index 85e409ac8d5c..926a81cec37e 100644
--- a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
@@ -1198,6 +1198,111 @@ 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>;
+ renesas,sysc-pwrrdy = <&sysc 0xd70 0x1>;
+ 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>;
+ 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>;
+ 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>;
+ 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>;
+ 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";
+ };
+
pcie: pcie@11e40000 {
reg = <0 0x11e40000 0 0x10000>;
ranges = <0x02000000 0 0x30000000 0 0x30000000 0 0x08000000>;
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v3 8/9] arm64: dts: renesas: r9a08g046: Add USB2.0 device nodes
2026-07-07 14:36 ` [PATCH v3 8/9] arm64: dts: renesas: r9a08g046: Add USB2.0 device nodes Biju
@ 2026-07-07 14:54 ` sashiko-bot
0 siblings, 0 replies; 8+ messages in thread
From: sashiko-bot @ 2026-07-07 14:54 UTC (permalink / raw)
To: Biju; +Cc: conor+dt, robh, devicetree, wsa+renesas
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
New issues:
- [Low] module_platform_driver() is invoked twice in the same C file, which will cause a build failure when compiled as a loadable module.
Pre-existing issues:
- [High] The fix for the VBUS regulator enable_count leak is incomplete and leaves the count unbalanced if the driver explicitly calls regulator_enable() on a pre-enabled regulator.
--
--- Patch [8]: [PATCH v3 8/9] arm64: dts: renesas: r9a08g046: Add USB2.0 device nodes ---
commit 5af51dcc7dc2267ce2a724cd23f6ac8e1361e710
Author: Biju Das <biju.das.jz@bp.renesas.com>
regulator: renesas-usb-vbus-regulator: Add RZ/G3L VBUS regulator support
Add dual USB VBUS regulator support for the RZ/G3L (r9a08g046) SoC.
Register a separate rzg3l-usb-vbus-regulator platform driver for it.
> diff --git a/drivers/regulator/renesas-usb-vbus-regulator.c b/drivers/regulator/renesas-usb-vbus-regulator.c
> index 9ba791bd72eca..9028340008749 100644
> --- a/drivers/regulator/renesas-usb-vbus-regulator.c
> +++ b/drivers/regulator/renesas-usb-vbus-regulator.c
[ ... ]
> @@ -64,6 +108,15 @@ static struct platform_driver rzg2l_usb_vbus_regulator_driver = {
> };
> module_platform_driver(rzg2l_usb_vbus_regulator_driver);
>
> +static struct platform_driver rzg3l_usb_vbus_regulator_driver = {
> + .probe = rzg3l_usb_vbus_regulator_probe,
> + .driver = {
> + .name = "rzg3l-usb-vbus-regulator",
> + .probe_type = PROBE_PREFER_ASYNCHRONOUS,
> + },
> +};
> +module_platform_driver(rzg3l_usb_vbus_regulator_driver);
[Severity: Low]
Will this cause a build failure when compiled as a loadable module?
The module_platform_driver() macro is invoked twice in the same C file, which
will expand to redefine the init_module and cleanup_module alias functions.
commit 30054990ee806fb8d79768ae79587b9acfe0f6a6
Author: Biju Das <biju.das.jz@bp.renesas.com>
phy: renesas: phy-rcar-gen3-usb2: Fix devm action registration for disabled VBUS regulator
Fix the devm disable action registration to base it on actual enabled state via
regulator_is_enabled(), regardless of whether the caller requested an explicit
enable.
> diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> index d06fb52ed5f1b..ef38c3b365d42 100644
> --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
[ ... ]
> @@ -905,15 +905,17 @@ static int rcar_gen3_phy_usb2_vbus_regulator_get_exclusive_enable(struct rcar_ge
> if (IS_ERR(channel->vbus))
> return PTR_ERR(channel->vbus);
>
> - if (!enable)
> - return 0;
> + if (enable) {
> + ret = regulator_enable(channel->vbus);
> + if (ret)
> + return ret;
> + }
>
> - ret = regulator_enable(channel->vbus);
> - if (ret)
> - return ret;
> + if (regulator_is_enabled(channel->vbus))
> + return devm_add_action_or_reset(dev, rcar_gen3_phy_usb2_vbus_disable_action,
> + channel->vbus);
[Severity: High]
This isn't a bug introduced by this patch, but does this leave the enable_count
unbalanced if the driver explicitly calls regulator_enable() on a pre-enabled
regulator?
If the enable parameter is true, regulator_enable() increments the count.
If the regulator was already enabled by hardware, registering a single devm
disable action here fails to account for the double-incremented enable_count.
This would trigger a WARN_ON during device removal, which could panic the
kernel if panic_on_warn is set.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260707143646.245177-1-biju.das.jz@bp.renesas.com?part=8
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3 9/9] arm64: dts: renesas: r9a08g046l48-smarc: Add USB2.0 support
2026-07-07 14:36 [PATCH v3 0/9] Add RZ/G3L USB2.0 host support Biju
` (2 preceding siblings ...)
2026-07-07 14:36 ` [PATCH v3 8/9] arm64: dts: renesas: r9a08g046: Add USB2.0 device nodes Biju
@ 2026-07-07 14:36 ` Biju
2026-07-07 14:59 ` sashiko-bot
3 siblings, 1 reply; 8+ messages in thread
From: Biju @ 2026-07-07 14:36 UTC (permalink / raw)
To: Geert Uytterhoeven, Magnus Damm, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: Biju Das, linux-renesas-soc, devicetree, linux-kernel,
Prabhakar Mahadev Lad, Biju Das
From: Biju Das <biju.das.jz@bp.renesas.com>
Enable USB2.0 on the RZ/G3L SMARC board (r9a08g046l48-smarc).
Port 0 (ehci0, ohci0, usb2_phy0) is configured as OTG with
usb0_pins pinmux (USB20_OVRCUR, USB20_VBUSEN) and usb0_vbus_otg
as the VBUS supply. Port 1 (ehci1, ohci1, usb2_phy1) is configured
as host-only with usb1_pins pinmux (USB21_OVRCUR, USB21_VBUSEN),
usb1_vbus_otg as the VBUS supply, and renesas,no-otg-pins set to
indicate no OTG pin routing. The phyrst USB PHY reset controller is
also enabled.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v2->v3:
* No change.
v1->v2:
* Updated commit description.
---
.../boot/dts/renesas/r9a08g046l48-smarc.dts | 49 +++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts b/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
index 96cc7ee46a6a..b189ae8e808d 100644
--- a/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
+++ b/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
@@ -87,6 +87,16 @@ vqmmc_sd1_pvdd: regulator-vqmmc-sd1-pvdd {
#endif
};
+&ehci0 {
+ dr_mode = "otg";
+ status = "okay";
+};
+
+&ehci1 {
+ dr_mode = "host";
+ status = "okay";
+};
+
&i2c2 {
pinctrl-0 = <&i2c2_pins>;
pinctrl-names = "default";
@@ -138,6 +148,20 @@ &keys {
#endif
};
+&ohci0 {
+ dr_mode = "otg";
+ status = "okay";
+};
+
+&ohci1 {
+ dr_mode = "host";
+ status = "okay";
+};
+
+&phyrst {
+ status = "okay";
+};
+
&pinctrl {
audio_clk_pins: audio-clock {
pinmux = <RZG3L_PORT_PINMUX(H, 4, 6)>, /* AUDIO_CLK_B */
@@ -259,6 +283,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
@@ -330,3 +364,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 related [flat|nested] 8+ messages in thread* Re: [PATCH v3 9/9] arm64: dts: renesas: r9a08g046l48-smarc: Add USB2.0 support
2026-07-07 14:36 ` [PATCH v3 9/9] arm64: dts: renesas: r9a08g046l48-smarc: Add USB2.0 support Biju
@ 2026-07-07 14:59 ` sashiko-bot
0 siblings, 0 replies; 8+ messages in thread
From: sashiko-bot @ 2026-07-07 14:59 UTC (permalink / raw)
To: Biju; +Cc: conor+dt, wsa+renesas, robh, devicetree
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Using `module_platform_driver()` twice in the same C file causes a build failure due to the redefinition of `init_module` and `cleanup_module`.
--
--- Patch [9]: [PATCH v3 9/9] arm64: dts: renesas: r9a08g046l48-smarc: Add USB2.0 support ---
commit 5af51dcc7dc2267ce2a724cd23f6ac8e1361e710
Author: Biju Das <biju.das.jz@bp.renesas.com>
regulator: renesas-usb-vbus-regulator: Add RZ/G3L VBUS regulator support
This commit adds dual USB VBUS regulator support for the RZ/G3L SoC. It
introduces an array of regulator descriptors and a dedicated probe
function to register both regulators. A new platform driver is also added
to handle this dual regulator configuration.
> diff --git a/drivers/regulator/renesas-usb-vbus-regulator.c b/drivers/regulator/renesas-usb-vbus-regulator.c
> index 9ba791bd72eca..9028340008749 100644
> --- a/drivers/regulator/renesas-usb-vbus-regulator.c
> +++ b/drivers/regulator/renesas-usb-vbus-regulator.c
[ ... ]
> @@ -64,6 +108,15 @@ static struct platform_driver rzg2l_usb_vbus_regulator_driver = {
> };
> module_platform_driver(rzg2l_usb_vbus_regulator_driver);
>
> +static struct platform_driver rzg3l_usb_vbus_regulator_driver = {
> + .probe = rzg3l_usb_vbus_regulator_probe,
> + .driver = {
> + .name = "rzg3l-usb-vbus-regulator",
> + .probe_type = PROBE_PREFER_ASYNCHRONOUS,
> + },
> +};
> +module_platform_driver(rzg3l_usb_vbus_regulator_driver);
[Severity: Low]
Will this regression cause a build failure when the driver is compiled as a
module?
Using module_platform_driver() twice in the same C file expands into
module_init() and module_exit() twice.
This creates conflicting global aliases for init_module and cleanup_module,
causing the compiler to flag a redefinition error.
Could these drivers be registered with a custom module_init() function
that registers both, or perhaps combined into a single driver using match data?
> +
> MODULE_AUTHOR("Biju Das <biju.das.jz@bp.renesas.com>");
> MODULE_DESCRIPTION("Renesas RZ/G2L USB Vbus Regulator Driver");
> MODULE_LICENSE("GPL");
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260707143646.245177-1-biju.das.jz@bp.renesas.com?part=9
^ permalink raw reply [flat|nested] 8+ messages in thread