162306a36Sopenharmony_ciAltera GPIO controller bindings 262306a36Sopenharmony_ci 362306a36Sopenharmony_ciRequired properties: 462306a36Sopenharmony_ci- compatible: 562306a36Sopenharmony_ci - "altr,pio-1.0" 662306a36Sopenharmony_ci- reg: Physical base address and length of the controller's registers. 762306a36Sopenharmony_ci- #gpio-cells : Should be 2 862306a36Sopenharmony_ci - The first cell is the gpio offset number. 962306a36Sopenharmony_ci - The second cell is reserved and is currently unused. 1062306a36Sopenharmony_ci- gpio-controller : Marks the device node as a GPIO controller. 1162306a36Sopenharmony_ci- interrupt-controller: Mark the device node as an interrupt controller 1262306a36Sopenharmony_ci- #interrupt-cells : Should be 2. The interrupt type is fixed in the hardware. 1362306a36Sopenharmony_ci - The first cell is the GPIO offset number within the GPIO controller. 1462306a36Sopenharmony_ci - The second cell is the interrupt trigger type and level flags. 1562306a36Sopenharmony_ci- interrupts: Specify the interrupt. 1662306a36Sopenharmony_ci- altr,interrupt-type: Specifies the interrupt trigger type the GPIO 1762306a36Sopenharmony_ci hardware is synthesized. This field is required if the Altera GPIO controller 1862306a36Sopenharmony_ci used has IRQ enabled as the interrupt type is not software controlled, 1962306a36Sopenharmony_ci but hardware synthesized. Required if GPIO is used as an interrupt 2062306a36Sopenharmony_ci controller. The value is defined in <dt-bindings/interrupt-controller/irq.h> 2162306a36Sopenharmony_ci Only the following flags are supported: 2262306a36Sopenharmony_ci IRQ_TYPE_EDGE_RISING 2362306a36Sopenharmony_ci IRQ_TYPE_EDGE_FALLING 2462306a36Sopenharmony_ci IRQ_TYPE_EDGE_BOTH 2562306a36Sopenharmony_ci IRQ_TYPE_LEVEL_HIGH 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ciOptional properties: 2862306a36Sopenharmony_ci- altr,ngpio: Width of the GPIO bank. This defines how many pins the 2962306a36Sopenharmony_ci GPIO device has. Ranges between 1-32. Optional and defaults to 32 if not 3062306a36Sopenharmony_ci specified. 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ciExample: 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_cigpio_altr: gpio@ff200000 { 3562306a36Sopenharmony_ci compatible = "altr,pio-1.0"; 3662306a36Sopenharmony_ci reg = <0xff200000 0x10>; 3762306a36Sopenharmony_ci interrupts = <0 45 4>; 3862306a36Sopenharmony_ci altr,ngpio = <32>; 3962306a36Sopenharmony_ci altr,interrupt-type = <IRQ_TYPE_EDGE_RISING>; 4062306a36Sopenharmony_ci #gpio-cells = <2>; 4162306a36Sopenharmony_ci gpio-controller; 4262306a36Sopenharmony_ci #interrupt-cells = <2>; 4362306a36Sopenharmony_ci interrupt-controller; 4462306a36Sopenharmony_ci}; 45