xref: /freebsd/sys/contrib/device-tree/Bindings/spi/renesas,rspi.yaml (revision b197d4b893974c9eb4d7b38704c6d5c486235d6f)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/spi/renesas,rspi.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Renesas (Quad) Serial Peripheral Interface (RSPI/QSPI)
8
9maintainers:
10  - Geert Uytterhoeven <geert+renesas@glider.be>
11
12properties:
13  compatible:
14    oneOf:
15      - items:
16          - enum:
17              - renesas,rspi-sh7757    # SH7757
18          - const: renesas,rspi        # Legacy SH
19
20      - items:
21          - enum:
22              - renesas,rspi-r7s72100  # RZ/A1H
23              - renesas,rspi-r7s9210   # RZ/A2
24              - renesas,r9a07g044-rspi # RZ/G2{L,LC}
25              - renesas,r9a07g054-rspi # RZ/V2L
26          - const: renesas,rspi-rz
27
28      - items:
29          - enum:
30              - renesas,qspi-r8a7742   # RZ/G1H
31              - renesas,qspi-r8a7743   # RZ/G1M
32              - renesas,qspi-r8a7744   # RZ/G1N
33              - renesas,qspi-r8a7745   # RZ/G1E
34              - renesas,qspi-r8a77470  # RZ/G1C
35              - renesas,qspi-r8a7790   # R-Car H2
36              - renesas,qspi-r8a7791   # R-Car M2-W
37              - renesas,qspi-r8a7792   # R-Car V2H
38              - renesas,qspi-r8a7793   # R-Car M2-N
39              - renesas,qspi-r8a7794   # R-Car E2
40          - const: renesas,qspi        # R-Car Gen2 and RZ/G1
41
42  reg:
43    maxItems: 1
44
45  interrupts:
46    oneOf:
47      - items:
48          - description: A combined interrupt
49      - items:
50          - description: Error interrupt (SPEI)
51          - description: Receive Interrupt (SPRI)
52          - description: Transmit Interrupt (SPTI)
53
54  interrupt-names:
55    oneOf:
56      - items:
57          - const: mux
58      - items:
59          - const: error
60          - const: rx
61          - const: tx
62
63  clocks:
64    maxItems: 1
65
66  power-domains:
67    maxItems: 1
68
69  resets:
70    maxItems: 1
71
72  dmas:
73    minItems: 2
74    maxItems: 4
75    description:
76      Must contain a list of pairs of references to DMA specifiers, one for
77      transmission, and one for reception.
78
79  dma-names:
80    minItems: 2
81    maxItems: 4
82    items:
83      enum:
84        - tx
85        - rx
86
87  num-cs:
88    description: |
89      Total number of native chip selects.
90      Hardware limitations related to chip selects:
91        - When using GPIO chip selects, at least one native chip select must
92          be left unused, as it will be driven anyway.
93    minimum: 1
94    maximum: 2
95    default: 1
96
97required:
98  - compatible
99  - reg
100  - interrupts
101  - clocks
102  - power-domains
103  - '#address-cells'
104  - '#size-cells'
105
106allOf:
107  - $ref: spi-controller.yaml#
108  - if:
109      properties:
110        compatible:
111          contains:
112            enum:
113              - renesas,rspi-rz
114    then:
115      properties:
116        interrupts:
117          minItems: 3
118      required:
119        - interrupt-names
120
121  - if:
122      properties:
123        compatible:
124          contains:
125            enum:
126              - renesas,qspi
127              - renesas,r9a07g044-rspi
128              - renesas,r9a07g054-rspi
129    then:
130      required:
131        - resets
132
133unevaluatedProperties: false
134
135examples:
136  - |
137    #include <dt-bindings/clock/r8a7791-cpg-mssr.h>
138    #include <dt-bindings/interrupt-controller/arm-gic.h>
139    #include <dt-bindings/power/r8a7791-sysc.h>
140
141    qspi: spi@e6b10000 {
142            compatible = "renesas,qspi-r8a7791", "renesas,qspi";
143            reg = <0xe6b10000 0x2c>;
144            interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
145            clocks = <&cpg CPG_MOD 917>;
146            dmas = <&dmac0 0x17>, <&dmac0 0x18>, <&dmac1 0x17>, <&dmac1 0x18>;
147            dma-names = "tx", "rx", "tx", "rx";
148            power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
149            resets = <&cpg 917>;
150            num-cs = <1>;
151            #address-cells = <1>;
152            #size-cells = <0>;
153    };
154