xref: /freebsd/sys/contrib/device-tree/Bindings/usb/genesys,gl850g.yaml (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
1aa1a8ff2SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
28bab661aSEmmanuel Vadot%YAML 1.2
38bab661aSEmmanuel Vadot---
48bab661aSEmmanuel Vadot$id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#
58bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
68bab661aSEmmanuel Vadot
784943d6fSEmmanuel Vadottitle: Genesys Logic USB hub controller
88bab661aSEmmanuel Vadot
98bab661aSEmmanuel Vadotmaintainers:
108bab661aSEmmanuel Vadot  - Icenowy Zheng <uwu@icenowy.me>
118bab661aSEmmanuel Vadot
128bab661aSEmmanuel Vadotproperties:
138bab661aSEmmanuel Vadot  compatible:
148bab661aSEmmanuel Vadot    enum:
158bab661aSEmmanuel Vadot      - usb5e3,608
16cb7aa33aSEmmanuel Vadot      - usb5e3,610
17aa1a8ff2SEmmanuel Vadot      - usb5e3,620
1884943d6fSEmmanuel Vadot      - usb5e3,626
198bab661aSEmmanuel Vadot
208bab661aSEmmanuel Vadot  reg: true
218bab661aSEmmanuel Vadot
228bab661aSEmmanuel Vadot  reset-gpios:
238bab661aSEmmanuel Vadot    description: GPIO controlling the RESET# pin.
248bab661aSEmmanuel Vadot
258bab661aSEmmanuel Vadot  vdd-supply:
268bab661aSEmmanuel Vadot    description:
27*0e8011faSEmmanuel Vadot      The regulator that provides 3.3V or 5.0V core power to the hub.
288bab661aSEmmanuel Vadot
298d13bc63SEmmanuel Vadot  peer-hub:
308d13bc63SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
318d13bc63SEmmanuel Vadot    description:
32*0e8011faSEmmanuel Vadot      For onboard hub controllers that support USB 3.x and USB 2.0 hubs
33*0e8011faSEmmanuel Vadot      with shared resets and power supplies, this property is used to identify
34*0e8011faSEmmanuel Vadot      the hubs with which these are shared.
358d13bc63SEmmanuel Vadot
368bab661aSEmmanuel Vadotrequired:
378bab661aSEmmanuel Vadot  - compatible
388bab661aSEmmanuel Vadot  - reg
398bab661aSEmmanuel Vadot
40*0e8011faSEmmanuel VadotallOf:
41*0e8011faSEmmanuel Vadot  - $ref: usb-device.yaml#
42*0e8011faSEmmanuel Vadot  - if:
43*0e8011faSEmmanuel Vadot      properties:
44*0e8011faSEmmanuel Vadot        compatible:
45*0e8011faSEmmanuel Vadot          contains:
46*0e8011faSEmmanuel Vadot            enum:
47*0e8011faSEmmanuel Vadot              - usb5e3,608
48*0e8011faSEmmanuel Vadot    then:
49*0e8011faSEmmanuel Vadot      properties:
50*0e8011faSEmmanuel Vadot        peer-hub: false
51*0e8011faSEmmanuel Vadot        vdd-supply: false
52*0e8011faSEmmanuel Vadot
53*0e8011faSEmmanuel Vadot  - if:
54*0e8011faSEmmanuel Vadot      properties:
55*0e8011faSEmmanuel Vadot        compatible:
56*0e8011faSEmmanuel Vadot          contains:
57*0e8011faSEmmanuel Vadot            enum:
58*0e8011faSEmmanuel Vadot              - usb5e3,610
59*0e8011faSEmmanuel Vadot              - usb5e3,620
60*0e8011faSEmmanuel Vadot    then:
61*0e8011faSEmmanuel Vadot      properties:
62*0e8011faSEmmanuel Vadot        peer-hub: true
63*0e8011faSEmmanuel Vadot        vdd-supply: true
64*0e8011faSEmmanuel Vadot
658bab661aSEmmanuel VadotadditionalProperties: false
668bab661aSEmmanuel Vadot
678bab661aSEmmanuel Vadotexamples:
688bab661aSEmmanuel Vadot  - |
698bab661aSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
708bab661aSEmmanuel Vadot    usb {
718bab661aSEmmanuel Vadot        dr_mode = "host";
728bab661aSEmmanuel Vadot        #address-cells = <1>;
738bab661aSEmmanuel Vadot        #size-cells = <0>;
748bab661aSEmmanuel Vadot
758bab661aSEmmanuel Vadot        hub: hub@1 {
768bab661aSEmmanuel Vadot            compatible = "usb5e3,608";
778bab661aSEmmanuel Vadot            reg = <1>;
788bab661aSEmmanuel Vadot            reset-gpios = <&pio 7 2 GPIO_ACTIVE_LOW>;
798bab661aSEmmanuel Vadot        };
808bab661aSEmmanuel Vadot    };
81*0e8011faSEmmanuel Vadot
82*0e8011faSEmmanuel Vadot  - |
83*0e8011faSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
84*0e8011faSEmmanuel Vadot    usb {
85*0e8011faSEmmanuel Vadot        dr_mode = "host";
86*0e8011faSEmmanuel Vadot        #address-cells = <1>;
87*0e8011faSEmmanuel Vadot        #size-cells = <0>;
88*0e8011faSEmmanuel Vadot
89*0e8011faSEmmanuel Vadot        /* 2.0 hub on port 1 */
90*0e8011faSEmmanuel Vadot        hub_2_0: hub@1 {
91*0e8011faSEmmanuel Vadot            compatible = "usb5e3,610";
92*0e8011faSEmmanuel Vadot            reg = <1>;
93*0e8011faSEmmanuel Vadot            peer-hub = <&hub_3_0>;
94*0e8011faSEmmanuel Vadot            reset-gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
95*0e8011faSEmmanuel Vadot            vdd-supply = <&vcc_5v>;
96*0e8011faSEmmanuel Vadot        };
97*0e8011faSEmmanuel Vadot
98*0e8011faSEmmanuel Vadot        /* 3.1 hub on port 4 */
99*0e8011faSEmmanuel Vadot        hub_3_0: hub@2 {
100*0e8011faSEmmanuel Vadot            compatible = "usb5e3,620";
101*0e8011faSEmmanuel Vadot            reg = <2>;
102*0e8011faSEmmanuel Vadot            peer-hub = <&hub_2_0>;
103*0e8011faSEmmanuel Vadot            reset-gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
104*0e8011faSEmmanuel Vadot            vdd-supply = <&vcc_5v>;
105*0e8011faSEmmanuel Vadot        };
106*0e8011faSEmmanuel Vadot    };
107