Re: [PATCH v2 0/1] dt-bindings: connector: Add role‑switch provider phandle

From: Dmitry Baryshkov

Date: Tue Mar 24 2026 - 13:52:22 EST


Hello,

On Tue, 24 Mar 2026 at 19:29, Elson Serrao
<elson.serrao@xxxxxxxxxxxxxxxx> wrote:
>
> Hi all,
>
> This patch proposes a generic Devicetree mechanism for a USB connector to
> reference the USB role‑switch provider when there is an intermediate,
> block between the connector and the controller in the OF graph.

Please, don't describe what the patch or the change does, see
Documentation/processes/submitting-patches.rst.

>
> Problem
> =======
> OF‑graph links are strictly point‑to‑point via remote-endpoint, so a
> consumer can only discover its immediate neighbor in the graph. When an
> intermediate node sits between the USB connector and the controller, the
> connector cannot identify the controller (the role‑switch provider) from
> the graph alone.

DT is a hardware description. Here you are trying to describe the
software behaviour. Please don't mix those.

[skipped diagrams]

>
> From the OF‑graph structure alone, Conn‑0 cannot determine that
> USBCtrl‑0 (and not USBCtrl‑1) is the correct role‑switch provider.
>
> Proposal
> ========
> Add an optional consumer→provider phandle on the connector:
>
> usb-role-switch = <&controller>;

An alternative proposal: let EUD register as a role-switch and then
retranslate usb-role-switch events. This is how it is handled by the
Type-C-related objects (muxes and orientation switches).

>
> The provider remains the controller node, which already declares the
> boolean 'usb-role-switch;' and registers the role‑switch device.


--
With best wishes
Dmitry