gpio-delay.yaml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. title: GPIO delay controller
  7. maintainers:
  8. - Alexander Stein <linux@ew.tq-group.com>
  9. description: |
  10. This binding describes an electrical setup where setting an GPIO output
  11. is delayed by some external setup, e.g. RC circuit.
  12. +----------+ +-----------+
  13. | | VCC_B | |
  14. | | | | |
  15. | | VCC_A _ | |
  16. | GPIO | | | R | Consumer |
  17. |controller| ___ |_| | |
  18. | | | | | | |
  19. | [IOx|-------| |--+-----|-----+ |
  20. | | |___| | | input |
  21. | | | | |
  22. +----------+ --- C +-----------+
  23. ---
  24. |
  25. -
  26. GND
  27. If the input on the consumer is controlled by an open-drain signal
  28. attached to an RC circuit the ramp-up delay is not under control
  29. of the GPIO controller.
  30. properties:
  31. compatible:
  32. const: gpio-delay
  33. "#gpio-cells":
  34. description: |
  35. Specifies the pin, ramp-up and ramp-down delays. The
  36. delays are specified in microseconds.
  37. const: 3
  38. gpios:
  39. description: Array of GPIOs which output signal change is delayed
  40. minItems: 1
  41. maxItems: 32
  42. gpio-controller: true
  43. gpio-line-names:
  44. minItems: 1
  45. maxItems: 32
  46. required:
  47. - compatible
  48. - "#gpio-cells"
  49. - gpio-controller
  50. - gpios
  51. additionalProperties: false
  52. examples:
  53. - |
  54. #include <dt-bindings/gpio/gpio.h>
  55. enable_delay: enable-delay {
  56. compatible = "gpio-delay";
  57. #gpio-cells = <3>;
  58. gpio-controller;
  59. gpios = <&gpio0 3 GPIO_ACTIVE_LOW>,
  60. <&gpio3 1 GPIO_ACTIVE_HIGH>;
  61. };
  62. consumer {
  63. enable-gpios = <&enable_delay 0 130000 30000>;
  64. };