| * Synopsys DesignWare APB GPIO controller |
| |
| Required properties: |
| - compatible : Should be "snps,dw-apb-gpio" |
| - reg : Address and length of the register set for the device |
| |
| The GPIO controller has a configurable number of banks, each of which are |
| represented as child nodes with the following properties: |
| |
| Required properties: |
| - compatible : "snps,dw-apb-gpio-bank" |
| - gpio-controller : Marks the device node as a gpio controller. |
| - #gpio-cells : Should be two. The first cell is the pin number and |
| the second cell is used to specify optional parameters (currently |
| unused). |
| - reg : The integer bank index of the bank, a single cell. |
| - nr-gpio : The number of pins in the bank, a single cell. |
| |
| Optional properties: |
| - interrupt-controller : The first bank may be configured to be an interrupt |
| controller. |
| - #interrupt-cells : Specifies the number of cells needed to encode an |
| interrupt. Shall be set to 2. The first cell defines the interrupt number, |
| the second encodes the triger flags encoded as described in |
| Documentation/devicetree/bindings/interrupts.txt |
| - interrupt-parent : The parent interrupt controller. |
| - interrupts : The interrupts to the parent controller raised when GPIOs |
| generate the interrupts. |
| |
| Example: |
| |
| gpio: gpio@20000 { |
| compatible = "snps,dw-apb-gpio"; |
| reg = <0x20000 0x1000>; |
| #address-cells = <1>; |
| #size-cells = <0>; |
| |
| banka: gpio-controller@0 { |
| compatible = "snps,dw-apb-gpio-bank"; |
| gpio-controller; |
| #gpio-cells = <2>; |
| nr-gpio = <8>; |
| reg = <0>; |
| interrupt-controller; |
| #interrupt-cells = <2>; |
| interrupt-parent = <&vic1>; |
| interrupts = <0 1 2 3 4 5 6 7>; |
| }; |
| |
| bankb: gpio-controller@1 { |
| compatible = "snps,dw-apb-gpio-bank"; |
| gpio-controller; |
| #gpio-cells = <2>; |
| nr-gpio = <8>; |
| reg = <1>; |
| }; |
| }; |