]> git.kernelconcepts.de Git - meta-kc-bsp.git/blob - recipes-kernel/linux/linux-karo-4.9.11/txbase/mb7-lvds/txbase-mb7-lvds.dtsi
linux-karo: Add initial version of linux-karo 4.9.11 based on NXP kernel tree
[meta-kc-bsp.git] / recipes-kernel / linux / linux-karo-4.9.11 / txbase / mb7-lvds / txbase-mb7-lvds.dtsi
1 /*
2  * Copyright 2016 Lothar Waßmann <LW@KARO-electronics.de>
3  * Copyright 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  * Please be reminded that in general DTSI file(s) are include files that are
46  * for more than one purpose (usually bound to a SoC) and as such shouldn't be
47  * edited. For end-user products it should be the DTS file(s) that choose which
48  * devices and pins are active and setup.
49  *
50  * The setup of DT files for Ka-Ro TX COM Modules under Yocto follow a
51  * different, non-standard, implementation, which can make it necessary.
52  */
53
54 /*
55  * Please see the imx6*-tx6-gpio.h && imx6*-tx6.dtsi in "linux-karo-x.y.ab/tx6"
56  * for the definitions like TX_NAND or TX_EMMC, etc.
57  */
58
59 / {
60         aliases {
61                 backlight = &backlight0;
62                 backlight0 = &backlight0;
63                 /*
64                 * The node/alias 'display' is needed for U-Boot to be able to
65                 * show a logo/splash image at boot time. It needs to include
66                 * 'display-timings' as direct sub-node.
67                 */
68                 display = &lvds0;
69                 lvds0 = &lvds0;
70                 lvds1 = &lvds1;
71                 mxcfb0 = TX_LDB_FB1;
72                 mxcfb1 = TX_LDB_FB2;
73         };
74
75         backlight0: backlight0 {
76                 compatible = "pwm-backlight";
77                 pwms = <TX_PWM 0 500000>;
78                 power-supply = <&reg_lcd0_pwr>;
79                 /*
80                 * a poor man's way to create a 1:1 relationship between
81                 * the PWM value and the actual duty cycle
82                 */
83                 brightness-levels = < 0  1  2  3  4  5  6  7  8  9
84                                      10 11 12 13 14 15 16 17 18 19
85                                      20 21 22 23 24 25 26 27 28 29
86                                      30 31 32 33 34 35 36 37 38 39
87                                      40 41 42 43 44 45 46 47 48 49
88                                      50 51 52 53 54 55 56 57 58 59
89                                      60 61 62 63 64 65 66 67 68 69
90                                      70 71 72 73 74 75 76 77 78 79
91                                      80 81 82 83 84 85 86 87 88 89
92                                      90 91 92 93 94 95 96 97 98 99
93                                     100>;
94                 default-brightness-level = <50>;
95                 status = "disabled";
96         };
97
98         leds {
99                 compatible = "gpio-leds";
100                 pinctrl-names = "default";
101                 pinctrl-0 = <&pinctrl_gpio_leds>;
102
103                 user_led: user {
104                         label = "Heartbeat";
105                         gpios = <TX_GPIO_PIN153 GPIO_ACTIVE_HIGH>;
106                         linux,default-trigger = "heartbeat";
107                 };
108         };
109
110         regulators {
111                 reg_2v5: regulator {
112                         compatible = "regulator-fixed";
113                         reg = <1>;
114                         regulator-name = "2V5";
115                         regulator-min-microvolt = <2500000>;
116                         regulator-max-microvolt = <2500000>;
117                         regulator-always-on;
118                 };
119
120                 reg_3v3: regulator {
121                         compatible = "regulator-fixed";
122                         reg = <2>;
123                         regulator-name = "3V3";
124                         regulator-min-microvolt = <3300000>;
125                         regulator-max-microvolt = <3300000>;
126                         regulator-always-on;
127                 };
128
129                 reg_lcd0_pwr: regulator-lcd0-power {
130                         compatible = "regulator-fixed";
131                         regulator-name = "LCD0 RESET";
132                         regulator-min-microvolt = <3300000>;
133                         regulator-max-microvolt = <3300000>;
134                         pinctrl-names = "default";
135                         pinctrl-0 = <&pinctrl_lcd0_pwr>;
136                         gpio = <TX_GPIO_PIN150 GPIO_ACTIVE_HIGH>;
137                         enable-active-high;
138                         regulator-boot-on;
139                         regulator-always-on;
140                 };
141         };
142
143         sound {
144                 compatible = "fsl,imx-audio-sgtl5000";
145                 model = "sgtl5000-audio";
146                 pinctrl-names = "default";
147                 pinctrl-0 = <TX_SSI_PIN>;
148                 ssi-controller = <&ssi1>;
149                 audio-codec = <&sgtl5000>;
150                 audio-routing =
151                         "MIC_IN", "Mic Jack",
152                         "Mic Jack", "Mic Bias",
153                         "Headphone Jack", "HP_OUT";
154                 mux-int-port = <1>;
155                 mux-ext-port = <5>;
156         };
157 };
158
159 TX_CAN1 {
160         status = "okay";
161 };
162
163 TX_I2C {
164         status = "okay";
165
166         sgtl5000: sgtl5000@0a {
167                 compatible = "fsl,sgtl5000";
168                 reg = <0x0a>;
169                 VDDA-supply = <&reg_2v5>;
170                 VDDIO-supply = <&reg_3v3>;
171                 clocks = <&mclk>;
172         };
173 };
174
175 TX_LDB {
176 /*
177  * The node/alias 'display' is needed for U-Boot to be able to show a
178  * logo/splash image at boot time. It needs to include 'display-timings'
179  * as direct sub-node.
180  *
181  * Other naming is only needed for the NXP/Freescale non-mainline
182  * compliant/proprietary display driver in their Yocto 4.1 Kernel
183  * implementation.
184  */
185         lvds0: lvds-channel@0 {
186                 crtc = "ipu1-di0";
187                 fsl,data-mapping = "spwg";
188                 fsl,data-width = <18>;
189                 primary;
190                 status = "disabled";
191
192                 display-timings {
193                         /*
194                          * The naitive mode has to be named seperately between
195                          * lvds0 & lvds1, otherwise it will be overwritten.
196                          */
197                         native-mode = <&timing0>;
198                         timing0: hsd100pxn1 {
199                                 clock-frequency = <65000000>;
200                                 hactive = <1024>;
201                                 vactive = <768>;
202                                 hback-porch = <220>;
203                                 hfront-porch = <40>;
204                                 vback-porch = <21>;
205                                 vfront-porch = <7>;
206                                 hsync-len = <60>;
207                                 vsync-len = <10>;
208                         };
209                 };
210         };
211
212         lvds1: lvds-channel@1 {
213                 crtc = "ipu1-di1";
214                 fsl,data-mapping = "spwg";
215                 fsl,data-width = <18>;
216                 status = "disabled";
217
218                 display-timings {
219                         /*
220                          * The naitive mode has to be named seperately between
221                          * lvds0 & lvds1, otherwise it will be overwritten.
222                          */
223                         native-mode = <&timing1>;
224                         timing1: hsd100pxn1 {
225                                 clock-frequency = <65000000>;
226                                 hactive = <1024>;
227                                 vactive = <768>;
228                                 hback-porch = <220>;
229                                 hfront-porch = <40>;
230                                 vback-porch = <21>;
231                                 vfront-porch = <7>;
232                                 hsync-len = <60>;
233                                 vsync-len = <10>;
234                         };
235                 };
236         };
237 };
238
239 TX_LDB_FB1 {
240         status = "okay";
241 };
242
243 TX_LDB_FB2 {
244         status = "okay";
245 };
246
247 TX_PWM {
248         status = "okay";
249 };
250
251 TX_SD1 {
252         status = "okay";
253 };
254
255 TX_SSI1 {
256         status = "okay";
257 };
258
259 TX_UART1 {
260         status = "okay";
261 };
262
263 TX_UART2 {
264         status = "okay";
265         fsl,uart-has-rtscts;
266         uart-has-rtscts;
267 };
268
269 TX_UART3 {
270         status = "okay";
271 };
272
273 TX_USBH {
274         status = "okay";
275 };
276
277 TX_USBOTG {
278         status = "okay";
279 };
280
281 &iomuxc {
282         tx6 {
283                 pinctrl_gpio_leds: gpioledsgrp {
284                         fsl,pins = <
285                                 TX_GPIO_PAD153          /* LED Heartbeat */
286                         >;
287                 };
288
289                 pinctrl_lcd0_pwr: lcd0-pwrgrp {
290                         fsl,pins = <
291                                 TX_GPIO_PAD150          /* LCD Reset */
292                         >;
293                 };
294         };
295 };