gpio-tz1090.txt 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ImgTec TZ1090 GPIO Controller
  2. Required properties:
  3. - compatible: Compatible property value should be "img,tz1090-gpio".
  4. - reg: Physical base address of the controller and length of memory mapped
  5. region.
  6. - #address-cells: Should be 1 (for bank subnodes)
  7. - #size-cells: Should be 0 (for bank subnodes)
  8. - Each bank of GPIOs should have a subnode to represent it.
  9. Bank subnode required properties:
  10. - reg: Index of bank in the range 0 to 2.
  11. - gpio-controller: Specifies that the node is a gpio controller.
  12. - #gpio-cells: Should be 2. The syntax of the gpio specifier used by client
  13. nodes should have the following values.
  14. <[phandle of the gpio controller node]
  15. [gpio number within the gpio bank]
  16. [gpio flags]>
  17. Values for gpio specifier:
  18. - GPIO number: a value in the range 0 to 29.
  19. - GPIO flags: bit field of flags, as defined in <dt-bindings/gpio/gpio.h>.
  20. Only the following flags are supported:
  21. GPIO_ACTIVE_HIGH
  22. GPIO_ACTIVE_LOW
  23. Bank subnode optional properties:
  24. - gpio-ranges: Mapping to pin controller pins (as described in
  25. Documentation/devicetree/bindings/gpio/gpio.txt)
  26. - interrupts: Interrupt for the entire bank
  27. - interrupt-controller: Specifies that the node is an interrupt controller
  28. - #interrupt-cells: Should be 2. The syntax of the interrupt specifier used by
  29. client nodes should have the following values.
  30. <[phandle of the interurupt controller]
  31. [gpio number within the gpio bank]
  32. [irq flags]>
  33. Values for irq specifier:
  34. - GPIO number: a value in the range 0 to 29
  35. - IRQ flags: value to describe edge and level triggering, as defined in
  36. <dt-bindings/interrupt-controller/irq.h>. Only the following flags are
  37. supported:
  38. IRQ_TYPE_EDGE_RISING
  39. IRQ_TYPE_EDGE_FALLING
  40. IRQ_TYPE_EDGE_BOTH
  41. IRQ_TYPE_LEVEL_HIGH
  42. IRQ_TYPE_LEVEL_LOW
  43. Example:
  44. gpios: gpio-controller@02005800 {
  45. #address-cells = <1>;
  46. #size-cells = <0>;
  47. compatible = "img,tz1090-gpio";
  48. reg = <0x02005800 0x90>;
  49. /* bank 0 with an interrupt */
  50. gpios0: bank@0 {
  51. #gpio-cells = <2>;
  52. #interrupt-cells = <2>;
  53. reg = <0>;
  54. interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
  55. gpio-controller;
  56. gpio-ranges = <&pinctrl 0 0 30>;
  57. interrupt-controller;
  58. };
  59. /* bank 2 without interrupt */
  60. gpios2: bank@2 {
  61. #gpio-cells = <2>;
  62. reg = <2>;
  63. gpio-controller;
  64. gpio-ranges = <&pinctrl 0 60 30>;
  65. };
  66. };