xref: /linux/scripts/dtc/include-prefixes/arm64/ti/k3-am625-verdin-ov5640.dtsi (revision b2128290c29902315e632ea59e0504d6bc9e9b42)
1// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2/*
3 * Copyright (c) Toradex
4 *
5 * Common device tree include for Toradex OV5640 CSI camera on Verdin CSI_1.
6 */
7
8#include <dt-bindings/gpio/gpio.h>
9
10&{/} {
11	clk_ov5640_osc: ov5640-xclk {
12		compatible = "fixed-clock";
13		#clock-cells = <0>;
14	};
15
16	regulator_camera: regulator-camera {
17		compatible = "regulator-fixed";
18		/* Verdin GPIO_8_CSI (SODIMM 222) - CAM_1_CON_PWRCTRL */
19		gpio = <&main_gpio0 42 GPIO_ACTIVE_HIGH>;
20		enable-active-high;
21		regulator-name = "V_CSI";
22		startup-delay-us = <5000>;
23	};
24};
25
26&csi0_port0 {
27	status = "okay";
28
29	csi2rx0_in_sensor: endpoint {
30		remote-endpoint = <&csi2_cam0>;
31		bus-type = <4>; /* CSI2 DPHY */
32		clock-lanes = <0>;
33		data-lanes = <1 2>;
34	};
35};
36
37&dphy0 {
38	status = "okay";
39};
40
41&main_i2c3 {
42	#address-cells = <1>;
43	#size-cells = <0>;
44
45	camera@3c {
46		compatible = "ovti,ov5640";
47		reg = <0x3c>;
48
49		clocks = <&clk_ov5640_osc>;
50		clock-names = "xclk";
51		AVDD-supply = <&regulator_camera>;
52		DOVDD-supply = <&regulator_camera>;
53		DVDD-supply = <&regulator_camera>;
54		/* Verdin GPIO_6 (SODIMM 218) - CAM_1_CON_PWRDWN */
55		powerdown-gpios = <&main_gpio0 36 GPIO_ACTIVE_HIGH>;
56		/* Verdin GPIO_5 (SODIMM 216) - CAM_1_CON_RST */
57		reset-gpios = <&main_gpio0 40 GPIO_ACTIVE_LOW>;
58
59		port {
60			csi2_cam0: endpoint {
61				remote-endpoint = <&csi2rx0_in_sensor>;
62				clock-lanes = <0>;
63				data-lanes = <1 2>;
64			};
65		};
66	};
67};
68
69&ti_csi2rx0 {
70	status = "okay";
71};
72