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