Path: blob/main/sys/contrib/device-tree/Bindings/gpio/gpio-altera.txt
48378 views
Altera GPIO controller bindings12Required 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 27- 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 controller11- #interrupt-cells : Should be 2. The interrupt type is fixed in the hardware.12- The first cell is the GPIO offset number within the GPIO controller.13- The second cell is the interrupt trigger type and level flags.14- interrupts: Specify the interrupt.15- altr,interrupt-type: Specifies the interrupt trigger type the GPIO16hardware is synthesized. This field is required if the Altera GPIO controller17used has IRQ enabled as the interrupt type is not software controlled,18but hardware synthesized. Required if GPIO is used as an interrupt19controller. The value is defined in <dt-bindings/interrupt-controller/irq.h>20Only the following flags are supported:21IRQ_TYPE_EDGE_RISING22IRQ_TYPE_EDGE_FALLING23IRQ_TYPE_EDGE_BOTH24IRQ_TYPE_LEVEL_HIGH2526Optional properties:27- altr,ngpio: Width of the GPIO bank. This defines how many pins the28GPIO device has. Ranges between 1-32. Optional and defaults to 32 if not29specified.3031Example:3233gpio_altr: gpio@ff200000 {34compatible = "altr,pio-1.0";35reg = <0xff200000 0x10>;36interrupts = <0 45 4>;37altr,ngpio = <32>;38altr,interrupt-type = <IRQ_TYPE_EDGE_RISING>;39#gpio-cells = <2>;40gpio-controller;41#interrupt-cells = <2>;42interrupt-controller;43};444546