snps-dwapb-gpio.txt 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. * Synopsys DesignWare APB GPIO controller
  2. Required properties:
  3. - compatible : Should contain "snps,dw-apb-gpio"
  4. - reg : Address and length of the register set for the device.
  5. - #address-cells : should be 1 (for addressing port subnodes).
  6. - #size-cells : should be 0 (port subnodes).
  7. The GPIO controller has a configurable number of ports, each of which are
  8. represented as child nodes with the following properties:
  9. Required properties:
  10. - compatible : "snps,dw-apb-gpio-port"
  11. - gpio-controller : Marks the device node as a gpio controller.
  12. - #gpio-cells : Should be two. The first cell is the pin number and
  13. the second cell is used to specify the gpio polarity:
  14. 0 = active high
  15. 1 = active low
  16. - reg : The integer port index of the port, a single cell.
  17. Optional properties:
  18. - interrupt-controller : The first port may be configured to be an interrupt
  19. controller.
  20. - #interrupt-cells : Specifies the number of cells needed to encode an
  21. interrupt. Shall be set to 2. The first cell defines the interrupt number,
  22. the second encodes the triger flags encoded as described in
  23. Documentation/devicetree/bindings/interrupts.txt
  24. - interrupt-parent : The parent interrupt controller.
  25. - interrupts : The interrupt to the parent controller raised when GPIOs
  26. generate the interrupts.
  27. - snps,nr-gpios : The number of pins in the port, a single cell.
  28. Example:
  29. gpio: gpio@20000 {
  30. compatible = "snps,dw-apb-gpio";
  31. reg = <0x20000 0x1000>;
  32. #address-cells = <1>;
  33. #size-cells = <0>;
  34. porta: gpio-controller@0 {
  35. compatible = "snps,dw-apb-gpio-port";
  36. gpio-controller;
  37. #gpio-cells = <2>;
  38. snps,nr-gpios = <8>;
  39. reg = <0>;
  40. interrupt-controller;
  41. #interrupt-cells = <2>;
  42. interrupt-parent = <&vic1>;
  43. interrupts = <0>;
  44. };
  45. portb: gpio-controller@1 {
  46. compatible = "snps,dw-apb-gpio-port";
  47. gpio-controller;
  48. #gpio-cells = <2>;
  49. snps,nr-gpios = <8>;
  50. reg = <1>;
  51. };
  52. };