xref: /freebsd/sys/contrib/device-tree/Bindings/spi/renesas,rspi.yaml (revision 19261079b74319502c6ffa1249920079f0f69a72)
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          - const: renesas,rspi-rz     # RZ/A
25
26      - items:
27          - enum:
28              - renesas,qspi-r8a7742   # RZ/G1H
29              - renesas,qspi-r8a7743   # RZ/G1M
30              - renesas,qspi-r8a7744   # RZ/G1N
31              - renesas,qspi-r8a7745   # RZ/G1E
32              - renesas,qspi-r8a77470  # RZ/G1C
33              - renesas,qspi-r8a7790   # R-Car H2
34              - renesas,qspi-r8a7791   # R-Car M2-W
35              - renesas,qspi-r8a7792   # R-Car V2H
36              - renesas,qspi-r8a7793   # R-Car M2-N
37              - renesas,qspi-r8a7794   # R-Car E2
38          - const: renesas,qspi        # R-Car Gen2 and RZ/G1
39
40  reg:
41    maxItems: 1
42
43  interrupts:
44    oneOf:
45      - items:
46          - description: A combined interrupt
47      - items:
48          - description: Error interrupt (SPEI)
49          - description: Receive Interrupt (SPRI)
50          - description: Transmit Interrupt (SPTI)
51
52  interrupt-names:
53    oneOf:
54      - items:
55          - const: mux
56      - items:
57          - const: error
58          - const: rx
59          - const: tx
60
61  clocks:
62    maxItems: 1
63
64  power-domains:
65    maxItems: 1
66
67  resets:
68    maxItems: 1
69
70  dmas:
71    minItems: 2
72    maxItems: 4
73    description:
74      Must contain a list of pairs of references to DMA specifiers, one for
75      transmission, and one for reception.
76
77  dma-names:
78    minItems: 2
79    maxItems: 4
80    items:
81      enum:
82        - tx
83        - rx
84
85  num-cs:
86    description: |
87      Total number of native chip selects.
88      Hardware limitations related to chip selects:
89        - When using GPIO chip selects, at least one native chip select must
90          be left unused, as it will be driven anyway.
91    minimum: 1
92    maximum: 2
93    default: 1
94
95required:
96  - compatible
97  - reg
98  - interrupts
99  - clocks
100  - power-domains
101  - '#address-cells'
102  - '#size-cells'
103
104allOf:
105  - $ref: spi-controller.yaml#
106  - if:
107      properties:
108        compatible:
109          contains:
110            enum:
111              - renesas,rspi-rz
112    then:
113      properties:
114        interrupts:
115          minItems: 3
116      required:
117        - interrupt-names
118
119  - if:
120      properties:
121        compatible:
122          contains:
123            enum:
124              - renesas,qspi
125    then:
126      required:
127        - resets
128
129unevaluatedProperties: false
130
131examples:
132  - |
133    #include <dt-bindings/clock/r8a7791-cpg-mssr.h>
134    #include <dt-bindings/interrupt-controller/arm-gic.h>
135    #include <dt-bindings/power/r8a7791-sysc.h>
136
137    qspi: spi@e6b10000 {
138            compatible = "renesas,qspi-r8a7791", "renesas,qspi";
139            reg = <0xe6b10000 0x2c>;
140            interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
141            clocks = <&cpg CPG_MOD 917>;
142            dmas = <&dmac0 0x17>, <&dmac0 0x18>, <&dmac1 0x17>, <&dmac1 0x18>;
143            dma-names = "tx", "rx", "tx", "rx";
144            power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
145            resets = <&cpg 917>;
146            num-cs = <1>;
147            #address-cells = <1>;
148            #size-cells = <0>;
149    };
150