1// SPDX-License-Identifier: GPL-2.0
2/*
3 * IMX219 (RPi v2) Camera Module
4 * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
5 */
6
7/dts-v1/;
8/plugin/;
9
10#include <dt-bindings/gpio/gpio.h>
11
12&{/} {
13	clk_imx219_fixed: imx219-xclk {
14		compatible = "fixed-clock";
15		#clock-cells = <0>;
16		clock-frequency = <24000000>;
17	};
18};
19
20&main_i2c2 {
21	#address-cells = <1>;
22	#size-cells = <0>;
23	status = "okay";
24
25	i2c-switch@71 {
26		compatible = "nxp,pca9543";
27		#address-cells = <1>;
28		#size-cells = <0>;
29		reg = <0x71>;
30
31		/* CAM port */
32		i2c@1 {
33			#address-cells = <1>;
34			#size-cells = <0>;
35			reg = <1>;
36
37			ov5640: camera@10 {
38				compatible = "sony,imx219";
39				reg = <0x10>;
40
41				clocks = <&clk_imx219_fixed>;
42				clock-names = "xclk";
43
44				reset-gpios = <&exp1 13 GPIO_ACTIVE_HIGH>;
45
46				port {
47					csi2_cam0: endpoint {
48						remote-endpoint = <&csi2rx0_in_sensor>;
49						link-frequencies = /bits/ 64 <456000000>;
50						clock-lanes = <0>;
51						data-lanes = <1 2>;
52					};
53				};
54			};
55		};
56	};
57};
58
59&cdns_csi2rx0 {
60	ports {
61		#address-cells = <1>;
62		#size-cells = <0>;
63
64		csi0_port0: port@0 {
65			reg = <0>;
66			status = "okay";
67
68			csi2rx0_in_sensor: endpoint {
69				remote-endpoint = <&csi2_cam0>;
70				bus-type = <4>; /* CSI2 DPHY. */
71				clock-lanes = <0>;
72				data-lanes = <1 2>;
73			};
74		};
75	};
76};
77
78&ti_csi2rx0 {
79	status = "okay";
80};
81
82&dphy0 {
83	status = "okay";
84};
85