]> git.kernelconcepts.de Git - meta-kc-bsp.git/blob - recipes-kernel/linux/linux-karo-4.9.11/txbase/mb7/txbase-mb7.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 / txbase-mb7.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 = TX_LCD;
69                 mxcfb0 = TX_LCD_FB;
70         };
71
72         backlight0: backlight0 {
73                 compatible = "pwm-backlight";
74                 pwms = <TX_PWM 0 500000>;
75                 power-supply = <&reg_lcd0_pwr>;
76                 /*
77                 * a poor man's way to create a 1:1 relationship between
78                 * the PWM value and the actual duty cycle
79                 */
80                 brightness-levels = < 0  1  2  3  4  5  6  7  8  9
81                                      10 11 12 13 14 15 16 17 18 19
82                                      20 21 22 23 24 25 26 27 28 29
83                                      30 31 32 33 34 35 36 37 38 39
84                                      40 41 42 43 44 45 46 47 48 49
85                                      50 51 52 53 54 55 56 57 58 59
86                                      60 61 62 63 64 65 66 67 68 69
87                                      70 71 72 73 74 75 76 77 78 79
88                                      80 81 82 83 84 85 86 87 88 89
89                                      90 91 92 93 94 95 96 97 98 99
90                                     100>;
91                 default-brightness-level = <50>;
92                 status = "disabled";
93         };
94
95         leds {
96                 compatible = "gpio-leds";
97                 pinctrl-names = "default";
98                 pinctrl-0 = <&pinctrl_gpio_leds>;
99
100                 user_led: user {
101                         label = "Heartbeat";
102                         gpios = <TX_GPIO_PIN153 GPIO_ACTIVE_HIGH>;
103                         linux,default-trigger = "heartbeat";
104                 };
105         };
106
107         regulators {
108                 reg_2v5: regulator {
109                         compatible = "regulator-fixed";
110                         reg = <1>;
111                         regulator-name = "2V5";
112                         regulator-min-microvolt = <2500000>;
113                         regulator-max-microvolt = <2500000>;
114                         regulator-always-on;
115                 };
116
117                 reg_3v3: regulator {
118                         compatible = "regulator-fixed";
119                         reg = <2>;
120                         regulator-name = "3V3";
121                         regulator-min-microvolt = <3300000>;
122                         regulator-max-microvolt = <3300000>;
123                         regulator-always-on;
124                 };
125
126                 reg_lcd0_pwr: regulator-lcd-power {
127                         compatible = "regulator-fixed";
128                         regulator-name = "LCD0 RESET";
129                         regulator-min-microvolt = <3300000>;
130                         regulator-max-microvolt = <3300000>;
131                         pinctrl-names = "default";
132                         pinctrl-0 = <&pinctrl_lcd0_pwr>;
133                         gpio = <TX_GPIO_PIN150 GPIO_ACTIVE_HIGH>;
134                         enable-active-high;
135                         regulator-boot-on;
136                         regulator-always-on;
137                 };
138         };
139
140         sound {
141                 compatible = "fsl,imx-audio-sgtl5000";
142                 model = "sgtl5000-audio";
143                 pinctrl-names = "default";
144                 pinctrl-0 = <TX_SSI_PIN>;
145                 ssi-controller = <&ssi1>;
146                 audio-codec = <&sgtl5000>;
147                 audio-routing =
148                         "MIC_IN", "Mic Jack",
149                         "Mic Jack", "Mic Bias",
150                         "Headphone Jack", "HP_OUT";
151                 mux-int-port = <1>;
152                 mux-ext-port = <5>;
153                 status = "okay";
154         };
155 };
156
157 TX_CAN1 {
158         status = "okay";
159 };
160
161 TX_I2C {
162         status = "okay";
163
164         sgtl5000: sgtl5000@0a {
165                 compatible = "fsl,sgtl5000";
166                 reg = <0x0a>;
167                 VDDA-supply = <&reg_2v5>;
168                 VDDIO-supply = <&reg_3v3>;
169                 clocks = <&mclk>;
170         };
171
172         polytouch: edt-ft5x06@38 {
173                 compatible = "edt,edt-ft5x06";
174                 reg = <0x38>;
175                 pinctrl-names = "default";
176                 pinctrl-0 = <&pinctrl_edt_ft5x06>;
177                 interrupts-extended = <TX_GPIO_PIN148 0>;
178                 reset-gpios = <TX_GPIO_PIN149 GPIO_ACTIVE_LOW>;
179                 wake-gpios = <TX_GPIO_PIN152 GPIO_ACTIVE_HIGH>;
180                 linux,wakeup;
181         };
182 };
183
184 TX_LCD {
185 /*
186  * The node/alias 'display' is needed for U-Boot to be able to show a
187  * logo/splash image at boot time. It needs to include 'display-timings'
188  * as direct sub-node.
189  *
190  * Other naming is only needed for the NXP/Freescale non-mainline
191  * compliant/proprietary display driver in their Yocto 4.1 Kernel
192  * implementation.
193  */
194         compatible = "fsl,lcd";
195         ipu_id = <0>;
196         disp_id = <0>;
197         default_ifmt = "RGB565";
198         pinctrl-names = "default";
199         pinctrl-0 = <&pinctrl_ipu1>;
200         status = "disabled";
201         display-timings {
202                 VGA {
203                         clock-frequency = <25200000>;
204                         hactive = <640>;
205                         vactive = <480>;
206                         hback-porch = <48>;
207                         hsync-len = <96>;
208                         hfront-porch = <16>;
209                         vback-porch = <31>;
210                         vsync-len = <2>;
211                         vfront-porch = <12>;
212                         hsync-active = <0>;
213                         vsync-active = <0>;
214                         de-active = <1>;
215                         pixelclk-active = <0>;
216                 };
217
218                 ETV570 {
219                         clock-frequency = <25200000>;
220                         hactive = <640>;
221                         vactive = <480>;
222                         hback-porch = <114>;
223                         hsync-len = <30>;
224                         hfront-porch = <16>;
225                         vback-porch = <32>;
226                         vsync-len = <3>;
227                         vfront-porch = <10>;
228                         hsync-active = <0>;
229                         vsync-active = <0>;
230                         de-active = <1>;
231                         pixelclk-active = <0>;
232                 };
233
234                 ET0350 {
235                         clock-frequency = <6413760>;
236                         hactive = <320>;
237                         vactive = <240>;
238                         hback-porch = <34>;
239                         hsync-len = <34>;
240                         hfront-porch = <20>;
241                         vback-porch = <15>;
242                         vsync-len = <3>;
243                         vfront-porch = <4>;
244                         hsync-active = <0>;
245                         vsync-active = <0>;
246                         de-active = <1>;
247                         pixelclk-active = <0>;
248                 };
249
250                 ET0430 {
251                         clock-frequency = <9009000>;
252                         hactive = <480>;
253                         vactive = <272>;
254                         hback-porch = <2>;
255                         hsync-len = <41>;
256                         hfront-porch = <2>;
257                         vback-porch = <2>;
258                         vsync-len = <10>;
259                         vfront-porch = <2>;
260                         hsync-active = <0>;
261                         vsync-active = <0>;
262                         de-active = <1>;
263                         pixelclk-active = <1>;
264                 };
265
266                 ET0500 {
267                         clock-frequency = <33264000>;
268                         hactive = <800>;
269                         vactive = <480>;
270                         hback-porch = <88>;
271                         hsync-len = <128>;
272                         hfront-porch = <40>;
273                         vback-porch = <33>;
274                         vsync-len = <2>;
275                         vfront-porch = <10>;
276                         hsync-active = <0>;
277                         vsync-active = <0>;
278                         de-active = <1>;
279                         pixelclk-active = <0>;
280                 };
281
282                 ET0700 { /* same as ET0500 */
283                         clock-frequency = <33264000>;
284                         hactive = <800>;
285                         vactive = <480>;
286                         hback-porch = <88>;
287                         hsync-len = <128>;
288                         hfront-porch = <40>;
289                         vback-porch = <33>;
290                         vsync-len = <2>;
291                         vfront-porch = <10>;
292                         hsync-active = <0>;
293                         vsync-active = <0>;
294                         de-active = <1>;
295                         pixelclk-active = <0>;
296                 };
297
298                 ETQ570 {
299                         clock-frequency = <6596040>;
300                         hactive = <320>;
301                         vactive = <240>;
302                         hback-porch = <38>;
303                         hsync-len = <30>;
304                         hfront-porch = <30>;
305                         vback-porch = <16>;
306                         vsync-len = <3>;
307                         vfront-porch = <4>;
308                         hsync-active = <0>;
309                         vsync-active = <0>;
310                         de-active = <1>;
311                         pixelclk-active = <0>;
312                 };
313         };
314 };
315
316 TX_LCD_FB {
317         compatible = "fsl,mxc_sdc_fb";
318         disp_dev = "lcd";
319         interface_pix_fmt = "RGB24";
320         default_bpp = <16>;
321         int_clk = <0>;
322         late_init = <0>;
323         status = "disabled";
324 };
325
326 TX_PWM {
327         status = "okay";
328 };
329
330 TX_SD1 {
331         status = "okay";
332 };
333
334 TX_SSI1 {
335         status = "okay";
336 };
337
338 TX_UART1 {
339         status = "okay";
340 };
341
342 TX_UART2 {
343         status = "okay";
344         fsl,uart-has-rtscts;
345         uart-has-rtscts;
346 };
347
348 TX_UART3 {
349         status = "okay";
350 };
351
352 TX_USBH {
353         status = "okay";
354 };
355
356 TX_USBOTG {
357         status = "okay";
358 };
359
360 &iomuxc {
361         tx6 {
362                 pinctrl_edt_ft5x06: edt-ft5x06grp {
363                         fsl,pins = <
364                                 TX_GPIO_PAD148          /* Interrupt */
365                                 TX_GPIO_PAD149          /* Reset */
366                                 TX_GPIO_PAD152          /* Wake */
367                         >;
368                 };
369
370                 pinctrl_gpio_leds: gpioledsgrp {
371                         fsl,pins = <
372                                 TX_GPIO_PAD153          /* LED Heartbeat */
373                         >;
374                 };
375
376                 pinctrl_lcd0_pwr: lcd0-pwrgrp {
377                         fsl,pins = <
378                                 TX_GPIO_PAD150          /* LCD Reset */
379                         >;
380                 };
381         };
382 };