1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
4 $id: http://devicetree.org/schemas/media/renesas,drif.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Renesas R-Car Gen3 Digital Radio Interface Controller (DRIF)
10 - Ramesh Shanmugasundaram <rashanmu@gmail.com>
11 - Fabrizio Castro <fabrizio.castro.jz@renesas.com>
14 R-Car Gen3 DRIF is a SPI like receive only slave device. A general
15 representation of DRIF interfacing with a master device is shown below.
17 +---------------------+ +---------------------+
18 | |-----SCK------->|CLK |
19 | Master |-----SS-------->|SYNC DRIFn (slave) |
20 | |-----SD0------->|D0 |
21 | |-----SD1------->|D1 |
22 +---------------------+ +---------------------+
24 As per datasheet, each DRIF channel (drifn) is made up of two internal
25 channels (drifn0 & drifn1). These two internal channels share the common
26 CLK & SYNC. Each internal channel has its own dedicated resources like
27 irq, dma channels, address space & clock. This internal split is not
28 visible to the external master device.
30 The device tree model represents each internal channel as a separate node.
31 The internal channels sharing the CLK & SYNC are tied together by their
32 phandles using a property called "renesas,bonding". For the rest of
33 the documentation, unless explicitly stated, the word channel implies an
36 When both internal channels are enabled they need to be managed together
37 as one (i.e.) they cannot operate alone as independent devices. Out of the
38 two, one of them needs to act as a primary device that accepts common
39 properties of both the internal channels. This channel is identified by a
40 property called "renesas,primary-bond".
43 * When both the internal channels that are bonded together are enabled,
44 the zeroth channel is selected as primary-bond. This channels accepts
45 properties common to all the members of the bond.
46 * When only one of the bonded channels need to be enabled, the property
47 "renesas,bonding" or "renesas,primary-bond" will have no effect. That
48 enabled channel can act alone as any other independent device.
54 - renesas,r8a7795-drif # R-Car H3
55 - renesas,r8a7796-drif # R-Car M3-W
56 - renesas,r8a77965-drif # R-Car M3-N
57 - renesas,r8a77990-drif # R-Car E3
58 - const: renesas,rcar-gen3-drif # Generic R-Car Gen3 compatible device
86 $ref: /schemas/types.yaml#/definitions/phandle
88 The phandle to the other internal channel of DRIF
96 Indicates that the channel acts as primary among the bonded channels.
99 $ref: /schemas/graph.yaml#/$defs/port-base
100 unevaluatedProperties: false
102 Child port node corresponding to the data input. The port node must
103 contain at least one endpoint.
107 $ref: /schemas/graph.yaml#/$defs/endpoint-base
108 unevaluatedProperties: false
112 $ref: /schemas/types.yaml#/definitions/uint32
115 Indicates sync signal polarity, 0/1 for low/high respectively.
116 This property maps to SYNCAC bit in the hardware manual. The
117 default is 1 (active high).
134 - renesas,primary-bond
153 additionalProperties: false
156 # Example with both internal channels enabled.
158 # When interfacing with a third party tuner device with two data pins as shown
161 # +---------------------+ +---------------------+
162 # | |-----SCK------->|CLK |
163 # | Master |-----SS-------->|SYNC DRIFn (slave) |
164 # | |-----SD0------->|D0 |
165 # | |-----SD1------->|D1 |
166 # +---------------------+ +---------------------+
168 #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
169 #include <dt-bindings/interrupt-controller/arm-gic.h>
170 #include <dt-bindings/power/r8a7795-sysc.h>
173 #address-cells = <2>;
176 drif00: rif@e6f40000 {
177 compatible = "renesas,r8a7795-drif",
178 "renesas,rcar-gen3-drif";
179 reg = <0 0xe6f40000 0 0x64>;
180 interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
181 clocks = <&cpg CPG_MOD 515>;
183 dmas = <&dmac1 0x20>, <&dmac2 0x20>;
184 dma-names = "rx", "rx";
185 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
186 renesas,bonding = <&drif01>;
188 renesas,primary-bond;
189 pinctrl-0 = <&drif0_pins>;
190 pinctrl-names = "default";
193 remote-endpoint = <&tuner_ep>;
198 drif01: rif@e6f50000 {
199 compatible = "renesas,r8a7795-drif",
200 "renesas,rcar-gen3-drif";
201 reg = <0 0xe6f50000 0 0x64>;
202 interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
203 clocks = <&cpg CPG_MOD 514>;
205 dmas = <&dmac1 0x22>, <&dmac2 0x22>;
206 dma-names = "rx", "rx";
207 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
208 renesas,bonding = <&drif00>;
213 # Example with internal channel 1 alone enabled.
215 # When interfacing with a third party tuner device with one data pin as shown
218 # +---------------------+ +---------------------+
219 # | |-----SCK------->|CLK |
220 # | Master |-----SS-------->|SYNC DRIFn (slave) |
222 # | |-----SD-------->|D1 |
223 # +---------------------+ +---------------------+
225 #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
226 #include <dt-bindings/interrupt-controller/arm-gic.h>
227 #include <dt-bindings/power/r8a7795-sysc.h>
230 #address-cells = <2>;
233 drif10: rif@e6f60000 {
234 compatible = "renesas,r8a7795-drif",
235 "renesas,rcar-gen3-drif";
236 reg = <0 0xe6f60000 0 0x64>;
237 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
238 clocks = <&cpg CPG_MOD 513>;
240 dmas = <&dmac1 0x24>, <&dmac2 0x24>;
241 dma-names = "rx", "rx";
242 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
244 renesas,bonding = <&drif11>;
247 drif11: rif@e6f70000 {
248 compatible = "renesas,r8a7795-drif",
249 "renesas,rcar-gen3-drif";
250 reg = <0 0xe6f70000 0 0x64>;
251 interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
252 clocks = <&cpg CPG_MOD 512>;
254 dmas = <&dmac1 0x26>, <&dmac2 0x26>;
255 dma-names = "rx", "rx";
256 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
258 renesas,bonding = <&drif10>;
259 pinctrl-0 = <&drif1_pins>;
260 pinctrl-names = "default";
263 remote-endpoint = <&tuner_ep1>;