Merge remote-tracking branches 'spi/topic/adi-v3', 'spi/topic/atmel', 'spi/topic...
[cascardo/linux.git] / Documentation / devicetree / bindings / gpio / renesas,gpio-rcar.txt
1 * Renesas R-Car GPIO Controller
2
3 Required Properties:
4
5   - compatible: should contain one of the following.
6     - "renesas,gpio-r8a7778": for R8A7778 (R-Mobile M1) compatible GPIO controller.
7     - "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) compatible GPIO controller.
8     - "renesas,gpio-r8a7790": for R8A7790 (R-Car H2) compatible GPIO controller.
9     - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2) compatible GPIO controller.
10     - "renesas,gpio-rcar": for generic R-Car GPIO controller.
11
12   - reg: Base address and length of each memory resource used by the GPIO
13     controller hardware module.
14
15   - interrupt-parent: phandle of the parent interrupt controller.
16   - interrupts: Interrupt specifier for the controllers interrupt.
17
18   - gpio-controller: Marks the device node as a gpio controller.
19   - #gpio-cells: Should be 2. The first cell is the GPIO number and the second
20     cell specifies GPIO flags, as defined in <dt-bindings/gpio/gpio.h>. Only the
21     GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported.
22   - gpio-ranges: Range of pins managed by the GPIO controller.
23
24 Optional properties:
25
26   - clocks: Must contain a reference to the functional clock.  The property is
27     mandatory if the hardware implements a controllable functional clock for
28     the GPIO instance.
29
30 Please refer to gpio.txt in this directory for details of gpio-ranges property
31 and the common GPIO bindings used by client devices.
32
33 The GPIO controller also acts as an interrupt controller. It uses the default
34 two cells specifier as described in Documentation/devicetree/bindings/
35 interrupt-controller/interrupts.txt.
36
37 Example: R8A7779 (R-Car H1) GPIO controller nodes
38
39         gpio0: gpio@ffc40000 {
40                 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
41                 reg = <0xffc40000 0x2c>;
42                 interrupt-parent = <&gic>;
43                 interrupts = <0 141 0x4>;
44                 #gpio-cells = <2>;
45                 gpio-controller;
46                 gpio-ranges = <&pfc 0 0 32>;
47                 interrupt-controller;
48                 #interrupt-cells = <2>;
49         };
50         ...
51         gpio6: gpio@ffc46000 {
52                 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
53                 reg = <0xffc46000 0x2c>;
54                 interrupt-parent = <&gic>;
55                 interrupts = <0 147 0x4>;
56                 #gpio-cells = <2>;
57                 gpio-controller;
58                 gpio-ranges = <&pfc 0 192 9>;
59                 interrupt-controller;
60                 #interrupt-cells = <2>;
61         };