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
8title: ASPEED USB 2.0 Virtual Hub Controller
9
10maintainers:
11  - Benjamin Herrenschmidt <benh@kernel.crashing.org>
12
13description: |+
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
23properties:
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    $ref: /schemas/types.yaml#/definitions/uint32
56    maximum: 65535
57
58  vhub-product-id:
59    description: vhub Product ID
60    $ref: /schemas/types.yaml#/definitions/uint32
61    maximum: 65535
62
63  vhub-device-revision:
64    description: vhub Device Revision in binary-coded decimal
65    $ref: /schemas/types.yaml#/definitions/uint32
66    maximum: 65535
67
68  vhub-strings:
69    type: object
70
71    properties:
72      '#address-cells':
73        const: 1
74
75      '#size-cells':
76        const: 0
77
78    patternProperties:
79      '^string@[0-9a-f]+$':
80        type: object
81        description: string descriptors of the specific language
82
83        properties:
84          reg:
85            maxItems: 1
86            description: 16-bit Language Identifier defined by USB-IF
87
88          manufacturer:
89            description: vhub manufacturer
90            $ref: /schemas/types.yaml#/definitions/string
91
92          product:
93            description: vhub product name
94            $ref: /schemas/types.yaml#/definitions/string
95
96          serial-number:
97            description: vhub device serial number
98            $ref: /schemas/types.yaml#/definitions/string
99
100required:
101  - compatible
102  - reg
103  - clocks
104  - interrupts
105  - aspeed,vhub-downstream-ports
106  - aspeed,vhub-generic-endpoints
107
108additionalProperties: false
109
110examples:
111  - |
112    #include <dt-bindings/clock/aspeed-clock.h>
113    vhub: usb-vhub@1e6a0000 {
114            compatible = "aspeed,ast2500-usb-vhub";
115            reg = <0x1e6a0000 0x300>;
116            interrupts = <5>;
117            clocks = <&syscon ASPEED_CLK_GATE_USBPORT1CLK>;
118            aspeed,vhub-downstream-ports = <5>;
119            aspeed,vhub-generic-endpoints = <15>;
120            pinctrl-names = "default";
121            pinctrl-0 = <&pinctrl_usb2ad_default>;
122
123            vhub-vendor-id = <0x1d6b>;
124            vhub-product-id = <0x0107>;
125            vhub-device-revision = <0x0100>;
126            vhub-strings {
127                #address-cells = <1>;
128                #size-cells = <0>;
129
130                string@409 {
131                        reg = <0x409>;
132                        manufacturer = "ASPEED";
133                        product = "USB Virtual Hub";
134                        serial-number = "0000";
135                };
136            };
137    };
138