xref: /freebsd/sys/contrib/device-tree/Bindings/media/i2c/st,st-mipid02.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotSTMicroelectronics MIPID02 CSI-2 to PARALLEL bridge
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotMIPID02 has two CSI-2 input ports, only one of those ports can be active at a
4*c66ec88fSEmmanuel Vadottime. Active port input stream will be de-serialized and its content outputted
5*c66ec88fSEmmanuel Vadotthrough PARALLEL output port.
6*c66ec88fSEmmanuel VadotCSI-2 first input port is a dual lane 800Mbps per lane whereas CSI-2 second
7*c66ec88fSEmmanuel Vadotinput port is a single lane 800Mbps. Both ports support clock and data lane
8*c66ec88fSEmmanuel Vadotpolarity swap. First port also supports data lane swap.
9*c66ec88fSEmmanuel VadotPARALLEL output port has a maximum width of 12 bits.
10*c66ec88fSEmmanuel VadotSupported formats are RAW6, RAW7, RAW8, RAW10, RAW12, RGB565, RGB888, RGB444,
11*c66ec88fSEmmanuel VadotYUV420 8-bit, YUV422 8-bit and YUV420 10-bit.
12*c66ec88fSEmmanuel Vadot
13*c66ec88fSEmmanuel VadotRequired Properties:
14*c66ec88fSEmmanuel Vadot- compatible: shall be "st,st-mipid02"
15*c66ec88fSEmmanuel Vadot- clocks: reference to the xclk input clock.
16*c66ec88fSEmmanuel Vadot- clock-names: shall be "xclk".
17*c66ec88fSEmmanuel Vadot- VDDE-supply: sensor digital IO supply. Must be 1.8 volts.
18*c66ec88fSEmmanuel Vadot- VDDIN-supply: sensor internal regulator supply. Must be 1.8 volts.
19*c66ec88fSEmmanuel Vadot
20*c66ec88fSEmmanuel VadotOptional Properties:
21*c66ec88fSEmmanuel Vadot- reset-gpios: reference to the GPIO connected to the xsdn pin, if any.
22*c66ec88fSEmmanuel Vadot	       This is an active low signal to the mipid02.
23*c66ec88fSEmmanuel Vadot
24*c66ec88fSEmmanuel VadotRequired subnodes:
25*c66ec88fSEmmanuel Vadot  - ports: A ports node with one port child node per device input and output
26*c66ec88fSEmmanuel Vadot	   port, in accordance with the video interface bindings defined in
27*c66ec88fSEmmanuel Vadot	   Documentation/devicetree/bindings/media/video-interfaces.txt. The
28*c66ec88fSEmmanuel Vadot	   port nodes are numbered as follows:
29*c66ec88fSEmmanuel Vadot
30*c66ec88fSEmmanuel Vadot	   Port Description
31*c66ec88fSEmmanuel Vadot	   -----------------------------
32*c66ec88fSEmmanuel Vadot	   0    CSI-2 first input port
33*c66ec88fSEmmanuel Vadot	   1    CSI-2 second input port
34*c66ec88fSEmmanuel Vadot	   2    PARALLEL output
35*c66ec88fSEmmanuel Vadot
36*c66ec88fSEmmanuel VadotEndpoint node required property for CSI-2 connection is:
37*c66ec88fSEmmanuel Vadot- data-lanes: shall be <1> for Port 1. for Port 0 dual-lane operation shall be
38*c66ec88fSEmmanuel Vadot<1 2> or <2 1>. For Port 0 single-lane operation shall be <1> or <2>.
39*c66ec88fSEmmanuel VadotEndpoint node optional property for CSI-2 connection is:
40*c66ec88fSEmmanuel Vadot- lane-polarities: any lane can be inverted or not.
41*c66ec88fSEmmanuel Vadot
42*c66ec88fSEmmanuel VadotEndpoint node required property for PARALLEL connection is:
43*c66ec88fSEmmanuel Vadot- bus-width: shall be set to <6>, <7>, <8>, <10> or <12>.
44*c66ec88fSEmmanuel VadotEndpoint node optional properties for PARALLEL connection are:
45*c66ec88fSEmmanuel Vadot- hsync-active: active state of the HSYNC signal, 0/1 for LOW/HIGH respectively.
46*c66ec88fSEmmanuel VadotLOW being the default.
47*c66ec88fSEmmanuel Vadot- vsync-active: active state of the VSYNC signal, 0/1 for LOW/HIGH respectively.
48*c66ec88fSEmmanuel VadotLOW being the default.
49*c66ec88fSEmmanuel Vadot
50*c66ec88fSEmmanuel VadotExample:
51*c66ec88fSEmmanuel Vadot
52*c66ec88fSEmmanuel Vadotmipid02: csi2rx@14 {
53*c66ec88fSEmmanuel Vadot	compatible = "st,st-mipid02";
54*c66ec88fSEmmanuel Vadot	reg = <0x14>;
55*c66ec88fSEmmanuel Vadot	status = "okay";
56*c66ec88fSEmmanuel Vadot	clocks = <&clk_ext_camera_12>;
57*c66ec88fSEmmanuel Vadot	clock-names = "xclk";
58*c66ec88fSEmmanuel Vadot	VDDE-supply = <&vdd>;
59*c66ec88fSEmmanuel Vadot	VDDIN-supply = <&vdd>;
60*c66ec88fSEmmanuel Vadot	ports {
61*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
62*c66ec88fSEmmanuel Vadot		#size-cells = <0>;
63*c66ec88fSEmmanuel Vadot		port@0 {
64*c66ec88fSEmmanuel Vadot			reg = <0>;
65*c66ec88fSEmmanuel Vadot
66*c66ec88fSEmmanuel Vadot			ep0: endpoint {
67*c66ec88fSEmmanuel Vadot				data-lanes = <1 2>;
68*c66ec88fSEmmanuel Vadot				remote-endpoint = <&mipi_csi2_in>;
69*c66ec88fSEmmanuel Vadot			};
70*c66ec88fSEmmanuel Vadot		};
71*c66ec88fSEmmanuel Vadot		port@2 {
72*c66ec88fSEmmanuel Vadot			reg = <2>;
73*c66ec88fSEmmanuel Vadot
74*c66ec88fSEmmanuel Vadot			ep2: endpoint {
75*c66ec88fSEmmanuel Vadot				bus-width = <8>;
76*c66ec88fSEmmanuel Vadot				hsync-active = <0>;
77*c66ec88fSEmmanuel Vadot				vsync-active = <0>;
78*c66ec88fSEmmanuel Vadot				remote-endpoint = <&parallel_out>;
79*c66ec88fSEmmanuel Vadot			};
80*c66ec88fSEmmanuel Vadot		};
81*c66ec88fSEmmanuel Vadot	};
82*c66ec88fSEmmanuel Vadot};
83