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