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