summaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/rockchip/rk3399-puma-peafowl.dts
blob: 4535bd424856394cf40d9b47bdf4e9144f0da8c4 (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
108
109
110
111
112
113
114
115
116
117
118
119
120
// 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: mipi-dphy-tx1rx1 {
		compatible = "rockchip,rk3399-mipi-dphy";
		reg =  <0x0 0xff968000 0x0 0x8000>;
		rockchip,grf = <&grf>;
		clocks = <&cru SCLK_MIPIDPHY_REF>,
			<&cru SCLK_DPHY_TX1RX1_CFG>,
			<&cru PCLK_VIO_GRF>,
			<&cru PCLK_MIPI_DSI1>;
		clock-names = "dphy-ref", "dphy-cfg", "grf", "pclk";
		power-domains = <&power RK3399_PD_VIO>;

		resets = <&cru SRST_P_MIPI_DSI1>;
		reset-names = "apb";

		status = "okay";

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

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

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

			port@1 {
				reg = <1>;

				dphy_txrx1_out: endpoint {
					remote-endpoint = <&isp0_mipi_in>;
				};
			};
		};
	};
};

&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_rx0_csi_in>;
				clock-lanes = <0>;
				data-lanes = <1 2 3 4>;
				clock-noncontinuous;
				link-frequencies = /bits/ 64 <297000000>;
			};
		};
	};
};

&rkisp1_0 {
	status = "okay";
};

&rkisp1_1 {
	status = "okay";

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

		isp0_mipi_in: endpoint@0 {
			reg = <0>;
			remote-endpoint = <&dphy_txrx1_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>;
		};
	};
};