gpio-latch.yaml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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-latch.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: GPIO latch controller
  7. maintainers:
  8. - Sascha Hauer <s.hauer@pengutronix.de>
  9. description: |
  10. This binding describes a GPIO multiplexer based on latches connected to
  11. other GPIOs, like this:
  12. CLK0 ----------------------. ,--------.
  13. CLK1 -------------------. `--------|> #0 |
  14. | | |
  15. OUT0 ----------------+--|-----------|D0 Q0|-----|<
  16. OUT1 --------------+-|--|-----------|D1 Q1|-----|<
  17. OUT2 ------------+-|-|--|-----------|D2 Q2|-----|<
  18. OUT3 ----------+-|-|-|--|-----------|D3 Q3|-----|<
  19. OUT4 --------+-|-|-|-|--|-----------|D4 Q4|-----|<
  20. OUT5 ------+-|-|-|-|-|--|-----------|D5 Q5|-----|<
  21. OUT6 ----+-|-|-|-|-|-|--|-----------|D6 Q6|-----|<
  22. OUT7 --+-|-|-|-|-|-|-|--|-----------|D7 Q7|-----|<
  23. | | | | | | | | | `--------'
  24. | | | | | | | | |
  25. | | | | | | | | | ,--------.
  26. | | | | | | | | `-----------|> #1 |
  27. | | | | | | | | | |
  28. | | | | | | | `--------------|D0 Q0|-----|<
  29. | | | | | | `----------------|D1 Q1|-----|<
  30. | | | | | `------------------|D2 Q2|-----|<
  31. | | | | `--------------------|D3 Q3|-----|<
  32. | | | `----------------------|D4 Q4|-----|<
  33. | | `------------------------|D5 Q5|-----|<
  34. | `--------------------------|D6 Q6|-----|<
  35. `----------------------------|D7 Q7|-----|<
  36. `--------'
  37. The number of clk-gpios and latched-gpios is not fixed. The actual number
  38. of number of latches and the number of inputs per latch is derived from
  39. the number of GPIOs given in the corresponding device tree properties.
  40. properties:
  41. compatible:
  42. const: gpio-latch
  43. "#gpio-cells":
  44. const: 2
  45. clk-gpios:
  46. description: Array of GPIOs to be used to clock a latch
  47. latched-gpios:
  48. description: Array of GPIOs to be used as inputs per latch
  49. setup-duration-ns:
  50. description: Delay in nanoseconds to wait after the latch inputs have been
  51. set up
  52. clock-duration-ns:
  53. description: Delay in nanoseconds to wait between clock output changes
  54. gpio-controller: true
  55. gpio-line-names: true
  56. required:
  57. - compatible
  58. - "#gpio-cells"
  59. - gpio-controller
  60. - clk-gpios
  61. - latched-gpios
  62. additionalProperties: false
  63. examples:
  64. - |
  65. gpio-latch {
  66. #gpio-cells = <2>;
  67. pinctrl-names = "default";
  68. pinctrl-0 = <&pinctrl_di_do_leds>;
  69. compatible = "gpio-latch";
  70. gpio-controller;
  71. setup-duration-ns = <100>;
  72. clock-duration-ns = <100>;
  73. clk-gpios = <&gpio3 7 0>, <&gpio3 8 0>;
  74. latched-gpios = <&gpio3 21 0>, <&gpio3 22 0>,
  75. <&gpio3 23 0>, <&gpio3 24 0>,
  76. <&gpio3 25 0>, <&gpio3 26 0>,
  77. <&gpio3 27 0>, <&gpio3 28 0>;
  78. };