gpio-altera.txt 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. Altera GPIO controller bindings
  2. Required properties:
  3. - compatible:
  4. - "altr,pio-1.0"
  5. - reg: Physical base address and length of the controller's registers.
  6. - #gpio-cells : Should be 2
  7. - The first cell is the gpio offset number.
  8. - The second cell is reserved and is currently unused.
  9. - gpio-controller : Marks the device node as a GPIO controller.
  10. - interrupt-controller: Mark the device node as an interrupt controller
  11. - #interrupt-cells : Should be 1. The interrupt type is fixed in the hardware.
  12. - The first cell is the GPIO offset number within the GPIO controller.
  13. - interrupts: Specify the interrupt.
  14. - altr,interrupt-trigger: Specifies the interrupt trigger type the GPIO
  15. hardware is synthesized. This field is required if the Altera GPIO controller
  16. used has IRQ enabled as the interrupt type is not software controlled,
  17. but hardware synthesized. Required if GPIO is used as an interrupt
  18. controller. The value is defined in <dt-bindings/interrupt-controller/irq.h>
  19. Only the following flags are supported:
  20. IRQ_TYPE_EDGE_RISING
  21. IRQ_TYPE_EDGE_FALLING
  22. IRQ_TYPE_EDGE_BOTH
  23. IRQ_TYPE_LEVEL_HIGH
  24. Optional properties:
  25. - altr,ngpio: Width of the GPIO bank. This defines how many pins the
  26. GPIO device has. Ranges between 1-32. Optional and defaults to 32 if not
  27. specified.
  28. Example:
  29. gpio_altr: gpio@0xff200000 {
  30. compatible = "altr,pio-1.0";
  31. reg = <0xff200000 0x10>;
  32. interrupts = <0 45 4>;
  33. altr,ngpio = <32>;
  34. altr,interrupt-trigger = <IRQ_TYPE_EDGE_RISING>;
  35. #gpio-cells = <2>;
  36. gpio-controller;
  37. #interrupt-cells = <1>;
  38. interrupt-controller;
  39. };