Merge tag 'ux500-dt-v3.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / imx28-tx28.dts
1 /*
2  * Copyright 2012 Shawn Guo <shawn.guo@linaro.org>
3  * Copyright 2013 Lothar Waßmann <LW@KARO-electronics.de>
4  *
5  * The code contained herein is licensed under the GNU General Public
6  * License. You may obtain a copy of the GNU General Public License
7  * Version 2 at the following locations:
8  *
9  * http://www.opensource.org/licenses/gpl-license.html
10  * http://www.gnu.org/copyleft/gpl.html
11  */
12
13 /dts-v1/;
14 #include "imx28.dtsi"
15 #include <dt-bindings/gpio/gpio.h>
16
17 / {
18         model = "Ka-Ro electronics TX28 module";
19         compatible = "karo,tx28", "fsl,imx28";
20
21         aliases {
22                 can0 = &can0;
23                 can1 = &can1;
24                 display = &display;
25                 ds1339 = &ds1339;
26                 gpio5 = &gpio5;
27                 lcdif = &lcdif;
28                 lcdif_23bit_pins = &tx28_lcdif_23bit_pins;
29                 lcdif_24bit_pins = &lcdif_24bit_pins_a;
30                 stk5led = &user_led;
31                 usbotg = &usb0;
32         };
33
34         memory {
35                 reg = <0 0>; /* will be filled in by U-Boot */
36         };
37
38         onewire {
39                 compatible = "w1-gpio";
40                 gpios = <&gpio2 7 0>;
41                 status = "disabled";
42         };
43
44         regulators {
45                 compatible = "simple-bus";
46                 #address-cells = <1>;
47                 #size-cells = <0>;
48
49                 reg_usb0_vbus: regulator@0 {
50                         compatible = "regulator-fixed";
51                         reg = <0>;
52                         regulator-name = "usb0_vbus";
53                         regulator-min-microvolt = <5000000>;
54                         regulator-max-microvolt = <5000000>;
55                         gpio = <&gpio0 18 0>;
56                         enable-active-high;
57                 };
58
59                 reg_usb1_vbus: regulator@1 {
60                         compatible = "regulator-fixed";
61                         reg = <1>;
62                         regulator-name = "usb1_vbus";
63                         regulator-min-microvolt = <5000000>;
64                         regulator-max-microvolt = <5000000>;
65                         gpio = <&gpio3 27 0>;
66                         enable-active-high;
67                 };
68
69                 reg_2p5v: regulator@2 {
70                         compatible = "regulator-fixed";
71                         reg = <2>;
72                         regulator-name = "2P5V";
73                         regulator-min-microvolt = <2500000>;
74                         regulator-max-microvolt = <2500000>;
75                         regulator-always-on;
76                 };
77
78                 reg_3p3v: regulator@3 {
79                         compatible = "regulator-fixed";
80                         reg = <3>;
81                         regulator-name = "3P3V";
82                         regulator-min-microvolt = <3300000>;
83                         regulator-max-microvolt = <3300000>;
84                         regulator-always-on;
85                 };
86
87                 reg_can_xcvr: regulator@4 {
88                         compatible = "regulator-fixed";
89                         reg = <4>;
90                         regulator-name = "CAN XCVR";
91                         regulator-min-microvolt = <3300000>;
92                         regulator-max-microvolt = <3300000>;
93                         gpio = <&gpio1 0 0>;
94                         enable-active-low;
95                         pinctrl-names = "default";
96                         pinctrl-0 = <&tx28_flexcan_xcvr_pins>;
97                 };
98
99                 reg_lcd: regulator@5 {
100                         compatible = "regulator-fixed";
101                         reg = <5>;
102                         regulator-name = "LCD POWER";
103                         regulator-min-microvolt = <3300000>;
104                         regulator-max-microvolt = <3300000>;
105                         gpio = <&gpio1 31 0>;
106                         enable-active-high;
107                 };
108
109                 reg_lcd_reset: regulator@6 {
110                         compatible = "regulator-fixed";
111                         reg = <6>;
112                         regulator-name = "LCD RESET";
113                         regulator-min-microvolt = <3300000>;
114                         regulator-max-microvolt = <3300000>;
115                         gpio = <&gpio3 30 0>;
116                         startup-delay-us = <300000>;
117                         enable-active-high;
118                         regulator-always-on;
119                         regulator-boot-on;
120                 };
121         };
122
123         clocks {
124                 #address-cells = <1>;
125                 #size-cells = <0>;
126                 mclk: clock@0 {
127                         compatible = "fixed-clock";
128                         reg = <0>;
129                         #clock-cells = <0>;
130                         clock-frequency = <27000000>;
131                 };
132         };
133
134         sound {
135                 compatible = "fsl,imx28-tx28-sgtl5000",
136                              "fsl,mxs-audio-sgtl5000";
137                 model = "imx28-tx28-sgtl5000";
138                 saif-controllers = <&saif0 &saif1>;
139                 audio-codec = <&sgtl5000>;
140         };
141
142         leds {
143                 compatible = "gpio-leds";
144
145                 user_led: user {
146                         label = "Heartbeat";
147                         gpios = <&gpio4 10 0>;
148                         linux,default-trigger = "heartbeat";
149                 };
150         };
151
152         backlight {
153                 compatible = "pwm-backlight";
154                 pwms = <&pwm 0 500000>;
155                 /*
156                  * a silly way to create a 1:1 relationship between the
157                  * PWM value and the actual duty cycle
158                  */
159                 brightness-levels = < 0  1  2  3  4  5  6  7  8  9
160                                      10 11 12 13 14 15 16 17 18 19
161                                      20 21 22 23 24 25 26 27 28 29
162                                      30 31 32 33 34 35 36 37 38 39
163                                      40 41 42 43 44 45 46 47 48 49
164                                      50 51 52 53 54 55 56 57 58 59
165                                      60 61 62 63 64 65 66 67 68 69
166                                      70 71 72 73 74 75 76 77 78 79
167                                      80 81 82 83 84 85 86 87 88 89
168                                      90 91 92 93 94 95 96 97 98 99
169                                     100>;
170                 default-brightness-level = <50>;
171         };
172
173         matrix_keypad: matrix-keypad@0 {
174                 compatible = "gpio-matrix-keypad";
175                 col-gpios = <
176                         &gpio5 0 0
177                         &gpio5 1 0
178                         &gpio5 2 0
179                         &gpio5 3 0
180                 >;
181                 row-gpios = <
182                         &gpio5 4 0
183                         &gpio5 5 0
184                         &gpio5 6 0
185                         &gpio5 7 0
186                 >;
187                 /* sample keymap */
188                 linux,keymap = <
189                         0x00000074 /* row 0, col 0, KEY_POWER */
190                         0x00010052 /* row 0, col 1, KEY_KP0 */
191                         0x0002004f /* row 0, col 2, KEY_KP1 */
192                         0x00030050 /* row 0, col 3, KEY_KP2 */
193                         0x01000051 /* row 1, col 0, KEY_KP3 */
194                         0x0101004b /* row 1, col 1, KEY_KP4 */
195                         0x0102004c /* row 1, col 2, KEY_KP5 */
196                         0x0103004d /* row 1, col 3, KEY_KP6 */
197                         0x02000047 /* row 2, col 0, KEY_KP7 */
198                         0x02010048 /* row 2, col 1, KEY_KP8 */
199                         0x02020049 /* row 2, col 2, KEY_KP9 */
200                 >;
201                 gpio-activelow;
202                 linux,wakeup;
203                 debounce-delay-ms = <100>;
204                 col-scan-delay-us = <5000>;
205                 linux,no-autorepeat;
206         };
207 };
208
209 /* 2nd TX-Std UART - (A)UART1  */
210 &auart1 {
211         pinctrl-names = "default";
212         pinctrl-0 = <&auart1_pins_a>;
213         status = "okay";
214 };
215
216 /* 3rd TX-Std UART - (A)UART3  */
217 &auart3 {
218         pinctrl-names = "default";
219         pinctrl-0 = <&auart3_pins_a>;
220         status = "okay";
221 };
222
223 &can0 {
224         pinctrl-names = "default";
225         pinctrl-0 = <&can0_pins_a>;
226         xceiver-supply = <&reg_can_xcvr>;
227         status = "okay";
228 };
229
230 &can1 {
231         pinctrl-names = "default";
232         pinctrl-0 = <&can1_pins_a>;
233         xceiver-supply = <&reg_can_xcvr>;
234         status = "okay";
235 };
236
237 &digctl {
238         status = "okay";
239 };
240
241 /* 1st TX-Std UART - (D)UART */
242 &duart {
243         pinctrl-names = "default";
244         pinctrl-0 = <&duart_4pins_a>;
245         status = "okay";
246 };
247
248 &gpmi {
249         pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>;
250         nand-on-flash-bbt;
251         status = "okay";
252 };
253
254 &i2c0 {
255         pinctrl-names = "default";
256         pinctrl-0 = <&i2c0_pins_a>;
257         clock-frequency = <400000>;
258         status = "okay";
259
260         sgtl5000: sgtl5000@0a {
261                 compatible = "fsl,sgtl5000";
262                 reg = <0x0a>;
263                 VDDA-supply = <&reg_2p5v>;
264                 VDDIO-supply = <&reg_3p3v>;
265                 clocks = <&mclk>;
266         };
267
268         gpio5: pca953x@20 {
269                 compatible = "nxp,pca9554";
270                 reg = <0x20>;
271                 pinctrl-names = "default";
272                 pinctrl-0 = <&tx28_pca9554_pins>;
273                 interrupt-parent = <&gpio3>;
274                 interrupts = <28 0>;
275                 gpio-controller;
276                 #gpio-cells = <2>;
277                 interrupt-controller;
278                 #interrupt-cells = <2>;
279         };
280
281         polytouch: edt-ft5x06@38 {
282                 compatible = "edt,edt-ft5x06";
283                 reg = <0x38>;
284                 pinctrl-names = "default";
285                 pinctrl-0 = <&tx28_edt_ft5x06_pins>;
286                 interrupt-parent = <&gpio2>;
287                 interrupts = <5 0>;
288                 reset-gpios = <&gpio2 6 1>;
289                 wake-gpios = <&gpio4 9 0>;
290         };
291
292         touchscreen: tsc2007@48 {
293                 compatible = "ti,tsc2007";
294                 reg = <0x48>;
295                 pinctrl-names = "default";
296                 pinctrl-0 = <&tx28_tsc2007_pins>;
297                 interrupt-parent = <&gpio3>;
298                 interrupts = <20 0>;
299                 pendown-gpio = <&gpio3 20 1>;
300                 ti,x-plate-ohms = /bits/ 16 <660>;
301         };
302
303         ds1339: rtc@68 {
304                 compatible = "mxim,ds1339";
305                 reg = <0x68>;
306         };
307 };
308
309 &lcdif {
310         pinctrl-names = "default";
311         pinctrl-0 = <&lcdif_24bit_pins_a &lcdif_sync_pins_a &tx28_lcdif_ctrl_pins>;
312         lcd-supply = <&reg_lcd>;
313         display = <&display>;
314         status = "okay";
315
316         display: display@0 {
317                 bits-per-pixel = <32>;
318                 bus-width = <24>;
319                 display-timings {
320                         native-mode = <&timing5>;
321                         timing0: timing0 {
322                                 panel-name = "VGA";
323                                 clock-frequency = <25175000>;
324                                 hactive = <640>;
325                                 vactive = <480>;
326                                 hback-porch = <48>;
327                                 hsync-len = <96>;
328                                 hfront-porch = <16>;
329                                 vback-porch = <33>;
330                                 vsync-len = <2>;
331                                 vfront-porch = <10>;
332                                 hsync-active = <0>;
333                                 vsync-active = <0>;
334                                 de-active = <1>;
335                                 pixelclk-active = <1>;
336                         };
337
338                         timing1: timing1 {
339                                 panel-name = "ETV570";
340                                 clock-frequency = <25175000>;
341                                 hactive = <640>;
342                                 vactive = <480>;
343                                 hback-porch = <114>;
344                                 hsync-len = <30>;
345                                 hfront-porch = <16>;
346                                 vback-porch = <32>;
347                                 vsync-len = <3>;
348                                 vfront-porch = <10>;
349                                 hsync-active = <0>;
350                                 vsync-active = <0>;
351                                 de-active = <1>;
352                                 pixelclk-active = <1>;
353                         };
354
355                         timing2: timing2 {
356                                 panel-name = "ET0350";
357                                 clock-frequency = <6500000>;
358                                 hactive = <320>;
359                                 vactive = <240>;
360                                 hback-porch = <34>;
361                                 hsync-len = <34>;
362                                 hfront-porch = <20>;
363                                 vback-porch = <15>;
364                                 vsync-len = <3>;
365                                 vfront-porch = <4>;
366                                 hsync-active = <0>;
367                                 vsync-active = <0>;
368                                 de-active = <1>;
369                                 pixelclk-active = <1>;
370                         };
371
372                         timing3: timing3 {
373                                 panel-name = "ET0430";
374                                 clock-frequency = <9000000>;
375                                 hactive = <480>;
376                                 vactive = <272>;
377                                 hback-porch = <2>;
378                                 hsync-len = <41>;
379                                 hfront-porch = <2>;
380                                 vback-porch = <2>;
381                                 vsync-len = <10>;
382                                 vfront-porch = <2>;
383                                 hsync-active = <0>;
384                                 vsync-active = <0>;
385                                 de-active = <1>;
386                                 pixelclk-active = <1>;
387                         };
388
389                         timing4: timing4 {
390                                 panel-name = "ET0500", "ET0700";
391                                 clock-frequency = <33260000>;
392                                 hactive = <800>;
393                                 vactive = <480>;
394                                 hback-porch = <88>;
395                                 hsync-len = <128>;
396                                 hfront-porch = <40>;
397                                 vback-porch = <33>;
398                                 vsync-len = <2>;
399                                 vfront-porch = <10>;
400                                 hsync-active = <0>;
401                                 vsync-active = <0>;
402                                 de-active = <1>;
403                                 pixelclk-active = <1>;
404                         };
405
406                         timing5: timing5 {
407                                 panel-name = "ETQ570";
408                                 clock-frequency = <6400000>;
409                                 hactive = <320>;
410                                 vactive = <240>;
411                                 hback-porch = <38>;
412                                 hsync-len = <30>;
413                                 hfront-porch = <30>;
414                                 vback-porch = <16>;
415                                 vsync-len = <3>;
416                                 vfront-porch = <4>;
417                                 hsync-active = <0>;
418                                 vsync-active = <0>;
419                                 de-active = <1>;
420                                 pixelclk-active = <1>;
421                         };
422                 };
423         };
424 };
425
426 &lradc {
427         fsl,lradc-touchscreen-wires = <4>;
428         status = "okay";
429 };
430
431 &mac0 {
432         phy-mode = "rmii";
433         pinctrl-names = "default", "gpio_mode";
434         pinctrl-0 = <&mac0_pins_a>;
435         pinctrl-1 = <&tx28_mac0_pins_gpio>;
436         status = "okay";
437 };
438
439 &mac1 {
440         phy-mode = "rmii";
441         pinctrl-names = "default";
442         pinctrl-0 = <&mac1_pins_a>;
443         /* not enabled by default */
444 };
445
446 &mxs_rtc {
447         status = "okay";
448 };
449
450 &ocotp {
451         status = "okay";
452 };
453
454 &pwm {
455         pinctrl-names = "default";
456         pinctrl-0 = <&pwm0_pins_a>;
457         status = "okay";
458 };
459
460 &pinctrl {
461         pinctrl-names = "default";
462         pinctrl-0 = <&hog_pins_a>;
463
464         hog_pins_a: hog@0 {
465                 reg = <0>;
466                 fsl,pinmux-ids = <
467                         MX28_PAD_ENET0_RXD3__GPIO_4_10 /* module LED */
468                 >;
469                 fsl,drive-strength = <MXS_DRIVE_4mA>;
470                 fsl,voltage = <MXS_VOLTAGE_HIGH>;
471                 fsl,pull-up = <MXS_PULL_DISABLE>;
472         };
473
474         tx28_edt_ft5x06_pins: tx28-edt-ft5x06-pins {
475                 fsl,pinmux-ids = <
476                         MX28_PAD_SSP0_DATA6__GPIO_2_6 /* RESET */
477                         MX28_PAD_SSP0_DATA5__GPIO_2_5 /* IRQ */
478                         MX28_PAD_ENET0_RXD2__GPIO_4_9 /* WAKE */
479                 >;
480                 fsl,drive-strength = <MXS_DRIVE_4mA>;
481                 fsl,voltage = <MXS_VOLTAGE_HIGH>;
482                 fsl,pull-up = <MXS_PULL_DISABLE>;
483         };
484
485         tx28_flexcan_xcvr_pins: tx28-flexcan-xcvr-pins {
486                 fsl,pinmux-ids = <
487                         MX28_PAD_LCD_D00__GPIO_1_0
488                 >;
489                 fsl,drive-strength = <MXS_DRIVE_4mA>;
490                 fsl,voltage = <MXS_VOLTAGE_HIGH>;
491                 fsl,pull-up = <MXS_PULL_DISABLE>;
492         };
493
494         tx28_lcdif_23bit_pins: tx28-lcdif-23bit {
495                 fsl,pinmux-ids = <
496                         /* LCD_D00 may be used as Flexcan Transceiver Enable on STK5-V5 */
497                         MX28_PAD_LCD_D01__LCD_D1
498                         MX28_PAD_LCD_D02__LCD_D2
499                         MX28_PAD_LCD_D03__LCD_D3
500                         MX28_PAD_LCD_D04__LCD_D4
501                         MX28_PAD_LCD_D05__LCD_D5
502                         MX28_PAD_LCD_D06__LCD_D6
503                         MX28_PAD_LCD_D07__LCD_D7
504                         MX28_PAD_LCD_D08__LCD_D8
505                         MX28_PAD_LCD_D09__LCD_D9
506                         MX28_PAD_LCD_D10__LCD_D10
507                         MX28_PAD_LCD_D11__LCD_D11
508                         MX28_PAD_LCD_D12__LCD_D12
509                         MX28_PAD_LCD_D13__LCD_D13
510                         MX28_PAD_LCD_D14__LCD_D14
511                         MX28_PAD_LCD_D15__LCD_D15
512                         MX28_PAD_LCD_D16__LCD_D16
513                         MX28_PAD_LCD_D17__LCD_D17
514                         MX28_PAD_LCD_D18__LCD_D18
515                         MX28_PAD_LCD_D19__LCD_D19
516                         MX28_PAD_LCD_D20__LCD_D20
517                         MX28_PAD_LCD_D21__LCD_D21
518                         MX28_PAD_LCD_D22__LCD_D22
519                         MX28_PAD_LCD_D23__LCD_D23
520                 >;
521                 fsl,drive-strength = <MXS_DRIVE_4mA>;
522                 fsl,voltage = <MXS_VOLTAGE_HIGH>;
523                 fsl,pull-up = <MXS_PULL_DISABLE>;
524         };
525
526         tx28_lcdif_ctrl_pins: tx28-lcdif-ctrl {
527                 fsl,pinmux-ids = <
528                         MX28_PAD_LCD_ENABLE__GPIO_1_31 /* Enable */
529                         MX28_PAD_LCD_RESET__GPIO_3_30  /* Reset */
530                 >;
531                 fsl,drive-strength = <MXS_DRIVE_4mA>;
532                 fsl,voltage = <MXS_VOLTAGE_HIGH>;
533                 fsl,pull-up = <MXS_PULL_DISABLE>;
534         };
535
536         tx28_mac0_pins_gpio: tx28-mac0-gpio-pins {
537                 fsl,pinmux-ids = <
538                         MX28_PAD_ENET0_MDC__GPIO_4_0
539                         MX28_PAD_ENET0_MDIO__GPIO_4_1
540                         MX28_PAD_ENET0_RX_EN__GPIO_4_2
541                         MX28_PAD_ENET0_RXD0__GPIO_4_3
542                         MX28_PAD_ENET0_RXD1__GPIO_4_4
543                         MX28_PAD_ENET0_TX_EN__GPIO_4_6
544                         MX28_PAD_ENET0_TXD0__GPIO_4_7
545                         MX28_PAD_ENET0_TXD1__GPIO_4_8
546                         MX28_PAD_ENET_CLK__GPIO_4_16
547                 >;
548                 fsl,drive-strength = <MXS_DRIVE_4mA>;
549                 fsl,voltage = <MXS_VOLTAGE_HIGH>;
550                 fsl,pull-up = <MXS_PULL_DISABLE>;
551         };
552
553         tx28_pca9554_pins: tx28-pca9554-pins {
554                 fsl,pinmux-ids = <
555                         MX28_PAD_PWM3__GPIO_3_28
556                 >;
557                 fsl,drive-strength = <MXS_DRIVE_4mA>;
558                 fsl,voltage = <MXS_VOLTAGE_HIGH>;
559                 fsl,pull-up = <MXS_PULL_DISABLE>;
560         };
561
562         tx28_tsc2007_pins: tx28-tsc2007-pins {
563                 fsl,pinmux-ids = <
564                         MX28_PAD_SAIF0_MCLK__GPIO_3_20 /* TSC2007 IRQ */
565                 >;
566                 fsl,drive-strength = <MXS_DRIVE_4mA>;
567                 fsl,voltage = <MXS_VOLTAGE_HIGH>;
568                 fsl,pull-up = <MXS_PULL_DISABLE>;
569         };
570
571
572         tx28_usbphy0_pins: tx28-usbphy0-pins {
573                 fsl,pinmux-ids = <
574                         MX28_PAD_GPMI_CE2N__GPIO_0_18 /* USBOTG_VBUSEN */
575                         MX28_PAD_GPMI_CE3N__GPIO_0_19 /* USBOTH_OC */
576                 >;
577                 fsl,drive-strength = <MXS_DRIVE_12mA>;
578                 fsl,voltage = <MXS_VOLTAGE_HIGH>;
579                 fsl,pull-up = <MXS_PULL_DISABLE>;
580         };
581
582         tx28_usbphy1_pins: tx28-usbphy1-pins {
583                 fsl,pinmux-ids = <
584                         MX28_PAD_SPDIF__GPIO_3_27 /* USBH_VBUSEN */
585                         MX28_PAD_JTAG_RTCK__GPIO_4_20 /* USBH_OC */
586                 >;
587                 fsl,drive-strength = <MXS_DRIVE_12mA>;
588                 fsl,voltage = <MXS_VOLTAGE_HIGH>;
589                 fsl,pull-up = <MXS_PULL_DISABLE>;
590         };
591 };
592
593 &saif0 {
594         pinctrl-names = "default";
595         pinctrl-0 = <&saif0_pins_b>;
596         fsl,saif-master;
597         status = "okay";
598 };
599
600 &saif1 {
601         pinctrl-names = "default";
602         pinctrl-0 = <&saif1_pins_a>;
603         status = "okay";
604 };
605
606 &ssp0 {
607         compatible = "fsl,imx28-mmc";
608         pinctrl-names = "default", "special";
609         pinctrl-0 = <&mmc0_4bit_pins_a
610                      &mmc0_cd_cfg
611                      &mmc0_sck_cfg>;
612         bus-width = <4>;
613         status = "okay";
614 };
615
616 &ssp3 {
617         compatible = "fsl,imx28-spi";
618         pinctrl-names = "default";
619         pinctrl-0 = <&spi3_pins_a>;
620         clock-frequency = <57600000>;
621         status = "okay";
622
623         spidev0: spi@0 {
624                 compatible = "spidev";
625                 reg = <0>;
626                 spi-max-frequency = <57600000>;
627         };
628
629         spidev1: spi@1 {
630                 compatible = "spidev";
631                 reg = <1>;
632                 spi-max-frequency = <57600000>;
633         };
634 };
635
636 &usb0 {
637         vbus-supply = <&reg_usb0_vbus>;
638         disable-over-current;
639         dr_mode = "peripheral";
640         status = "okay";
641 };
642
643 &usb1 {
644         vbus-supply = <&reg_usb1_vbus>;
645         disable-over-current;
646         dr_mode = "host";
647         status = "okay";
648 };
649
650 &usbphy0 {
651         pinctrl-names = "default";
652         pinctrl-0 = <&tx28_usbphy0_pins>;
653         phy_type = "utmi";
654         status = "okay";
655 };
656
657 &usbphy1 {
658         pinctrl-names = "default";
659         pinctrl-0 = <&tx28_usbphy1_pins>;
660         phy_type = "utmi";
661         status = "okay";
662 };