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