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