xref: /openbmc/linux/Documentation/devicetree/bindings/usb/brcm,usb-pinmap.yaml (revision 5ed132db5ad4f58156ae9d28219396b6f764a9cb)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/usb/brcm,usb-pinmap.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Broadcom USB pin map Controller Device Tree Bindings
8
9maintainers:
10  - Al Cooper <alcooperx@gmail.com>
11
12properties:
13  compatible:
14    items:
15      - const: brcm,usb-pinmap
16
17  reg:
18    maxItems: 1
19
20  interrupts:
21    maxItems: 1
22    description: Interrupt for signals mirrored to out-gpios.
23
24  in-gpios:
25    description: Array of one or two GPIO pins used for input signals.
26
27  brcm,in-functions:
28    $ref: /schemas/types.yaml#/definitions/string-array
29    description: Array of input signal names, one per gpio in in-gpios.
30
31  brcm,in-masks:
32    $ref: /schemas/types.yaml#/definitions/uint32-array
33    description: Array of enable and mask pairs, one per gpio in-gpios.
34
35  out-gpios:
36    description: Array of one GPIO pin used for output signals.
37
38  brcm,out-functions:
39    $ref: /schemas/types.yaml#/definitions/string-array
40    description: Array of output signal names, one per gpio in out-gpios.
41
42  brcm,out-masks:
43    $ref: /schemas/types.yaml#/definitions/uint32-array
44    description: Array of enable, value, changed and clear masks, one
45      per gpio in out-gpios.
46
47required:
48  - compatible
49  - reg
50
51additionalProperties: false
52
53dependencies:
54  in-gpios: [ interrupts ]
55
56examples:
57  - |
58    usb_pinmap: usb-pinmap@22000d0 {
59        compatible = "brcm,usb-pinmap";
60        reg = <0x22000d0 0x4>;
61        in-gpios = <&gpio 18 0>, <&gpio 19 0>;
62        brcm,in-functions = "VBUS", "PWRFLT";
63        brcm,in-masks = <0x8000 0x40000 0x10000 0x80000>;
64        out-gpios = <&gpio 20 0>;
65        brcm,out-functions = "PWRON";
66        brcm,out-masks = <0x20000 0x800000 0x400000 0x200000>;
67        interrupts = <0x0 0xb2 0x4>;
68    };
69
70...
71