1*05e6ae33SLad Prabhakar// SPDX-License-Identifier: GPL-2.0
2*05e6ae33SLad Prabhakar/*
3*05e6ae33SLad Prabhakar * Device Tree Source for the HiHope RZ/G2[HMN] MIPI common parts
4*05e6ae33SLad Prabhakar *
5*05e6ae33SLad Prabhakar * Copyright (C) 2020 Renesas Electronics Corp.
6*05e6ae33SLad Prabhakar */
7*05e6ae33SLad Prabhakar
8*05e6ae33SLad Prabhakar#define MIPI_OV5645_PARENT_I2C i2c2
9*05e6ae33SLad Prabhakar#define MIPI_IMX219_PARENT_I2C i2c3
10*05e6ae33SLad Prabhakar#include "aistarvision-mipi-adapter-2.1.dtsi"
11*05e6ae33SLad Prabhakar
12*05e6ae33SLad Prabhakar&csi20 {
13*05e6ae33SLad Prabhakar	status = "okay";
14*05e6ae33SLad Prabhakar
15*05e6ae33SLad Prabhakar	ports {
16*05e6ae33SLad Prabhakar		port@0 {
17*05e6ae33SLad Prabhakar			reg = <0>;
18*05e6ae33SLad Prabhakar			csi20_in: endpoint {
19*05e6ae33SLad Prabhakar				clock-lanes = <0>;
20*05e6ae33SLad Prabhakar				data-lanes = <1 2>;
21*05e6ae33SLad Prabhakar				remote-endpoint = <&ov5645_ep>;
22*05e6ae33SLad Prabhakar			};
23*05e6ae33SLad Prabhakar		};
24*05e6ae33SLad Prabhakar	};
25*05e6ae33SLad Prabhakar};
26*05e6ae33SLad Prabhakar
27*05e6ae33SLad Prabhakar&csi40 {
28*05e6ae33SLad Prabhakar	status = "okay";
29*05e6ae33SLad Prabhakar
30*05e6ae33SLad Prabhakar	ports {
31*05e6ae33SLad Prabhakar		port@0 {
32*05e6ae33SLad Prabhakar			reg = <0>;
33*05e6ae33SLad Prabhakar			csi40_in: endpoint {
34*05e6ae33SLad Prabhakar				clock-lanes = <0>;
35*05e6ae33SLad Prabhakar				data-lanes = <1 2>;
36*05e6ae33SLad Prabhakar				remote-endpoint = <&imx219_ep>;
37*05e6ae33SLad Prabhakar			};
38*05e6ae33SLad Prabhakar		};
39*05e6ae33SLad Prabhakar	};
40*05e6ae33SLad Prabhakar};
41*05e6ae33SLad Prabhakar
42*05e6ae33SLad Prabhakar&i2c3 {
43*05e6ae33SLad Prabhakar	pinctrl-0 = <&i2c3_pins>;
44*05e6ae33SLad Prabhakar	pinctrl-names = "default";
45*05e6ae33SLad Prabhakar	status = "okay";
46*05e6ae33SLad Prabhakar};
47*05e6ae33SLad Prabhakar
48*05e6ae33SLad Prabhakar&imx219 {
49*05e6ae33SLad Prabhakar	port {
50*05e6ae33SLad Prabhakar		imx219_ep: endpoint {
51*05e6ae33SLad Prabhakar			clock-lanes = <0>;
52*05e6ae33SLad Prabhakar			data-lanes = <1 2>;
53*05e6ae33SLad Prabhakar			link-frequencies = /bits/ 64 <456000000>;
54*05e6ae33SLad Prabhakar			remote-endpoint = <&csi40_in>;
55*05e6ae33SLad Prabhakar		};
56*05e6ae33SLad Prabhakar	};
57*05e6ae33SLad Prabhakar};
58*05e6ae33SLad Prabhakar
59*05e6ae33SLad Prabhakar&ov5645 {
60*05e6ae33SLad Prabhakar	enable-gpios = <&gpio6 4 GPIO_ACTIVE_HIGH>;
61*05e6ae33SLad Prabhakar	reset-gpios = <&gpio6 8 GPIO_ACTIVE_LOW>;
62*05e6ae33SLad Prabhakar
63*05e6ae33SLad Prabhakar	port {
64*05e6ae33SLad Prabhakar		ov5645_ep: endpoint {
65*05e6ae33SLad Prabhakar			clock-lanes = <0>;
66*05e6ae33SLad Prabhakar			data-lanes = <1 2>;
67*05e6ae33SLad Prabhakar			remote-endpoint = <&csi20_in>;
68*05e6ae33SLad Prabhakar		};
69*05e6ae33SLad Prabhakar	};
70*05e6ae33SLad Prabhakar};
71*05e6ae33SLad Prabhakar
72*05e6ae33SLad Prabhakar&pfc {
73*05e6ae33SLad Prabhakar	i2c3_pins: i2c3 {
74*05e6ae33SLad Prabhakar		groups = "i2c3";
75*05e6ae33SLad Prabhakar		function = "i2c3";
76*05e6ae33SLad Prabhakar	};
77*05e6ae33SLad Prabhakar};
78*05e6ae33SLad Prabhakar
79*05e6ae33SLad Prabhakar&vin0 {
80*05e6ae33SLad Prabhakar	status = "okay";
81*05e6ae33SLad Prabhakar};
82*05e6ae33SLad Prabhakar
83*05e6ae33SLad Prabhakar&vin1 {
84*05e6ae33SLad Prabhakar	status = "okay";
85*05e6ae33SLad Prabhakar};
86*05e6ae33SLad Prabhakar
87*05e6ae33SLad Prabhakar&vin2 {
88*05e6ae33SLad Prabhakar	status = "okay";
89*05e6ae33SLad Prabhakar};
90*05e6ae33SLad Prabhakar
91*05e6ae33SLad Prabhakar&vin3 {
92*05e6ae33SLad Prabhakar	status = "okay";
93*05e6ae33SLad Prabhakar};
94*05e6ae33SLad Prabhakar
95*05e6ae33SLad Prabhakar&vin4 {
96*05e6ae33SLad Prabhakar	status = "okay";
97*05e6ae33SLad Prabhakar};
98*05e6ae33SLad Prabhakar
99*05e6ae33SLad Prabhakar&vin5 {
100*05e6ae33SLad Prabhakar	status = "okay";
101*05e6ae33SLad Prabhakar};
102*05e6ae33SLad Prabhakar
103*05e6ae33SLad Prabhakar&vin6 {
104*05e6ae33SLad Prabhakar	status = "okay";
105*05e6ae33SLad Prabhakar};
106*05e6ae33SLad Prabhakar
107*05e6ae33SLad Prabhakar&vin7 {
108*05e6ae33SLad Prabhakar	status = "okay";
109*05e6ae33SLad Prabhakar};
110