Merge tag 'linux-cpupower-4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / imx6qdl-tx6-lcd.dtsi
1 /*
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>;
54                 turn-on-delay-ms = <35>;
55                 /*
56                  * a poor man's way to create a 1:1 relationship between
57                  * the PWM value and the actual duty cycle
58                  */
59                 brightness-levels = < 0  1  2  3  4  5  6  7  8  9
60                                      10 11 12 13 14 15 16 17 18 19
61                                      20 21 22 23 24 25 26 27 28 29
62                                      30 31 32 33 34 35 36 37 38 39
63                                      40 41 42 43 44 45 46 47 48 49
64                                      50 51 52 53 54 55 56 57 58 59
65                                      60 61 62 63 64 65 66 67 68 69
66                                      70 71 72 73 74 75 76 77 78 79
67                                      80 81 82 83 84 85 86 87 88 89
68                                      90 91 92 93 94 95 96 97 98 99
69                                     100>;
70                 default-brightness-level = <50>;
71         };
72
73         lcd_panel: lcd-panel {
74                 compatible = "edt,etm0700g0dh6";
75                 pinctrl-names = "default";
76                 pinctrl-0 = <&pinctrl_lcd0_pwr>;
77                 enable-gpios = <&gpio3 29 GPIO_ACTIVE_HIGH>;
78                 power-supply = <&reg_3v3>;
79                 backlight = <&backlight>;
80                 bus-format-override = "rgb24";
81
82                 port {
83                         lcd_panel_in: endpoint {
84                                 remote-endpoint = <&lcd_out>;
85                         };
86                 };
87         };
88
89         display: disp0 {
90                 compatible = "fsl,imx-parallel-display";
91                 #address-cells = <1>;
92                 #size-cells = <0>;
93                 pinctrl-names = "default";
94                 pinctrl-0 = <&pinctrl_disp0_1>;
95                 status = "okay";
96
97                 port@0 {
98                         reg = <0>;
99
100                         lcd_in: endpoint {
101                                 remote-endpoint = <&ipu1_di0_disp0>;
102                         };
103                 };
104
105                 port@1 {
106                         reg = <1>;
107
108                         lcd_out: endpoint {
109                                 remote-endpoint = <&lcd_panel_in>;
110                         };
111                 };
112
113                 display-timings {
114                         VGA {
115                                 clock-frequency = <25200000>;
116                                 hactive = <640>;
117                                 vactive = <480>;
118                                 hback-porch = <48>;
119                                 hsync-len = <96>;
120                                 hfront-porch = <16>;
121                                 vback-porch = <31>;
122                                 vsync-len = <2>;
123                                 vfront-porch = <12>;
124                                 hsync-active = <0>;
125                                 vsync-active = <0>;
126                                 de-active = <1>;
127                                 pixelclk-active = <0>;
128                         };
129
130                         ETV570 {
131                                 u-boot,panel-name = "edt,et057090dhu";
132                                 clock-frequency = <25200000>;
133                                 hactive = <640>;
134                                 vactive = <480>;
135                                 hback-porch = <114>;
136                                 hsync-len = <30>;
137                                 hfront-porch = <16>;
138                                 vback-porch = <32>;
139                                 vsync-len = <3>;
140                                 vfront-porch = <10>;
141                                 hsync-active = <0>;
142                                 vsync-active = <0>;
143                                 de-active = <1>;
144                                 pixelclk-active = <0>;
145                         };
146
147                         ET0350 {
148                                 u-boot,panel-name = "edt,et0350g0dh6";
149                                 clock-frequency = <6413760>;
150                                 hactive = <320>;
151                                 vactive = <240>;
152                                 hback-porch = <34>;
153                                 hsync-len = <34>;
154                                 hfront-porch = <20>;
155                                 vback-porch = <15>;
156                                 vsync-len = <3>;
157                                 vfront-porch = <4>;
158                                 hsync-active = <0>;
159                                 vsync-active = <0>;
160                                 de-active = <1>;
161                                 pixelclk-active = <0>;
162                         };
163
164                         ET0430 {
165                                 u-boot,panel-name = "edt,et0430g0dh6";
166                                 clock-frequency = <9009000>;
167                                 hactive = <480>;
168                                 vactive = <272>;
169                                 hback-porch = <2>;
170                                 hsync-len = <41>;
171                                 hfront-porch = <2>;
172                                 vback-porch = <2>;
173                                 vsync-len = <10>;
174                                 vfront-porch = <2>;
175                                 hsync-active = <0>;
176                                 vsync-active = <0>;
177                                 de-active = <1>;
178                                 pixelclk-active = <1>;
179                         };
180
181                         ET0500 {
182                                 clock-frequency = <33264000>;
183                                 hactive = <800>;
184                                 vactive = <480>;
185                                 hback-porch = <88>;
186                                 hsync-len = <128>;
187                                 hfront-porch = <40>;
188                                 vback-porch = <33>;
189                                 vsync-len = <2>;
190                                 vfront-porch = <10>;
191                                 hsync-active = <0>;
192                                 vsync-active = <0>;
193                                 de-active = <1>;
194                                 pixelclk-active = <0>;
195                         };
196
197                         ET0700 { /* same as ET0500 */
198                                 u-boot,panel-name = "edt,etm0700g0dh6";
199                                 clock-frequency = <33264000>;
200                                 hactive = <800>;
201                                 vactive = <480>;
202                                 hback-porch = <88>;
203                                 hsync-len = <128>;
204                                 hfront-porch = <40>;
205                                 vback-porch = <33>;
206                                 vsync-len = <2>;
207                                 vfront-porch = <10>;
208                                 hsync-active = <0>;
209                                 vsync-active = <0>;
210                                 de-active = <1>;
211                                 pixelclk-active = <0>;
212                         };
213
214                         ETQ570 {
215                                 clock-frequency = <6596040>;
216                                 hactive = <320>;
217                                 vactive = <240>;
218                                 hback-porch = <38>;
219                                 hsync-len = <30>;
220                                 hfront-porch = <30>;
221                                 vback-porch = <16>;
222                                 vsync-len = <3>;
223                                 vfront-porch = <4>;
224                                 hsync-active = <0>;
225                                 vsync-active = <0>;
226                                 de-active = <1>;
227                                 pixelclk-active = <0>;
228                         };
229
230                         CoMTFT { /* same as ET0700 but with inverted pixel clock */
231                                 u-boot,panel-name = "edt,etm0700g0edh6";
232                                 clock-frequency = <33264000>;
233                                 hactive = <800>;
234                                 vactive = <480>;
235                                 hback-porch = <88>;
236                                 hsync-len = <128>;
237                                 hfront-porch = <40>;
238                                 vback-porch = <33>;
239                                 vsync-len = <2>;
240                                 vfront-porch = <10>;
241                                 hsync-active = <0>;
242                                 vsync-active = <0>;
243                                 de-active = <1>;
244                                 pixelclk-active = <1>;
245                         };
246                 };
247         };
248 };
249
250 &ipu1_di0_disp0 {
251         remote-endpoint = <&lcd_in>;
252 };