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 AM62P CSI_1. 6 */ 7 8#include <dt-bindings/gpio/gpio.h> 9 10&{/} { 11 clock_camera: clock-camera { 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 52 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/* Verdin I2C_4_CSI */ 42&main_i2c3 { 43 #address-cells = <1>; 44 #size-cells = <0>; 45 46 camera@3c { 47 compatible = "ovti,ov5640"; 48 reg = <0x3c>; 49 50 clocks = <&clock_camera>; 51 clock-names = "xclk"; 52 AVDD-supply = <®ulator_camera>; 53 DOVDD-supply = <®ulator_camera>; 54 DVDD-supply = <®ulator_camera>; 55 /* Verdin GPIO_6 (SODIMM 218) - CAM_1_CON_PWRDWN */ 56 powerdown-gpios = <&main_gpio0 50 GPIO_ACTIVE_HIGH>; 57 /* Verdin GPIO_5 (SODIMM 216) - CAM_1_CON_RST */ 58 reset-gpios = <&main_gpio0 49 GPIO_ACTIVE_LOW>; 59 60 port { 61 csi2_cam0: endpoint { 62 remote-endpoint = <&csi2rx0_in_sensor>; 63 clock-lanes = <0>; 64 data-lanes = <1 2>; 65 }; 66 }; 67 }; 68}; 69 70&ti_csi2rx0 { 71 status = "okay"; 72}; 73