[PATCH v2 0/2] phy: tegra: xusb: Default otg mode to peripheral

Jon Hunter jonathanh at nvidia.com
Wed May 7 03:48:35 PDT 2025


On 06/05/2025 18:09, Aaron Kling via B4 Relay wrote:
> Signed-off-by: Aaron Kling <webgeek1234 at gmail.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.

Thanks
Jon

-- 
nvpublic




More information about the linux-phy mailing list