xref: /freebsd/sys/contrib/device-tree/src/arm/nxp/imx/imx6dl-prtvt7.dts (revision e1e636193db45630c7881246d25902e57c43d24e)
1// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2/*
3 * Copyright (c) 2016 Protonic Holland
4 */
5
6/dts-v1/;
7#include "imx6dl.dtsi"
8#include "imx6qdl-prti6q.dtsi"
9#include <dt-bindings/display/sdtv-standards.h>
10#include <dt-bindings/input/input.h>
11#include <dt-bindings/leds/common.h>
12#include <dt-bindings/sound/fsl-imx-audmux.h>
13
14/ {
15	model = "Protonic VT7";
16	compatible = "prt,prtvt7", "fsl,imx6dl";
17
18	memory@10000000 {
19		device_type = "memory";
20		reg = <0x10000000 0x20000000>;
21	};
22
23	backlight_lcd: backlight-lcd {
24		compatible = "pwm-backlight";
25		pwms = <&pwm1 0 500000 0>;
26		brightness-levels = <0 20 81 248 1000>;
27		default-brightness-level = <65>;
28		num-interpolated-steps = <21>;
29		power-supply = <&reg_bl_12v0>;
30	};
31
32	display {
33		compatible = "fsl,imx-parallel-display";
34		pinctrl-0 = <&pinctrl_ipu1_disp>;
35		pinctrl-names = "default";
36		#address-cells = <1>;
37		#size-cells = <0>;
38
39		port@0 {
40			reg = <0>;
41
42			display_in: endpoint {
43				remote-endpoint = <&ipu1_di0_disp0>;
44			};
45		};
46
47		port@1 {
48			reg = <1>;
49
50			display_out: endpoint {
51				remote-endpoint = <&panel_in>;
52			};
53		};
54	};
55
56	iio-hwmon {
57		compatible = "iio-hwmon";
58		io-channels = <&vdiv_vaccu>;
59	};
60
61	keys {
62		compatible = "gpio-keys";
63		autorepeat;
64
65		key-esc {
66			label = "GPIO Key ESC";
67			linux,code = <KEY_ESC>;
68			gpios = <&gpio_pca 0 GPIO_ACTIVE_LOW>;
69		};
70
71		key-up {
72			label = "GPIO Key UP";
73			linux,code = <KEY_UP>;
74			gpios = <&gpio_pca 1 GPIO_ACTIVE_LOW>;
75		};
76
77		key-down {
78			label = "GPIO Key DOWN";
79			linux,code = <KEY_DOWN>;
80			gpios = <&gpio_pca 4 GPIO_ACTIVE_LOW>;
81		};
82
83		key-enter {
84			label = "GPIO Key Enter";
85			linux,code = <KEY_ENTER>;
86			gpios = <&gpio_pca 3 GPIO_ACTIVE_LOW>;
87		};
88
89		key-cycle {
90			label = "GPIO Key CYCLE";
91			linux,code = <KEY_CYCLEWINDOWS>;
92			gpios = <&gpio_pca 2 GPIO_ACTIVE_LOW>;
93		};
94
95		key-f1 {
96			label = "GPIO Key F1";
97			linux,code = <KEY_F1>;
98			gpios = <&gpio_pca 14 GPIO_ACTIVE_LOW>;
99		};
100
101		key-f2 {
102			label = "GPIO Key F2";
103			linux,code = <KEY_F2>;
104			gpios = <&gpio_pca 13 GPIO_ACTIVE_LOW>;
105		};
106
107		key-f3 {
108			label = "GPIO Key F3";
109			linux,code = <KEY_F3>;
110			gpios = <&gpio_pca 12 GPIO_ACTIVE_LOW>;
111		};
112
113		key-f4 {
114			label = "GPIO Key F4";
115			linux,code = <KEY_F4>;
116			gpios = <&gpio_pca 11 GPIO_ACTIVE_LOW>;
117		};
118
119		key-f5 {
120			label = "GPIO Key F5";
121			linux,code = <KEY_F5>;
122			gpios = <&gpio_pca 10 GPIO_ACTIVE_LOW>;
123		};
124
125		key-f6 {
126			label = "GPIO Key F6";
127			linux,code = <KEY_F6>;
128			gpios = <&gpio_pca 5 GPIO_ACTIVE_LOW>;
129		};
130
131		key-f7 {
132			label = "GPIO Key F7";
133			linux,code = <KEY_F7>;
134			gpios = <&gpio_pca 6 GPIO_ACTIVE_LOW>;
135		};
136
137		key-f8 {
138			label = "GPIO Key F8";
139			linux,code = <KEY_F8>;
140			gpios = <&gpio_pca 7 GPIO_ACTIVE_LOW>;
141		};
142
143		key-f9 {
144			label = "GPIO Key F9";
145			linux,code = <KEY_F9>;
146			gpios = <&gpio_pca 8 GPIO_ACTIVE_LOW>;
147		};
148
149		key-f10 {
150			label = "GPIO Key F10";
151			linux,code = <KEY_F10>;
152			gpios = <&gpio_pca 9 GPIO_ACTIVE_LOW>;
153		};
154	};
155
156	leds {
157		compatible = "gpio-leds";
158		pinctrl-names = "default";
159		pinctrl-0 = <&pinctrl_leds>;
160
161		led-debug0 {
162			function = LED_FUNCTION_STATUS;
163			gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
164			linux,default-trigger = "heartbeat";
165		};
166	};
167
168	panel {
169		compatible = "innolux,g070y2-t02";
170		backlight = <&backlight_lcd>;
171		power-supply = <&reg_3v3>;
172
173		port {
174			panel_in: endpoint {
175				remote-endpoint = <&display_out>;
176			};
177		};
178	};
179
180	connector {
181		compatible = "composite-video-connector";
182		label = "Composite0";
183		sdtv-standards = <SDTV_STD_PAL_B>;
184
185		port {
186			comp0_out: endpoint {
187				remote-endpoint = <&tvp5150_comp0_in>;
188			};
189		};
190	};
191
192	reg_bl_12v0: regulator-bl-12v0 {
193		compatible = "regulator-fixed";
194		pinctrl-names = "default";
195		pinctrl-0 = <&pinctrl_reg_bl_12v0>;
196		regulator-name = "bl-12v0";
197		regulator-min-microvolt = <12000000>;
198		regulator-max-microvolt = <12000000>;
199		gpio = <&gpio1 7 GPIO_ACTIVE_HIGH>;
200		enable-active-high;
201	};
202
203	reg_3v3: regulator-3v3 {
204		compatible = "regulator-fixed";
205		regulator-name = "3v3";
206		regulator-min-microvolt = <3300000>;
207		regulator-max-microvolt = <3300000>;
208	};
209
210	reg_1v8: regulator-1v8 {
211		compatible = "regulator-fixed";
212		regulator-name = "1v8";
213		regulator-min-microvolt = <1800000>;
214		regulator-max-microvolt = <1800000>;
215	};
216
217	sound {
218		compatible = "simple-audio-card";
219		simple-audio-card,name = "prti6q-sgtl5000";
220		simple-audio-card,format = "i2s";
221		simple-audio-card,widgets =
222			"Microphone", "Microphone Jack",
223			"Line", "Line In Jack",
224			"Headphone", "Headphone Jack",
225			"Speaker", "External Speaker";
226		simple-audio-card,routing =
227			"MIC_IN", "Microphone Jack",
228			"LINE_IN", "Line In Jack",
229			"Headphone Jack", "HP_OUT",
230			"External Speaker", "LINE_OUT";
231
232		simple-audio-card,cpu {
233			sound-dai = <&ssi1>;
234			system-clock-frequency = <0>;
235		};
236
237		simple-audio-card,codec {
238			sound-dai = <&sgtl5000>;
239			bitclock-master;
240			frame-master;
241		};
242	};
243
244	thermal-zones {
245		chassis-thermal {
246			polling-delay = <20000>;
247			polling-delay-passive = <0>;
248			thermal-sensors = <&tsens0>;
249
250			trips {
251				alert {
252					temperature = <105000>; /* millicelsius */
253					hysteresis = <2000>; /* millicelsius */
254					type = "passive";
255				};
256			};
257		};
258
259		touch-thermal0 {
260			polling-delay = <20000>;
261			polling-delay-passive = <0>;
262			thermal-sensors = <&touch_temp0>;
263
264			trips {
265				alert {
266					temperature = <105000>; /* millicelsius */
267					hysteresis = <2000>; /* millicelsius */
268					type = "passive";
269				};
270			};
271		};
272
273		touch-thermal1 {
274			polling-delay = <20000>;
275			polling-delay-passive = <0>;
276			thermal-sensors = <&touch_temp1>;
277
278			trips {
279				alert {
280					temperature = <105000>; /* millicelsius */
281					hysteresis = <2000>; /* millicelsius */
282					type = "passive";
283				};
284			};
285		};
286	};
287
288	touchscreen {
289		compatible = "resistive-adc-touch";
290		io-channels = <&adc_ts 1>, <&adc_ts 3>, <&adc_ts 4>,
291                              <&adc_ts 5>;
292		io-channel-names = "y", "z1", "z2", "x";
293		touchscreen-min-pressure = <64687>;
294		touchscreen-x-plate-ohms = <300>;
295		touchscreen-y-plate-ohms = <800>;
296	};
297
298	touch_temp0: touch-temperature-sensor0 {
299		compatible = "generic-adc-thermal";
300		#thermal-sensor-cells = <0>;
301		io-channels = <&adc_ts 0>;
302		io-channel-names = "sensor-channel";
303		temperature-lookup-table = <    (-40000) 736
304						85000 474>;
305	};
306
307	touch_temp1: touch-temperature-sensor1 {
308		compatible = "generic-adc-thermal";
309		#thermal-sensor-cells = <0>;
310		io-channels = <&adc_ts 7>;
311		io-channel-names = "sensor-channel";
312		temperature-lookup-table = <    (-40000) 826
313						85000 609>;
314	};
315
316	vdiv_vaccu: voltage-divider-vaccu {
317		compatible = "voltage-divider";
318		io-channels = <&adc_ts 2>;
319		output-ohms = <2500>;
320		full-ohms = <64000>;
321		#io-channel-cells = <0>;
322	};
323};
324
325&audmux {
326	pinctrl-names = "default";
327	pinctrl-0 = <&pinctrl_audmux>;
328	status = "okay";
329
330	mux-ssi1 {
331		fsl,audmux-port = <0>;
332		fsl,port-config = <
333			IMX_AUDMUX_V2_PTCR_SYN		0
334			IMX_AUDMUX_V2_PTCR_TFSEL(2)	0
335			IMX_AUDMUX_V2_PTCR_TCSEL(2)	0
336			IMX_AUDMUX_V2_PTCR_TFSDIR	0
337			IMX_AUDMUX_V2_PTCR_TCLKDIR IMX_AUDMUX_V2_PDCR_RXDSEL(2)
338		>;
339	};
340
341	mux-pins3 {
342		fsl,audmux-port = <2>;
343		fsl,port-config = <
344			IMX_AUDMUX_V2_PTCR_SYN IMX_AUDMUX_V2_PDCR_RXDSEL(0)
345			0		       IMX_AUDMUX_V2_PDCR_TXRXEN
346		>;
347	};
348};
349
350&can1 {
351	pinctrl-0 = <&pinctrl_can1 &pinctrl_can1phy>;
352};
353
354&clks {
355	assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>;
356	assigned-clock-parents = <&clks IMX6QDL_CLK_PLL5_VIDEO_DIV>;
357};
358
359&ecspi2 {
360	cs-gpios = <&gpio2 26 GPIO_ACTIVE_LOW>;
361	pinctrl-names = "default";
362	pinctrl-0 = <&pinctrl_ecspi2>;
363	status = "okay";
364
365	adc_ts: adc@0 {
366		compatible = "ti,tsc2046e-adc";
367		reg = <0>;
368		pinctrl-0 = <&pinctrl_tsc>;
369		pinctrl-names = "default";
370		spi-max-frequency = <1000000>;
371		interrupts-extended = <&gpio3 20 IRQ_TYPE_LEVEL_LOW>;
372		#io-channel-cells = <1>;
373
374		#address-cells = <1>;
375		#size-cells = <0>;
376
377		channel@1 {
378			reg = <1>;
379			settling-time-us = <700>;
380			oversampling-ratio = <5>;
381		};
382
383		channel@3 {
384			reg = <3>;
385			settling-time-us = <700>;
386			oversampling-ratio = <5>;
387		};
388
389		channel@4 {
390			reg = <4>;
391			settling-time-us = <700>;
392			oversampling-ratio = <5>;
393		};
394
395		channel@5 {
396			reg = <5>;
397			settling-time-us = <700>;
398			oversampling-ratio = <5>;
399		};
400	};
401};
402
403&i2c1 {
404	sgtl5000: audio-codec@a {
405		compatible = "fsl,sgtl5000";
406		reg = <0xa>;
407		pinctrl-names = "default";
408		pinctrl-0 = <&pinctrl_codec>;
409		#sound-dai-cells = <0>;
410		clocks = <&clks 201>;
411		VDDA-supply = <&reg_3v3>;
412		VDDIO-supply = <&reg_3v3>;
413		VDDD-supply = <&reg_1v8>;
414	};
415
416	video@5c {
417		compatible = "ti,tvp5150";
418		reg = <0x5c>;
419
420		#address-cells = <1>;
421		#size-cells = <0>;
422
423		port@0 {
424			reg = <0>;
425
426			tvp5150_comp0_in: endpoint {
427				remote-endpoint = <&comp0_out>;
428			};
429		};
430
431		/* Output port 2 is video output pad */
432		port@2 {
433			reg = <2>;
434
435			tvp5151_to_ipu1_csi0_mux: endpoint {
436				remote-endpoint = <&ipu1_csi0_mux_from_parallel_sensor>;
437			};
438		};
439	};
440};
441
442&i2c3 {
443	rtc@51 {
444		compatible = "nxp,pcf8563";
445		reg = <0x51>;
446	};
447
448	tsens0: temperature-sensor@70 {
449		compatible = "ti,tmp103";
450		reg = <0x70>;
451		#thermal-sensor-cells = <0>;
452	};
453
454	gpio_pca: gpio@74 {
455		compatible = "nxp,pca9539";
456		reg = <0x74>;
457		interrupts-extended = <&gpio4 5 IRQ_TYPE_LEVEL_LOW>;
458		#gpio-cells = <2>;
459		gpio-controller;
460	};
461};
462
463&ipu1 {
464	pinctrl-names = "default";
465	pinctrl-0 = <&pinctrl_ipu1_csi0>;
466	status = "okay";
467};
468
469&ipu1_di0_disp0 {
470	remote-endpoint = <&display_in>;
471};
472
473&ipu1_csi0_mux_from_parallel_sensor {
474	remote-endpoint = <&tvp5151_to_ipu1_csi0_mux>;
475};
476
477&pwm1 {
478	pinctrl-names = "default";
479	pinctrl-0 = <&pinctrl_pwm1>;
480	status = "okay";
481};
482
483&snvs_poweroff {
484	status = "okay";
485};
486
487&snvs_pwrkey {
488	status = "okay";
489};
490
491&ssi1 {
492	status = "okay";
493};
494
495&usbh1 {
496	status = "disabled";
497};
498
499&iomuxc {
500	pinctrl_audmux: audmuxgrp {
501		fsl,pins = <
502			MX6QDL_PAD_CSI0_MCLK__CCM_CLKO1		0x030b0
503			MX6QDL_PAD_CSI0_DAT7__AUD3_RXD		0x130b0
504			MX6QDL_PAD_CSI0_DAT4__AUD3_TXC		0x130b0
505			MX6QDL_PAD_CSI0_DAT5__AUD3_TXD		0x110b0
506			MX6QDL_PAD_CSI0_DAT6__AUD3_TXFS		0x130b0
507		>;
508	};
509
510	pinctrl_can1phy: can1phy {
511		fsl,pins = <
512			/* CAN1_SR */
513			MX6QDL_PAD_KEY_COL3__GPIO4_IO12		0x13070
514			/* CAN1_TERM */
515			MX6QDL_PAD_GPIO_0__GPIO1_IO00		0x1b0b0
516		>;
517	};
518
519	pinctrl_codec: codecgrp {
520		fsl,pins = <
521			/* AUDIO_nRESET */
522			MX6QDL_PAD_CSI0_VSYNC__GPIO5_IO21	0x1f0b0
523		>;
524	};
525
526	pinctrl_ecspi2: ecspi2grp {
527		fsl,pins = <
528			MX6QDL_PAD_EIM_OE__ECSPI2_MISO		0x100b1
529			MX6QDL_PAD_EIM_CS0__ECSPI2_SCLK		0x100b1
530			MX6QDL_PAD_EIM_CS1__ECSPI2_MOSI		0x100b1
531			MX6QDL_PAD_EIM_RW__GPIO2_IO26		0x000b1
532		>;
533	};
534
535	pinctrl_ipu1_csi0: ipu1csi0grp {
536		fsl,pins = <
537			MX6QDL_PAD_CSI0_DAT12__IPU1_CSI0_DATA12	0x1b0b0
538			MX6QDL_PAD_CSI0_DAT13__IPU1_CSI0_DATA13	0x1b0b0
539			MX6QDL_PAD_CSI0_DAT14__IPU1_CSI0_DATA14	0x1b0b0
540			MX6QDL_PAD_CSI0_DAT15__IPU1_CSI0_DATA15	0x1b0b0
541			MX6QDL_PAD_CSI0_DAT16__IPU1_CSI0_DATA16	0x1b0b0
542			MX6QDL_PAD_CSI0_DAT17__IPU1_CSI0_DATA17	0x1b0b0
543			MX6QDL_PAD_CSI0_DAT18__IPU1_CSI0_DATA18	0x1b0b0
544			MX6QDL_PAD_CSI0_DAT19__IPU1_CSI0_DATA19	0x1b0b0
545			MX6QDL_PAD_CSI0_PIXCLK__IPU1_CSI0_PIXCLK 0x1b0b0
546			/* ITU656_nRESET */
547			MX6QDL_PAD_GPIO_2__GPIO1_IO02		0x1b0b0
548			/* ITU656_nPDN */
549			MX6QDL_PAD_CSI0_DATA_EN__GPIO5_IO20	0x1b0b0
550		>;
551	};
552
553	pinctrl_ipu1_disp: ipudisp1grp {
554		fsl,pins = <
555			MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK 0xb0
556			MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15	   0xb0
557
558			MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00 0xb0
559			MX6QDL_PAD_DISP0_DAT1__IPU1_DISP0_DATA01 0xb0
560			MX6QDL_PAD_DISP0_DAT2__IPU1_DISP0_DATA02 0xb0
561			MX6QDL_PAD_DISP0_DAT3__IPU1_DISP0_DATA03 0xb0
562			MX6QDL_PAD_DISP0_DAT4__IPU1_DISP0_DATA04 0xb0
563			MX6QDL_PAD_DISP0_DAT5__IPU1_DISP0_DATA05 0xb0
564			MX6QDL_PAD_DISP0_DAT6__IPU1_DISP0_DATA06 0xb0
565			MX6QDL_PAD_DISP0_DAT7__IPU1_DISP0_DATA07 0xb0
566
567			MX6QDL_PAD_DISP0_DAT8__IPU1_DISP0_DATA08 0xb0
568			MX6QDL_PAD_DISP0_DAT9__IPU1_DISP0_DATA09 0xb0
569			MX6QDL_PAD_DISP0_DAT10__IPU1_DISP0_DATA10 0xb0
570			MX6QDL_PAD_DISP0_DAT11__IPU1_DISP0_DATA11 0xb0
571			MX6QDL_PAD_DISP0_DAT12__IPU1_DISP0_DATA12 0xb0
572			MX6QDL_PAD_DISP0_DAT13__IPU1_DISP0_DATA13 0xb0
573			MX6QDL_PAD_DISP0_DAT14__IPU1_DISP0_DATA14 0xb0
574			MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15 0xb0
575
576			MX6QDL_PAD_DISP0_DAT16__IPU1_DISP0_DATA16 0xb0
577			MX6QDL_PAD_DISP0_DAT17__IPU1_DISP0_DATA17 0xb0
578			MX6QDL_PAD_DISP0_DAT18__IPU1_DISP0_DATA18 0xb0
579			MX6QDL_PAD_DISP0_DAT19__IPU1_DISP0_DATA19 0xb0
580			MX6QDL_PAD_DISP0_DAT20__IPU1_DISP0_DATA20 0xb0
581			MX6QDL_PAD_DISP0_DAT21__IPU1_DISP0_DATA21 0xb0
582			MX6QDL_PAD_DISP0_DAT22__IPU1_DISP0_DATA22 0xb0
583			MX6QDL_PAD_DISP0_DAT23__IPU1_DISP0_DATA23 0xb0
584		>;
585	};
586
587	pinctrl_leds: ledsgrp {
588		fsl,pins = <
589			MX6QDL_PAD_GPIO_8__GPIO1_IO08		0x1b0b0
590		>;
591	};
592
593	pinctrl_pwm1: pwm1grp {
594		fsl,pins = <
595			MX6QDL_PAD_GPIO_9__PWM1_OUT		0x1b0b0
596		>;
597	};
598
599	pinctrl_reg_bl_12v0: 12blgrp {
600		fsl,pins = <
601			MX6QDL_PAD_GPIO_7__GPIO1_IO07		0x1b0b0
602		>;
603	};
604
605	pinctrl_tsc: tscgrp {
606
607		fsl,pins = <
608			MX6QDL_PAD_EIM_D20__GPIO3_IO20		0x1b0b0
609			MX6QDL_PAD_EIM_EB2__GPIO2_IO30		0x1b0b0
610		>;
611	};
612};
613