xref: /linux/scripts/dtc/include-prefixes/arm64/ti/k3-am62-phyboard-lyra-oldi-lcd185.dtso (revision b2128290c29902315e632ea59e0504d6bc9e9b42)
1// SPDX-License-Identifier: GPL-2.0-only OR MIT
2/*
3 * Copyright (C) 2022-2026 PHYTEC Messtechnik GmbH
4 * Author: Wadim Egorov <w.egorov@phytec.de>
5 */
6
7/dts-v1/;
8/plugin/;
9
10#include <dt-bindings/pwm/pwm.h>
11#include <dt-bindings/gpio/gpio.h>
12#include <dt-bindings/interrupt-controller/irq.h>
13#include "k3-pinctrl.h"
14
15&{/} {
16	display {
17		compatible = "lincolntech,lcd185-101ct";
18		backlight = <&backlight>;
19		power-supply = <&vdd_usb_5v0>;
20
21		ports {
22			#address-cells = <1>;
23			#size-cells = <0>;
24
25			port@0 {
26				reg = <0>;
27				dual-lvds-odd-pixels;
28				lcd_in0: endpoint {
29					remote-endpoint = <&oldi_0_out>;
30				};
31			};
32
33			port@1 {
34				reg = <1>;
35				dual-lvds-even-pixels;
36				lcd_in1: endpoint {
37					remote-endpoint = <&oldi_1_out>;
38				};
39			};
40		};
41	};
42
43	backlight: backlight {
44		compatible = "pwm-backlight";
45		brightness-levels = <0 4 8 16 32 64 128 255>;
46		default-brightness-level = <6>;
47		enable-gpios = <&gpio_exp 5 GPIO_ACTIVE_HIGH>;
48		pinctrl-names = "default";
49		pinctrl-0 = <&bl_pwm_pins_default>;
50		pwms = <&epwm0 1 50000 0>;
51	};
52
53	vdd_usb_5v0: regulator-vdd-usb5v0 {
54		compatible = "regulator-fixed";
55		regulator-name = "vdd-usb5v0";
56		regulator-min-microvolt = <5000000>;
57		regulator-max-microvolt = <5000000>;
58		regulator-always-on;
59		regulator-boot-on;
60	};
61};
62
63&dss {
64	pinctrl-names = "default";
65	pinctrl-0 = <&main_oldi0_pins_default>, <&main_dss0_pins_default>;
66};
67
68&dss_ports {
69	#address-cells = <1>;
70	#size-cells = <0>;
71
72	/* VP1: Output to OLDI */
73	port@0 {
74		reg = <0>;
75		#address-cells = <1>;
76		#size-cells = <0>;
77
78		dpi0_out0: endpoint@0 {
79			reg = <0>;
80			remote-endpoint = <&oldi_0_in>;
81		};
82
83		dpi0_out1: endpoint@1 {
84			reg = <1>;
85			remote-endpoint = <&oldi_1_in>;
86		};
87	};
88};
89
90&epwm0 {
91	status = "okay";
92};
93
94&main_i2c1 {
95	#address-cells = <1>;
96	#size-cells = <0>;
97
98	touchscreen@5d {
99		compatible = "goodix,gt928";
100		reg = <0x5d>;
101
102		pinctrl-names = "default";
103		pinctrl-0 = <&touch_screen_pins_default>;
104
105		interrupt-parent = <&main_gpio0>;
106		interrupts = <19 IRQ_TYPE_LEVEL_LOW>;
107
108		reset-gpios = <&main_gpio0 18 GPIO_ACTIVE_HIGH>;
109		irq-gpios = <&main_gpio0 19 GPIO_ACTIVE_HIGH>;
110	};
111};
112
113&main_pmx0 {
114	bl_pwm_pins_default: bl-pwm-default-pins {
115		pinctrl-single,pins = <
116			AM62X_IOPAD(0x01b8, PIN_INPUT, 2) /* (C13) SPI0_CS1.EHRPWM0_B */
117		>;
118	};
119
120	touch_screen_pins_default: touch-screen-default-pins {
121		pinctrl-single,pins = <
122			AM62X_IOPAD(0x048, PIN_OUTPUT, 7) /* (N25) GPMC0_AD3.GPIO0_18 - RST */
123			AM62X_IOPAD(0x04c, PIN_INPUT, 7) /* (P24) GPMC0_AD4.GPIO0_19 - INT */
124		>;
125	};
126
127	main_oldi0_pins_default: main-oldi0-default-pins {
128		pinctrl-single,pins = <
129			AM62X_IOPAD(0x0260, PIN_OUTPUT, 0) /* (AA5) OLDI0_A0N */
130			AM62X_IOPAD(0x025c, PIN_OUTPUT, 0) /* (Y6) OLDI0_A0P */
131			AM62X_IOPAD(0x0268, PIN_OUTPUT, 0) /* (AD3) OLDI0_A1N */
132			AM62X_IOPAD(0x0264, PIN_OUTPUT, 0) /* (AB4) OLDI0_A1P */
133			AM62X_IOPAD(0x0270, PIN_OUTPUT, 0) /* (Y8) OLDI0_A2N */
134			AM62X_IOPAD(0x026c, PIN_OUTPUT, 0) /* (AA8) OLDI0_A2P */
135			AM62X_IOPAD(0x0278, PIN_OUTPUT, 0) /* (AB6) OLDI0_A3N */
136			AM62X_IOPAD(0x0274, PIN_OUTPUT, 0) /* (AA7) OLDI0_A3P */
137			AM62X_IOPAD(0x0280, PIN_OUTPUT, 0) /* (AC6) OLDI0_A4N */
138			AM62X_IOPAD(0x027c, PIN_OUTPUT, 0) /* (AC5) OLDI0_A4P */
139			AM62X_IOPAD(0x0288, PIN_OUTPUT, 0) /* (AE5) OLDI0_A5N */
140			AM62X_IOPAD(0x0284, PIN_OUTPUT, 0) /* (AD6) OLDI0_A5P */
141			AM62X_IOPAD(0x0290, PIN_OUTPUT, 0) /* (AE6) OLDI0_A6N */
142			AM62X_IOPAD(0x028c, PIN_OUTPUT, 0) /* (AD7) OLDI0_A6P */
143			AM62X_IOPAD(0x0298, PIN_OUTPUT, 0) /* (AD8) OLDI0_A7N */
144			AM62X_IOPAD(0x0294, PIN_OUTPUT, 0) /* (AE7) OLDI0_A7P */
145			AM62X_IOPAD(0x02a0, PIN_OUTPUT, 0) /* (AD4) OLDI0_CLK0N */
146			AM62X_IOPAD(0x029c, PIN_OUTPUT, 0) /* (AE3) OLDI0_CLK0P */
147			AM62X_IOPAD(0x02a8, PIN_OUTPUT, 0) /* (AE4) OLDI0_CLK1N */
148			AM62X_IOPAD(0x02a4, PIN_OUTPUT, 0) /* (AD5) OLDI0_CLK1P */
149		>;
150	};
151};
152
153&oldi0 {
154	ti,companion-oldi = <&oldi1>;
155	status = "okay";
156};
157
158&oldi0_port0 {
159	oldi_0_in: endpoint {
160		remote-endpoint = <&dpi0_out0>;
161	};
162};
163
164&oldi0_port1 {
165	oldi_0_out: endpoint {
166		remote-endpoint = <&lcd_in0>;
167	};
168};
169
170&oldi1 {
171	ti,secondary-oldi;
172	status = "okay";
173};
174
175&oldi1_port0 {
176	oldi_1_in: endpoint {
177		remote-endpoint = <&dpi0_out1>;
178	};
179};
180
181&oldi1_port1 {
182	oldi_1_out: endpoint {
183		remote-endpoint = <&lcd_in1>;
184	};
185};
186