Using CSI camera on the DragonBoard 820c

Yes, that’s the point.

Does the CCI/I2C clock looks good?

Was the boad powered? it’s a possibility, though I did not check the pin details. Try with an other sensor if you can.

Thanks for all the help so far! I’ve found the beginnings of a solution. I tried to scope the test points near the camera module and found that, on the board I have, a different signal is being sent as the enable signal for the ov5645 through the IPEX connector.

The GPIO pin on the db820c that I’ve found to work best for this connection is apq_gpio_10. On this MIPI adapter board (schematic here) I connected pins 5 and 6 on the J15 header. This says apq_gpio_24, but for the db820c this is actually pin 10. This connects to the real power enable line for the ov5645 via the J10 IPEX connector.

My process is outlined below.

git clone https://git.linaro.org/landing-teams/working/qualcomm/kernel.git
cd kernel
git checkout release/qcomlt-4.14
/* Apply changes to ./arch/arm64/boot/dts/apq8096-db820c.dtsi */
make clean
ARCH=arm64 make defconfig
ARCH=arm64 make dtbs

# install device tree compiler
sudo apt-get install device-tree-compiler

# install tool to update devicetree blob
git clone https://github.com/96boards/dt-update.git
cd dt-update && make
sudo make install

# Update boot partition with the update devicetree blob
sudo dbootimg /dev/disk/by-partlabel/boot -u dtb ./arch/arm64/boot/dts/qcom/apq8096-db820c.dtb
sudo sync

/* reboot then check if /dev/media0 appears */

This process allowed successful communication with the camera module.
“dmesg | grep ov5645” gives:
[8…] ov5645 3-0060: OV5645 detected at address 0x60

Here is the important changes I made to kernel/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi:

...
		cci@a0c000 {
			status = "ok";

			camera_rear@60 {
				compatible = "ovti,ov5645";
				reg = <0x60>;

				enable-gpios = <&msmgpio 10 GPIO_ACTIVE_HIGH>;
				reset-gpios = <&msmgpio 25 GPIO_ACTIVE_LOW>;
				pinctrl-names = "default";
				pinctrl-0 = <&camera_rear_default>;

				clocks = <&mmcc CAMSS_MCLK0_CLK>;
				clock-names = "xclk";
				clock-frequency = <24000000>;

				vdddo-supply = <&camera_vdddo_1v8>;
				vdda-supply = <&camera_vdda_2v8>;
				vddd-supply = <&camera_vddd_1v5>;

				status = "okay";

				port {
					ov5645_ep: endpoint {
						clock-lanes = <1>;
						data-lanes = <0 2>;
						remote-endpoint = <&csiphy0_ep>;
					};
				};
			};

...

		camss@a00000 {
			status = "ok";

			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					reg = <0>;
					csiphy0_ep: endpoint {
						clock-lanes = <7>;
						data-lanes = <0 1>;
						remote-endpoint = <&ov5645_ep>;
						status = "okay";
					};
				};

I’m still troubleshooting the datapath stuff and I have yet to actually get an image, but this is definitely a step forward. Thanks again for the help so far!

1 Like

great, you should now be able to use media-ctl for pipeline configuration and gstreamer to capture frames.