From: sashiko-bot@kernel.org
To: "Fabio Estevam" <festevam@gmail.com>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH] arm64: dts: rockchip: Enable USB device mode on rk3399-roc-pc-plus
Date: Tue, 21 Jul 2026 03:13:17 +0000 [thread overview]
Message-ID: <20260721031318.7D5041F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260721030043.84691-1-festevam@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Adding `usb-role-switch` breaks existing host mode and automatic OTG role switching for the DWC3 controller due to a missing OF graph connection.
--
--- Patch [1]: [PATCH] arm64: dts: rockchip: Enable USB device mode on rk3399-roc-pc-plus ---
commit 083559b8c4d210ad85e3dc07a4f89e6cd4079c56
Author: Fabio Estevam <festevam@nabladev.com>
arm64: dts: rockchip: Enable USB device mode on rk3399-roc-pc-plus
This commit describes the DWC3 controller as a USB role switch and selects
peripheral as the default role. This allows DWC3 to register a UDC while
retaining OTG operation.
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-plus.dts b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-plus.dts
> --- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-plus.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-plus.dts
[ ... ]
> @@ -203,7 +203,9 @@ &uart0 {
> };
>
> &usbdrd_dwc3_0 {
> - dr_mode = "host";
> + dr_mode = "otg";
> + role-switch-default-mode = "peripheral";
> + usb-role-switch;
[Severity: High]
Does adding the usb-role-switch property here break existing host mode
functionality on the Type-C port?
When usb-role-switch is present, dwc3_drd_init() bypasses its internal
hardware OTG initialization and waits indefinitely for a software role switch
event.
Without an OF graph connection (a port/endpoint mapping) from the fusb0
Type-C controller to this dwc3 node, the tcpm framework won't be able to
locate the USB role switch via fwnode_usb_role_switch_get() when a user
plugs in a host adapter.
As a result, the role switch lookup fails and the controller might get
permanently stuck in the default peripheral mode.
Should an OF graph connection be added between the Type-C controller and
this dwc3 node so the role switch events can be delivered correctly?
> status = "okay";
> };
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260721030043.84691-1-festevam@gmail.com?part=1
prev parent reply other threads:[~2026-07-21 3:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 3:00 [PATCH] arm64: dts: rockchip: Enable USB device mode on rk3399-roc-pc-plus Fabio Estevam
2026-07-21 3:13 ` 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=20260721031318.7D5041F000E9@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