]> git.kernelconcepts.de Git - meta-kc-bsp.git/blob - recipes-kernel/linux/linux-karo-4.9.11/txbase/aclavis-lvds/txbase-aclavis-lvds.dtsi
fix machine definition substitution
[meta-kc-bsp.git] / recipes-kernel / linux / linux-karo-4.9.11 / txbase / aclavis-lvds / txbase-aclavis-lvds.dtsi
1 /*
2  * Copyright 2016 Lothar Waßmann <LW@KARO-electronics.de>
3  * Copyright 2016-2017 Oliver Wendt <OW@KARO-electronics.de>
4  * Copyright 2016 Michael Vyskocil <MV@KARO-electronics.de>
5  *
6  * This file is dual-licensed: you can use it either under the terms
7  * of the GPL or the X11 license, at your option. Note that this dual
8  * licensing only applies to this file, and not this project as a
9  * whole.
10  *
11  *  a) This file is free software; you can redistribute it and/or
12  *     modify it under the terms of the GNU General Public License
13  *     version 2 as published by the Free Software Foundation.
14  *
15  *     This file is distributed in the hope that it will be useful,
16  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
17  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  *     GNU General Public License for more details.
19  *
20  * Or, alternatively,
21  *
22  *  b) Permission is hereby granted, free of charge, to any person
23  *     obtaining a copy of this software and associated documentation
24  *     files (the "Software"), to deal in the Software without
25  *     restriction, including without limitation the rights to use,
26  *     copy, modify, merge, publish, distribute, sublicense, and/or
27  *     sell copies of the Software, and to permit persons to whom the
28  *     Software is furnished to do so, subject to the following
29  *     conditions:
30  *
31  *     The above copyright notice and this permission notice shall be
32  *     included in all copies or substantial portions of the Software.
33  *
34  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
35  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
36  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
38  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
39  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
40  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
41  *     OTHER DEALINGS IN THE SOFTWARE.
42  */
43
44 / {
45         aliases {
46                 backlight = &backlight0;
47                 backlight0 = &backlight0;
48                 /*
49                  * The node/alias 'display' is needed for U-Boot to be able to
50                  * show a logo/splash image at boot time. It needs to include
51                  * 'display-timings' as direct sub-node.
52                  */
53                 display = &lvds0;
54                 lvds0 = &lvds0;
55                 lvds1 = &lvds1;
56                 mxcfb0 = TX_LDB_FB1;
57                 mxcfb1 = TX_LDB_FB2;
58         };
59
60         backlight0: backlight0 {
61                 compatible = "pwm-backlight";
62                 pwms = <TX_PWM 0 500000>;
63                 power-supply = <&reg_lcd0_pwr>;
64                 enable-gpios = <TX_GPIO_PIN154 GPIO_ACTIVE_HIGH>;
65                 /*
66                 * a poor man's way to create a 1:1 relationship between
67                 * the PWM value and the actual duty cycle
68                 */
69                 brightness-levels = < 0  1  2  3  4  5  6  7  8  9
70                                      10 11 12 13 14 15 16 17 18 19
71                                      20 21 22 23 24 25 26 27 28 29
72                                      30 31 32 33 34 35 36 37 38 39
73                                      40 41 42 43 44 45 46 47 48 49
74                                      50 51 52 53 54 55 56 57 58 59
75                                      60 61 62 63 64 65 66 67 68 69
76                                      70 71 72 73 74 75 76 77 78 79
77                                      80 81 82 83 84 85 86 87 88 89
78                                      90 91 92 93 94 95 96 97 98 99
79                                     100>;
80                 default-brightness-level = <50>;
81                 status = "disabled";
82         };
83
84         leds {
85                 compatible = "gpio-leds";
86                 pinctrl-names = "default";
87                 pinctrl-0 = <&pinctrl_gpio_leds>;
88
89                 user_led: user {
90                         label = "Heartbeat";
91                         gpios = <TX_GPIO_PIN153 GPIO_ACTIVE_HIGH>;
92                         linux,default-trigger = "heartbeat";
93                 };
94         };
95
96         regulators {
97                 reg_lcd0_pwr: regulator-lcd0-power {
98                         compatible = "regulator-fixed";
99                         regulator-name = "LCD0 RESET";
100                         regulator-min-microvolt = <3300000>;
101                         regulator-max-microvolt = <3300000>;
102                         pinctrl-names = "default";
103                         pinctrl-0 = <&pinctrl_lcd0_pwr>;
104                         gpio = <TX_GPIO_PIN150 GPIO_ACTIVE_HIGH>;
105                         enable-active-high;
106                         regulator-boot-on;
107                         regulator-always-on;
108                 };
109         };
110 };
111
112 TX_CAN1 {
113         status = "okay";
114 };
115
116 TX_I2C {
117         status = "okay";
118
119         ds1339: rtc@68 {
120                 compatible = "dallas,ds1339";
121                 reg = <0x68>;
122         };
123 };
124
125 TX_LDB {
126 /*
127  * The node/alias 'display' is needed for U-Boot to be able to show a
128  * logo/splash image at boot time. It needs to include 'display-timings'
129  * as direct sub-node.
130  *
131  * Other naming is only needed for the NXP/Freescale non-mainline
132  * compliant/proprietary display driver in their Yocto 4.1 Kernel
133  * implementation.
134  */
135         lvds0: lvds-channel@0 {
136                 crtc = "ipu1-di0";
137                 fsl,data-mapping = "spwg";
138                 fsl,data-width = <24>;
139                 primary;
140                 status = "disabled";
141
142                 display-timings {
143                         /*
144                          * The naitive mode has to be named seperately between
145                          * lvds0 & lvds1, otherwise it will be overwritten.
146                          */
147                         native-mode = <&timing0>;
148                         timing0: ETML101001DKA {
149                                 clock-frequency = <0x043b5fc0>;
150                                 hactive = <0x00000500>;
151                                 vactive = <0x00000320>;
152                                 hback-porch = <0x00000032>;
153                                 hsync-len = <0x0000003c>;
154                                 hfront-porch = <0x00000032>;
155                                 vback-porch = <0x00000005>;
156                                 vsync-len = <0x0000000d>;
157                                 vfront-porch = <0x00000005>;
158                         };
159                 };
160         };
161
162         lvds1: lvds-channel@1 {
163                 crtc = "ipu1-di1";
164                 fsl,data-mapping = "spwg";
165                 fsl,data-width = <18>;
166                 status = "disabled";
167
168                 display-timings {
169                         /*
170                          * The naitive mode has to be named seperately between
171                          * lvds0 & lvds1, otherwise it will be overwritten.
172                          */
173                         native-mode = <&timing1>;
174                         timing1: ETML101001DKA {
175                                 clock-frequency = <0x043b5fc0>;
176                                 hactive = <0x00000500>;
177                                 vactive = <0x00000320>;
178                                 hback-porch = <0x00000032>;
179                                 hsync-len = <0x0000003c>;
180                                 hfront-porch = <0x00000032>;
181                                 vback-porch = <0x00000005>;
182                                 vsync-len = <0x0000000d>;
183                                 vfront-porch = <0x00000005>;
184                         };
185                 };
186         };
187 };
188
189 TX_LDB_FB1 {
190         status = "okay";
191 };
192
193 TX_LDB_FB2 {
194         status = "okay";
195 };
196
197 TX_PWM {
198         status = "okay";
199 };
200
201 TX_SD1 {
202         status = "okay";
203 };
204
205 TX_UART1 {
206         status = "okay";
207 };
208
209 TX_UART2 {
210         status = "okay";
211         fsl,uart-has-rtscts;
212         uart-has-rtscts;
213 };
214
215 TX_USBH {
216         status = "okay";
217 };
218
219 TX_USBOTG {
220         status = "okay";
221 };
222
223 &iomuxc {
224         tx6 {
225                 pinctrl_hog: hoggrp {
226                         fsl,pins = <
227                                 TX_GPIO_PAD148          /* OPTO IN */
228                                 TX_GPIO_PAD149          /* OPTO IN */
229                                 TX_GPIO_PAD151          /* OPTO OUT */
230                                 TX_GPIO_PAD152          /* OPTO OUT */
231                                 TX_GPIO_PAD154          /* Backlight enable */
232                         >;
233                 };
234
235                 pinctrl_gpio_leds: gpioledsgrp {
236                         fsl,pins = <
237                                 TX_GPIO_PAD153          /* LED Heartbeat */
238                         >;
239                 };
240
241                 pinctrl_lcd0_pwr: lcd0-pwrgrp {
242                         fsl,pins = <
243                                 TX_GPIO_PAD150          /* LCD Reset */
244                         >;
245                 };
246         };
247 };