Debian Codegraph @

Documentation/devicetree/bindings/media/nxp,imx8mq-mipi-csi2.yaml

raw symbols SCIP
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/media/nxp,imx8mq-mipi-csi2.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: NXP i.MX8MQ MIPI CSI-2 receiver
8
9 maintainers:
10 - Martin Kepplinger <[email protected]>
11
12 description: |-
13 This binding covers the CSI-2 RX PHY and host controller included in the
14 NXP i.MX8MQ SoC. It handles the sensor/image input and process for all the
15 input imaging devices.
16
17 properties:
18 compatible:
19 oneOf:
20 - enum:
21 - fsl,imx8mq-mipi-csi2
22 - fsl,imx8qxp-mipi-csi2
23 - fsl,imx8ulp-mipi-csi2
24 - items:
25 - const: fsl,imx8qm-mipi-csi2
26 - const: fsl,imx8qxp-mipi-csi2
27
28 reg:
29 items:
30 - description: MIPI CSI-2 RX host controller register.
31 - description: MIPI CSI-2 control and status register (csr).
32 minItems: 1
33
34 clocks:
35 items:
36 - description: core is the RX Controller Core Clock input. This clock
37 must be exactly equal to or faster than the receive
38 byteclock from the RX DPHY.
39 - description: esc is the Rx Escape Clock. This must be the same escape
40 clock that the RX DPHY receives.
41 - description: ui is the pixel clock (phy_ref up to 333Mhz).
42 See the reference manual for details.
43 - description: pclk is clock for csr APB interface.
44 minItems: 3
45
46 clock-names:
47 items:
48 - const: core
49 - const: esc
50 - const: ui
51 - const: pclk
52 minItems: 3
53
54 power-domains:
55 maxItems: 1
56
57 resets:
58 items:
59 - description: CORE_RESET reset register bit definition
60 - description: PHY_REF_RESET reset register bit definition
61 - description: ESC_RESET reset register bit definition
62 minItems: 1
63
64 fsl,mipi-phy-gpr:
65 description: |
66 The phandle to the imx8mq syscon iomux-gpr with the register
67 for setting RX_ENABLE for the mipi receiver.
68
69 The format should be as follows:
70 <gpr req_gpr>
71 gpr is the phandle to general purpose register node.
72 req_gpr is the gpr register offset of RX_ENABLE for the mipi phy.
73 $ref: /schemas/types.yaml#/definitions/phandle-array
74 items:
75 - items:
76 - description: The 'gpr' is the phandle to general purpose register node.
77 - description: The 'req_gpr' is the gpr register offset containing
78 CSI2_1_RX_ENABLE or CSI2_2_RX_ENABLE respectively.
79 maximum: 0xff
80
81 interconnects:
82 maxItems: 1
83
84 interconnect-names:
85 const: dram
86
87 ports:
88 $ref: /schemas/graph.yaml#/properties/ports
89
90 properties:
91 port@0:
92 $ref: /schemas/graph.yaml#/$defs/port-base
93 unevaluatedProperties: false
94 description:
95 Input port node, single endpoint describing the CSI-2 transmitter.
96
97 properties:
98 endpoint:
99 $ref: video-interfaces.yaml#
100 unevaluatedProperties: false
101
102 properties:
103 data-lanes:
104 minItems: 1
105 items:
106 - const: 1
107 - const: 2
108 - const: 3
109 - const: 4
110
111 required:
112 - data-lanes
113
114 port@1:
115 $ref: /schemas/graph.yaml#/properties/port
116 description:
117 Output port node
118
119 required:
120 - port@0
121 - port@1
122
123 required:
124 - compatible
125 - reg
126 - clocks
127 - clock-names
128 - power-domains
129 - resets
130 - ports
131
132 allOf:
133 - if:
134 properties:
135 compatible:
136 contains:
137 enum:
138 - fsl,imx8mq-mipi-csi2
139 then:
140 properties:
141 reg:
142 maxItems: 1
143 resets:
144 minItems: 3
145 clocks:
146 maxItems: 3
147 clock-names:
148 maxItems: 3
149 required:
150 - fsl,mipi-phy-gpr
151
152 - if:
153 properties:
154 compatible:
155 contains:
156 const: fsl,imx8qxp-mipi-csi2
157 then:
158 properties:
159 reg:
160 minItems: 2
161 resets:
162 maxItems: 1
163 clocks:
164 maxItems: 3
165 clock-names:
166 maxItems: 3
167
168 - if:
169 properties:
170 compatible:
171 contains:
172 enum:
173 - fsl,imx8ulp-mipi-csi2
174 then:
175 properties:
176 reg:
177 minItems: 2
178 resets:
179 minItems: 2
180 maxItems: 2
181 clocks:
182 minItems: 4
183 clock-names:
184 minItems: 4
185
186 additionalProperties: false
187
188 examples:
189 - |
190 #include <dt-bindings/clock/imx8mq-clock.h>
191 #include <dt-bindings/interconnect/imx8mq.h>
192 #include <dt-bindings/reset/imx8mq-reset.h>
193
194 csi@30a70000 {
195 compatible = "fsl,imx8mq-mipi-csi2";
196 reg = <0x30a70000 0x1000>;
197 clocks = <&clk IMX8MQ_CLK_CSI1_CORE>,
198 <&clk IMX8MQ_CLK_CSI1_ESC>,
199 <&clk IMX8MQ_CLK_CSI1_PHY_REF>;
200 clock-names = "core", "esc", "ui";
201 assigned-clocks = <&clk IMX8MQ_CLK_CSI1_CORE>,
202 <&clk IMX8MQ_CLK_CSI1_PHY_REF>,
203 <&clk IMX8MQ_CLK_CSI1_ESC>;
204 assigned-clock-rates = <266000000>, <200000000>, <66000000>;
205 assigned-clock-parents = <&clk IMX8MQ_SYS1_PLL_266M>,
206 <&clk IMX8MQ_SYS2_PLL_1000M>,
207 <&clk IMX8MQ_SYS1_PLL_800M>;
208 power-domains = <&pgc_mipi_csi1>;
209 resets = <&src IMX8MQ_RESET_MIPI_CSI1_CORE_RESET>,
210 <&src IMX8MQ_RESET_MIPI_CSI1_PHY_REF_RESET>,
211 <&src IMX8MQ_RESET_MIPI_CSI1_ESC_RESET>;
212 fsl,mipi-phy-gpr = <&iomuxc_gpr 0x88>;
213 interconnects = <&noc IMX8MQ_ICM_CSI1 &noc IMX8MQ_ICS_DRAM>;
214 interconnect-names = "dram";
215
216 ports {
217 #address-cells = <1>;
218 #size-cells = <0>;
219
220 port@0 {
221 reg = <0>;
222
223 imx8mm_mipi_csi_in: endpoint {
224 remote-endpoint = <&imx477_out>;
225 data-lanes = <1 2 3 4>;
226 };
227 };
228
229 port@1 {
230 reg = <1>;
231
232 imx8mm_mipi_csi_out: endpoint {
233 remote-endpoint = <&csi_in>;
234 };
235 };
236 };
237 };
238
239 ...