~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/devicetree/bindings/media/renesas,drif.yaml

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  2 %YAML 1.2
  3 ---
  4 $id: http://devicetree.org/schemas/media/renesas,drif.yaml#
  5 $schema: http://devicetree.org/meta-schemas/core.yaml#
  6 
  7 title: Renesas R-Car Gen3 Digital Radio Interface Controller (DRIF)
  8 
  9 maintainers:
 10   - Ramesh Shanmugasundaram <rashanmu@gmail.com>
 11   - Fabrizio Castro <fabrizio.castro.jz@renesas.com>
 12 
 13 description: |
 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.
 16 
 17   +---------------------+                +---------------------+
 18   |                     |-----SCK------->|CLK                  |
 19   |       Master        |-----SS-------->|SYNC  DRIFn (slave)  |
 20   |                     |-----SD0------->|D0                   |
 21   |                     |-----SD1------->|D1                   |
 22   +---------------------+                +---------------------+
 23 
 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.
 29 
 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
 34   internal channel.
 35 
 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".
 41 
 42   To summarize,
 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.
 49 
 50 properties:
 51   compatible:
 52     items:
 53       - enum:
 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
 59 
 60   reg:
 61     maxItems: 1
 62 
 63   interrupts:
 64     maxItems: 1
 65 
 66   clocks:
 67     maxItems: 1
 68 
 69   clock-names:
 70     const: fck
 71 
 72   resets:
 73     maxItems: 1
 74 
 75   dmas:
 76     minItems: 1
 77     maxItems: 2
 78 
 79   dma-names:
 80     minItems: 1
 81     items:
 82       - const: rx
 83       - const: rx
 84 
 85   renesas,bonding:
 86     $ref: /schemas/types.yaml#/definitions/phandle
 87     description:
 88       The phandle to the other internal channel of DRIF
 89 
 90   power-domains:
 91     maxItems: 1
 92 
 93   renesas,primary-bond:
 94     type: boolean
 95     description:
 96       Indicates that the channel acts as primary among the bonded channels.
 97 
 98   port:
 99     $ref: /schemas/graph.yaml#/$defs/port-base
100     unevaluatedProperties: false
101     description:
102       Child port node corresponding to the data input. The port node must
103       contain at least one endpoint.
104 
105     properties:
106       endpoint:
107         $ref: /schemas/graph.yaml#/$defs/endpoint-base
108         unevaluatedProperties: false
109 
110         properties:
111           sync-active:
112             $ref: /schemas/types.yaml#/definitions/uint32
113             enum: [0, 1]
114             description:
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).
118 
119 required:
120   - compatible
121   - reg
122   - interrupts
123   - clocks
124   - clock-names
125   - resets
126   - dmas
127   - dma-names
128   - renesas,bonding
129   - power-domains
130 
131 allOf:
132   - if:
133       required:
134         - renesas,primary-bond
135     then:
136       required:
137         - pinctrl-0
138         - pinctrl-names
139         - port
140 
141   - if:
142       required:
143         - port
144     then:
145       required:
146         - pinctrl-0
147         - pinctrl-names
148     else:
149       properties:
150         pinctrl-0: false
151         pinctrl-names: false
152 
153 additionalProperties: false
154 
155 examples:
156   # Example with both internal channels enabled.
157   #
158   # When interfacing with a third party tuner device with two data pins as shown
159   # below.
160   #
161   # +---------------------+                +---------------------+
162   # |                     |-----SCK------->|CLK                  |
163   # |       Master        |-----SS-------->|SYNC  DRIFn (slave)  |
164   # |                     |-----SD0------->|D0                   |
165   # |                     |-----SD1------->|D1                   |
166   # +---------------------+                +---------------------+
167   - |
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>
171 
172     soc {
173             #address-cells = <2>;
174             #size-cells = <2>;
175 
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>;
182                     clock-names = "fck";
183                     dmas = <&dmac1 0x20>, <&dmac2 0x20>;
184                     dma-names = "rx", "rx";
185                     power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
186                     renesas,bonding = <&drif01>;
187                     resets = <&cpg 515>;
188                     renesas,primary-bond;
189                     pinctrl-0 = <&drif0_pins>;
190                     pinctrl-names = "default";
191                     port {
192                             drif0_ep: endpoint {
193                                  remote-endpoint = <&tuner_ep>;
194                             };
195                     };
196             };
197 
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>;
204                     clock-names = "fck";
205                     dmas = <&dmac1 0x22>, <&dmac2 0x22>;
206                     dma-names = "rx", "rx";
207                     power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
208                     renesas,bonding = <&drif00>;
209                     resets = <&cpg 514>;
210             };
211     };
212 
213   # Example with internal channel 1 alone enabled.
214   #
215   # When interfacing with a third party tuner device with one data pin as shown
216   # below.
217   #
218   # +---------------------+                +---------------------+
219   # |                     |-----SCK------->|CLK                  |
220   # |       Master        |-----SS-------->|SYNC  DRIFn (slave)  |
221   # |                     |                |D0 (unused)          |
222   # |                     |-----SD-------->|D1                   |
223   # +---------------------+                +---------------------+
224   - |
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>
228 
229     soc {
230             #address-cells = <2>;
231             #size-cells = <2>;
232 
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>;
239                     clock-names = "fck";
240                     dmas = <&dmac1 0x24>, <&dmac2 0x24>;
241                     dma-names = "rx", "rx";
242                     power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
243                     resets = <&cpg 513>;
244                     renesas,bonding = <&drif11>;
245             };
246 
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>;
253                     clock-names = "fck";
254                     dmas = <&dmac1 0x26>, <&dmac2 0x26>;
255                     dma-names = "rx", "rx";
256                     power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
257                     resets = <&cpg 512>;
258                     renesas,bonding = <&drif10>;
259                     pinctrl-0 = <&drif1_pins>;
260                     pinctrl-names = "default";
261                     port {
262                             drif1_ep: endpoint {
263                                  remote-endpoint = <&tuner_ep1>;
264                                  sync-active = <0>;
265                             };
266                     };
267             };
268     };
269 ...

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php