xref: /linux/Documentation/devicetree/bindings/usb/usb-switch.yaml (revision 34f2573661e3e644efaf383178af634a2fd67828)
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.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: USB Orientation and Mode Switches Common Properties
8
9maintainers:
10  - Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11
12description:
13  Common properties for devices handling USB mode and orientation switching.
14
15properties:
16  mode-switch:
17    description: Possible handler of altmode switching
18    type: boolean
19
20  orientation-switch:
21    description: Possible handler of orientation switching
22    type: boolean
23
24  retimer-switch:
25    description: Possible handler of SuperSpeed signals retiming
26    type: boolean
27
28  port:
29    $ref: /schemas/graph.yaml#/$defs/port-base
30    description:
31      A port node to link the device to a TypeC controller for the purpose of
32      handling altmode muxing and orientation switching.
33
34    properties:
35      endpoint:
36        $ref: /schemas/graph.yaml#/$defs/endpoint-base
37        unevaluatedProperties: false
38        properties:
39          data-lanes:
40            $ref: /schemas/types.yaml#/definitions/uint32-array
41            minItems: 1
42            maxItems: 8
43            uniqueItems: true
44            items:
45              maximum: 8
46
47  ports:
48    $ref: /schemas/graph.yaml#/properties/ports
49    properties:
50      port@0:
51        $ref: /schemas/graph.yaml#/properties/port
52        description:
53          Super Speed (SS) Output endpoint to the Type-C connector
54
55      port@1:
56        $ref: /schemas/graph.yaml#/$defs/port-base
57        description:
58          Super Speed (SS) Input endpoint from the Super-Speed PHY
59        unevaluatedProperties: false
60
61        properties:
62          endpoint:
63            $ref: /schemas/graph.yaml#/$defs/endpoint-base
64            unevaluatedProperties: false
65            properties:
66              data-lanes:
67                $ref: /schemas/types.yaml#/definitions/uint32-array
68                minItems: 1
69                maxItems: 8
70                uniqueItems: true
71                items:
72                  maximum: 8
73
74oneOf:
75  - required:
76      - port
77  - required:
78      - ports
79
80additionalProperties: true
81