Laurent Pinchart | 159f8a0 | 2013-05-21 13:40:06 +0200 | [diff] [blame] | 1 | * Renesas R-Car GPIO Controller |
| 2 | |
| 3 | Required Properties: |
| 4 | |
Laurent Pinchart | 6125752 | 2013-11-29 21:14:57 +0100 | [diff] [blame] | 5 | - compatible: should contain one of the following. |
Laurent Pinchart | 159f8a0 | 2013-05-21 13:40:06 +0200 | [diff] [blame] | 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. |
Laurent Pinchart | 6125752 | 2013-11-29 21:14:57 +0100 | [diff] [blame] | 9 | - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2) compatible GPIO controller. |
Laurent Pinchart | 159f8a0 | 2013-05-21 13:40:06 +0200 | [diff] [blame] | 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 |
Laurent Pinchart | b559c3e | 2013-06-18 12:29:48 +0200 | [diff] [blame] | 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. |
Laurent Pinchart | 159f8a0 | 2013-05-21 13:40:06 +0200 | [diff] [blame] | 23 | |
Geert Uytterhoeven | 370a451 | 2014-04-14 20:33:12 +0200 | [diff] [blame] | 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 | |
Laurent Pinchart | b559c3e | 2013-06-18 12:29:48 +0200 | [diff] [blame] | 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. |
Laurent Pinchart | 159f8a0 | 2013-05-21 13:40:06 +0200 | [diff] [blame] | 32 | |
Laurent Pinchart | f8b1bd7 | 2013-07-04 19:44:39 +0200 | [diff] [blame] | 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 | |
Laurent Pinchart | 159f8a0 | 2013-05-21 13:40:06 +0200 | [diff] [blame] | 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>; |
Laurent Pinchart | f8b1bd7 | 2013-07-04 19:44:39 +0200 | [diff] [blame] | 47 | interrupt-controller; |
| 48 | #interrupt-cells = <2>; |
Laurent Pinchart | 159f8a0 | 2013-05-21 13:40:06 +0200 | [diff] [blame] | 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>; |
Laurent Pinchart | f8b1bd7 | 2013-07-04 19:44:39 +0200 | [diff] [blame] | 59 | interrupt-controller; |
| 60 | #interrupt-cells = <2>; |
Laurent Pinchart | 159f8a0 | 2013-05-21 13:40:06 +0200 | [diff] [blame] | 61 | }; |