xref: /freebsd/sys/contrib/device-tree/Bindings/media/cdns,csi2rx.yaml (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1*aa1a8ff2SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*aa1a8ff2SEmmanuel Vadot%YAML 1.2
3*aa1a8ff2SEmmanuel Vadot---
4*aa1a8ff2SEmmanuel Vadot$id: http://devicetree.org/schemas/media/cdns,csi2rx.yaml#
5*aa1a8ff2SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*aa1a8ff2SEmmanuel Vadot
7*aa1a8ff2SEmmanuel Vadottitle: Cadence MIPI-CSI2 RX controller
8*aa1a8ff2SEmmanuel Vadot
9*aa1a8ff2SEmmanuel Vadotmaintainers:
10*aa1a8ff2SEmmanuel Vadot  - Maxime Ripard <mripard@kernel.org>
11*aa1a8ff2SEmmanuel Vadot
12*aa1a8ff2SEmmanuel Vadotdescription:
13*aa1a8ff2SEmmanuel Vadot  The Cadence MIPI-CSI2 RX controller is a CSI-2 bridge supporting up to 4 CSI
14*aa1a8ff2SEmmanuel Vadot  lanes in input, and 4 different pixel streams in output.
15*aa1a8ff2SEmmanuel Vadot
16*aa1a8ff2SEmmanuel Vadotproperties:
17*aa1a8ff2SEmmanuel Vadot  compatible:
18*aa1a8ff2SEmmanuel Vadot    items:
19*aa1a8ff2SEmmanuel Vadot      - enum:
20*aa1a8ff2SEmmanuel Vadot          - starfive,jh7110-csi2rx
21*aa1a8ff2SEmmanuel Vadot      - const: cdns,csi2rx
22*aa1a8ff2SEmmanuel Vadot
23*aa1a8ff2SEmmanuel Vadot  reg:
24*aa1a8ff2SEmmanuel Vadot    maxItems: 1
25*aa1a8ff2SEmmanuel Vadot
26*aa1a8ff2SEmmanuel Vadot  clocks:
27*aa1a8ff2SEmmanuel Vadot    items:
28*aa1a8ff2SEmmanuel Vadot      - description: CSI2Rx system clock
29*aa1a8ff2SEmmanuel Vadot      - description: Gated Register bank clock for APB interface
30*aa1a8ff2SEmmanuel Vadot      - description: pixel Clock for Stream interface 0
31*aa1a8ff2SEmmanuel Vadot      - description: pixel Clock for Stream interface 1
32*aa1a8ff2SEmmanuel Vadot      - description: pixel Clock for Stream interface 2
33*aa1a8ff2SEmmanuel Vadot      - description: pixel Clock for Stream interface 3
34*aa1a8ff2SEmmanuel Vadot
35*aa1a8ff2SEmmanuel Vadot  clock-names:
36*aa1a8ff2SEmmanuel Vadot    items:
37*aa1a8ff2SEmmanuel Vadot      - const: sys_clk
38*aa1a8ff2SEmmanuel Vadot      - const: p_clk
39*aa1a8ff2SEmmanuel Vadot      - const: pixel_if0_clk
40*aa1a8ff2SEmmanuel Vadot      - const: pixel_if1_clk
41*aa1a8ff2SEmmanuel Vadot      - const: pixel_if2_clk
42*aa1a8ff2SEmmanuel Vadot      - const: pixel_if3_clk
43*aa1a8ff2SEmmanuel Vadot
44*aa1a8ff2SEmmanuel Vadot  resets:
45*aa1a8ff2SEmmanuel Vadot    items:
46*aa1a8ff2SEmmanuel Vadot      - description: CSI2Rx system reset
47*aa1a8ff2SEmmanuel Vadot      - description: Gated Register bank reset for APB interface
48*aa1a8ff2SEmmanuel Vadot      - description: pixel reset for Stream interface 0
49*aa1a8ff2SEmmanuel Vadot      - description: pixel reset for Stream interface 1
50*aa1a8ff2SEmmanuel Vadot      - description: pixel reset for Stream interface 2
51*aa1a8ff2SEmmanuel Vadot      - description: pixel reset for Stream interface 3
52*aa1a8ff2SEmmanuel Vadot
53*aa1a8ff2SEmmanuel Vadot  reset-names:
54*aa1a8ff2SEmmanuel Vadot    items:
55*aa1a8ff2SEmmanuel Vadot      - const: sys
56*aa1a8ff2SEmmanuel Vadot      - const: reg_bank
57*aa1a8ff2SEmmanuel Vadot      - const: pixel_if0
58*aa1a8ff2SEmmanuel Vadot      - const: pixel_if1
59*aa1a8ff2SEmmanuel Vadot      - const: pixel_if2
60*aa1a8ff2SEmmanuel Vadot      - const: pixel_if3
61*aa1a8ff2SEmmanuel Vadot
62*aa1a8ff2SEmmanuel Vadot  phys:
63*aa1a8ff2SEmmanuel Vadot    maxItems: 1
64*aa1a8ff2SEmmanuel Vadot    description: MIPI D-PHY
65*aa1a8ff2SEmmanuel Vadot
66*aa1a8ff2SEmmanuel Vadot  phy-names:
67*aa1a8ff2SEmmanuel Vadot    items:
68*aa1a8ff2SEmmanuel Vadot      - const: dphy
69*aa1a8ff2SEmmanuel Vadot
70*aa1a8ff2SEmmanuel Vadot  ports:
71*aa1a8ff2SEmmanuel Vadot    $ref: /schemas/graph.yaml#/properties/ports
72*aa1a8ff2SEmmanuel Vadot
73*aa1a8ff2SEmmanuel Vadot    properties:
74*aa1a8ff2SEmmanuel Vadot      port@0:
75*aa1a8ff2SEmmanuel Vadot        $ref: /schemas/graph.yaml#/$defs/port-base
76*aa1a8ff2SEmmanuel Vadot        unevaluatedProperties: false
77*aa1a8ff2SEmmanuel Vadot        description:
78*aa1a8ff2SEmmanuel Vadot          Input port node, single endpoint describing the CSI-2 transmitter.
79*aa1a8ff2SEmmanuel Vadot
80*aa1a8ff2SEmmanuel Vadot        properties:
81*aa1a8ff2SEmmanuel Vadot          endpoint:
82*aa1a8ff2SEmmanuel Vadot            $ref: video-interfaces.yaml#
83*aa1a8ff2SEmmanuel Vadot            unevaluatedProperties: false
84*aa1a8ff2SEmmanuel Vadot
85*aa1a8ff2SEmmanuel Vadot            properties:
86*aa1a8ff2SEmmanuel Vadot              bus-type:
87*aa1a8ff2SEmmanuel Vadot                const: 4
88*aa1a8ff2SEmmanuel Vadot
89*aa1a8ff2SEmmanuel Vadot              clock-lanes:
90*aa1a8ff2SEmmanuel Vadot                const: 0
91*aa1a8ff2SEmmanuel Vadot
92*aa1a8ff2SEmmanuel Vadot              data-lanes:
93*aa1a8ff2SEmmanuel Vadot                minItems: 1
94*aa1a8ff2SEmmanuel Vadot                maxItems: 4
95*aa1a8ff2SEmmanuel Vadot                items:
96*aa1a8ff2SEmmanuel Vadot                  maximum: 4
97*aa1a8ff2SEmmanuel Vadot
98*aa1a8ff2SEmmanuel Vadot            required:
99*aa1a8ff2SEmmanuel Vadot              - data-lanes
100*aa1a8ff2SEmmanuel Vadot
101*aa1a8ff2SEmmanuel Vadot      port@1:
102*aa1a8ff2SEmmanuel Vadot        $ref: /schemas/graph.yaml#/properties/port
103*aa1a8ff2SEmmanuel Vadot        description:
104*aa1a8ff2SEmmanuel Vadot          Stream 0 Output port node
105*aa1a8ff2SEmmanuel Vadot
106*aa1a8ff2SEmmanuel Vadot      port@2:
107*aa1a8ff2SEmmanuel Vadot        $ref: /schemas/graph.yaml#/properties/port
108*aa1a8ff2SEmmanuel Vadot        description:
109*aa1a8ff2SEmmanuel Vadot          Stream 1 Output port node
110*aa1a8ff2SEmmanuel Vadot
111*aa1a8ff2SEmmanuel Vadot      port@3:
112*aa1a8ff2SEmmanuel Vadot        $ref: /schemas/graph.yaml#/properties/port
113*aa1a8ff2SEmmanuel Vadot        description:
114*aa1a8ff2SEmmanuel Vadot          Stream 2 Output port node
115*aa1a8ff2SEmmanuel Vadot
116*aa1a8ff2SEmmanuel Vadot      port@4:
117*aa1a8ff2SEmmanuel Vadot        $ref: /schemas/graph.yaml#/properties/port
118*aa1a8ff2SEmmanuel Vadot        description:
119*aa1a8ff2SEmmanuel Vadot          Stream 3 Output port node
120*aa1a8ff2SEmmanuel Vadot
121*aa1a8ff2SEmmanuel Vadot    required:
122*aa1a8ff2SEmmanuel Vadot      - port@0
123*aa1a8ff2SEmmanuel Vadot
124*aa1a8ff2SEmmanuel Vadotrequired:
125*aa1a8ff2SEmmanuel Vadot  - compatible
126*aa1a8ff2SEmmanuel Vadot  - reg
127*aa1a8ff2SEmmanuel Vadot  - clocks
128*aa1a8ff2SEmmanuel Vadot  - clock-names
129*aa1a8ff2SEmmanuel Vadot  - ports
130*aa1a8ff2SEmmanuel Vadot
131*aa1a8ff2SEmmanuel VadotadditionalProperties: false
132*aa1a8ff2SEmmanuel Vadot
133*aa1a8ff2SEmmanuel Vadotexamples:
134*aa1a8ff2SEmmanuel Vadot  - |
135*aa1a8ff2SEmmanuel Vadot    csi@d060000 {
136*aa1a8ff2SEmmanuel Vadot        compatible = "starfive,jh7110-csi2rx", "cdns,csi2rx";
137*aa1a8ff2SEmmanuel Vadot        reg = <0x0d060000 0x1000>;
138*aa1a8ff2SEmmanuel Vadot        clocks = <&byteclock 7>, <&byteclock 6>,
139*aa1a8ff2SEmmanuel Vadot                 <&coreclock 8>, <&coreclock 9>,
140*aa1a8ff2SEmmanuel Vadot                 <&coreclock 10>, <&coreclock 11>;
141*aa1a8ff2SEmmanuel Vadot        clock-names = "sys_clk", "p_clk",
142*aa1a8ff2SEmmanuel Vadot                      "pixel_if0_clk", "pixel_if1_clk",
143*aa1a8ff2SEmmanuel Vadot                      "pixel_if2_clk", "pixel_if3_clk";
144*aa1a8ff2SEmmanuel Vadot        resets = <&bytereset 9>, <&bytereset 4>,
145*aa1a8ff2SEmmanuel Vadot                 <&corereset 5>, <&corereset 6>,
146*aa1a8ff2SEmmanuel Vadot                 <&corereset 7>, <&corereset 8>;
147*aa1a8ff2SEmmanuel Vadot        reset-names = "sys", "reg_bank",
148*aa1a8ff2SEmmanuel Vadot                      "pixel_if0", "pixel_if1",
149*aa1a8ff2SEmmanuel Vadot                      "pixel_if2", "pixel_if3";
150*aa1a8ff2SEmmanuel Vadot        phys = <&csi_phy>;
151*aa1a8ff2SEmmanuel Vadot        phy-names = "dphy";
152*aa1a8ff2SEmmanuel Vadot
153*aa1a8ff2SEmmanuel Vadot        ports {
154*aa1a8ff2SEmmanuel Vadot                #address-cells = <1>;
155*aa1a8ff2SEmmanuel Vadot                #size-cells = <0>;
156*aa1a8ff2SEmmanuel Vadot
157*aa1a8ff2SEmmanuel Vadot                port@0 {
158*aa1a8ff2SEmmanuel Vadot                    reg = <0>;
159*aa1a8ff2SEmmanuel Vadot
160*aa1a8ff2SEmmanuel Vadot                    csi2rx_in_sensor: endpoint {
161*aa1a8ff2SEmmanuel Vadot                        remote-endpoint = <&sensor_out_csi2rx>;
162*aa1a8ff2SEmmanuel Vadot                        clock-lanes = <0>;
163*aa1a8ff2SEmmanuel Vadot                        data-lanes = <1 2>;
164*aa1a8ff2SEmmanuel Vadot                    };
165*aa1a8ff2SEmmanuel Vadot                };
166*aa1a8ff2SEmmanuel Vadot
167*aa1a8ff2SEmmanuel Vadot                port@1 {
168*aa1a8ff2SEmmanuel Vadot                    reg = <1>;
169*aa1a8ff2SEmmanuel Vadot
170*aa1a8ff2SEmmanuel Vadot                    csi2rx_out_grabber0: endpoint {
171*aa1a8ff2SEmmanuel Vadot                        remote-endpoint = <&grabber0_in_csi2rx>;
172*aa1a8ff2SEmmanuel Vadot                    };
173*aa1a8ff2SEmmanuel Vadot                };
174*aa1a8ff2SEmmanuel Vadot
175*aa1a8ff2SEmmanuel Vadot                port@2 {
176*aa1a8ff2SEmmanuel Vadot                    reg = <2>;
177*aa1a8ff2SEmmanuel Vadot
178*aa1a8ff2SEmmanuel Vadot                    csi2rx_out_grabber1: endpoint {
179*aa1a8ff2SEmmanuel Vadot                        remote-endpoint = <&grabber1_in_csi2rx>;
180*aa1a8ff2SEmmanuel Vadot                    };
181*aa1a8ff2SEmmanuel Vadot                };
182*aa1a8ff2SEmmanuel Vadot
183*aa1a8ff2SEmmanuel Vadot                port@3 {
184*aa1a8ff2SEmmanuel Vadot                    reg = <3>;
185*aa1a8ff2SEmmanuel Vadot
186*aa1a8ff2SEmmanuel Vadot                    csi2rx_out_grabber2: endpoint {
187*aa1a8ff2SEmmanuel Vadot                        remote-endpoint = <&grabber2_in_csi2rx>;
188*aa1a8ff2SEmmanuel Vadot                    };
189*aa1a8ff2SEmmanuel Vadot                };
190*aa1a8ff2SEmmanuel Vadot
191*aa1a8ff2SEmmanuel Vadot                port@4 {
192*aa1a8ff2SEmmanuel Vadot                    reg = <4>;
193*aa1a8ff2SEmmanuel Vadot
194*aa1a8ff2SEmmanuel Vadot                    csi2rx_out_grabber3: endpoint {
195*aa1a8ff2SEmmanuel Vadot                        remote-endpoint = <&grabber3_in_csi2rx>;
196*aa1a8ff2SEmmanuel Vadot                    };
197*aa1a8ff2SEmmanuel Vadot                };
198*aa1a8ff2SEmmanuel Vadot        };
199*aa1a8ff2SEmmanuel Vadot    };
200*aa1a8ff2SEmmanuel Vadot
201*aa1a8ff2SEmmanuel Vadot...
202