summaryrefslogtreecommitdiff
path: root/overlays/verdin-imx8mp_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dts
blob: 840edd8f5707c7326ff13d37ec13bf6e7f11e68c (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
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2023 Toradex
 */

// Verdin DSI to LVDS Adapter with plugged in
// Capacitive Touch Display 10.1" LVDS orderable at Toradex.

/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pwm/pwm.h>

/ {
	compatible = "toradex,verdin-imx8mp";
};

&{/} {
	backlight {
		compatible = "pwm-backlight";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_i2s_2_d_out_dsi_1_bkl_en>;
		brightness-levels = <0 45 63 88 119 158 203 255>;
		default-brightness-level = <4>;
		/* Verdin I2S_2_D_OUT (DSI_1_BKL_EN/DSI_1_BKL_EN_LVDS, SODIMM 46) */
		enable-gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;
		power-supply = <&reg_3p3v>;
		/* Verdin PWM_3_DSI/PWM_3_DSI_LVDS (SODIMM 19) */
		pwms = <&pwm3 0 6666667 PWM_POLARITY_INVERTED>;
		status = "okay";
	};

	panel_lvds: panel-lvds {
		compatible = "panel-lvds";
		backlight = <&backlight>;
		data-mapping = "vesa-24";
		height-mm = <136>;
		width-mm = <217>;
	};
};

/* Verdin I2C_1 */
&i2c4 {
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";

	lvds_ti_sn65dsi84: bridge@2c {
		compatible = "ti,sn65dsi84";
		reg = <0x2c>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_gpio_10_dsi>;
		/* Verdin GPIO_9_DSI (SN65DSI84 IRQ, SODIMM 17, unused) */
		/* Verdin GPIO_10_DSI (SODIMM 21) */
		enable-gpios = <&gpio4 28 GPIO_ACTIVE_HIGH>;
	};

	touch@4a {
		compatible = "atmel,maxtouch";
		reg = <0x4a>;
		/*
		 * Verdin GPIO_9_DSI
		 * (TOUCH_INT#, SODIMM 17, also routed to SN65DSI84 IRQ albeit currently unused)
		 */
		interrupt-parent = <&gpio4>;
		interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_gpio_9_dsi>, <&pinctrl_i2s_2_bclk_touch_reset>;
		/* Verdin I2S_2_BCLK (TOUCH_RESET#, SODIMM 42) */
		reset-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
		status = "okay";
	};
};

/* LCDIF to MIPI-DSI */
&lcdif1 {
	status = "okay";
};

/* Verdin PWM_3_DSI */
&pwm3 {
	status = "okay";
};

/* As the following make use of labels only just created above */
#include "display-lt170410_sn65dsi84_overlay.dtsi"
#include "verdin-imx8_mipi-dsi-to-sn65dsi84.dtsi"