xref: /freebsd/sys/contrib/device-tree/Bindings/media/cdns,csi2rx.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotCadence MIPI-CSI2 RX controller
2*c66ec88fSEmmanuel Vadot===============================
3*c66ec88fSEmmanuel Vadot
4*c66ec88fSEmmanuel VadotThe Cadence MIPI-CSI2 RX controller is a CSI-2 bridge supporting up to 4 CSI
5*c66ec88fSEmmanuel Vadotlanes in input, and 4 different pixel streams in output.
6*c66ec88fSEmmanuel Vadot
7*c66ec88fSEmmanuel VadotRequired properties:
8*c66ec88fSEmmanuel Vadot  - compatible: must be set to "cdns,csi2rx" and an SoC-specific compatible
9*c66ec88fSEmmanuel Vadot  - reg: base address and size of the memory mapped region
10*c66ec88fSEmmanuel Vadot  - clocks: phandles to the clocks driving the controller
11*c66ec88fSEmmanuel Vadot  - clock-names: must contain:
12*c66ec88fSEmmanuel Vadot    * sys_clk: main clock
13*c66ec88fSEmmanuel Vadot    * p_clk: register bank clock
14*c66ec88fSEmmanuel Vadot    * pixel_if[0-3]_clk: pixel stream output clock, one for each stream
15*c66ec88fSEmmanuel Vadot                         implemented in hardware, between 0 and 3
16*c66ec88fSEmmanuel Vadot
17*c66ec88fSEmmanuel VadotOptional properties:
18*c66ec88fSEmmanuel Vadot  - phys: phandle to the external D-PHY, phy-names must be provided
19*c66ec88fSEmmanuel Vadot  - phy-names: must contain "dphy", if the implementation uses an
20*c66ec88fSEmmanuel Vadot               external D-PHY
21*c66ec88fSEmmanuel Vadot
22*c66ec88fSEmmanuel VadotRequired subnodes:
23*c66ec88fSEmmanuel Vadot  - ports: A ports node with one port child node per device input and output
24*c66ec88fSEmmanuel Vadot           port, in accordance with the video interface bindings defined in
25*c66ec88fSEmmanuel Vadot           Documentation/devicetree/bindings/media/video-interfaces.txt. The
26*c66ec88fSEmmanuel Vadot           port nodes are numbered as follows:
27*c66ec88fSEmmanuel Vadot
28*c66ec88fSEmmanuel Vadot           Port Description
29*c66ec88fSEmmanuel Vadot           -----------------------------
30*c66ec88fSEmmanuel Vadot           0    CSI-2 input
31*c66ec88fSEmmanuel Vadot           1    Stream 0 output
32*c66ec88fSEmmanuel Vadot           2    Stream 1 output
33*c66ec88fSEmmanuel Vadot           3    Stream 2 output
34*c66ec88fSEmmanuel Vadot           4    Stream 3 output
35*c66ec88fSEmmanuel Vadot
36*c66ec88fSEmmanuel Vadot           The stream output port nodes are optional if they are not
37*c66ec88fSEmmanuel Vadot           connected to anything at the hardware level or implemented
38*c66ec88fSEmmanuel Vadot           in the design.Since there is only one endpoint per port,
39*c66ec88fSEmmanuel Vadot           the endpoints are not numbered.
40*c66ec88fSEmmanuel Vadot
41*c66ec88fSEmmanuel Vadot
42*c66ec88fSEmmanuel VadotExample:
43*c66ec88fSEmmanuel Vadot
44*c66ec88fSEmmanuel Vadotcsi2rx: csi-bridge@0d060000 {
45*c66ec88fSEmmanuel Vadot	compatible = "cdns,csi2rx";
46*c66ec88fSEmmanuel Vadot	reg = <0x0d060000 0x1000>;
47*c66ec88fSEmmanuel Vadot	clocks = <&byteclock>, <&byteclock>
48*c66ec88fSEmmanuel Vadot		 <&coreclock>, <&coreclock>,
49*c66ec88fSEmmanuel Vadot		 <&coreclock>, <&coreclock>;
50*c66ec88fSEmmanuel Vadot	clock-names = "sys_clk", "p_clk",
51*c66ec88fSEmmanuel Vadot		      "pixel_if0_clk", "pixel_if1_clk",
52*c66ec88fSEmmanuel Vadot		      "pixel_if2_clk", "pixel_if3_clk";
53*c66ec88fSEmmanuel Vadot
54*c66ec88fSEmmanuel Vadot	ports {
55*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
56*c66ec88fSEmmanuel Vadot		#size-cells = <0>;
57*c66ec88fSEmmanuel Vadot
58*c66ec88fSEmmanuel Vadot		port@0 {
59*c66ec88fSEmmanuel Vadot			reg = <0>;
60*c66ec88fSEmmanuel Vadot
61*c66ec88fSEmmanuel Vadot			csi2rx_in_sensor: endpoint {
62*c66ec88fSEmmanuel Vadot				remote-endpoint = <&sensor_out_csi2rx>;
63*c66ec88fSEmmanuel Vadot				clock-lanes = <0>;
64*c66ec88fSEmmanuel Vadot				data-lanes = <1 2>;
65*c66ec88fSEmmanuel Vadot			};
66*c66ec88fSEmmanuel Vadot		};
67*c66ec88fSEmmanuel Vadot
68*c66ec88fSEmmanuel Vadot		port@1 {
69*c66ec88fSEmmanuel Vadot			reg = <1>;
70*c66ec88fSEmmanuel Vadot
71*c66ec88fSEmmanuel Vadot			csi2rx_out_grabber0: endpoint {
72*c66ec88fSEmmanuel Vadot				remote-endpoint = <&grabber0_in_csi2rx>;
73*c66ec88fSEmmanuel Vadot			};
74*c66ec88fSEmmanuel Vadot		};
75*c66ec88fSEmmanuel Vadot
76*c66ec88fSEmmanuel Vadot		port@2 {
77*c66ec88fSEmmanuel Vadot			reg = <2>;
78*c66ec88fSEmmanuel Vadot
79*c66ec88fSEmmanuel Vadot			csi2rx_out_grabber1: endpoint {
80*c66ec88fSEmmanuel Vadot				remote-endpoint = <&grabber1_in_csi2rx>;
81*c66ec88fSEmmanuel Vadot			};
82*c66ec88fSEmmanuel Vadot		};
83*c66ec88fSEmmanuel Vadot
84*c66ec88fSEmmanuel Vadot		port@3 {
85*c66ec88fSEmmanuel Vadot			reg = <3>;
86*c66ec88fSEmmanuel Vadot
87*c66ec88fSEmmanuel Vadot			csi2rx_out_grabber2: endpoint {
88*c66ec88fSEmmanuel Vadot				remote-endpoint = <&grabber2_in_csi2rx>;
89*c66ec88fSEmmanuel Vadot			};
90*c66ec88fSEmmanuel Vadot		};
91*c66ec88fSEmmanuel Vadot
92*c66ec88fSEmmanuel Vadot		port@4 {
93*c66ec88fSEmmanuel Vadot			reg = <4>;
94*c66ec88fSEmmanuel Vadot
95*c66ec88fSEmmanuel Vadot			csi2rx_out_grabber3: endpoint {
96*c66ec88fSEmmanuel Vadot				remote-endpoint = <&grabber3_in_csi2rx>;
97*c66ec88fSEmmanuel Vadot			};
98*c66ec88fSEmmanuel Vadot		};
99*c66ec88fSEmmanuel Vadot	};
100*c66ec88fSEmmanuel Vadot};
101