blob: 77594546ef376826ab67282f0c71263a3a881bdd [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001/*
2 * Copyright 2017 Lothar Waßmann <LW@KARO-electronics.de>
3 *
4 * This file is dual-licensed: you can use it either under the terms
5 * of the GPL or the X11 license, at your option. Note that this dual
6 * licensing only applies to this file, and not this project as a
7 * whole.
8 *
9 * a) This file is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * version 2 as published by the Free Software Foundation.
12 *
13 * This file is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * Or, alternatively,
19 *
20 * b) Permission is hereby granted, free of charge, to any person
21 * obtaining a copy of this software and associated documentation
22 * files (the "Software"), to deal in the Software without
23 * restriction, including without limitation the rights to use,
24 * copy, modify, merge, publish, distribute, sublicense, and/or
25 * sell copies of the Software, and to permit persons to whom the
26 * Software is furnished to do so, subject to the following
27 * conditions:
28 *
29 * The above copyright notice and this permission notice shall be
30 * included in all copies or substantial portions of the Software.
31 *
32 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
33 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
34 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
35 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
36 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
37 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
38 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
39 * OTHER DEALINGS IN THE SOFTWARE.
40 */
41
42/ {
43 aliases {
44 display = &display;
45 };
46
47 backlight: backlight {
48 compatible = "pwm-backlight";
49 pwms = <&pwm2 0 500000 PWM_POLARITY_INVERTED>;
50 pinctrl-names = "default";
51 pinctrl-0 = <&pinctrl_lcd1_pwr>;
52 enable-gpios = <&gpio2 31 GPIO_ACTIVE_HIGH>;
53 power-supply = <&reg_3v3>;
Tom Rini53633a82024-02-29 12:33:36 -050054 /*
55 * a poor man's way to create a 1:1 relationship between
56 * the PWM value and the actual duty cycle
57 */
58 brightness-levels = < 0 1 2 3 4 5 6 7 8 9
59 10 11 12 13 14 15 16 17 18 19
60 20 21 22 23 24 25 26 27 28 29
61 30 31 32 33 34 35 36 37 38 39
62 40 41 42 43 44 45 46 47 48 49
63 50 51 52 53 54 55 56 57 58 59
64 60 61 62 63 64 65 66 67 68 69
65 70 71 72 73 74 75 76 77 78 79
66 80 81 82 83 84 85 86 87 88 89
67 90 91 92 93 94 95 96 97 98 99
68 100>;
69 default-brightness-level = <50>;
70 };
71
72 lcd_panel: lcd-panel {
73 compatible = "edt,etm0700g0dh6";
74 pinctrl-names = "default";
75 pinctrl-0 = <&pinctrl_lcd0_pwr>;
76 enable-gpios = <&gpio3 29 GPIO_ACTIVE_HIGH>;
77 power-supply = <&reg_3v3>;
78 backlight = <&backlight>;
79
80 port {
81 lcd_panel_in: endpoint {
82 remote-endpoint = <&lcd_out>;
83 };
84 };
85 };
86
87 display: disp0 {
88 compatible = "fsl,imx-parallel-display";
89 #address-cells = <1>;
90 #size-cells = <0>;
91 pinctrl-names = "default";
92 pinctrl-0 = <&pinctrl_disp0_1>;
93 status = "okay";
94
95 port@0 {
96 reg = <0>;
97
98 lcd_in: endpoint {
99 remote-endpoint = <&ipu1_di0_disp0>;
100 };
101 };
102
103 port@1 {
104 reg = <1>;
105
106 lcd_out: endpoint {
107 remote-endpoint = <&lcd_panel_in>;
108 };
109 };
110
111 display-timings {
Tom Rini6b642ac2024-10-01 12:20:28 -0600112 timing-vga {
Tom Rini53633a82024-02-29 12:33:36 -0500113 clock-frequency = <25200000>;
114 hactive = <640>;
115 vactive = <480>;
116 hback-porch = <48>;
117 hsync-len = <96>;
118 hfront-porch = <16>;
119 vback-porch = <31>;
120 vsync-len = <2>;
121 vfront-porch = <12>;
122 hsync-active = <0>;
123 vsync-active = <0>;
124 de-active = <1>;
125 pixelclk-active = <0>;
126 };
127
Tom Rini6b642ac2024-10-01 12:20:28 -0600128 timing-etv570 {
Tom Rini53633a82024-02-29 12:33:36 -0500129 clock-frequency = <25200000>;
130 hactive = <640>;
131 vactive = <480>;
132 hback-porch = <114>;
133 hsync-len = <30>;
134 hfront-porch = <16>;
135 vback-porch = <32>;
136 vsync-len = <3>;
137 vfront-porch = <10>;
138 hsync-active = <0>;
139 vsync-active = <0>;
140 de-active = <1>;
141 pixelclk-active = <0>;
142 };
143
Tom Rini6b642ac2024-10-01 12:20:28 -0600144 timing-et0350 {
Tom Rini53633a82024-02-29 12:33:36 -0500145 clock-frequency = <6413760>;
146 hactive = <320>;
147 vactive = <240>;
148 hback-porch = <34>;
149 hsync-len = <34>;
150 hfront-porch = <20>;
151 vback-porch = <15>;
152 vsync-len = <3>;
153 vfront-porch = <4>;
154 hsync-active = <0>;
155 vsync-active = <0>;
156 de-active = <1>;
157 pixelclk-active = <0>;
158 };
159
Tom Rini6b642ac2024-10-01 12:20:28 -0600160 timing-et0430 {
Tom Rini53633a82024-02-29 12:33:36 -0500161 clock-frequency = <9009000>;
162 hactive = <480>;
163 vactive = <272>;
164 hback-porch = <2>;
165 hsync-len = <41>;
166 hfront-porch = <2>;
167 vback-porch = <2>;
168 vsync-len = <10>;
169 vfront-porch = <2>;
170 hsync-active = <0>;
171 vsync-active = <0>;
172 de-active = <1>;
173 pixelclk-active = <1>;
174 };
175
Tom Rini6b642ac2024-10-01 12:20:28 -0600176 timing-et0500 {
Tom Rini53633a82024-02-29 12:33:36 -0500177 clock-frequency = <33264000>;
178 hactive = <800>;
179 vactive = <480>;
180 hback-porch = <88>;
181 hsync-len = <128>;
182 hfront-porch = <40>;
183 vback-porch = <33>;
184 vsync-len = <2>;
185 vfront-porch = <10>;
186 hsync-active = <0>;
187 vsync-active = <0>;
188 de-active = <1>;
189 pixelclk-active = <0>;
190 };
191
Tom Rini6b642ac2024-10-01 12:20:28 -0600192 timing-et0700 { /* same as ET0500 */
Tom Rini53633a82024-02-29 12:33:36 -0500193 clock-frequency = <33264000>;
194 hactive = <800>;
195 vactive = <480>;
196 hback-porch = <88>;
197 hsync-len = <128>;
198 hfront-porch = <40>;
199 vback-porch = <33>;
200 vsync-len = <2>;
201 vfront-porch = <10>;
202 hsync-active = <0>;
203 vsync-active = <0>;
204 de-active = <1>;
205 pixelclk-active = <0>;
206 };
207
Tom Rini6b642ac2024-10-01 12:20:28 -0600208 timing-etq570 {
Tom Rini53633a82024-02-29 12:33:36 -0500209 clock-frequency = <6596040>;
210 hactive = <320>;
211 vactive = <240>;
212 hback-porch = <38>;
213 hsync-len = <30>;
214 hfront-porch = <30>;
215 vback-porch = <16>;
216 vsync-len = <3>;
217 vfront-porch = <4>;
218 hsync-active = <0>;
219 vsync-active = <0>;
220 de-active = <1>;
221 pixelclk-active = <0>;
222 };
223
Tom Rini6b642ac2024-10-01 12:20:28 -0600224 timing-comtft { /* same as ET0700 but with inverted pixel clock */
Tom Rini53633a82024-02-29 12:33:36 -0500225 clock-frequency = <33264000>;
226 hactive = <800>;
227 vactive = <480>;
228 hback-porch = <88>;
229 hsync-len = <128>;
230 hfront-porch = <40>;
231 vback-porch = <33>;
232 vsync-len = <2>;
233 vfront-porch = <10>;
234 hsync-active = <0>;
235 vsync-active = <0>;
236 de-active = <1>;
237 pixelclk-active = <1>;
238 };
239 };
240 };
241};
242
243&ipu1_di0_disp0 {
244 remote-endpoint = <&lcd_in>;
245};