Did anyone get a camera working?

Curious about the MIPI-CSI connector on the default EXT board. I’ve done some searching here, Reddit etc - did anyone successfully connect a camera module via this connector?

I had tried to connect a Raspberry Pi Zero camera via mine and yatli’s (forgot to credit the MVP :slight_smile: ) cartridge system but I failed miserably at the device tree.
I did get a few more video devices, but they all didn’t play well with V4L.
Signal integrity through the connector could also have been an issue.
I did however match the impedance of the differential lines as well as I could.

Here’s the dts for anyone interested.

DTS for camera
/dts-v1/;
/plugin/;

#include <dt-bindings/clock/rk3399-cru.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/rk3399-power.h>

/{
	/*compatible = "brcm,bcm2835";*/
	compatible = "rockchip,rk3399";

fragment@0 {
	target-path = "/";
	__overlay__ {
		isp0: isp0@ff910000 {
			compatible = "rockchip,rk3399-cif-isp";
			reg = <0x0 0xff910000 0x0 0x4000>;
			interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH 0>;
			clocks = <&cru SCLK_ISP0>,
					 <&cru ACLK_ISP0>, <&cru ACLK_ISP0_WRAPPER>,
					 <&cru HCLK_ISP0>, <&cru HCLK_ISP0_WRAPPER>;
			clock-names = "clk_isp",
						  "aclk_isp", "aclk_isp_wrap",
						  "hclk_isp", "hclk_isp_wrap";
			power-domains = <&power RK3399_PD_ISP0>;
			iommus = <&isp0_mmu>;
			status = "okay";

			port {
				#address-cells = <1>;
				#size-cells = <0>;

				/* mipi */
				isp0_mipi_in: endpoint@0 {
					reg = <0>;
					data-lanes = <1 2>;
					remote-endpoint = <&dphy_rx0_out>;
				};
			};
		};
	};
};

fragment@2 {
	target = <&isp0_mmu>;
	__overlay__ {
		status = "okay";
	};
};

fragment@10 {
	target = <&i2c2>;
	__overlay__ {
		#address-cells = <1>;
		#size-cells = <0>;
		
		status = "okay";
		ov5647: ov5647@36 {
			compatible = "ovti,ov5647";
			reg = <0x36>;
			status = "okay";

			pwdn-gpios = <&gpio0 29 1>, <&gpio0 28 1>;
			/*clocks = <&ext_cam_clk>;*/
			/*clocks = <&cru SCLK_TESTCLKOUT1>;*/
			/*assigned-clock-rates = <25000000>;*/
			clocks = <&cru SCLK_CIF_OUT>;
                        clock-names = "xvclk";
                        assigned-clocks = <&cru SCLK_CIF_OUT>;
                        assigned-clock-rates = <25000000>;

			rotation = <0>;

			port {
				cam_out: endpoint {
					remote-endpoint = <&csi1_ep>;
					clock-lanes = <0>;
					data-lanes = <1 2>;
					clock-noncontinuous;
					link-frequencies =
						/bits/ 64 <297000000>;
					};
				};
			};
		};
	};

	fragment@3 {
		target = <&mipi_dphy_rx0>;
		__overlay__ {
			compatible = "rockchip,rk3399-mipi-dphy-rx0";
			clocks = <&cru SCLK_MIPIDPHY_REF>,
					 <&cru SCLK_DPHY_RX0_CFG>,
					 <&cru PCLK_VIO_GRF>;
			clock-names = "dphy-ref", "dphy-cfg", "grf";
			power-domains = <&power RK3399_PD_VIO>;
			#phy-cells = <0>;
			status = "okay";

			ports {
				#address-cells = <1>;
				#size-cells = <0>;

				port@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;
					
					csi1_ep: endpoint@0 {
						#address-cells = <1>;
						#size-cells = <0>;
						reg = <0>;
						remote-endpoint = <&cam_out>;
						clock-lanes = <0>;
						data-lanes = <1 2>;
					};
				};
				
				port@1 {
					reg = <1>;

					dphy_rx0_out: endpoint {
						data-lanes = <1 2>;
						remote-endpoint = <&isp0_mipi_in>;
					};
				};
			};
		};
	};	

	__overrides__ {
		rotation = <&ov5647>,"rotation:0";
	};
};