xref: /linux/scripts/dtc/include-prefixes/arm64/ti/k3-am625-verdin-panel-cap-touch-10inch-lvds.dtso (revision b2128290c29902315e632ea59e0504d6bc9e9b42)
1// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2/*
3 * Copyright (c) Toradex
4 *
5 * Toradex Capacitive Touch Display 10.1" connected via Verdin AM62 OLDI
6 * on carrier boards with a Toradex standard LVDS display connector
7 * (e.g., Mallow).
8 *
9 * https://developer.toradex.com/hardware/accessories/displays/capacitive-touch-display-101inch-lvds
10 * https://www.toradex.com/accessories/capacitive-touch-display-10.1-inch-lvds
11 */
12
13/dts-v1/;
14/plugin/;
15
16#include <dt-bindings/gpio/gpio.h>
17#include <dt-bindings/interrupt-controller/irq.h>
18#include <dt-bindings/pwm/pwm.h>
19#include "k3-pinctrl.h"
20
21&{/} {
22	backlight_pwm2: backlight-pwm2 {
23		compatible = "pwm-backlight";
24		pinctrl-names = "default";
25		pinctrl-0 = <&pinctrl_i2s_2_d_out_gpio>;
26		brightness-levels = <0 45 63 88 119 158 203 255>;
27		default-brightness-level = <4>;
28		/* Verdin I2S_2_D_OUT as GPIO (SODIMM 46) */
29		enable-gpios = <&main_gpio0 34 GPIO_ACTIVE_HIGH>;
30		/* Verdin PWM_2 (SODIMM 16) */
31		pwms = <&epwm0 1 6666667 PWM_POLARITY_INVERTED>;
32	};
33
34	panel-lvds-native {
35		compatible = "logictechno,lt170410-2whc";
36		backlight = <&backlight_pwm2>;
37		power-supply = <&reg_3v3_lvds>;
38
39		port {
40			panel_lvds_native_in: endpoint {
41				remote-endpoint = <&oldi0_out>;
42			};
43		};
44	};
45
46	reg_3v3_lvds: regulator-3v3-lvds {
47		compatible = "regulator-fixed";
48		regulator-max-microvolt = <3300000>;
49		regulator-min-microvolt = <3300000>;
50		regulator-name = "+V3.3_LVDS";
51	};
52};
53
54&dss {
55	status = "okay";
56};
57
58&dss_ports {
59	#address-cells = <1>;
60	#size-cells = <0>;
61
62	/* DSS VP1: internal DPI output to OLDIx */
63	port@0 {
64		reg = <0>;
65
66		dss0_out: endpoint {
67			remote-endpoint = <&oldi0_in>;
68		};
69	};
70};
71
72/* Verdin I2C_2_DSI */
73&main_i2c2 {
74	#address-cells = <1>;
75	#size-cells = <0>;
76
77	touchscreen@4a {
78		compatible = "atmel,maxtouch";
79		reg = <0x4a>;
80		pinctrl-names = "default";
81		pinctrl-0 = <&pinctrl_i2s_2_d_in_gpio>, <&pinctrl_i2s_2_sync_gpio>;
82		/* Verdin I2S_2_SYNC as GPIO (SODIMM 44) */
83		interrupt-parent = <&main_gpio0>;
84		interrupts = <37 IRQ_TYPE_EDGE_FALLING>;
85		/* Verdin I2S_2_D_IN as GPIO (SODIMM 48) */
86		reset-gpios = <&main_gpio0 33 GPIO_ACTIVE_LOW>;
87	};
88};
89
90&main_pmx0 {
91	/* Mallow Touch RST */
92	pinctrl_i2s_2_d_in_gpio: main-gpio0-33-default-pins {
93		pinctrl-single,pins = <
94			AM62X_IOPAD(0x0088, PIN_INPUT, 7) /* (L24) GPMC0_OEn_REn.GPIO0_33 */ /* SODIMM 48 */
95		>;
96	};
97
98	/* Mallow Touch INT# */
99	pinctrl_i2s_2_sync_gpio: main-gpio0-37-default-pins {
100		pinctrl-single,pins = <
101			AM62X_IOPAD(0x0098, PIN_INPUT, 7) /* (U23) GPMC0_WAIT0.GPIO0_37 */ /* SODIMM 44 */
102		>;
103	};
104};
105
106&oldi0 {
107	status = "okay";
108};
109
110&oldi0_port0 {
111	oldi0_in: endpoint {
112		remote-endpoint = <&dss0_out>;
113	};
114};
115
116&oldi0_port1 {
117	oldi0_out: endpoint {
118		remote-endpoint = <&panel_lvds_native_in>;
119	};
120};
121