blob: 941a26aa43228647dc021527c894a6ceb0d69d88 [file] [log] [blame]
Laurent Pinchart159f8a02013-05-21 13:40:06 +02001* Renesas R-Car GPIO Controller
2
3Required Properties:
4
Laurent Pinchart61257522013-11-29 21:14:57 +01005 - compatible: should contain one of the following.
Laurent Pinchart159f8a02013-05-21 13:40:06 +02006 - "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.
Laurent Pinchart61257522013-11-29 21:14:57 +01009 - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2) compatible GPIO controller.
Laurent Pinchart159f8a02013-05-21 13:40:06 +020010 - "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
Laurent Pinchartb559c3e2013-06-18 12:29:48 +020020 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.
Laurent Pinchart159f8a02013-05-21 13:40:06 +020023
Geert Uytterhoeven370a4512014-04-14 20:33:12 +020024Optional 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
Laurent Pinchartb559c3e2013-06-18 12:29:48 +020030Please refer to gpio.txt in this directory for details of gpio-ranges property
31and the common GPIO bindings used by client devices.
Laurent Pinchart159f8a02013-05-21 13:40:06 +020032
Laurent Pinchartf8b1bd72013-07-04 19:44:39 +020033The GPIO controller also acts as an interrupt controller. It uses the default
34two cells specifier as described in Documentation/devicetree/bindings/
35interrupt-controller/interrupts.txt.
36
Laurent Pinchart159f8a02013-05-21 13:40:06 +020037Example: 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>;
Laurent Pinchartf8b1bd72013-07-04 19:44:39 +020047 interrupt-controller;
48 #interrupt-cells = <2>;
Laurent Pinchart159f8a02013-05-21 13:40:06 +020049 };
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>;
Laurent Pinchartf8b1bd72013-07-04 19:44:39 +020059 interrupt-controller;
60 #interrupt-cells = <2>;
Laurent Pinchart159f8a02013-05-21 13:40:06 +020061 };