snps,dw-apb-gpio.yaml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/gpio/snps,dw-apb-gpio.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Synopsys DesignWare APB GPIO controller
  7. description: |
  8. Synopsys DesignWare GPIO controllers have a configurable number of ports,
  9. each of which are intended to be represented as child nodes with the generic
  10. GPIO-controller properties as described in this bindings file.
  11. maintainers:
  12. - Hoan Tran <hoan@os.amperecomputing.com>
  13. - Serge Semin <fancer.lancer@gmail.com>
  14. properties:
  15. $nodename:
  16. pattern: "^gpio@[0-9a-f]+$"
  17. compatible:
  18. const: snps,dw-apb-gpio
  19. "#address-cells":
  20. const: 1
  21. "#size-cells":
  22. const: 0
  23. reg:
  24. maxItems: 1
  25. clocks:
  26. minItems: 1
  27. items:
  28. - description: APB interface clock source
  29. - description: DW GPIO debounce reference clock source
  30. clock-names:
  31. minItems: 1
  32. items:
  33. - const: bus
  34. - const: db
  35. resets:
  36. maxItems: 1
  37. patternProperties:
  38. "^gpio-(port|controller)@[0-9a-f]+$":
  39. type: object
  40. properties:
  41. compatible:
  42. const: snps,dw-apb-gpio-port
  43. reg:
  44. maxItems: 1
  45. gpio-controller: true
  46. '#gpio-cells':
  47. const: 2
  48. gpio-line-names:
  49. minItems: 1
  50. maxItems: 32
  51. gpio-ranges: true
  52. ngpios:
  53. default: 32
  54. minimum: 1
  55. maximum: 32
  56. snps,nr-gpios:
  57. description: The number of GPIO pins exported by the port.
  58. deprecated: true
  59. $ref: /schemas/types.yaml#/definitions/uint32
  60. default: 32
  61. minimum: 1
  62. maximum: 32
  63. interrupts:
  64. description: |
  65. The interrupts to the parent controller raised when GPIOs generate
  66. the interrupts. If the controller provides one combined interrupt
  67. for all GPIOs, specify a single interrupt. If the controller provides
  68. one interrupt for each GPIO, provide a list of interrupts that
  69. correspond to each of the GPIO pins.
  70. minItems: 1
  71. maxItems: 32
  72. interrupt-controller: true
  73. '#interrupt-cells':
  74. const: 2
  75. required:
  76. - compatible
  77. - reg
  78. - gpio-controller
  79. - '#gpio-cells'
  80. dependencies:
  81. interrupt-controller: [ interrupts ]
  82. additionalProperties: false
  83. additionalProperties: false
  84. required:
  85. - compatible
  86. - reg
  87. - "#address-cells"
  88. - "#size-cells"
  89. examples:
  90. - |
  91. gpio: gpio@20000 {
  92. compatible = "snps,dw-apb-gpio";
  93. reg = <0x20000 0x1000>;
  94. #address-cells = <1>;
  95. #size-cells = <0>;
  96. porta: gpio-port@0 {
  97. compatible = "snps,dw-apb-gpio-port";
  98. reg = <0>;
  99. gpio-controller;
  100. #gpio-cells = <2>;
  101. snps,nr-gpios = <8>;
  102. interrupt-controller;
  103. #interrupt-cells = <2>;
  104. interrupt-parent = <&vic1>;
  105. interrupts = <0>;
  106. };
  107. portb: gpio-port@1 {
  108. compatible = "snps,dw-apb-gpio-port";
  109. reg = <1>;
  110. gpio-controller;
  111. #gpio-cells = <2>;
  112. snps,nr-gpios = <8>;
  113. };
  114. };
  115. ...