summaryrefslogtreecommitdiff
path: root/overlays/colibri-imx8x_ov5640_overlay.dts
blob: 3ccc3ca12daeeb7a5c477496e70802fda28813fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2021 Toradex
 */

// CSI Camera Module 5MP OV5640 previously orderable at Toradex.

/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>

/ {
	compatible = "toradex,colibri-imx8x";
};

/* On-module MIPI CSI I2C accessible on FFC (X3) */
&i2c0_mipi_lvds1 {
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";

	ov5640_mipi@3c {
		AVDD-supply = <&reg_module_3v3>;
		compatible = "ovti,ov5640";
		clocks = <&xtal24m>;
		clock-names = "xclk";
		csi_id = <0>;
		DOVDD-supply = <&reg_module_3v3>;
		DVDD-supply = <&reg_module_3v3>;
		mclk = <24000000>;
		mclk_source = <0>;
		mipi_csi;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_csi_ctl>, <&pinctrl_csi_mclk>;
		powerdown-gpios = <&lsio_gpio3 14 GPIO_ACTIVE_HIGH>;	/* X3-22 */
		reg = <0x3c>;
		reset-gpios = <&lsio_gpio3 15 GPIO_ACTIVE_LOW>;		/* X3-11 */
		status = "okay";

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

&isi_0 {
	interface = <2 0 2>;
	/**
	 * interface = <Input MIPI_VCx Output>
	 * Input:	0-DC0, 1-DC1, 2-MIPI CSI0, 3-MIPI CSI1, 4-HDMI, 5-MEM, INPUT: 6-PARALLEL CSI
	 * MIPI_VCx:	0-VC0, 1-VC1, 2-VC2, 3-VC3, MIPI CSI only
	 * Output:	0-DC0, 1-DC1, 2-MEM
	 */
	status = "okay";
};

/* MIPI CSI accessible via FFC (X3) */
&mipi_csi_0 {
	#address-cells = <1>;
	#size-cells = <0>;
	/delete-property/virtual-channel;
	status = "okay";

	/* Camera 0 MIPI CSI-2 (CSIS0) */
	port@0 {
		reg = <0>;

		mipi_csi0_ep: endpoint {
			bus-type = <4>;
			data-lanes = <1 2>;
			remote-endpoint = <&ov5640_mipi_ep>;
		};
	};
};