xref: /linux/Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml (revision 39c7c93de02c2c0c150ff41f33068c201b964050)
17f7d408eSGeert Uytterhoeven# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
27f7d408eSGeert Uytterhoeven%YAML 1.2
37f7d408eSGeert Uytterhoeven---
47f7d408eSGeert Uytterhoeven$id: http://devicetree.org/schemas/gpio/renesas,rcar-gpio.yaml#
57f7d408eSGeert Uytterhoeven$schema: http://devicetree.org/meta-schemas/core.yaml#
67f7d408eSGeert Uytterhoeven
77f7d408eSGeert Uytterhoeventitle: Renesas R-Car General-Purpose Input/Output Ports (GPIO)
87f7d408eSGeert Uytterhoeven
97f7d408eSGeert Uytterhoevenmaintainers:
107f7d408eSGeert Uytterhoeven  - Geert Uytterhoeven <geert+renesas@glider.be>
117f7d408eSGeert Uytterhoeven
127f7d408eSGeert Uytterhoevenproperties:
137f7d408eSGeert Uytterhoeven  compatible:
147f7d408eSGeert Uytterhoeven    oneOf:
157f7d408eSGeert Uytterhoeven      - items:
167f7d408eSGeert Uytterhoeven         - enum:
177f7d408eSGeert Uytterhoeven             - renesas,gpio-r8a7778      # R-Car M1
187f7d408eSGeert Uytterhoeven             - renesas,gpio-r8a7779      # R-Car H1
197f7d408eSGeert Uytterhoeven         - const: renesas,rcar-gen1-gpio # R-Car Gen1
207f7d408eSGeert Uytterhoeven
217f7d408eSGeert Uytterhoeven      - items:
227f7d408eSGeert Uytterhoeven         - enum:
23*39c7c93dSLad Prabhakar             - renesas,gpio-r8a7742      # RZ/G1H
247f7d408eSGeert Uytterhoeven             - renesas,gpio-r8a7743      # RZ/G1M
257f7d408eSGeert Uytterhoeven             - renesas,gpio-r8a7744      # RZ/G1N
267f7d408eSGeert Uytterhoeven             - renesas,gpio-r8a7745      # RZ/G1E
277f7d408eSGeert Uytterhoeven             - renesas,gpio-r8a77470     # RZ/G1C
287f7d408eSGeert Uytterhoeven             - renesas,gpio-r8a7790      # R-Car H2
297f7d408eSGeert Uytterhoeven             - renesas,gpio-r8a7791      # R-Car M2-W
307f7d408eSGeert Uytterhoeven             - renesas,gpio-r8a7792      # R-Car V2H
317f7d408eSGeert Uytterhoeven             - renesas,gpio-r8a7793      # R-Car M2-N
327f7d408eSGeert Uytterhoeven             - renesas,gpio-r8a7794      # R-Car E2
337f7d408eSGeert Uytterhoeven         - const: renesas,rcar-gen2-gpio # R-Car Gen2 or RZ/G1
347f7d408eSGeert Uytterhoeven
357f7d408eSGeert Uytterhoeven      - items:
367f7d408eSGeert Uytterhoeven         - enum:
377f7d408eSGeert Uytterhoeven             - renesas,gpio-r8a774a1     # RZ/G2M
387f7d408eSGeert Uytterhoeven             - renesas,gpio-r8a774b1     # RZ/G2N
397f7d408eSGeert Uytterhoeven             - renesas,gpio-r8a774c0     # RZ/G2E
407f7d408eSGeert Uytterhoeven             - renesas,gpio-r8a7795      # R-Car H3
417f7d408eSGeert Uytterhoeven             - renesas,gpio-r8a7796      # R-Car M3-W
427f7d408eSGeert Uytterhoeven             - renesas,gpio-r8a77961     # R-Car M3-W+
437f7d408eSGeert Uytterhoeven             - renesas,gpio-r8a77965     # R-Car M3-N
447f7d408eSGeert Uytterhoeven             - renesas,gpio-r8a77970     # R-Car V3M
457f7d408eSGeert Uytterhoeven             - renesas,gpio-r8a77980     # R-Car V3H
467f7d408eSGeert Uytterhoeven             - renesas,gpio-r8a77990     # R-Car E3
477f7d408eSGeert Uytterhoeven             - renesas,gpio-r8a77995     # R-Car D3
487f7d408eSGeert Uytterhoeven         - const: renesas,rcar-gen3-gpio # R-Car Gen3 or RZ/G2
497f7d408eSGeert Uytterhoeven
507f7d408eSGeert Uytterhoeven  reg:
517f7d408eSGeert Uytterhoeven    maxItems: 1
527f7d408eSGeert Uytterhoeven
537f7d408eSGeert Uytterhoeven  interrupts:
547f7d408eSGeert Uytterhoeven    maxItems: 1
557f7d408eSGeert Uytterhoeven
567f7d408eSGeert Uytterhoeven  clocks:
577f7d408eSGeert Uytterhoeven    maxItems: 1
587f7d408eSGeert Uytterhoeven
597f7d408eSGeert Uytterhoeven  power-domains:
607f7d408eSGeert Uytterhoeven    maxItems: 1
617f7d408eSGeert Uytterhoeven
627f7d408eSGeert Uytterhoeven  resets:
637f7d408eSGeert Uytterhoeven    maxItems: 1
647f7d408eSGeert Uytterhoeven
657f7d408eSGeert Uytterhoeven  gpio-controller: true
667f7d408eSGeert Uytterhoeven
677f7d408eSGeert Uytterhoeven  '#gpio-cells':
687f7d408eSGeert Uytterhoeven    const: 2
697f7d408eSGeert Uytterhoeven
707f7d408eSGeert Uytterhoeven  interrupt-controller: true
717f7d408eSGeert Uytterhoeven
727f7d408eSGeert Uytterhoeven  '#interrupt-cells':
737f7d408eSGeert Uytterhoeven    const: 2
747f7d408eSGeert Uytterhoeven
757f7d408eSGeert Uytterhoeven  gpio-ranges:
767f7d408eSGeert Uytterhoeven    maxItems: 1
777f7d408eSGeert Uytterhoeven
787f7d408eSGeert Uytterhoeven  gpio-reserved-ranges:
797f7d408eSGeert Uytterhoeven    minItems: 1
807f7d408eSGeert Uytterhoeven    maxItems: 8
817f7d408eSGeert Uytterhoeven
827f7d408eSGeert UytterhoevenpatternProperties:
837f7d408eSGeert Uytterhoeven  "^.*$":
847f7d408eSGeert Uytterhoeven    if:
857f7d408eSGeert Uytterhoeven      type: object
867f7d408eSGeert Uytterhoeven    then:
877f7d408eSGeert Uytterhoeven      properties:
887f7d408eSGeert Uytterhoeven        gpio-hog: true
897f7d408eSGeert Uytterhoeven        gpios: true
907f7d408eSGeert Uytterhoeven        input: true
917f7d408eSGeert Uytterhoeven        output-high: true
927f7d408eSGeert Uytterhoeven        output-low: true
937f7d408eSGeert Uytterhoeven        line-name: true
947f7d408eSGeert Uytterhoeven
957f7d408eSGeert Uytterhoeven      required:
967f7d408eSGeert Uytterhoeven        - gpio-hog
977f7d408eSGeert Uytterhoeven        - gpios
987f7d408eSGeert Uytterhoeven
997f7d408eSGeert Uytterhoeven      additionalProperties: false
1007f7d408eSGeert Uytterhoeven
1017f7d408eSGeert Uytterhoevenrequired:
1027f7d408eSGeert Uytterhoeven  - compatible
1037f7d408eSGeert Uytterhoeven  - reg
1047f7d408eSGeert Uytterhoeven  - interrupts
1057f7d408eSGeert Uytterhoeven  - gpio-controller
1067f7d408eSGeert Uytterhoeven  - '#gpio-cells'
1077f7d408eSGeert Uytterhoeven  - gpio-ranges
1087f7d408eSGeert Uytterhoeven  - interrupt-controller
1097f7d408eSGeert Uytterhoeven  - '#interrupt-cells'
1107f7d408eSGeert Uytterhoeven
1117f7d408eSGeert Uytterhoevenif:
1127f7d408eSGeert Uytterhoeven  not:
1137f7d408eSGeert Uytterhoeven    properties:
1147f7d408eSGeert Uytterhoeven      compatible:
1157f7d408eSGeert Uytterhoeven        contains:
1167f7d408eSGeert Uytterhoeven          enum:
1177f7d408eSGeert Uytterhoeven            - renesas,rcar-gen1-gpio
1187f7d408eSGeert Uytterhoeventhen:
1197f7d408eSGeert Uytterhoeven  required:
1207f7d408eSGeert Uytterhoeven    - clocks
1217f7d408eSGeert Uytterhoeven    - power-domains
1227f7d408eSGeert Uytterhoeven    - resets
1237f7d408eSGeert Uytterhoeven
1247f7d408eSGeert UytterhoevenadditionalProperties: false
1257f7d408eSGeert Uytterhoeven
1267f7d408eSGeert Uytterhoevenexamples:
1277f7d408eSGeert Uytterhoeven  - |
1287f7d408eSGeert Uytterhoeven    #include <dt-bindings/clock/r8a77470-cpg-mssr.h>
1297f7d408eSGeert Uytterhoeven    #include <dt-bindings/interrupt-controller/arm-gic.h>
1307f7d408eSGeert Uytterhoeven    #include <dt-bindings/power/r8a77470-sysc.h>
1317f7d408eSGeert Uytterhoeven    gpio3: gpio@e6053000 {
1327f7d408eSGeert Uytterhoeven            compatible = "renesas,gpio-r8a77470", "renesas,rcar-gen2-gpio";
1337f7d408eSGeert Uytterhoeven            reg = <0xe6053000 0x50>;
1347f7d408eSGeert Uytterhoeven            interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
1357f7d408eSGeert Uytterhoeven            clocks = <&cpg CPG_MOD 909>;
1367f7d408eSGeert Uytterhoeven            power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
1377f7d408eSGeert Uytterhoeven            resets = <&cpg 909>;
1387f7d408eSGeert Uytterhoeven            gpio-controller;
1397f7d408eSGeert Uytterhoeven            #gpio-cells = <2>;
1407f7d408eSGeert Uytterhoeven            gpio-ranges = <&pfc 0 96 30>;
1417f7d408eSGeert Uytterhoeven            gpio-reserved-ranges = <17 10>;
1427f7d408eSGeert Uytterhoeven            interrupt-controller;
1437f7d408eSGeert Uytterhoeven            #interrupt-cells = <2>;
1447f7d408eSGeert Uytterhoeven     };
145