xref: /openbmc/linux/Documentation/devicetree/bindings/spi/renesas,rspi.yaml (revision 9a87ffc99ec8eb8d35eed7c4f816d75f5cc9662e)
1999866c9SGeert Uytterhoeven# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2999866c9SGeert Uytterhoeven%YAML 1.2
3999866c9SGeert Uytterhoeven---
4999866c9SGeert Uytterhoeven$id: http://devicetree.org/schemas/spi/renesas,rspi.yaml#
5999866c9SGeert Uytterhoeven$schema: http://devicetree.org/meta-schemas/core.yaml#
6999866c9SGeert Uytterhoeven
7999866c9SGeert Uytterhoeventitle: Renesas (Quad) Serial Peripheral Interface (RSPI/QSPI)
8999866c9SGeert Uytterhoeven
9999866c9SGeert Uytterhoevenmaintainers:
10999866c9SGeert Uytterhoeven  - Geert Uytterhoeven <geert+renesas@glider.be>
11999866c9SGeert Uytterhoeven
12999866c9SGeert Uytterhoevenproperties:
13999866c9SGeert Uytterhoeven  compatible:
14999866c9SGeert Uytterhoeven    oneOf:
15999866c9SGeert Uytterhoeven      - items:
16999866c9SGeert Uytterhoeven          - enum:
17999866c9SGeert Uytterhoeven              - renesas,rspi-sh7757    # SH7757
18999866c9SGeert Uytterhoeven          - const: renesas,rspi        # Legacy SH
19999866c9SGeert Uytterhoeven
20999866c9SGeert Uytterhoeven      - items:
21999866c9SGeert Uytterhoeven          - enum:
22999866c9SGeert Uytterhoeven              - renesas,rspi-r7s72100  # RZ/A1H
23999866c9SGeert Uytterhoeven              - renesas,rspi-r7s9210   # RZ/A2
24*dfc6597eSBiju Das              - renesas,r9a07g043-rspi # RZ/G2UL
255a8f8542SLad Prabhakar              - renesas,r9a07g044-rspi # RZ/G2{L,LC}
26f16ed63eSLad Prabhakar              - renesas,r9a07g054-rspi # RZ/V2L
27ee8ad944SLad Prabhakar          - const: renesas,rspi-rz
28999866c9SGeert Uytterhoeven
29999866c9SGeert Uytterhoeven      - items:
30999866c9SGeert Uytterhoeven          - enum:
3108f9793eSLad Prabhakar              - renesas,qspi-r8a7742   # RZ/G1H
32999866c9SGeert Uytterhoeven              - renesas,qspi-r8a7743   # RZ/G1M
33999866c9SGeert Uytterhoeven              - renesas,qspi-r8a7744   # RZ/G1N
34999866c9SGeert Uytterhoeven              - renesas,qspi-r8a7745   # RZ/G1E
35999866c9SGeert Uytterhoeven              - renesas,qspi-r8a77470  # RZ/G1C
36999866c9SGeert Uytterhoeven              - renesas,qspi-r8a7790   # R-Car H2
37999866c9SGeert Uytterhoeven              - renesas,qspi-r8a7791   # R-Car M2-W
38999866c9SGeert Uytterhoeven              - renesas,qspi-r8a7792   # R-Car V2H
39999866c9SGeert Uytterhoeven              - renesas,qspi-r8a7793   # R-Car M2-N
40999866c9SGeert Uytterhoeven              - renesas,qspi-r8a7794   # R-Car E2
41999866c9SGeert Uytterhoeven          - const: renesas,qspi        # R-Car Gen2 and RZ/G1
42999866c9SGeert Uytterhoeven
43999866c9SGeert Uytterhoeven  reg:
44999866c9SGeert Uytterhoeven    maxItems: 1
45999866c9SGeert Uytterhoeven
46999866c9SGeert Uytterhoeven  interrupts:
47999866c9SGeert Uytterhoeven    oneOf:
48999866c9SGeert Uytterhoeven      - items:
49999866c9SGeert Uytterhoeven          - description: A combined interrupt
50999866c9SGeert Uytterhoeven      - items:
51999866c9SGeert Uytterhoeven          - description: Error interrupt (SPEI)
52999866c9SGeert Uytterhoeven          - description: Receive Interrupt (SPRI)
53999866c9SGeert Uytterhoeven          - description: Transmit Interrupt (SPTI)
54999866c9SGeert Uytterhoeven
55999866c9SGeert Uytterhoeven  interrupt-names:
56999866c9SGeert Uytterhoeven    oneOf:
57999866c9SGeert Uytterhoeven      - items:
58999866c9SGeert Uytterhoeven          - const: mux
59999866c9SGeert Uytterhoeven      - items:
60999866c9SGeert Uytterhoeven          - const: error
61999866c9SGeert Uytterhoeven          - const: rx
62999866c9SGeert Uytterhoeven          - const: tx
63999866c9SGeert Uytterhoeven
64999866c9SGeert Uytterhoeven  clocks:
65999866c9SGeert Uytterhoeven    maxItems: 1
66999866c9SGeert Uytterhoeven
67999866c9SGeert Uytterhoeven  power-domains:
68999866c9SGeert Uytterhoeven    maxItems: 1
69999866c9SGeert Uytterhoeven
70999866c9SGeert Uytterhoeven  resets:
71999866c9SGeert Uytterhoeven    maxItems: 1
72999866c9SGeert Uytterhoeven
73999866c9SGeert Uytterhoeven  dmas:
740499220dSRob Herring    minItems: 2
750499220dSRob Herring    maxItems: 4
76999866c9SGeert Uytterhoeven    description:
77999866c9SGeert Uytterhoeven      Must contain a list of pairs of references to DMA specifiers, one for
78999866c9SGeert Uytterhoeven      transmission, and one for reception.
79999866c9SGeert Uytterhoeven
80999866c9SGeert Uytterhoeven  dma-names:
81999866c9SGeert Uytterhoeven    minItems: 2
82999866c9SGeert Uytterhoeven    maxItems: 4
83999866c9SGeert Uytterhoeven    items:
84999866c9SGeert Uytterhoeven      enum:
85999866c9SGeert Uytterhoeven        - tx
86999866c9SGeert Uytterhoeven        - rx
87999866c9SGeert Uytterhoeven
88999866c9SGeert Uytterhoeven  num-cs:
89999866c9SGeert Uytterhoeven    description: |
90999866c9SGeert Uytterhoeven      Total number of native chip selects.
91999866c9SGeert Uytterhoeven      Hardware limitations related to chip selects:
92999866c9SGeert Uytterhoeven        - When using GPIO chip selects, at least one native chip select must
93999866c9SGeert Uytterhoeven          be left unused, as it will be driven anyway.
94999866c9SGeert Uytterhoeven    minimum: 1
95999866c9SGeert Uytterhoeven    maximum: 2
96999866c9SGeert Uytterhoeven    default: 1
97999866c9SGeert Uytterhoeven
98999866c9SGeert Uytterhoevenrequired:
99999866c9SGeert Uytterhoeven  - compatible
100999866c9SGeert Uytterhoeven  - reg
101999866c9SGeert Uytterhoeven  - interrupts
102999866c9SGeert Uytterhoeven  - clocks
103999866c9SGeert Uytterhoeven  - power-domains
104999866c9SGeert Uytterhoeven  - '#address-cells'
105999866c9SGeert Uytterhoeven  - '#size-cells'
106999866c9SGeert Uytterhoeven
107999866c9SGeert UytterhoevenallOf:
108999866c9SGeert Uytterhoeven  - $ref: spi-controller.yaml#
109999866c9SGeert Uytterhoeven  - if:
110999866c9SGeert Uytterhoeven      properties:
111999866c9SGeert Uytterhoeven        compatible:
112999866c9SGeert Uytterhoeven          contains:
113999866c9SGeert Uytterhoeven            enum:
114999866c9SGeert Uytterhoeven              - renesas,rspi-rz
115999866c9SGeert Uytterhoeven    then:
116999866c9SGeert Uytterhoeven      properties:
117999866c9SGeert Uytterhoeven        interrupts:
118999866c9SGeert Uytterhoeven          minItems: 3
119999866c9SGeert Uytterhoeven      required:
120999866c9SGeert Uytterhoeven        - interrupt-names
121999866c9SGeert Uytterhoeven
122999866c9SGeert Uytterhoeven  - if:
123999866c9SGeert Uytterhoeven      properties:
124999866c9SGeert Uytterhoeven        compatible:
125999866c9SGeert Uytterhoeven          contains:
126999866c9SGeert Uytterhoeven            enum:
127999866c9SGeert Uytterhoeven              - renesas,qspi
128*dfc6597eSBiju Das              - renesas,r9a07g043-rspi
1295a8f8542SLad Prabhakar              - renesas,r9a07g044-rspi
130f16ed63eSLad Prabhakar              - renesas,r9a07g054-rspi
131999866c9SGeert Uytterhoeven    then:
132999866c9SGeert Uytterhoeven      required:
133999866c9SGeert Uytterhoeven        - resets
134999866c9SGeert Uytterhoeven
1356fdc6e23SRob HerringunevaluatedProperties: false
1366fdc6e23SRob Herring
137999866c9SGeert Uytterhoevenexamples:
138999866c9SGeert Uytterhoeven  - |
139999866c9SGeert Uytterhoeven    #include <dt-bindings/clock/r8a7791-cpg-mssr.h>
140999866c9SGeert Uytterhoeven    #include <dt-bindings/interrupt-controller/arm-gic.h>
141999866c9SGeert Uytterhoeven    #include <dt-bindings/power/r8a7791-sysc.h>
142999866c9SGeert Uytterhoeven
143999866c9SGeert Uytterhoeven    qspi: spi@e6b10000 {
144999866c9SGeert Uytterhoeven        compatible = "renesas,qspi-r8a7791", "renesas,qspi";
145999866c9SGeert Uytterhoeven        reg = <0xe6b10000 0x2c>;
146999866c9SGeert Uytterhoeven        interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
147999866c9SGeert Uytterhoeven        clocks = <&cpg CPG_MOD 917>;
148999866c9SGeert Uytterhoeven        dmas = <&dmac0 0x17>, <&dmac0 0x18>, <&dmac1 0x17>, <&dmac1 0x18>;
149999866c9SGeert Uytterhoeven        dma-names = "tx", "rx", "tx", "rx";
150999866c9SGeert Uytterhoeven        power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
151999866c9SGeert Uytterhoeven        resets = <&cpg 917>;
152999866c9SGeert Uytterhoeven        num-cs = <1>;
153999866c9SGeert Uytterhoeven        #address-cells = <1>;
154999866c9SGeert Uytterhoeven        #size-cells = <0>;
155999866c9SGeert Uytterhoeven    };
156