[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALHNRZ9Li3KzS074dT0ytaEYx7NAMZHYYiuyeoFaBEOEKscR0w@mail.gmail.com>
Date: Tue, 13 May 2025 15:39:15 -0500
From: Aaron Kling <webgeek1234@...il.com>
To: Jon Hunter <jonathanh@...dia.com>
Cc: JC Kuo <jckuo@...dia.com>, Vinod Koul <vkoul@...nel.org>,
Kishon Vijay Abraham I <kishon@...nel.org>, Thierry Reding <thierry.reding@...il.com>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
linux-phy@...ts.infradead.org, linux-tegra@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v2 0/2] phy: tegra: xusb: Default otg mode to peripheral
On Wed, May 7, 2025 at 5:48 AM Jon Hunter <jonathanh@...dia.com> wrote:
>
>
> On 06/05/2025 18:09, Aaron Kling via B4 Relay wrote:
> > Signed-off-by: Aaron Kling <webgeek1234@...il.com>
> > ---
> > Changes in v2:
> > - Add new patch to document role-switch-default-mode in xusb padctl
> > - Simplify code change, per review
> > - Comment in code why device mode is default
> > - Link to v1: https://lore.kernel.org/r/20250404-xusb-peripheral-v1-1-99c184b9bf5f@gmail.com
>
>
> I have been asking our team about this and this is the feedback I
> received ...
>
> "By design, a port’s data role starts out as USB_ROLE_NONE.
> It remains in that state until a dedicated role‐switch driver, such as
> the GPIO-based driver, usb-conn-gpio, or a Type-C controller driver,
> CCG, probes VBUS/ID or CC lines and tells the USB core whether to switch
> to host or device.
> The role-switch-default-mode DT property exists precisely for controlled
> use cases where a board truly only ever needs one role and doesn’t
> include any role-detection hardware.
> In that scenario, you’re effectively opting out of dynamic role switching.
> In the general OTG case, though, we shouldn’t assume the data role of an
> OTG port.
>
> In his case, he should work out
> 1. If his platform has a role-switch component, then he should enable it
> rather than adding this change.
> 2. If his platform doesn’t have a role-switch controller, add
> role-switch-default-mode = "peripheral"; to the PHY node instead of
> changing the core driver."
>
> So I guess the question is, does your platform have a role-switch
> controller?
>
> The bottom line here is that we don't want to make this change by
> default for all Tegra platforms.
I wasn't familiar with role-switch controllers and that seems to have
been my problem. I wasn't loading the usb-conn-gpio or ucsi_ccg
modules which was why the current role wasn't being auto-detected.
After loading those, the majority of the Jetson devkits and Shield
devices I'm targeting worked as expected without this change. The only
failure I've seen so far is p3509+p3636. And I've got a fix I'll push
separately for that. So this series can be abandoned.
Sincerely,
Aaron
Powered by blists - more mailing lists