gpio-xgene-sb.txt 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. APM X-Gene Standby GPIO controller bindings
  2. This is a gpio controller in the standby domain. It also supports interrupt in
  3. some particular pins which are sourced to its parent interrupt controller
  4. as diagram below:
  5. +-----------------+
  6. | X-Gene standby |
  7. | GPIO controller +------ GPIO_0
  8. +------------+ | | ...
  9. | Parent IRQ | EXT_INT_0 | +------ GPIO_8/EXT_INT_0
  10. | controller | (SPI40) | | ...
  11. | (GICv2) +--------------+ +------ GPIO_[N+8]/EXT_INT_N
  12. | | ... | |
  13. | | EXT_INT_N | +------ GPIO_[N+9]
  14. | | (SPI[40 + N])| | ...
  15. | +--------------+ +------ GPIO_MAX
  16. +------------+ +-----------------+
  17. Required properties:
  18. - compatible: "apm,xgene-gpio-sb" for the X-Gene Standby GPIO controller
  19. - reg: Physical base address and size of the controller's registers
  20. - #gpio-cells: Should be two.
  21. - first cell is the pin number
  22. - second cell is used to specify the gpio polarity:
  23. 0 = active high
  24. 1 = active low
  25. - gpio-controller: Marks the device node as a GPIO controller.
  26. - interrupts: The EXT_INT_0 parent interrupt resource must be listed first.
  27. - interrupt-parent: Phandle of the parent interrupt controller.
  28. - interrupt-cells: Should be two.
  29. - first cell is 0-N coresponding for EXT_INT_0 to EXT_INT_N.
  30. - second cell is used to specify flags.
  31. - interrupt-controller: Marks the device node as an interrupt controller.
  32. - apm,nr-gpios: Optional, specify number of gpios pin.
  33. - apm,nr-irqs: Optional, specify number of interrupt pins.
  34. - apm,irq-start: Optional, specify lowest gpio pin support interrupt.
  35. Example:
  36. sbgpio: gpio@17001000{
  37. compatible = "apm,xgene-gpio-sb";
  38. reg = <0x0 0x17001000 0x0 0x400>;
  39. #gpio-cells = <2>;
  40. gpio-controller;
  41. interrupts = <0x0 0x28 0x1>,
  42. <0x0 0x29 0x1>,
  43. <0x0 0x2a 0x1>,
  44. <0x0 0x2b 0x1>,
  45. <0x0 0x2c 0x1>,
  46. <0x0 0x2d 0x1>;
  47. interrupt-parent = <&gic>;
  48. #interrupt-cells = <2>;
  49. interrupt-controller;
  50. apm,nr-gpios = <22>;
  51. apm,nr-irqs = <6>;
  52. apm,irq-start = <8>;
  53. };
  54. testuser {
  55. compatible = "example,testuser";
  56. /* Use the GPIO_13/EXT_INT_5 line as an active high triggered
  57. * level interrupt
  58. */
  59. interrupts = <5 4>;
  60. interrupt-parent = <&sbgpio>;
  61. };