usb: dwc3: meson-g12a: fix USB2 PHY initialization on G12A and A1 SoCs
[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     allOf:
42       - $ref: /schemas/types.yaml#/definitions/uint32
43       - default: 5
44         minimum: 1
45         maximum: 7
46
47   aspeed,vhub-generic-endpoints:
48     description: Number of generic endpoints supported by the Virtual Hub
49     allOf:
50       - $ref: /schemas/types.yaml#/definitions/uint32
51       - default: 15
52         minimum: 1
53         maximum: 21
54
55   vhub-vendor-id:
56     description: vhub Vendor ID
57     allOf:
58       - $ref: /schemas/types.yaml#/definitions/uint32
59       - maximum: 65535
60
61   vhub-product-id:
62     description: vhub Product ID
63     allOf:
64       - $ref: /schemas/types.yaml#/definitions/uint32
65       - maximum: 65535
66
67   vhub-device-revision:
68     description: vhub Device Revision in binary-coded decimal
69     allOf:
70       - $ref: /schemas/types.yaml#/definitions/uint32
71       - maximum: 65535
72
73   vhub-strings:
74     type: object
75
76     properties:
77       '#address-cells':
78         const: 1
79
80       '#size-cells':
81         const: 0
82
83     patternProperties:
84       '^string@[0-9a-f]+$':
85         type: object
86         description: string descriptors of the specific language
87
88         properties:
89           reg:
90             maxItems: 1
91             description: 16-bit Language Identifier defined by USB-IF
92
93           manufacturer:
94             description: vhub manufacturer
95             allOf:
96               - $ref: /schemas/types.yaml#/definitions/string
97
98           product:
99             description: vhub product name
100             allOf:
101               - $ref: /schemas/types.yaml#/definitions/string
102
103           serial-number:
104             description: vhub device serial number
105             allOf:
106               - $ref: /schemas/types.yaml#/definitions/string
107
108 required:
109   - compatible
110   - reg
111   - clocks
112   - interrupts
113   - aspeed,vhub-downstream-ports
114   - aspeed,vhub-generic-endpoints
115
116 additionalProperties: false
117
118 examples:
119   - |
120     #include <dt-bindings/clock/aspeed-clock.h>
121     vhub: usb-vhub@1e6a0000 {
122             compatible = "aspeed,ast2500-usb-vhub";
123             reg = <0x1e6a0000 0x300>;
124             interrupts = <5>;
125             clocks = <&syscon ASPEED_CLK_GATE_USBPORT1CLK>;
126             aspeed,vhub-downstream-ports = <5>;
127             aspeed,vhub-generic-endpoints = <15>;
128             pinctrl-names = "default";
129             pinctrl-0 = <&pinctrl_usb2ad_default>;
130
131             vhub-vendor-id = <0x1d6b>;
132             vhub-product-id = <0x0107>;
133             vhub-device-revision = <0x0100>;
134             vhub-strings {
135                 #address-cells = <1>;
136                 #size-cells = <0>;
137
138                 string@0409 {
139                         reg = <0x0409>;
140                         manufacturer = "ASPEED";
141                         product = "USB Virtual Hub";
142                         serial-number = "0000";
143                 };
144             };
145     };