[RFC PATCH v3 1/2] dt-bindings: usb: snps,dwc3: describe two connectors sharing one HS bus

From: Qianhui Xu

Date: Mon Oct 19 2026 - 09:26:55 EST


Two connectors can share the High Speed D+/D- pair of a single DWC3
controller, with a GPIO selecting which one is connected. Super Speed
lanes stay per connector.

Describe that in snps,dwc3-common.yaml:

- port-select-gpios selects which connector drives the shared HS bus;
- the shared HS bus is port@0 with two numbered endpoints, endpoint@0
and endpoint@1, so that "ports" keeps describing the controller's own
buses as the graph bindings expect;
- each endpoint carries "mux-state", the port-select level of that
connector, and "usb-role-switch" to declare that this connector has
its own role switch input.

When port-select-gpios is absent the endpoint properties are rejected,
so existing single-connector descriptions are unaffected. The two
mux-state values are constrained to be complementary.

Signed-off-by: Qianhui Xu <xiaqinghuan@xxxxxxxxxxxxxxxx>
---
.../bindings/usb/snps,dwc3-common.yaml | 109 +++++++++++++++++-
1 file changed, 108 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml
index 6c0b8b653..6b06b0027 100644
--- a/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml
+++ b/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml
@@ -13,6 +13,38 @@ description:
Defines the properties of the DWC3 core as being embedded in either an
vendor-specific implementation or as a standalone component.

+$defs:
+ hs-endpoint:
+ $ref: /schemas/graph.yaml#/$defs/endpoint-base
+ unevaluatedProperties: false
+
+ properties:
+ usb-role-switch:
+ type: boolean
+ description:
+ This connector endpoint has its own USB role switch. The switch is
+ registered against this endpoint and looked up with
+ usb_role_switch_at_endpoint().
+
+ mux-state:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+ description:
+ Logical level of the port-select GPIO which connects this
+ connector to the shared High Speed data bus.
+
+ dependentRequired:
+ usb-role-switch: [mux-state]
+ mux-state: [usb-role-switch]
+
+ hs-port:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
+
+ patternProperties:
+ '^endpoint@[01]$':
+ $ref: '#/$defs/hs-endpoint'
+
allOf:
- $ref: usb-drd.yaml#
- if:
@@ -26,8 +58,83 @@ allOf:
$ref: usb.yaml#
else:
$ref: usb-xhci.yaml#
+ - if:
+ required: [port-select-gpios]
+ then:
+ required: [dr_mode, ports]
+ properties:
+ dr_mode:
+ const: otg
+ ports:
+ required: [port@0]
+ properties:
+ port@0:
+ required: ['#address-cells', '#size-cells', endpoint@0, endpoint@1]
+ properties:
+ endpoint@0:
+ required: [usb-role-switch, mux-state]
+ endpoint@1:
+ required: [usb-role-switch, mux-state]
+ else:
+ properties:
+ ports:
+ properties:
+ port@0:
+ patternProperties:
+ '^endpoint@[01]$':
+ properties:
+ usb-role-switch: false
+ mux-state: false
+ - if:
+ properties:
+ ports:
+ properties:
+ port@0:
+ properties:
+ endpoint@0:
+ properties:
+ mux-state:
+ const: 0
+ then:
+ properties:
+ ports:
+ properties:
+ port@0:
+ properties:
+ endpoint@1:
+ properties:
+ mux-state:
+ const: 1
+ - if:
+ properties:
+ ports:
+ properties:
+ port@0:
+ properties:
+ endpoint@1:
+ properties:
+ mux-state:
+ const: 0
+ then:
+ properties:
+ ports:
+ properties:
+ port@0:
+ properties:
+ endpoint@0:
+ properties:
+ mux-state:
+ const: 1

properties:
+ port-select-gpios:
+ maxItems: 1
+ description:
+ Selects which of the two connectors drives the controller's shared High
+ Speed data bus. Each connector is described by a numbered endpoint of
+ "port@0" that carries its own role-switch input and the "mux-state"
+ level selecting it.
+
extcon:
maxItems: 1
deprecated: true
@@ -411,7 +518,7 @@ properties:

properties:
port@0:
- $ref: /schemas/graph.yaml#/properties/port
+ $ref: '#/$defs/hs-port'
description: High Speed (HS) data bus.

port@1:
--
2.53.0