Merge tag 'cris-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper...
[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-W) compatible GPIO controller.
10     - "renesas,gpio-r8a7792": for R8A7792 (R-Car V2H) compatible GPIO controller.
11     - "renesas,gpio-r8a7793": for R8A7793 (R-Car M2-N) compatible GPIO controller.
12     - "renesas,gpio-r8a7794": for R8A7794 (R-Car E2) compatible GPIO controller.
13     - "renesas,gpio-r8a7795": for R8A7795 (R-Car H3) compatible GPIO controller.
14     - "renesas,gpio-r8a7796": for R8A7796 (R-Car M3-W) compatible GPIO controller.
15     - "renesas,gpio-rcar": for generic R-Car GPIO controller.
16
17   - reg: Base address and length of each memory resource used by the GPIO
18     controller hardware module.
19
20   - interrupt-parent: phandle of the parent interrupt controller.
21   - interrupts: Interrupt specifier for the controllers interrupt.
22
23   - gpio-controller: Marks the device node as a gpio controller.
24   - #gpio-cells: Should be 2. The first cell is the GPIO number and the second
25     cell specifies GPIO flags, as defined in <dt-bindings/gpio/gpio.h>. Only the
26     GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported.
27   - gpio-ranges: Range of pins managed by the GPIO controller.
28
29 Optional properties:
30
31   - clocks: Must contain a reference to the functional clock.  The property is
32     mandatory if the hardware implements a controllable functional clock for
33     the GPIO instance.
34
35 Please refer to gpio.txt in this directory for details of gpio-ranges property
36 and the common GPIO bindings used by client devices.
37
38 The GPIO controller also acts as an interrupt controller. It uses the default
39 two cells specifier as described in Documentation/devicetree/bindings/
40 interrupt-controller/interrupts.txt.
41
42 Example: R8A7779 (R-Car H1) GPIO controller nodes
43
44         gpio0: gpio@ffc40000 {
45                 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
46                 reg = <0xffc40000 0x2c>;
47                 interrupt-parent = <&gic>;
48                 interrupts = <0 141 0x4>;
49                 #gpio-cells = <2>;
50                 gpio-controller;
51                 gpio-ranges = <&pfc 0 0 32>;
52                 interrupt-controller;
53                 #interrupt-cells = <2>;
54         };
55         ...
56         gpio6: gpio@ffc46000 {
57                 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
58                 reg = <0xffc46000 0x2c>;
59                 interrupt-parent = <&gic>;
60                 interrupts = <0 147 0x4>;
61                 #gpio-cells = <2>;
62                 gpio-controller;
63                 gpio-ranges = <&pfc 0 192 9>;
64                 interrupt-controller;
65                 #interrupt-cells = <2>;
66         };