summaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/rockchip/rk3399-puma-peafowl.dts
blob: 686e815787cd8c485aecf6848aadbbb511a3da98 (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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)

/*
 Theobroma Systems RK3399-Q7 "Puma" with HDMI to CSI adapter "Peafowl".
 Uses the Toshiba TC358749 chip.
 */

#include "rk3399-puma.dts"

/ {
	hdmi2csi_clk: hdmi2csi_clk {
		compatible = "fixed-clock";
		clock-frequency = <27000000>;
		clock-output-names = "hdmi2csi_clk";
		#clock-cells = <0>;
	};
};

&mipi_dphy_tx1rx1 {
	status = "okay";

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

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

			dphy_tx1rx1_csi_in: endpoint {
				reg = <0>;
				remote-endpoint = <&hdmi2csi_out>;
				data-lanes = <1 2 3 4>;
			};
		};

		port@1 {
			reg = <1>;

			dphy_tx1rx1_out: endpoint {
				remote-endpoint = <&isp1_mipi_in>;
			};
		};
	};
};

&mipi_dphy_rx0 {
	status = "okay";
};

&i2c1 {
	hdmi2csi {
		status = "okay";
		compatible = "toshiba,tc358749";
		reg = <0x1f>;
		clocks = <&hdmi2csi_clk>;
		clock-names = "refclk";

		pinctrl-names = "default";
		pinctrl-0 = <&peafowl_gpios>;

		// gpio158
		reset-gpios = <&gpio4 30 GPIO_ACTIVE_LOW>;
		// gpio55
		int-gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;

		port {
			hdmi2csi_out: endpoint {
				remote-endpoint = <&dphy_tx1rx1_csi_in>;
				clock-lanes = <0>;
				data-lanes = <1 2 3 4>;
				clock-noncontinuous;
				link-frequencies = /bits/ 64 <297000000>;
			};
		};
	};
};


&rkisp1_1 {
	status = "okay";

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

		isp1_mipi_in: endpoint@0 {
			reg = <0>;
			remote-endpoint = <&dphy_tx1rx1_out>;
		};
	};
};

&isp1_mmu {
	status = "okay";
};

&pinctrl {
	peafowl {
		peafowl_gpios: peafowl_gpios {
		rockchip,pins =
				<4 30 RK_FUNC_GPIO &pcfg_pull_none>,
				<1 23 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};
};