1*8bab661aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*8bab661aSEmmanuel Vadot%YAML 1.2
3*8bab661aSEmmanuel Vadot---
4*8bab661aSEmmanuel Vadot$id: http://devicetree.org/schemas/media/i2c/st,st-mipid02.yaml#
5*8bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*8bab661aSEmmanuel Vadot
7*8bab661aSEmmanuel Vadottitle: STMicroelectronics MIPID02 CSI-2 to PARALLEL bridge
8*8bab661aSEmmanuel Vadot
9*8bab661aSEmmanuel Vadotmaintainers:
10*8bab661aSEmmanuel Vadot  - Benjamin Mugnier <benjamin.mugnier@foss.st.com>
11*8bab661aSEmmanuel Vadot  - Sylvain Petinot <sylvain.petinot@foss.st.com>
12*8bab661aSEmmanuel Vadot
13*8bab661aSEmmanuel Vadotdescription:
14*8bab661aSEmmanuel Vadot  MIPID02 has two CSI-2 input ports, only one of those ports can be
15*8bab661aSEmmanuel Vadot  active at a time. Active port input stream will be de-serialized
16*8bab661aSEmmanuel Vadot  and its content outputted through PARALLEL output port.
17*8bab661aSEmmanuel Vadot  CSI-2 first input port is a dual lane 800Mbps per lane whereas CSI-2
18*8bab661aSEmmanuel Vadot  second input port is a single lane 800Mbps. Both ports support clock
19*8bab661aSEmmanuel Vadot  and data lane polarity swap. First port also supports data lane swap.
20*8bab661aSEmmanuel Vadot  PARALLEL output port has a maximum width of 12 bits.
21*8bab661aSEmmanuel Vadot  Supported formats are RAW6, RAW7, RAW8, RAW10, RAW12, RGB565, RGB888,
22*8bab661aSEmmanuel Vadot  RGB444, YUV420 8-bit, YUV422 8-bit and YUV420 10-bit.
23*8bab661aSEmmanuel Vadot
24*8bab661aSEmmanuel Vadotproperties:
25*8bab661aSEmmanuel Vadot  compatible:
26*8bab661aSEmmanuel Vadot    const: st,st-mipid02
27*8bab661aSEmmanuel Vadot
28*8bab661aSEmmanuel Vadot  reg:
29*8bab661aSEmmanuel Vadot    maxItems: 1
30*8bab661aSEmmanuel Vadot
31*8bab661aSEmmanuel Vadot  clocks:
32*8bab661aSEmmanuel Vadot    maxItems: 1
33*8bab661aSEmmanuel Vadot
34*8bab661aSEmmanuel Vadot  clock-names:
35*8bab661aSEmmanuel Vadot    const: xclk
36*8bab661aSEmmanuel Vadot
37*8bab661aSEmmanuel Vadot  VDDE-supply:
38*8bab661aSEmmanuel Vadot    description:
39*8bab661aSEmmanuel Vadot      Sensor digital IO supply. Must be 1.8 volts.
40*8bab661aSEmmanuel Vadot
41*8bab661aSEmmanuel Vadot  VDDIN-supply:
42*8bab661aSEmmanuel Vadot    description:
43*8bab661aSEmmanuel Vadot      Sensor internal regulator supply. Must be 1.8 volts.
44*8bab661aSEmmanuel Vadot
45*8bab661aSEmmanuel Vadot  reset-gpios:
46*8bab661aSEmmanuel Vadot    description:
47*8bab661aSEmmanuel Vadot      Reference to the GPIO connected to the xsdn pin, if any.
48*8bab661aSEmmanuel Vadot      This is an active low signal to the mipid02.
49*8bab661aSEmmanuel Vadot
50*8bab661aSEmmanuel Vadot  ports:
51*8bab661aSEmmanuel Vadot    $ref: /schemas/graph.yaml#/properties/ports
52*8bab661aSEmmanuel Vadot    properties:
53*8bab661aSEmmanuel Vadot      port@0:
54*8bab661aSEmmanuel Vadot        $ref: /schemas/graph.yaml#/$defs/port-base
55*8bab661aSEmmanuel Vadot        unevaluatedProperties: false
56*8bab661aSEmmanuel Vadot        description: CSI-2 first input port
57*8bab661aSEmmanuel Vadot        properties:
58*8bab661aSEmmanuel Vadot          endpoint:
59*8bab661aSEmmanuel Vadot            $ref: /schemas/media/video-interfaces.yaml#
60*8bab661aSEmmanuel Vadot            unevaluatedProperties: false
61*8bab661aSEmmanuel Vadot
62*8bab661aSEmmanuel Vadot            properties:
63*8bab661aSEmmanuel Vadot              data-lanes:
64*8bab661aSEmmanuel Vadot                description:
65*8bab661aSEmmanuel Vadot                  Single-lane operation shall be <1> or <2> .
66*8bab661aSEmmanuel Vadot                  Dual-lane operation shall be <1 2> or <2 1> .
67*8bab661aSEmmanuel Vadot                minItems: 1
68*8bab661aSEmmanuel Vadot                maxItems: 2
69*8bab661aSEmmanuel Vadot
70*8bab661aSEmmanuel Vadot              lane-polarities:
71*8bab661aSEmmanuel Vadot                description:
72*8bab661aSEmmanuel Vadot                  Any lane can be inverted or not.
73*8bab661aSEmmanuel Vadot                minItems: 1
74*8bab661aSEmmanuel Vadot                maxItems: 2
75*8bab661aSEmmanuel Vadot
76*8bab661aSEmmanuel Vadot            required:
77*8bab661aSEmmanuel Vadot              - data-lanes
78*8bab661aSEmmanuel Vadot
79*8bab661aSEmmanuel Vadot      port@1:
80*8bab661aSEmmanuel Vadot        $ref: /schemas/graph.yaml#/$defs/port-base
81*8bab661aSEmmanuel Vadot        unevaluatedProperties: false
82*8bab661aSEmmanuel Vadot        description: CSI-2 second input port
83*8bab661aSEmmanuel Vadot        properties:
84*8bab661aSEmmanuel Vadot          endpoint:
85*8bab661aSEmmanuel Vadot            $ref: /schemas/media/video-interfaces.yaml#
86*8bab661aSEmmanuel Vadot            unevaluatedProperties: false
87*8bab661aSEmmanuel Vadot
88*8bab661aSEmmanuel Vadot            properties:
89*8bab661aSEmmanuel Vadot              data-lanes:
90*8bab661aSEmmanuel Vadot                description:
91*8bab661aSEmmanuel Vadot                  Single-lane operation shall be <1> or <2> .
92*8bab661aSEmmanuel Vadot                maxItems: 1
93*8bab661aSEmmanuel Vadot
94*8bab661aSEmmanuel Vadot              lane-polarities:
95*8bab661aSEmmanuel Vadot                description:
96*8bab661aSEmmanuel Vadot                  Any lane can be inverted or not.
97*8bab661aSEmmanuel Vadot                maxItems: 1
98*8bab661aSEmmanuel Vadot
99*8bab661aSEmmanuel Vadot            required:
100*8bab661aSEmmanuel Vadot              - data-lanes
101*8bab661aSEmmanuel Vadot
102*8bab661aSEmmanuel Vadot      port@2:
103*8bab661aSEmmanuel Vadot        $ref: /schemas/graph.yaml#/$defs/port-base
104*8bab661aSEmmanuel Vadot        unevaluatedProperties: false
105*8bab661aSEmmanuel Vadot        description: Output port
106*8bab661aSEmmanuel Vadot        properties:
107*8bab661aSEmmanuel Vadot          endpoint:
108*8bab661aSEmmanuel Vadot            $ref: /schemas/media/video-interfaces.yaml#
109*8bab661aSEmmanuel Vadot            unevaluatedProperties: false
110*8bab661aSEmmanuel Vadot
111*8bab661aSEmmanuel Vadot            properties:
112*8bab661aSEmmanuel Vadot              bus-width:
113*8bab661aSEmmanuel Vadot                enum: [6, 7, 8, 10, 12]
114*8bab661aSEmmanuel Vadot
115*8bab661aSEmmanuel Vadot            required:
116*8bab661aSEmmanuel Vadot              - bus-width
117*8bab661aSEmmanuel Vadot
118*8bab661aSEmmanuel Vadot    anyOf:
119*8bab661aSEmmanuel Vadot      - required:
120*8bab661aSEmmanuel Vadot          - port@0
121*8bab661aSEmmanuel Vadot      - required:
122*8bab661aSEmmanuel Vadot          - port@1
123*8bab661aSEmmanuel Vadot
124*8bab661aSEmmanuel Vadot    required:
125*8bab661aSEmmanuel Vadot      - port@2
126*8bab661aSEmmanuel Vadot
127*8bab661aSEmmanuel VadotadditionalProperties: false
128*8bab661aSEmmanuel Vadot
129*8bab661aSEmmanuel Vadotrequired:
130*8bab661aSEmmanuel Vadot  - compatible
131*8bab661aSEmmanuel Vadot  - reg
132*8bab661aSEmmanuel Vadot  - clocks
133*8bab661aSEmmanuel Vadot  - clock-names
134*8bab661aSEmmanuel Vadot  - VDDE-supply
135*8bab661aSEmmanuel Vadot  - VDDIN-supply
136*8bab661aSEmmanuel Vadot  - ports
137*8bab661aSEmmanuel Vadot
138*8bab661aSEmmanuel Vadotexamples:
139*8bab661aSEmmanuel Vadot  - |
140*8bab661aSEmmanuel Vadot    i2c {
141*8bab661aSEmmanuel Vadot        #address-cells = <1>;
142*8bab661aSEmmanuel Vadot        #size-cells = <0>;
143*8bab661aSEmmanuel Vadot        mipid02: csi2rx@14 {
144*8bab661aSEmmanuel Vadot            compatible = "st,st-mipid02";
145*8bab661aSEmmanuel Vadot            reg = <0x14>;
146*8bab661aSEmmanuel Vadot            clocks = <&clk_ext_camera_12>;
147*8bab661aSEmmanuel Vadot            clock-names = "xclk";
148*8bab661aSEmmanuel Vadot            VDDE-supply = <&vdd>;
149*8bab661aSEmmanuel Vadot            VDDIN-supply = <&vdd>;
150*8bab661aSEmmanuel Vadot            ports {
151*8bab661aSEmmanuel Vadot                #address-cells = <1>;
152*8bab661aSEmmanuel Vadot                #size-cells = <0>;
153*8bab661aSEmmanuel Vadot                port@0 {
154*8bab661aSEmmanuel Vadot                    reg = <0>;
155*8bab661aSEmmanuel Vadot
156*8bab661aSEmmanuel Vadot                    ep0: endpoint {
157*8bab661aSEmmanuel Vadot                        data-lanes = <1 2>;
158*8bab661aSEmmanuel Vadot                        remote-endpoint = <&mipi_csi2_in>;
159*8bab661aSEmmanuel Vadot                    };
160*8bab661aSEmmanuel Vadot                };
161*8bab661aSEmmanuel Vadot                port@2 {
162*8bab661aSEmmanuel Vadot                    reg = <2>;
163*8bab661aSEmmanuel Vadot
164*8bab661aSEmmanuel Vadot                    ep2: endpoint {
165*8bab661aSEmmanuel Vadot                        bus-width = <8>;
166*8bab661aSEmmanuel Vadot                        hsync-active = <0>;
167*8bab661aSEmmanuel Vadot                        vsync-active = <0>;
168*8bab661aSEmmanuel Vadot                        remote-endpoint = <&parallel_out>;
169*8bab661aSEmmanuel Vadot                    };
170*8bab661aSEmmanuel Vadot                };
171*8bab661aSEmmanuel Vadot            };
172*8bab661aSEmmanuel Vadot        };
173*8bab661aSEmmanuel Vadot    };
174*8bab661aSEmmanuel Vadot
175*8bab661aSEmmanuel Vadot...
176