• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2# Copyright 2019 Linaro Ltd.
3%YAML 1.2
4---
5$id: "http://devicetree.org/schemas/misc/hisilicon-hikey-usb.yaml#"
6$schema: "http://devicetree.org/meta-schemas/core.yaml#"
7
8title: HiKey960 onboard USB GPIO Hub
9
10maintainers:
11  - John Stultz <john.stultz@linaro.org>
12
13description: |
14  Supports the onboard HiKey960 USB GPIO hub, which acts as a
15  role-switch intermediary to detect the state of the USB-C
16  port, to switch the hub into dual-role USB-C or host mode,
17  which enables the onboard USB-A host ports.
18
19  Schematics about the hub can be found here:
20    https://github.com/96boards/documentation/raw/master/consumer/hikey/hikey960/hardware-docs/HiKey960_Schematics.pdf
21
22properties:
23  compatible:
24    items:
25      - const: hisilicon,gpio_hubv1
26
27  typec-vbus-gpios:
28    $ref: /schemas/types.yaml#/definitions/phandle
29    description: phandle to the typec-vbus gpio
30
31  otg-switch-gpios:
32    $ref: /schemas/types.yaml#/definitions/phandle
33    description: phandle to the otg-switch gpio
34
35  hub-vdd33-en-gpios:
36    $ref: /schemas/types.yaml#/definitions/phandle
37    description: phandle to the hub 3.3v power enablement gpio
38
39  usb-role-switch:
40    $ref: /schemas/types.yaml#/definitions/flag
41    description: Support role switch.
42
43  port:
44    description: |
45      any connector to the data bus of this controller should be modelled
46      using the OF graph bindings specified, if the "usb-role-switch"
47      property is used. Note for this driver, two ports are supported,
48      the first being the endpoint that will be notified by this driver,
49      and the second being the endpoint that notifies this driver of a
50      role switch.
51
52
53required:
54  - compatible
55  - typec-vbus-gpios
56  - otg-switch-gpios
57  - hub-vdd33-en-gpios
58  - usb-role-switch
59  - port
60
61additionalProperties: false
62
63examples:
64  - |
65    hisi_hikey_usb: hisi_hikey_usb {
66        compatible = "hisilicon,gpio_hubv1";
67        typec-vbus-gpios = <&gpio25 2 GPIO_ACTIVE_HIGH>;
68        otg-switch-gpios = <&gpio25 6 GPIO_ACTIVE_HIGH>;
69        hub-vdd33-en-gpios = <&gpio5 6 GPIO_ACTIVE_HIGH>;
70        usb-role-switch;
71
72        port {
73            #address-cells = <1>;
74            #size-cells = <0>;
75
76            hikey_usb_ep0: endpoint@0 {
77                reg = <0>;
78                remote-endpoint = <&dwc3_role_switch>;
79            };
80            hikey_usb_ep1: endpoint@1 {
81                reg = <1>;
82                remote-endpoint = <&rt1711h_ep>;
83            };
84        };
85    };
86