Debian Codegraph @

Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml

raw
1 # SPDX-License-Identifier: GPL-2.0
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/spi/renesas,sh-msiof.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Renesas MSIOF SPI / I2S controller
8
9 maintainers:
10 - Geert Uytterhoeven <[email protected]>
11
12 properties:
13 compatible:
14 oneOf:
15 - items:
16 - const: renesas,msiof-sh73a0 # SH-Mobile AG5
17 - const: renesas,sh-mobile-msiof # generic SH-Mobile compatible
18 # device
19 - items:
20 - enum:
21 - renesas,msiof-r8a7742 # RZ/G1H
22 - renesas,msiof-r8a7743 # RZ/G1M
23 - renesas,msiof-r8a7744 # RZ/G1N
24 - renesas,msiof-r8a7745 # RZ/G1E
25 - renesas,msiof-r8a77470 # RZ/G1C
26 - renesas,msiof-r8a7790 # R-Car H2
27 - renesas,msiof-r8a7791 # R-Car M2-W
28 - renesas,msiof-r8a7792 # R-Car V2H
29 - renesas,msiof-r8a7793 # R-Car M2-N
30 - renesas,msiof-r8a7794 # R-Car E2
31 - const: renesas,rcar-gen2-msiof # generic R-Car Gen2 and RZ/G1
32 # compatible device
33 - items:
34 - enum:
35 - renesas,msiof-r8a774a1 # RZ/G2M
36 - renesas,msiof-r8a774b1 # RZ/G2N
37 - renesas,msiof-r8a774c0 # RZ/G2E
38 - renesas,msiof-r8a774e1 # RZ/G2H
39 - renesas,msiof-r8a7795 # R-Car H3
40 - renesas,msiof-r8a7796 # R-Car M3-W
41 - renesas,msiof-r8a77961 # R-Car M3-W+
42 - renesas,msiof-r8a77965 # R-Car M3-N
43 - renesas,msiof-r8a77970 # R-Car V3M
44 - renesas,msiof-r8a77980 # R-Car V3H
45 - renesas,msiof-r8a77990 # R-Car E3
46 - renesas,msiof-r8a77995 # R-Car D3
47 - const: renesas,rcar-gen3-msiof # generic R-Car Gen3 and RZ/G2
48 # compatible device
49 - items:
50 - enum:
51 - renesas,msiof-r8a779a0 # R-Car V3U
52 - renesas,msiof-r8a779f0 # R-Car S4-8
53 - renesas,msiof-r8a779g0 # R-Car V4H
54 - renesas,msiof-r8a779h0 # R-Car V4M
55 - const: renesas,rcar-gen4-msiof # generic R-Car Gen4
56 # compatible device
57 - items:
58 - const: renesas,sh-msiof # deprecated
59
60 reg:
61 minItems: 1
62 maxItems: 2
63 oneOf:
64 - items:
65 - description: CPU and DMA engine registers
66 - items:
67 - description: CPU registers
68 - description: DMA engine registers
69
70 interrupts:
71 maxItems: 1
72
73 clocks:
74 maxItems: 1
75
76 power-domains:
77 maxItems: 1
78
79 resets:
80 maxItems: 1
81
82 num-cs:
83 description: |
84 Total number of chip selects (default is 1).
85 Up to 3 native chip selects are supported:
86 0: MSIOF_SYNC
87 1: MSIOF_SS1
88 2: MSIOF_SS2
89 Hardware limitations related to chip selects:
90 - Native chip selects are always deasserted in between transfers
91 that are part of the same message. Use cs-gpios to work around
92 this.
93 - All slaves using native chip selects must use the same spi-cs-high
94 configuration. Use cs-gpios to work around this.
95 - When using GPIO chip selects, at least one native chip select must
96 be left unused, as it will be driven anyway.
97 minimum: 1
98 maximum: 3
99 default: 1
100
101 dmas:
102 minItems: 2
103 maxItems: 4
104
105 dma-names:
106 minItems: 2
107 maxItems: 4
108 items:
109 enum: [ tx, rx ]
110
111 renesas,dtdl:
112 description: delay sync signal (setup) in transmit mode.
113 $ref: /schemas/types.yaml#/definitions/uint32
114 enum:
115 - 0 # no bit delay
116 - 50 # 0.5-clock-cycle delay
117 - 100 # 1-clock-cycle delay
118 - 150 # 1.5-clock-cycle delay
119 - 200 # 2-clock-cycle delay
120
121 renesas,syncdl:
122 description: delay sync signal (hold) in transmit mode
123 $ref: /schemas/types.yaml#/definitions/uint32
124 enum:
125 - 0 # no bit delay
126 - 50 # 0.5-clock-cycle delay
127 - 100 # 1-clock-cycle delay
128 - 150 # 1.5-clock-cycle delay
129 - 200 # 2-clock-cycle delay
130 - 300 # 3-clock-cycle delay
131
132 renesas,tx-fifo-size:
133 # deprecated for soctype-specific bindings
134 description: |
135 Override the default TX fifo size. Unit is words. Ignored if 0.
136 $ref: /schemas/types.yaml#/definitions/uint32
137 default: 64
138
139 renesas,rx-fifo-size:
140 # deprecated for soctype-specific bindings
141 description: |
142 Override the default RX fifo size. Unit is words. Ignored if 0.
143 $ref: /schemas/types.yaml#/definitions/uint32
144 default: 64
145
146 # for MSIOF-I2S
147 port:
148 $ref: ../sound/audio-graph-port.yaml#
149 unevaluatedProperties: false
150
151 required:
152 - compatible
153 - reg
154 - interrupts
155 - clocks
156 - power-domains
157
158 allOf:
159 # additional "required""
160 - if:
161 not:
162 properties:
163 compatible:
164 contains:
165 const: renesas,sh-mobile-msiof
166 then:
167 required:
168 - resets
169
170 # If it doesn't have "port" node, it is "MSIOF-SPI"
171 - if:
172 not:
173 required:
174 - port
175 then:
176 allOf:
177 - $ref: spi-controller.yaml#
178
179 unevaluatedProperties: false
180
181 examples:
182 - |
183 #include <dt-bindings/clock/r8a7791-cpg-mssr.h>
184 #include <dt-bindings/interrupt-controller/arm-gic.h>
185 #include <dt-bindings/power/r8a7791-sysc.h>
186
187 msiof0: spi@e6e20000 {
188 compatible = "renesas,msiof-r8a7791", "renesas,rcar-gen2-msiof";
189 reg = <0xe6e20000 0x0064>;
190 interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
191 clocks = <&cpg CPG_MOD 000>;
192 dmas = <&dmac0 0x51>, <&dmac0 0x52>;
193 dma-names = "tx", "rx";
194 power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
195 resets = <&cpg 0>;
196 #address-cells = <1>;
197 #size-cells = <0>;
198 };