Skip to content

Commit bd8c3ce

Browse files
superna9999gregkh
authored andcommitted
dt-bindings: usb: switch: split out ports definition
The ports definition currently defined in the usb-switch.yaml fits standards devices which are either recipient of altmode muxing and orientation switching events or an element of the USB Super Speed data lanes. This doesn't necessarely fit combo PHYs like the Qualcomm USB3/DP Combo which has a different ports representation. Move the ports definition to a separate usb-switch-ports.yaml and reference it next to the usb-switch.yaml, except for the Qualcomm USB3/DP Combo PHY bindings. Reported-by: Rob Herring <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/ Fixes: 3bad7fe ("dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp: Reference usb-switch.yaml to allow mode-switch") Signed-off-by: Neil Armstrong <[email protected]> Reviewed-by: Rob Herring (Arm) <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 2758246 commit bd8c3ce

11 files changed

Lines changed: 81 additions & 54 deletions

Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ allOf:
142142
required:
143143
- orientation-switch
144144
then:
145-
$ref: /schemas/usb/usb-switch.yaml#
145+
allOf:
146+
- $ref: /schemas/usb/usb-switch.yaml#
147+
- $ref: /schemas/usb/usb-switch-ports.yaml#
146148

147149
unevaluatedProperties: false
148150

Documentation/devicetree/bindings/phy/samsung,usb3-drd-phy.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ allOf:
125125
contains:
126126
const: google,gs101-usb31drd-phy
127127
then:
128-
$ref: /schemas/usb/usb-switch.yaml#
128+
allOf:
129+
- $ref: /schemas/usb/usb-switch.yaml#
130+
- $ref: /schemas/usb/usb-switch-ports.yaml#
129131

130132
properties:
131133
clocks:

Documentation/devicetree/bindings/usb/fcs,fsa4480.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ required:
7676

7777
allOf:
7878
- $ref: usb-switch.yaml#
79+
- $ref: usb-switch-ports.yaml#
7980

8081
additionalProperties: false
8182

Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ required:
5252

5353
allOf:
5454
- $ref: usb-switch.yaml#
55+
- $ref: usb-switch-ports.yaml#
5556
- if:
5657
required:
5758
- mode-switch

Documentation/devicetree/bindings/usb/nxp,ptn36502.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ required:
4646

4747
allOf:
4848
- $ref: usb-switch.yaml#
49+
- $ref: usb-switch-ports.yaml#
4950

5051
additionalProperties: false
5152

Documentation/devicetree/bindings/usb/onnn,nb7vpq904m.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ required:
9191

9292
allOf:
9393
- $ref: usb-switch.yaml#
94+
- $ref: usb-switch-ports.yaml#
9495

9596
additionalProperties: false
9697

Documentation/devicetree/bindings/usb/parade,ps8830.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ required:
8181

8282
allOf:
8383
- $ref: usb-switch.yaml#
84+
- $ref: usb-switch-ports.yaml#
8485

8586
additionalProperties: false
8687

Documentation/devicetree/bindings/usb/qcom,wcd939x-usbss.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ required:
6060

6161
allOf:
6262
- $ref: usb-switch.yaml#
63+
- $ref: usb-switch-ports.yaml#
6364

6465
additionalProperties: false
6566

Documentation/devicetree/bindings/usb/ti,tusb1046.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ maintainers:
1111

1212
allOf:
1313
- $ref: usb-switch.yaml#
14+
- $ref: usb-switch-ports.yaml#
1415

1516
properties:
1617
compatible:
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/usb/usb-switch-ports.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: USB Orientation and Mode Switches Ports Graph Properties
8+
9+
maintainers:
10+
- Greg Kroah-Hartman <[email protected]>
11+
12+
description:
13+
Ports Graph properties for devices handling USB mode and orientation switching.
14+
15+
properties:
16+
port:
17+
$ref: /schemas/graph.yaml#/$defs/port-base
18+
description:
19+
A port node to link the device to a TypeC controller for the purpose of
20+
handling altmode muxing and orientation switching.
21+
22+
properties:
23+
endpoint:
24+
$ref: /schemas/graph.yaml#/$defs/endpoint-base
25+
unevaluatedProperties: false
26+
properties:
27+
data-lanes:
28+
$ref: /schemas/types.yaml#/definitions/uint32-array
29+
minItems: 1
30+
maxItems: 8
31+
uniqueItems: true
32+
items:
33+
maximum: 8
34+
35+
ports:
36+
$ref: /schemas/graph.yaml#/properties/ports
37+
properties:
38+
port@0:
39+
$ref: /schemas/graph.yaml#/properties/port
40+
description:
41+
Super Speed (SS) Output endpoint to the Type-C connector
42+
43+
port@1:
44+
$ref: /schemas/graph.yaml#/$defs/port-base
45+
description:
46+
Super Speed (SS) Input endpoint from the Super-Speed PHY
47+
unevaluatedProperties: false
48+
49+
properties:
50+
endpoint:
51+
$ref: /schemas/graph.yaml#/$defs/endpoint-base
52+
unevaluatedProperties: false
53+
properties:
54+
data-lanes:
55+
$ref: /schemas/types.yaml#/definitions/uint32-array
56+
minItems: 1
57+
maxItems: 8
58+
uniqueItems: true
59+
items:
60+
maximum: 8
61+
62+
oneOf:
63+
- required:
64+
- port
65+
- required:
66+
- ports
67+
68+
additionalProperties: true

0 commit comments

Comments
 (0)