| ImgTec TZ1090 GPIO Controller |
| |
| Required properties: |
| - compatible: Compatible property value should be "img,tz1090-gpio". |
| |
| - reg: Physical base address of the controller and length of memory mapped |
| region. |
| |
| - #address-cells: Should be 1 (for bank subnodes) |
| |
| - #size-cells: Should be 0 (for bank subnodes) |
| |
| - Each bank of GPIOs should have a subnode to represent it. |
| |
| Bank subnode required properties: |
| - reg: Index of bank in the range 0 to 2. |
| |
| - gpio-controller: Specifies that the node is a gpio controller. |
| |
| - #gpio-cells: Should be 2. The syntax of the gpio specifier used by client |
| nodes should have the following values. |
| <[phandle of the gpio controller node] |
| [gpio number within the gpio bank] |
| [gpio flags]> |
| |
| Values for gpio specifier: |
| - GPIO number: a value in the range 0 to 29. |
| - GPIO flags: bit field of flags, as defined in <dt-bindings/gpio/gpio.h>. |
| Only the following flags are supported: |
| GPIO_ACTIVE_HIGH |
| GPIO_ACTIVE_LOW |
| |
| Bank subnode optional properties: |
| - gpio-ranges: Mapping to pin controller pins (as described in |
| Documentation/devicetree/bindings/gpio/gpio.txt) |
| |
| - interrupts: Interrupt for the entire bank |
| |
| - interrupt-controller: Specifies that the node is an interrupt controller |
| |
| - #interrupt-cells: Should be 2. The syntax of the interrupt specifier used by |
| client nodes should have the following values. |
| <[phandle of the interurupt controller] |
| [gpio number within the gpio bank] |
| [irq flags]> |
| |
| Values for irq specifier: |
| - GPIO number: a value in the range 0 to 29 |
| - IRQ flags: value to describe edge and level triggering, as defined in |
| <dt-bindings/interrupt-controller/irq.h>. Only the following flags are |
| supported: |
| IRQ_TYPE_EDGE_RISING |
| IRQ_TYPE_EDGE_FALLING |
| IRQ_TYPE_EDGE_BOTH |
| IRQ_TYPE_LEVEL_HIGH |
| IRQ_TYPE_LEVEL_LOW |
| |
| |
| |
| Example: |
| |
| gpios: gpio-controller@2005800 { |
| #address-cells = <1>; |
| #size-cells = <0>; |
| compatible = "img,tz1090-gpio"; |
| reg = <0x02005800 0x90>; |
| |
| /* bank 0 with an interrupt */ |
| gpios0: bank@0 { |
| #gpio-cells = <2>; |
| #interrupt-cells = <2>; |
| reg = <0>; |
| interrupts = <13 IRQ_TYPE_LEVEL_HIGH>; |
| gpio-controller; |
| gpio-ranges = <&pinctrl 0 0 30>; |
| interrupt-controller; |
| }; |
| |
| /* bank 2 without interrupt */ |
| gpios2: bank@2 { |
| #gpio-cells = <2>; |
| reg = <2>; |
| gpio-controller; |
| gpio-ranges = <&pinctrl 0 60 30>; |
| }; |
| }; |
| |
| |