summaryrefslogtreecommitdiff
path: root/overlays/apalis-imx8_mezzanine_panel-cap-touch-10inch-lvds_overlay.dts
blob: 84f485b354d13bf23265ba21ab8bf646624b4a95 (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
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2020-2022 Toradex
 */

/*
 * Apalis iMX8 driving the Capacitive Touch Display 10.1" LVDS connected to
 * the Apalis Evaluation board Mezzanine.
 */
#include <dt-bindings/gpio/gpio.h>

/dts-v1/;
/plugin/;
/ {
	compatible = "toradex,apalis-imx8", "toradex,apalis-imx8-v1.1";
};

&ldb1 {
	status = "okay";

	lvds-channel@0 {
		#address-cells = <1>;
		#size-cells = <0>;

		fsl,data-mapping = "spwg";
		fsl,data-width = <24>;
		status = "okay";

		port@1 {
			reg = <1>;

			lvds2_out: endpoint {
				remote-endpoint = <&panel2_lvds_in>;
			};
		};
	};
};

&ldb1_phy {
	status = "okay";
};

&{/} {
	panel2_lvds: panel2-lvds {
		compatible = "panel-lvds";
		data-mapping = "vesa-24";
		height-mm = <136>;
		width-mm = <217>;
		status = "okay";

		panel-timing {
			clock-frequency = <68900000 71100000 73400000>;
			de-active = <1>;
			hactive = <1280 1280 1280>;
			hback-porch = <23 60 71>;
			hfront-porch = <23 60 71>;
			hsync-len = <15 40 47>;
			pixelclk-active = <1>; /* positive edge */
			vactive = <800 800 800>;
			vback-porch = <5 7 10>;
			vfront-porch = <5 7 10>;
			vsync-len = <6 9 12>;
		};

		port {
			panel2_lvds_in: endpoint {
				remote-endpoint = <&lvds2_out>;
			};
		};
	};
};

/* Enable 10" LVDS backlight LVDS_0_BKL1_ON */
&lsio_gpio1 {
	LVDS_0_BKL1_ON {
		gpio-hog;
		gpios = <22 GPIO_ACTIVE_HIGH>;
		line-name = "LVDS_0_BKL1_ON";
		output-high;
	};
};

/*
 * Put LVDS_0_PWM_BKL1 (GPIO8) low. GPIO8 is shared with gpio-fan.
 * JP20 should be set to 1-2 (automatic) instead of GPIO8 (2-3).
 */
&lsio_gpio3 {
	PWM_BKL1 {
		gpio-hog;
		gpios = <28 GPIO_ACTIVE_HIGH>;
		line-name = "LVDS_0_PWM_BKL1";
		output-low;
	};
};

&gpio_fan {
	status = "disabled";
};