Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: usb: Introduce usb-hub.yaml

Introduce a general USB hub binding that describes downstream ports
and hard wired USB devices for on-board USB hubs.

Signed-off-by: Pin-yen Lin <treapking@chromium.org>
Reviewed-by: "Rob Herring (Arm)" <robh@kernel.org>
Link: https://lore.kernel.org/r/20250422082957.2058229-2-treapking@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Pin-yen Lin and committed by
Greg Kroah-Hartman
7fcdfaf3 ea34925f

+84
+84
Documentation/devicetree/bindings/usb/usb-hub.yaml
··· 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-hub.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Generic USB Hub 8 + 9 + maintainers: 10 + - Pin-yen Lin <treapking@chromium.org> 11 + 12 + allOf: 13 + - $ref: usb-device.yaml# 14 + 15 + properties: 16 + '#address-cells': 17 + const: 1 18 + 19 + peer-hub: 20 + $ref: /schemas/types.yaml#/definitions/phandle 21 + description: 22 + phandle to the peer hub on the controller. 23 + 24 + ports: 25 + $ref: /schemas/graph.yaml#/properties/ports 26 + description: 27 + The downstream facing USB ports 28 + 29 + patternProperties: 30 + "^port@[1-9a-f][0-9a-f]*$": 31 + $ref: /schemas/graph.yaml#/properties/port 32 + 33 + patternProperties: 34 + '^.*@[1-9a-f][0-9a-f]*$': 35 + description: The hard wired USB devices 36 + type: object 37 + $ref: /schemas/usb/usb-device.yaml 38 + additionalProperties: true 39 + 40 + required: 41 + - compatible 42 + - reg 43 + 44 + additionalProperties: true 45 + 46 + examples: 47 + - | 48 + usb { 49 + #address-cells = <1>; 50 + #size-cells = <0>; 51 + 52 + /* 2.0 hub on port 1 */ 53 + hub_2_0: hub@1 { 54 + compatible = "usb123,4567"; 55 + reg = <1>; 56 + peer-hub = <&hub_3_0>; 57 + #address-cells = <1>; 58 + #size-cells = <0>; 59 + /* USB 2.0 device on port 5 */ 60 + device@5 { 61 + reg = <5>; 62 + compatible = "usb765,4321"; 63 + }; 64 + }; 65 + 66 + /* 3.0 hub on port 2 */ 67 + hub_3_0: hub@2 { 68 + compatible = "usb123,abcd"; 69 + reg = <2>; 70 + peer-hub = <&hub_2_0>; 71 + 72 + ports { 73 + #address-cells = <1>; 74 + #size-cells = <0>; 75 + /* Type-A connector on port 3 */ 76 + port@3 { 77 + reg = <3>; 78 + endpoint { 79 + remote-endpoint = <&usb_a0_ss>; 80 + }; 81 + }; 82 + }; 83 + }; 84 + };