From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: John Keeping <jkeeping@inmusicbrands.com>
Cc: "linux-rockchip@lists.infradead.org"
<linux-rockchip@lists.infradead.org>,
Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sebastian Reichel <sebastian.reichel@collabora.com>,
Nicolas Frattaroli <nicolas.frattaroli@collabora.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-phy@lists.infradead.org" <linux-phy@lists.infradead.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC/PATCH 1/2] usb: dwc3: disable for USB_ROLE_NONE
Date: Sat, 12 Jul 2025 00:11:38 +0000 [thread overview]
Message-ID: <20250712001131.ax3rw24h3deekxfv@synopsys.com> (raw)
In-Reply-To: <20250710152252.2532020-2-jkeeping@inmusicbrands.com>
On Thu, Jul 10, 2025, John Keeping wrote:
> When the phy is acting as a Type C mux, it may need to reset when the
> cable direction changes. But this should not happen while DWC3 is
> trying to use the USB connection.
>
> In this case, there must be a connection manager to notify the phy of
> the orientation change and tcpm_mux_set() ensures this happens before
> DWC3's role switch is informed of a change.
>
> It should not be possible to go directly from device->device or
> host->host with a change in orientation without transitioning through
> the "none" role as the cable is unplugged. So ensuring that DWC3 always
The controller is either host or device mode. It's odd to use "none" to
indicate connection.
> informs the phy of the new mode whenever a plug is detected should be
> sufficient for the phy to safely reset itself at a time that is safe for
> DWC3.
Couldn't the phy do this as it detects connection/disconnection.
It seems what you need is a full controller initialization upon new
connection on orientation change, and you're using role_switch selecting
"none" to do so.
I'm not sure if role-switch has the right interface to do so. Perhaps we
can introduce one? I don't think we should change the behavior of the
current flow and apply that to all other platforms.
Thanks,
Thinh
>
> Lifting the special-case for desired_dr_mode==0 in __dwc3_set_mode() is
> sufficient to allow using the unset mode for USB_ROLE_NONE. The
> handling already disables the old mode and then simply does not enable a
> new one.
>
> If an external device is notifying USB role switches, then it is not
> necessary to set the default role when USB_ROLE_NONE is passed.
next prev parent reply other threads:[~2025-07-12 0:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 15:22 [RFC/PATCH 0/2] dwc3/rockchip orientation fixes John Keeping
2025-07-10 15:22 ` [RFC/PATCH 1/2] usb: dwc3: disable for USB_ROLE_NONE John Keeping
2025-07-12 0:11 ` Thinh Nguyen [this message]
2025-07-14 15:15 ` John Keeping
2025-07-29 22:10 ` Thinh Nguyen
2025-08-06 17:10 ` John Keeping
2025-08-07 0:58 ` Thinh Nguyen
2025-07-10 15:22 ` [RFC/PATCH 2/2] phy: rockchip: usbdp: implement .set_mode John Keeping
2025-07-15 10:35 ` Heiko Stuebner
2025-07-16 19:14 ` John Keeping
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=20250712001131.ax3rw24h3deekxfv@synopsys.com \
--to=thinh.nguyen@synopsys.com \
--cc=gregkh@linuxfoundation.org \
--cc=heiko@sntech.de \
--cc=jkeeping@inmusicbrands.com \
--cc=kishon@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=nicolas.frattaroli@collabora.com \
--cc=sebastian.reichel@collabora.com \
--cc=vkoul@kernel.org \
/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