1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/gpio/gpio-delay.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: GPIO delay controller
8
9maintainers:
10  - Alexander Stein <linux@ew.tq-group.com>
11
12description: |
13  This binding describes an electrical setup where setting an GPIO output
14  is delayed by some external setup, e.g. RC circuit.
15
16  +----------+                    +-----------+
17  |          |             VCC_B  |           |
18  |          |              |     |           |
19  |          | VCC_A        _     |           |
20  |  GPIO    |             | | R  |  Consumer |
21  |controller|        ___  |_|    |           |
22  |          |       |   |  |     |           |
23  |      [IOx|-------|   |--+-----|-----+     |
24  |          |       |___|  |     |   input   |
25  |          |              |     |           |
26  +----------+             --- C  +-----------+
27                           ---
28                            |
29                            -
30                           GND
31
32  If the input on the consumer is controlled by an open-drain signal
33  attached to an RC circuit the ramp-up delay is not under control
34  of the GPIO controller.
35
36properties:
37  compatible:
38    const: gpio-delay
39
40  "#gpio-cells":
41    description: |
42      Specifies the pin, ramp-up and ramp-down delays. The
43      delays are specified in microseconds.
44    const: 3
45
46  gpios:
47    description: Array of GPIOs which output signal change is delayed
48    minItems: 1
49    maxItems: 32
50
51  gpio-controller: true
52
53  gpio-line-names:
54    minItems: 1
55    maxItems: 32
56
57required:
58  - compatible
59  - "#gpio-cells"
60  - gpio-controller
61  - gpios
62
63additionalProperties: false
64
65examples:
66  - |
67    #include <dt-bindings/gpio/gpio.h>
68
69    enable_delay: enable-delay {
70        compatible = "gpio-delay";
71        #gpio-cells = <3>;
72        gpio-controller;
73        gpios = <&gpio0 3 GPIO_ACTIVE_LOW>,
74                <&gpio3 1 GPIO_ACTIVE_HIGH>;
75    };
76
77    consumer {
78        enable-gpios = <&enable_delay 0 130000 30000>;
79    };
80