summaryrefslogtreecommitdiff
path: root/overlays/verdin-imx8mm_ov5640_overlay.dts
blob: 9a0b1c186e407ba7855a774e45d36aa057a356aa (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
80
81
82
83
84
85
86
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2020-2021 Toradex
 */

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

/dts-v1/;
/plugin/;

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

/ {
	compatible = "toradex,verdin-imx8mm";
};

&csi1_bridge {
	fsl,mipi-mode;
	status = "okay";

	port {
		csi1_ep: endpoint {
			remote-endpoint = <&csi1_mipi_ep>;
		};
	};
};

/* Verdin I2C_4_CSI */
&i2c3 {
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";

	ov5640_mipi@3c {
		assigned-clocks = <&clk IMX8MM_CLK_CLKO1>;
		assigned-clock-parents = <&clk IMX8MM_CLK_24M>;
		assigned-clock-rates = <24000000>;
		AVDD-supply = <&reg_3p3v>;
		compatible = "ovti,ov5640_mipi";
		clock-names = "csi_mclk";
		clocks = <&clk IMX8MM_CLK_CLKO1>;
		csi_id = <0>;
		DOVDD-supply = <&reg_3p3v>;
		DVDD-supply = <&reg_3p3v>;
		mclk = <24000000>;
		mclk_source = <0>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_gpio5>, <&pinctrl_gpio6>;
		PVDD-supply = <&reg_3p3v>;
		pwn-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
		reg = <0x3c>;
		rst-gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
		status = "okay";

		port {
			ov5640_mipi1_ep: endpoint {
				remote-endpoint = <&mipi1_sensor_ep>;
			};
		};
	};
};

&mipi_csi_1 {
	mipi-phy-supply = <&reg_mipi_phy>;
	status = "okay";

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

		mipi1_sensor_ep: endpoint@1 {
			csis-hs-settle = <13>;
			csis-clk-settle = <2>;
			csis-wclk;
			data-lanes = <2>;
			reg = <1>;
			remote-endpoint = <&ov5640_mipi1_ep>;
		};

		csi1_mipi_ep: endpoint@2 {
			reg = <2>;
			remote-endpoint = <&csi1_ep>;
		};
	};
};