linux-loongson/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
Dmitry Baryshkov 246fef761a dt-bindings: usb: genesys,gl850g: add downstream facing ports
In order to describe connections between Genesys GL850G hub and
corresponding Type-C connectors, follow example of RTS5411 and describe
downstream facing ports. Unline normal case of ports being connected to
a USB device, hotplug ports use OF graph representation.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: "Rob Herring (Arm)" <robh@kernel.org>
Link: https://lore.kernel.org/r/20250608-genesys-ports-v1-2-09ca19f6838e@oss.qualcomm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-06-28 17:23:52 +02:00

114 lines
2.2 KiB
YAML

# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Genesys Logic USB hub controller
maintainers:
- Icenowy Zheng <uwu@icenowy.me>
properties:
compatible:
enum:
- usb5e3,608
- usb5e3,610
- usb5e3,620
- usb5e3,626
reg: true
reset-gpios:
description: GPIO controlling the RESET# pin.
vdd-supply:
description:
The regulator that provides 3.3V or 5.0V core power to the hub.
peer-hub: true
ports:
$ref: /schemas/graph.yaml#/properties/ports
patternProperties:
'^port@':
$ref: /schemas/graph.yaml#/properties/port
properties:
reg:
minimum: 1
maximum: 4
required:
- compatible
- reg
allOf:
- $ref: usb-hub.yaml#
- if:
properties:
compatible:
contains:
enum:
- usb5e3,608
then:
properties:
peer-hub: false
vdd-supply: false
- if:
properties:
compatible:
contains:
enum:
- usb5e3,610
- usb5e3,620
then:
properties:
peer-hub: true
vdd-supply: true
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
usb {
dr_mode = "host";
#address-cells = <1>;
#size-cells = <0>;
hub: hub@1 {
compatible = "usb5e3,608";
reg = <1>;
reset-gpios = <&pio 7 2 GPIO_ACTIVE_LOW>;
};
};
- |
#include <dt-bindings/gpio/gpio.h>
usb {
dr_mode = "host";
#address-cells = <1>;
#size-cells = <0>;
/* 2.0 hub on port 1 */
hub_2_0: hub@1 {
compatible = "usb5e3,610";
reg = <1>;
peer-hub = <&hub_3_0>;
reset-gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
vdd-supply = <&vcc_5v>;
};
/* 3.1 hub on port 4 */
hub_3_0: hub@2 {
compatible = "usb5e3,620";
reg = <2>;
peer-hub = <&hub_2_0>;
reset-gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
vdd-supply = <&vcc_5v>;
};
};