summaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou-video-demo.dts
blob: 4ea2bda4aeb8de990ea925a4d169bab9ead3da56 (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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright (c) 2022 Theobroma Systems Design und Consulting GmbH
 */

/dts-v1/;

#include <dt-bindings/leds/common.h>

#include "rk3399-puma-haikou.dts"

/ {
	model = "Theobroma Systems RK3399-Q7 SoM on Haikou devkit with Video Demo adapter";
	compatible = "tsd,rk3399-puma-haikou-video-demo", "tsd,rk3399-puma-haikou", "rockchip,rk3399";

	video-adapter-leds {
		compatible = "gpio-leds";

		video-adapter-led {
			label = "video-adapter-led";
			gpios = <&pca9670 7 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "none";
			color = <LED_COLOR_ID_BLUE>;
		};
	};

	backlight: backlight {
		compatible = "pwm-backlight";
		power-supply = <&dc_12v>;
		pwms = <&pwm0 0 25000 0>;
	};

	cam_afvdd_2v8: cam-afvdd-2v8-regulator {
		compatible  = "regulator-fixed";
		regulator-name = "cam-afvdd-2v8";
		gpio = <&pca9670 2 GPIO_ACTIVE_LOW>;
		regulator-min-microvolt = <2800000>;
		regulator-max-microvolt = <2800000>;
		vin-supply = <&vcc2v8_video>;
	};

	cam_avdd_2v8: cam-avdd-2v8-regulator {
		compatible  = "regulator-fixed";
		regulator-name = "cam-avdd-2v8";
		gpio = <&pca9670 4 GPIO_ACTIVE_LOW>;
		vin-supply = <&vcc2v8_video>;
		regulator-min-microvolt = <2800000>;
		regulator-max-microvolt = <2800000>;
	};

	cam_dovdd_1v8: cam-dovdd-1v8-regulator {
		compatible  = "regulator-fixed";
	        regulator-name = "cam-dovdd-1v8";
	        gpio = <&pca9670 3 GPIO_ACTIVE_LOW>;
	        regulator-min-microvolt = <1800000>;
	        regulator-max-microvolt = <1800000>;
	        vin-supply = <&vcc1v8_video>;
	};

	cam_dvdd_1v2: cam-dvdd-1v2-regulator {
		compatible = "regulator-fixed";
		regulator-name = "cam-dvdd-1v2";
		gpio = <&pca9670 5 GPIO_ACTIVE_HIGH>;
		enable-active-high;
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <1200000>;
		vin-supply = <&vcc3v3_baseboard>;
	};

	vcc1v8_video: vcc1v8-video-regulator {
		compatible = "regulator-fixed";
		regulator-name = "vcc1v8-video";
		regulator-always-on;
		regulator-boot-on;
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <1800000>;
		vin-supply = <&vcc3v3_baseboard>;
	};

	vcc2v8_video: vcc2v8-video-regulator {
		compatible = "regulator-fixed";
		regulator-name = "vcc2v8-video";
		regulator-always-on;
		regulator-boot-on;
		regulator-min-microvolt = <2800000>;
		regulator-max-microvolt = <2800000>;
		vin-supply = <&vcc3v3_baseboard>;
	};
};

&cif_clkouta {
	rockchip,io-domains = <&io_domains>;
};

/* PCA9670 is connected to the SoC through a level shifter, so the HW pull-up
 * is not enough to keep the line high without SW help.
 * FIXME: ideally done via a reset-gpios in the PCA9670 driver.
 */
&gpio4 {
	pca9670-reset-hog {
		gpio-hog;
		gpios = <RK_PD6 GPIO_ACTIVE_HIGH>;
		output-high;
		line-name = "pca9670-reset";
	};
};

&i2c1 {
	/* OV5675, GT911, DW9714 are limited to 400KHz */
	clock-frequency = <400000>;

	focus: focus@c {
		compatible = "dongwoon,dw9714";
		reg = <0xc>;
		vcc-supply = <&cam_afvdd_2v8>;
		status = "okay";
	};

	touchscreen@14 {
		compatible = "goodix,gt911";
		reg = <0x14>;
		interrupt-parent = <&gpio1>;
		interrupts = <RK_PC7 IRQ_TYPE_LEVEL_LOW>;
		irq-gpios = <&gpio1 RK_PC7 GPIO_ACTIVE_HIGH>;
		reset-gpios = <&pca9670 1 GPIO_ACTIVE_HIGH>;
		AVDD28-supply = <&vcc2v8_video>;
		VDDIO-supply = <&vcc3v3_baseboard>;
		pinctrl-0 = <&touch_int>;
		pinctrl-names = "default";

		goodix,calibration-data = [
			51 d0 02 00 05 05 35 00 01 0f 28 0f 5a 3c 03 00 00 00
			00 00 00 00 08 18 1a 1e 14 8b 2b 0c 2c 2e bb 0a 00 00
			01 01 03 2d 00 00 00 00 00 00 00 00 00 00 00 28 64 94
			d5 02 08 00 00 04 80 2c 00 6d 34 00 5b 3f 00 4d 4c 00
			42 5b 00 42 00 00 00 00 00 00 00 00 00 00 00 00 00 00
			00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
			00 00 00 00 02 04 06 08 0a 0c 0e 10 12 14 16 18 ff ff
			00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 26 24
			22 21 20 1f 1e 1d 1c 18 16 13 12 10 0f 0c 0a 08 06 04
			02 00 ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00
			00 00 00 00 88 01
		];
	};

	pca9670: gpio@27 {
		compatible = "nxp,pca9670";
		reg = <0x27>;
		gpio-controller;
		#gpio-cells = <2>;
	};

	camera@36 {
		compatible = "ovti,ov5675";
		reg = <0x36>;

		clocks = <&cru SCLK_CIF_OUT>;
		assigned-clocks = <&cru SCLK_CIF_OUT>;
		assigned-clock-rates = <19200000>;
		avdd-supply = <&cam_avdd_2v8>;
		dvdd-supply = <&cam_dvdd_1v2>;
		dovdd-supply = <&cam_dovdd_1v8>;
		pinctrl-names = "default";
		pinctrl-0 = <&cif_clkouta>;
		reset-gpios = <&pca9670 6 GPIO_ACTIVE_LOW>;

		lens-focus = <&focus>;
		status = "okay";

		port {
			cam_out: endpoint {
				remote-endpoint = <&mipi_in_cam>;
				data-lanes = <1 2>;
				link-frequencies = /bits/ 64 <450000000>;
			};
		};
	};
};

&isp1 {
	status = "okay";

	ports {
		port@0 {
			mipi_in_cam: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&cam_out>;
				data-lanes = <1 2>;
			};
		};
	};
};

&isp1_mmu {
	status = "okay";
};

&mipi_dsi {
	status = "okay";

	ports {
		mipi_out: port@1 {
			reg = <1>;

			mipi_out_panel: endpoint {
				remote-endpoint = <&mipi_in_panel>;
			};
		};
	};

	panel@0 {
		compatible = "leadtek,ltk050h3148w";
		reg = <0>;
		backlight = <&backlight>;
		iovcc-supply = <&vcc1v8_video>;
		vci-supply = <&vcc2v8_video>;
		reset-gpios = <&pca9670 0 GPIO_ACTIVE_LOW>;
		status = "okay";

		port {
			mipi_in_panel: endpoint {
				remote-endpoint = <&mipi_out_panel>;
			};
		};
	};
};

&mipi_dsi1 {
	status = "okay";
};

&pinctrl {
	touch {
		touch_int: touch-int {
			rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};
};