Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/gpio/renesas,rcar-gpio.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Renesas R-Car General-Purpose Input/Output Ports (GPIO)
0008 
0009 maintainers:
0010   - Geert Uytterhoeven <geert+renesas@glider.be>
0011 
0012 properties:
0013   compatible:
0014     oneOf:
0015       - items:
0016           - enum:
0017               - renesas,gpio-r8a7778      # R-Car M1
0018               - renesas,gpio-r8a7779      # R-Car H1
0019           - const: renesas,rcar-gen1-gpio # R-Car Gen1
0020 
0021       - items:
0022           - enum:
0023               - renesas,gpio-r8a7742      # RZ/G1H
0024               - renesas,gpio-r8a7743      # RZ/G1M
0025               - renesas,gpio-r8a7744      # RZ/G1N
0026               - renesas,gpio-r8a7745      # RZ/G1E
0027               - renesas,gpio-r8a77470     # RZ/G1C
0028               - renesas,gpio-r8a7790      # R-Car H2
0029               - renesas,gpio-r8a7791      # R-Car M2-W
0030               - renesas,gpio-r8a7792      # R-Car V2H
0031               - renesas,gpio-r8a7793      # R-Car M2-N
0032               - renesas,gpio-r8a7794      # R-Car E2
0033           - const: renesas,rcar-gen2-gpio # R-Car Gen2 or RZ/G1
0034 
0035       - items:
0036           - enum:
0037               - renesas,gpio-r8a774a1     # RZ/G2M
0038               - renesas,gpio-r8a774b1     # RZ/G2N
0039               - renesas,gpio-r8a774c0     # RZ/G2E
0040               - renesas,gpio-r8a774e1     # RZ/G2H
0041               - renesas,gpio-r8a7795      # R-Car H3
0042               - renesas,gpio-r8a7796      # R-Car M3-W
0043               - renesas,gpio-r8a77961     # R-Car M3-W+
0044               - renesas,gpio-r8a77965     # R-Car M3-N
0045               - renesas,gpio-r8a77970     # R-Car V3M
0046               - renesas,gpio-r8a77980     # R-Car V3H
0047               - renesas,gpio-r8a77990     # R-Car E3
0048               - renesas,gpio-r8a77995     # R-Car D3
0049           - const: renesas,rcar-gen3-gpio # R-Car Gen3 or RZ/G2
0050 
0051       - items:
0052           - enum:
0053               - renesas,gpio-r8a779a0     # R-Car V3U
0054               - renesas,gpio-r8a779f0     # R-Car S4-8
0055           - const: renesas,rcar-gen4-gpio # R-Car Gen4
0056 
0057   reg:
0058     maxItems: 1
0059 
0060   interrupts:
0061     maxItems: 1
0062 
0063   clocks:
0064     maxItems: 1
0065 
0066   power-domains:
0067     maxItems: 1
0068 
0069   resets:
0070     maxItems: 1
0071 
0072   gpio-controller: true
0073 
0074   '#gpio-cells':
0075     const: 2
0076 
0077   interrupt-controller: true
0078 
0079   '#interrupt-cells':
0080     const: 2
0081 
0082   gpio-ranges:
0083     maxItems: 1
0084 
0085   gpio-reserved-ranges:
0086     minItems: 1
0087     maxItems: 8
0088 
0089 patternProperties:
0090   "^.*$":
0091     if:
0092       type: object
0093     then:
0094       properties:
0095         gpio-hog: true
0096         gpios: true
0097         input: true
0098         output-high: true
0099         output-low: true
0100         line-name: true
0101 
0102       required:
0103         - gpio-hog
0104         - gpios
0105 
0106       additionalProperties: false
0107 
0108 required:
0109   - compatible
0110   - reg
0111   - interrupts
0112   - gpio-controller
0113   - '#gpio-cells'
0114   - gpio-ranges
0115   - interrupt-controller
0116   - '#interrupt-cells'
0117 
0118 if:
0119   not:
0120     properties:
0121       compatible:
0122         contains:
0123           enum:
0124             - renesas,rcar-gen1-gpio
0125 then:
0126   required:
0127     - clocks
0128     - power-domains
0129     - resets
0130 
0131 additionalProperties: false
0132 
0133 examples:
0134   - |
0135     #include <dt-bindings/clock/r8a77470-cpg-mssr.h>
0136     #include <dt-bindings/interrupt-controller/arm-gic.h>
0137     #include <dt-bindings/power/r8a77470-sysc.h>
0138     gpio3: gpio@e6053000 {
0139             compatible = "renesas,gpio-r8a77470", "renesas,rcar-gen2-gpio";
0140             reg = <0xe6053000 0x50>;
0141             interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
0142             clocks = <&cpg CPG_MOD 909>;
0143             power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
0144             resets = <&cpg 909>;
0145             gpio-controller;
0146             #gpio-cells = <2>;
0147             gpio-ranges = <&pfc 0 96 30>;
0148             gpio-reserved-ranges = <17 10>;
0149             interrupt-controller;
0150             #interrupt-cells = <2>;
0151      };