xref: /freebsd/sys/contrib/device-tree/Bindings/media/renesas,rzg2l-cru.yaml (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*8bab661aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*8bab661aSEmmanuel Vadot# Copyright (C) 2022 Renesas Electronics Corp.
3*8bab661aSEmmanuel Vadot%YAML 1.2
4*8bab661aSEmmanuel Vadot---
5*8bab661aSEmmanuel Vadot$id: http://devicetree.org/schemas/media/renesas,rzg2l-cru.yaml#
6*8bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
7*8bab661aSEmmanuel Vadot
8*8bab661aSEmmanuel Vadottitle: Renesas RZ/G2L (and alike SoC's) Camera Data Receiving Unit (CRU) Image processing
9*8bab661aSEmmanuel Vadot
10*8bab661aSEmmanuel Vadotmaintainers:
11*8bab661aSEmmanuel Vadot  - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
12*8bab661aSEmmanuel Vadot
13*8bab661aSEmmanuel Vadotdescription:
14*8bab661aSEmmanuel Vadot  The CRU image processing module is a data conversion module equipped with pixel
15*8bab661aSEmmanuel Vadot  color space conversion, LUT, pixel format conversion, etc. An MIPI CSI-2 input and
16*8bab661aSEmmanuel Vadot  parallel (including ITU-R BT.656) input are provided as the image sensor interface.
17*8bab661aSEmmanuel Vadot
18*8bab661aSEmmanuel Vadotproperties:
19*8bab661aSEmmanuel Vadot  compatible:
20*8bab661aSEmmanuel Vadot    items:
21*8bab661aSEmmanuel Vadot      - enum:
22*8bab661aSEmmanuel Vadot          - renesas,r9a07g044-cru       # RZ/G2{L,LC}
23*8bab661aSEmmanuel Vadot          - renesas,r9a07g054-cru       # RZ/V2L
24*8bab661aSEmmanuel Vadot      - const: renesas,rzg2l-cru
25*8bab661aSEmmanuel Vadot
26*8bab661aSEmmanuel Vadot  reg:
27*8bab661aSEmmanuel Vadot    maxItems: 1
28*8bab661aSEmmanuel Vadot
29*8bab661aSEmmanuel Vadot  interrupts:
30*8bab661aSEmmanuel Vadot    maxItems: 3
31*8bab661aSEmmanuel Vadot
32*8bab661aSEmmanuel Vadot  interrupt-names:
33*8bab661aSEmmanuel Vadot    items:
34*8bab661aSEmmanuel Vadot      - const: image_conv
35*8bab661aSEmmanuel Vadot      - const: image_conv_err
36*8bab661aSEmmanuel Vadot      - const: axi_mst_err
37*8bab661aSEmmanuel Vadot
38*8bab661aSEmmanuel Vadot  clocks:
39*8bab661aSEmmanuel Vadot    items:
40*8bab661aSEmmanuel Vadot      - description: CRU Main clock
41*8bab661aSEmmanuel Vadot      - description: CRU Register access clock
42*8bab661aSEmmanuel Vadot      - description: CRU image transfer clock
43*8bab661aSEmmanuel Vadot
44*8bab661aSEmmanuel Vadot  clock-names:
45*8bab661aSEmmanuel Vadot    items:
46*8bab661aSEmmanuel Vadot      - const: video
47*8bab661aSEmmanuel Vadot      - const: apb
48*8bab661aSEmmanuel Vadot      - const: axi
49*8bab661aSEmmanuel Vadot
50*8bab661aSEmmanuel Vadot  power-domains:
51*8bab661aSEmmanuel Vadot    maxItems: 1
52*8bab661aSEmmanuel Vadot
53*8bab661aSEmmanuel Vadot  resets:
54*8bab661aSEmmanuel Vadot    items:
55*8bab661aSEmmanuel Vadot      - description: CRU_PRESETN reset terminal
56*8bab661aSEmmanuel Vadot      - description: CRU_ARESETN reset terminal
57*8bab661aSEmmanuel Vadot
58*8bab661aSEmmanuel Vadot  reset-names:
59*8bab661aSEmmanuel Vadot    items:
60*8bab661aSEmmanuel Vadot      - const: presetn
61*8bab661aSEmmanuel Vadot      - const: aresetn
62*8bab661aSEmmanuel Vadot
63*8bab661aSEmmanuel Vadot  ports:
64*8bab661aSEmmanuel Vadot    $ref: /schemas/graph.yaml#/properties/ports
65*8bab661aSEmmanuel Vadot
66*8bab661aSEmmanuel Vadot    properties:
67*8bab661aSEmmanuel Vadot      port@0:
68*8bab661aSEmmanuel Vadot        $ref: /schemas/graph.yaml#/$defs/port-base
69*8bab661aSEmmanuel Vadot        unevaluatedProperties: false
70*8bab661aSEmmanuel Vadot        description:
71*8bab661aSEmmanuel Vadot          Input port node, single endpoint describing a parallel input source.
72*8bab661aSEmmanuel Vadot
73*8bab661aSEmmanuel Vadot        properties:
74*8bab661aSEmmanuel Vadot          endpoint:
75*8bab661aSEmmanuel Vadot            $ref: video-interfaces.yaml#
76*8bab661aSEmmanuel Vadot            unevaluatedProperties: false
77*8bab661aSEmmanuel Vadot
78*8bab661aSEmmanuel Vadot            properties:
79*8bab661aSEmmanuel Vadot              hsync-active: true
80*8bab661aSEmmanuel Vadot              vsync-active: true
81*8bab661aSEmmanuel Vadot              bus-width: true
82*8bab661aSEmmanuel Vadot              data-shift: true
83*8bab661aSEmmanuel Vadot
84*8bab661aSEmmanuel Vadot      port@1:
85*8bab661aSEmmanuel Vadot        $ref: /schemas/graph.yaml#/properties/port
86*8bab661aSEmmanuel Vadot        description:
87*8bab661aSEmmanuel Vadot          Input port node, describing the Image Processing module connected to the
88*8bab661aSEmmanuel Vadot          CSI-2 receiver.
89*8bab661aSEmmanuel Vadot
90*8bab661aSEmmanuel Vadot    required:
91*8bab661aSEmmanuel Vadot      - port@0
92*8bab661aSEmmanuel Vadot      - port@1
93*8bab661aSEmmanuel Vadot
94*8bab661aSEmmanuel Vadotrequired:
95*8bab661aSEmmanuel Vadot  - compatible
96*8bab661aSEmmanuel Vadot  - reg
97*8bab661aSEmmanuel Vadot  - interrupts
98*8bab661aSEmmanuel Vadot  - interrupt-names
99*8bab661aSEmmanuel Vadot  - clocks
100*8bab661aSEmmanuel Vadot  - clock-names
101*8bab661aSEmmanuel Vadot  - resets
102*8bab661aSEmmanuel Vadot  - reset-names
103*8bab661aSEmmanuel Vadot  - power-domains
104*8bab661aSEmmanuel Vadot
105*8bab661aSEmmanuel VadotadditionalProperties: false
106*8bab661aSEmmanuel Vadot
107*8bab661aSEmmanuel Vadotexamples:
108*8bab661aSEmmanuel Vadot  # Device node example with CSI-2
109*8bab661aSEmmanuel Vadot  - |
110*8bab661aSEmmanuel Vadot    #include <dt-bindings/clock/r9a07g044-cpg.h>
111*8bab661aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
112*8bab661aSEmmanuel Vadot
113*8bab661aSEmmanuel Vadot    cru: video@10830000 {
114*8bab661aSEmmanuel Vadot        compatible = "renesas,r9a07g044-cru", "renesas,rzg2l-cru";
115*8bab661aSEmmanuel Vadot        reg = <0x10830000 0x400>;
116*8bab661aSEmmanuel Vadot        interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>,
117*8bab661aSEmmanuel Vadot                     <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>,
118*8bab661aSEmmanuel Vadot                     <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>;
119*8bab661aSEmmanuel Vadot        interrupt-names = "image_conv", "image_conv_err", "axi_mst_err";
120*8bab661aSEmmanuel Vadot        clocks = <&cpg CPG_MOD R9A07G044_CRU_VCLK>,
121*8bab661aSEmmanuel Vadot                 <&cpg CPG_MOD R9A07G044_CRU_PCLK>,
122*8bab661aSEmmanuel Vadot                 <&cpg CPG_MOD R9A07G044_CRU_ACLK>;
123*8bab661aSEmmanuel Vadot        clock-names = "video", "apb", "axi";
124*8bab661aSEmmanuel Vadot        power-domains = <&cpg>;
125*8bab661aSEmmanuel Vadot        resets = <&cpg R9A07G044_CRU_PRESETN>,
126*8bab661aSEmmanuel Vadot                 <&cpg R9A07G044_CRU_ARESETN>;
127*8bab661aSEmmanuel Vadot        reset-names = "presetn", "aresetn";
128*8bab661aSEmmanuel Vadot
129*8bab661aSEmmanuel Vadot        ports {
130*8bab661aSEmmanuel Vadot            #address-cells = <1>;
131*8bab661aSEmmanuel Vadot            #size-cells = <0>;
132*8bab661aSEmmanuel Vadot
133*8bab661aSEmmanuel Vadot            port@0 {
134*8bab661aSEmmanuel Vadot                #address-cells = <1>;
135*8bab661aSEmmanuel Vadot                #size-cells = <0>;
136*8bab661aSEmmanuel Vadot                reg = <0>;
137*8bab661aSEmmanuel Vadot
138*8bab661aSEmmanuel Vadot                cru_parallel_in: endpoint@0 {
139*8bab661aSEmmanuel Vadot                    reg = <0>;
140*8bab661aSEmmanuel Vadot                    remote-endpoint = <&ov5642>;
141*8bab661aSEmmanuel Vadot                    hsync-active = <1>;
142*8bab661aSEmmanuel Vadot                    vsync-active = <1>;
143*8bab661aSEmmanuel Vadot                };
144*8bab661aSEmmanuel Vadot            };
145*8bab661aSEmmanuel Vadot
146*8bab661aSEmmanuel Vadot            port@1 {
147*8bab661aSEmmanuel Vadot                #address-cells = <1>;
148*8bab661aSEmmanuel Vadot                #size-cells = <0>;
149*8bab661aSEmmanuel Vadot                reg = <1>;
150*8bab661aSEmmanuel Vadot
151*8bab661aSEmmanuel Vadot                cru_csi_in: endpoint@0 {
152*8bab661aSEmmanuel Vadot                    reg = <0>;
153*8bab661aSEmmanuel Vadot                    remote-endpoint = <&csi_cru_in>;
154*8bab661aSEmmanuel Vadot                };
155*8bab661aSEmmanuel Vadot            };
156*8bab661aSEmmanuel Vadot        };
157*8bab661aSEmmanuel Vadot    };
158