| 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 <[email protected]> |
| 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 and AST2700 Virtual Hub supports |
| 21 |
7 downstream 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 |
- aspeed,ast2700-usb-vhub |
| 30 |
|
| 31 |
reg: |
| 32 |
maxItems: 1 |
| 33 |
|
| 34 |
clocks: |
| 35 |
maxItems: 1 |
| 36 |
|
| 37 |
resets: |
| 38 |
maxItems: 1 |
| 39 |
|
| 40 |
interrupts: |
| 41 |
maxItems: 1 |
| 42 |
|
| 43 |
aspeed,vhub-downstream-ports: |
| 44 |
description: Number of downstream ports supported by the Virtual Hub |
| 45 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 46 |
default: 5 |
| 47 |
minimum: 1 |
| 48 |
maximum: 7 |
| 49 |
|
| 50 |
aspeed,vhub-generic-endpoints: |
| 51 |
description: Number of generic endpoints supported by the Virtual Hub |
| 52 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 53 |
default: 15 |
| 54 |
minimum: 1 |
| 55 |
maximum: 21 |
| 56 |
|
| 57 |
vhub-vendor-id: |
| 58 |
description: vhub Vendor ID |
| 59 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 60 |
maximum: 65535 |
| 61 |
|
| 62 |
vhub-product-id: |
| 63 |
description: vhub Product ID |
| 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 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 70 |
maximum: 65535 |
| 71 |
|
| 72 |
vhub-strings: |
| 73 |
type: object |
| 74 |
additionalProperties: false |
| 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 |
additionalProperties: false |
| 87 |
description: string descriptors of the specific language |
| 88 |
|
| 89 |
properties: |
| 90 |
reg: |
| 91 |
maxItems: 1 |
| 92 |
description: 16-bit Language Identifier defined by USB-IF |
| 93 |
|
| 94 |
manufacturer: |
| 95 |
description: vhub manufacturer |
| 96 |
$ref: /schemas/types.yaml#/definitions/string |
| 97 |
|
| 98 |
product: |
| 99 |
description: vhub product name |
| 100 |
$ref: /schemas/types.yaml#/definitions/string |
| 101 |
|
| 102 |
serial-number: |
| 103 |
description: vhub device serial number |
| 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 |
if: |
| 115 |
properties: |
| 116 |
compatible: |
| 117 |
contains: |
| 118 |
const: aspeed,ast2700-usb-vhub |
| 119 |
|
| 120 |
then: |
| 121 |
required: |
| 122 |
- resets |
| 123 |
|
| 124 |
else: |
| 125 |
properties: |
| 126 |
resets: false |
| 127 |
|
| 128 |
additionalProperties: false |
| 129 |
|
| 130 |
examples: |
| 131 |
- | |
| 132 |
#include <dt-bindings/clock/aspeed-clock.h> |
| 133 |
vhub: usb-vhub@1e6a0000 { |
| 134 |
compatible = "aspeed,ast2500-usb-vhub"; |
| 135 |
reg = <0x1e6a0000 0x300>; |
| 136 |
interrupts = <5>; |
| 137 |
clocks = <&syscon ASPEED_CLK_GATE_USBPORT1CLK>; |
| 138 |
aspeed,vhub-downstream-ports = <5>; |
| 139 |
aspeed,vhub-generic-endpoints = <15>; |
| 140 |
pinctrl-names = "default"; |
| 141 |
pinctrl-0 = <&pinctrl_usb2ad_default>; |
| 142 |
|
| 143 |
vhub-vendor-id = <0x1d6b>; |
| 144 |
vhub-product-id = <0x0107>; |
| 145 |
vhub-device-revision = <0x0100>; |
| 146 |
vhub-strings { |
| 147 |
#address-cells = <1>; |
| 148 |
#size-cells = <0>; |
| 149 |
|
| 150 |
string@409 { |
| 151 |
reg = <0x409>; |
| 152 |
manufacturer = "ASPEED"; |
| 153 |
product = "USB Virtual Hub"; |
| 154 |
serial-number = "0000"; |
| 155 |
}; |
| 156 |
}; |
| 157 |
}; |