From: sashiko-bot@kernel.org
To: "Fabio Estevam" <festevam@gmail.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH] arm64: dts: rockchip: Enable USB device mode on rk3588s-roc-pc
Date: Thu, 09 Jul 2026 01:01:05 +0000 [thread overview]
Message-ID: <20260709010105.D64731F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260709005006.413145-1-festevam@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Adding `usb-role-switch` nullifies existing `extcon` functionality, permanently breaking automatic OTG role switching.
--
--- Patch [1]: [PATCH] arm64: dts: rockchip: Enable USB device mode on rk3588s-roc-pc ---
commit 5791d34a99b00bf3d67aa350284aa7287f468661
Author: Fabio Estevam <festevam@nabladev.com>
arm64: dts: rockchip: Enable USB device mode on rk3588s-roc-pc
This commit configures the DWC3 controller on the rk3588s-roc-pc to act as a
USB role switch defaulting to peripheral mode. It also enables the USBDP PHY
to allow the controller to register as a UDC, enabling USB gadget drivers to
bind.
> diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-roc-pc.dts b/arch/arm64/boot/dts/rockchip/rk3588s-roc-pc.dts
> index 7e179862da6e5..cf2e83664305d 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3588s-roc-pc.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3588s-roc-pc.dts
> @@ -813,6 +813,12 @@ &usb_host0_ohci {
>
> &usb_host0_xhci {
> extcon = <&u2phy0>;
> + role-switch-default-mode = "peripheral";
> + usb-role-switch;
[Severity: Medium]
Will adding usb-role-switch here nullify the existing extcon functionality and
permanently break automatic OTG role switching?
During initialization, DWC3's dwc3_drd_init() unconditionally returns early if
the usb-role-switch property is set, which skips the extcon_register_notifier()
call entirely.
Because the board's PHY driver (phy-rockchip-inno-usb2) broadcasts ID pin state
changes exclusively via extcon and does not implement a usb_role_switch
provider, it appears DWC3 will never receive role switch events. Will this
cause the OTG port to be permanently locked into peripheral mode, preventing
USB host mode from functioning when an OTG cable is attached?
> + status = "okay";
> +};
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260709005006.413145-1-festevam@gmail.com?part=1
prev parent reply other threads:[~2026-07-09 1:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 0:50 [PATCH] arm64: dts: rockchip: Enable USB device mode on rk3588s-roc-pc Fabio Estevam
2026-07-09 1:01 ` sashiko-bot [this message]
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=20260709010105.D64731F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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