Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / media / nxp,imx7-mipi-csi2.yaml
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,imx7-mipi-csi2.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: NXP i.MX7 Mipi CSI2
8
9 maintainers:
10   - Rui Miguel Silva <rmfrfs@gmail.com>
11
12 description: |
13   This is the device node for the MIPI CSI-2 receiver core in i.MX7 soc. It is
14   compatible with previous version of samsung d-phy.
15
16 properties:
17   compatible:
18     const: fsl,imx7-mipi-csi2
19
20   reg:
21     maxItems: 1
22
23   interrupts:
24     maxItems: 1
25
26   clocks:
27     minItems: 3
28     maxItems: 3
29
30   clock-names:
31     items:
32       - const: pclk
33       - const: wrap
34       - const: phy
35
36   power-domains:
37     maxItems: 1
38
39   phy-supply:
40     description:
41       Phandle to a regulator that provides power to the PHY. This
42       regulator will be managed during the PHY power on/off sequence.
43
44   resets:
45     maxItems: 1
46
47   reset-names:
48     const: mrst
49
50   clock-frequency:
51     description:
52       The IP main (system bus) clock frequency in Hertz
53     default: 166000000
54
55   fsl,csis-hs-settle:
56     $ref: /schemas/types.yaml#/definitions/uint32
57     description:
58       Differential receiver (HS-RX) settle time
59
60   ports:
61     type: object
62     description:
63       A node containing input and output port nodes with endpoint definitions
64       as documented in
65       Documentation/devicetree/bindings/media/video-interfaces.txt
66
67     properties:
68       '#address-cells':
69         const: 1
70
71       '#size-cells':
72         const: 0
73
74       port@0:
75         type: object
76         description:
77           Input port node, single endpoint describing the CSI-2 transmitter.
78
79         properties:
80           reg:
81             const: 0
82
83           endpoint:
84             type: object
85
86             properties:
87               data-lanes:
88                 $ref: /schemas/types.yaml#/definitions/uint32-array
89                 description: See ../video-interfaces.txt
90                 oneOf:
91                   - items:
92                       - const: 1
93                   - items:
94                       - const: 1
95                       - const: 2
96
97               remote-endpoint: true
98
99             required:
100               - data-lanes
101               - remote-endpoint
102
103             additionalProperties: false
104
105         additionalProperties: false
106
107       port@1:
108         type: object
109         description:
110           Output port node
111
112 required:
113   - compatible
114   - reg
115   - interrupts
116   - clocks
117   - clock-names
118   - power-domains
119   - phy-supply
120   - resets
121   - reset-names
122   - ports
123
124 additionalProperties: false
125
126 examples:
127   - |
128     #include <dt-bindings/clock/imx7d-clock.h>
129     #include <dt-bindings/interrupt-controller/arm-gic.h>
130     #include <dt-bindings/interrupt-controller/irq.h>
131     #include <dt-bindings/reset/imx7-reset.h>
132
133     mipi_csi: mipi-csi@30750000 {
134             compatible = "fsl,imx7-mipi-csi2";
135             reg = <0x30750000 0x10000>;
136             interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
137
138             clocks = <&clks IMX7D_IPG_ROOT_CLK>,
139                      <&clks IMX7D_MIPI_CSI_ROOT_CLK>,
140                      <&clks IMX7D_MIPI_DPHY_ROOT_CLK>;
141             clock-names = "pclk", "wrap", "phy";
142             clock-frequency = <166000000>;
143
144             power-domains = <&pgc_mipi_phy>;
145             phy-supply = <&reg_1p0d>;
146             resets = <&src IMX7_RESET_MIPI_PHY_MRST>;
147             reset-names = "mrst";
148             fsl,csis-hs-settle = <3>;
149
150             ports {
151                     #address-cells = <1>;
152                     #size-cells = <0>;
153
154                     port@0 {
155                             reg = <0>;
156
157                             mipi_from_sensor: endpoint {
158                                     remote-endpoint = <&ov2680_to_mipi>;
159                                     data-lanes = <1>;
160                             };
161                     };
162
163                     port@1 {
164                             reg = <1>;
165
166                             mipi_vc0_to_csi_mux: endpoint {
167                                     remote-endpoint = <&csi_mux_from_mipi_vc0>;
168                             };
169                     };
170             };
171     };
172
173 ...