Merge tag 'usb-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[platform/kernel/linux-rpi.git] / Documentation / devicetree / bindings / usb / aspeed,usb-vhub.yaml
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 # Copyright (c) 2020 Facebook Inc.
3 %YAML 1.2
4 ---
5 $id: http://devicetree.org/schemas/usb/aspeed,usb-vhub.yaml#
6 $schema: http://devicetree.org/meta-schemas/core.yaml#
7
8 title: ASPEED USB 2.0 Virtual Hub Controller
9
10 maintainers:
11   - Benjamin Herrenschmidt <benh@kernel.crashing.org>
12
13 description: |+
14   The ASPEED USB 2.0 Virtual Hub Controller implements 1 set of USB Hub
15   register and several sets of Device and Endpoint registers to support
16   the Virtual Hub's downstream USB devices.
17
18   Supported number of devices and endpoints vary depending on hardware
19   revisions. AST2400 and AST2500 Virtual Hub supports 5 downstream devices
20   and 15 generic endpoints, while AST2600 Virtual Hub supports 7 downstream
21   devices and 21 generic endpoints.
22
23 properties:
24   compatible:
25     enum:
26       - aspeed,ast2400-usb-vhub
27       - aspeed,ast2500-usb-vhub
28       - aspeed,ast2600-usb-vhub
29
30   reg:
31     maxItems: 1
32
33   clocks:
34     maxItems: 1
35
36   interrupts:
37     maxItems: 1
38
39   aspeed,vhub-downstream-ports:
40     description: Number of downstream ports supported by the Virtual Hub
41     $ref: /schemas/types.yaml#/definitions/uint32
42     default: 5
43     minimum: 1
44     maximum: 7
45
46   aspeed,vhub-generic-endpoints:
47     description: Number of generic endpoints supported by the Virtual Hub
48     $ref: /schemas/types.yaml#/definitions/uint32
49     default: 15
50     minimum: 1
51     maximum: 21
52
53   vhub-vendor-id:
54     description: vhub Vendor ID
55     allOf:
56       - $ref: /schemas/types.yaml#/definitions/uint32
57       - maximum: 65535
58
59   vhub-product-id:
60     description: vhub Product ID
61     allOf:
62       - $ref: /schemas/types.yaml#/definitions/uint32
63       - maximum: 65535
64
65   vhub-device-revision:
66     description: vhub Device Revision in binary-coded decimal
67     allOf:
68       - $ref: /schemas/types.yaml#/definitions/uint32
69       - maximum: 65535
70
71   vhub-strings:
72     type: object
73
74     properties:
75       '#address-cells':
76         const: 1
77
78       '#size-cells':
79         const: 0
80
81     patternProperties:
82       '^string@[0-9a-f]+$':
83         type: object
84         description: string descriptors of the specific language
85
86         properties:
87           reg:
88             maxItems: 1
89             description: 16-bit Language Identifier defined by USB-IF
90
91           manufacturer:
92             description: vhub manufacturer
93             allOf:
94               - $ref: /schemas/types.yaml#/definitions/string
95
96           product:
97             description: vhub product name
98             allOf:
99               - $ref: /schemas/types.yaml#/definitions/string
100
101           serial-number:
102             description: vhub device serial number
103             allOf:
104               - $ref: /schemas/types.yaml#/definitions/string
105
106 required:
107   - compatible
108   - reg
109   - clocks
110   - interrupts
111   - aspeed,vhub-downstream-ports
112   - aspeed,vhub-generic-endpoints
113
114 additionalProperties: false
115
116 examples:
117   - |
118     #include <dt-bindings/clock/aspeed-clock.h>
119     vhub: usb-vhub@1e6a0000 {
120             compatible = "aspeed,ast2500-usb-vhub";
121             reg = <0x1e6a0000 0x300>;
122             interrupts = <5>;
123             clocks = <&syscon ASPEED_CLK_GATE_USBPORT1CLK>;
124             aspeed,vhub-downstream-ports = <5>;
125             aspeed,vhub-generic-endpoints = <15>;
126             pinctrl-names = "default";
127             pinctrl-0 = <&pinctrl_usb2ad_default>;
128
129             vhub-vendor-id = <0x1d6b>;
130             vhub-product-id = <0x0107>;
131             vhub-device-revision = <0x0100>;
132             vhub-strings {
133                 #address-cells = <1>;
134                 #size-cells = <0>;
135
136                 string@0409 {
137                         reg = <0x0409>;
138                         manufacturer = "ASPEED";
139                         product = "USB Virtual Hub";
140                         serial-number = "0000";
141                 };
142             };
143     };