Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / omap3-n900.dts
1 /*
2  * Copyright (C) 2013 Pavel Machek <pavel@ucw.cz>
3  * Copyright (C) 2013-2014 Aaro Koskinen <aaro.koskinen@iki.fi>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 (or later) as
7  * published by the Free Software Foundation.
8  */
9
10 /dts-v1/;
11
12 #include "omap34xx-hs.dtsi"
13
14 / {
15         model = "Nokia N900";
16         compatible = "nokia,omap3-n900", "ti,omap3430", "ti,omap3";
17
18         cpus {
19                 cpu@0 {
20                         cpu0-supply = <&vcc>;
21                 };
22         };
23
24         memory {
25                 device_type = "memory";
26                 reg = <0x80000000 0x10000000>; /* 256 MB */
27         };
28
29         gpio_keys {
30                 compatible = "gpio-keys";
31
32                 camera_lens_cover {
33                         label = "Camera Lens Cover";
34                         gpios = <&gpio4 14 GPIO_ACTIVE_LOW>; /* 110 */
35                         linux,input-type = <5>; /* EV_SW */
36                         linux,code = <0x09>; /* SW_CAMERA_LENS_COVER */
37                         gpio-key,wakeup;
38                 };
39
40                 camera_focus {
41                         label = "Camera Focus";
42                         gpios = <&gpio3 4 GPIO_ACTIVE_LOW>; /* 68 */
43                         linux,code = <0x210>; /* KEY_CAMERA_FOCUS */
44                         gpio-key,wakeup;
45                 };
46
47                 camera_capture {
48                         label = "Camera Capture";
49                         gpios = <&gpio3 5 GPIO_ACTIVE_LOW>; /* 69 */
50                         linux,code = <0xd4>; /* KEY_CAMERA */
51                         gpio-key,wakeup;
52                 };
53
54                 lock_button {
55                         label = "Lock Button";
56                         gpios = <&gpio4 17 GPIO_ACTIVE_LOW>; /* 113 */
57                         linux,code = <0x98>; /* KEY_SCREENLOCK */
58                         gpio-key,wakeup;
59                 };
60
61                 keypad_slide {
62                         label = "Keypad Slide";
63                         gpios = <&gpio3 7 GPIO_ACTIVE_LOW>; /* 71 */
64                         linux,input-type = <5>; /* EV_SW */
65                         linux,code = <0x0a>; /* SW_KEYPAD_SLIDE */
66                         gpio-key,wakeup;
67                 };
68
69                 proximity_sensor {
70                         label = "Proximity Sensor";
71                         gpios = <&gpio3 25 GPIO_ACTIVE_HIGH>; /* 89 */
72                         linux,input-type = <5>; /* EV_SW */
73                         linux,code = <0x0b>; /* SW_FRONT_PROXIMITY */
74                 };
75         };
76
77         isp1704: isp1704 {
78                 compatible = "nxp,isp1704";
79                 nxp,enable-gpio = <&gpio3 3 GPIO_ACTIVE_HIGH>;
80                 usb-phy = <&usb2_phy>;
81         };
82
83         tv: connector {
84                 compatible = "composite-connector";
85                 label = "tv";
86
87                 port {
88                         tv_connector_in: endpoint {
89                                 remote-endpoint = <&venc_out>;
90                         };
91                 };
92         };
93 };
94
95 &omap3_pmx_core {
96         pinctrl-names = "default";
97
98         uart2_pins: pinmux_uart2_pins {
99                 pinctrl-single,pins = <
100                         0x14a (PIN_INPUT | MUX_MODE0)           /* uart2_rx */
101                         0x148 (PIN_OUTPUT | MUX_MODE0)          /* uart2_tx */
102                 >;
103         };
104
105         uart3_pins: pinmux_uart3_pins {
106                 pinctrl-single,pins = <
107                         0x16e (PIN_INPUT | MUX_MODE0)           /* uart3_rx */
108                         0x170 (PIN_OUTPUT | MUX_MODE0)          /* uart3_tx */
109                 >;
110         };
111
112         i2c1_pins: pinmux_i2c1_pins {
113                 pinctrl-single,pins = <
114                         0x18a (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c1_scl */
115                         0x18c (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c1_sda */
116                 >;
117         };
118
119         i2c2_pins: pinmux_i2c2_pins {
120                 pinctrl-single,pins = <
121                         0x18e (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c2_scl */
122                         0x190 (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c2_sda */
123                 >;
124         };
125
126         i2c3_pins: pinmux_i2c3_pins {
127                 pinctrl-single,pins = <
128                         0x192 (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c3_scl */
129                         0x194 (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c3_sda */
130                 >;
131         };
132
133         mmc1_pins: pinmux_mmc1_pins {
134                 pinctrl-single,pins = <
135                         0x114 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_clk */
136                         0x116 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_cmd */
137                         0x118 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat0 */
138                         0x11a (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat1 */
139                         0x11c (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat2 */
140                         0x11e (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat3 */
141                 >;
142         };
143
144         mmc2_pins: pinmux_mmc2_pins {
145                 pinctrl-single,pins = <
146                         0x128 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_clk */
147                         0x12a (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_cmd */
148                         0x12c (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat0 */
149                         0x12e (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat1 */
150                         0x130 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat2 */
151                         0x132 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat3 */
152                         0x134 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat4 */
153                         0x136 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat5 */
154                         0x138 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat6 */
155                         0x13a (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat7 */
156                 >;
157         };
158
159         acx565akm_pins: pinmux_acx565akm_pins {
160                 pinctrl-single,pins = <
161                         0x0d4 (PIN_OUTPUT | MUX_MODE4)          /* RX51_LCD_RESET_GPIO */
162                 >;
163         };
164
165         dss_sdi_pins: pinmux_dss_sdi_pins {
166                 pinctrl-single,pins = <
167                         0x0c0 (PIN_OUTPUT | MUX_MODE1)   /* dss_data10.sdi_dat1n */
168                         0x0c2 (PIN_OUTPUT | MUX_MODE1)   /* dss_data11.sdi_dat1p */
169                         0x0c4 (PIN_OUTPUT | MUX_MODE1)   /* dss_data12.sdi_dat2n */
170                         0x0c6 (PIN_OUTPUT | MUX_MODE1)   /* dss_data13.sdi_dat2p */
171
172                         0x0d8 (PIN_OUTPUT | MUX_MODE1)   /* dss_data22.sdi_clkp */
173                         0x0da (PIN_OUTPUT | MUX_MODE1)   /* dss_data23.sdi_clkn */
174                 >;
175         };
176 };
177
178 &i2c1 {
179         pinctrl-names = "default";
180         pinctrl-0 = <&i2c1_pins>;
181
182         clock-frequency = <2200000>;
183
184         twl: twl@48 {
185                 reg = <0x48>;
186                 interrupts = <7>; /* SYS_NIRQ cascaded to intc */
187                 interrupt-parent = <&intc>;
188         };
189 };
190
191 #include "twl4030.dtsi"
192 #include "twl4030_omap3.dtsi"
193
194 &vaux1 {
195         regulator-name = "V28";
196         regulator-min-microvolt = <2800000>;
197         regulator-max-microvolt = <2800000>;
198         regulator-always-on; /* due battery cover sensor */
199 };
200
201 &vaux2 {
202         regulator-name = "VCSI";
203         regulator-min-microvolt = <1800000>;
204         regulator-max-microvolt = <1800000>;
205 };
206
207 &vaux3 {
208         regulator-name = "VMMC2_30";
209         regulator-min-microvolt = <2800000>;
210         regulator-max-microvolt = <3000000>;
211 };
212
213 &vaux4 {
214         regulator-name = "VCAM_ANA_28";
215         regulator-min-microvolt = <2800000>;
216         regulator-max-microvolt = <2800000>;
217 };
218
219 &vmmc1 {
220         regulator-name = "VMMC1";
221         regulator-min-microvolt = <1850000>;
222         regulator-max-microvolt = <3150000>;
223 };
224
225 &vmmc2 {
226         regulator-name = "V28_A";
227         regulator-min-microvolt = <2800000>;
228         regulator-max-microvolt = <3000000>;
229         regulator-always-on; /* due VIO leak to AIC34 VDDs */
230 };
231
232 &vpll1 {
233         regulator-name = "VPLL";
234         regulator-min-microvolt = <1800000>;
235         regulator-max-microvolt = <1800000>;
236         regulator-always-on;
237 };
238
239 &vpll2 {
240         regulator-name = "VSDI_CSI";
241         regulator-min-microvolt = <1800000>;
242         regulator-max-microvolt = <1800000>;
243         regulator-always-on;
244 };
245
246 &vsim {
247         regulator-name = "VMMC2_IO_18";
248         regulator-min-microvolt = <1800000>;
249         regulator-max-microvolt = <1800000>;
250 };
251
252 &vio {
253         regulator-name = "VIO";
254         regulator-min-microvolt = <1800000>;
255         regulator-max-microvolt = <1800000>;
256
257 };
258
259 &vintana1 {
260         regulator-name = "VINTANA1";
261         /* fixed to 1500000 */
262         regulator-always-on;
263 };
264
265 &vintana2 {
266         regulator-name = "VINTANA2";
267         regulator-min-microvolt = <2750000>;
268         regulator-max-microvolt = <2750000>;
269         regulator-always-on;
270 };
271
272 &vintdig {
273         regulator-name = "VINTDIG";
274         /* fixed to 1500000 */
275         regulator-always-on;
276 };
277
278 &twl {
279         twl_audio: audio {
280                 compatible = "ti,twl4030-audio";
281                 ti,enable-vibra = <1>;
282         };
283 };
284
285 &twl_keypad {
286         linux,keymap = < 0x00000010 /* KEY_Q */
287                          0x00010018 /* KEY_O */
288                          0x00020019 /* KEY_P */
289                          0x00030033 /* KEY_COMMA */
290                          0x0004000e /* KEY_BACKSPACE */
291                          0x0006001e /* KEY_A */
292                          0x0007001f /* KEY_S */
293
294                          0x01000011 /* KEY_W */
295                          0x01010020 /* KEY_D */
296                          0x01020021 /* KEY_F */
297                          0x01030022 /* KEY_G */
298                          0x01040023 /* KEY_H */
299                          0x01050024 /* KEY_J */
300                          0x01060025 /* KEY_K */
301                          0x01070026 /* KEY_L */
302
303                          0x02000012 /* KEY_E */
304                          0x02010034 /* KEY_DOT */
305                          0x02020067 /* KEY_UP */
306                          0x0203001c /* KEY_ENTER */
307                          0x0205002c /* KEY_Z */
308                          0x0206002d /* KEY_X */
309                          0x0207002e /* KEY_C */
310                          0x02080043 /* KEY_F9 */
311
312                          0x03000013 /* KEY_R */
313                          0x0301002f /* KEY_V */
314                          0x03020030 /* KEY_B */
315                          0x03030031 /* KEY_N */
316                          0x03040032 /* KEY_M */
317                          0x03050039 /* KEY_SPACE */
318                          0x03060039 /* KEY_SPACE */
319                          0x03070069 /* KEY_LEFT */
320
321                          0x04000014 /* KEY_T */
322                          0x0401006c /* KEY_DOWN */
323                          0x0402006a /* KEY_RIGHT */
324                          0x0404001d /* KEY_LEFTCTRL */
325                          0x04050064 /* KEY_RIGHTALT */
326                          0x0406002a /* KEY_LEFTSHIFT */
327                          0x04080044 /* KEY_F10 */
328
329                          0x05000015 /* KEY_Y */
330                          0x05080057 /* KEY_F11 */
331
332                          0x06000016 /* KEY_U */
333
334                          0x07000017 /* KEY_I */
335                          0x07010041 /* KEY_F7 */
336                          0x07020042 /* KEY_F8 */
337                          >;
338 };
339
340 &twl_gpio {
341         ti,pullups      = <0x0>;
342         ti,pulldowns    = <0x03ff3f>; /* BIT(0..5) | BIT(8..17) */
343 };
344
345 &i2c2 {
346         pinctrl-names = "default";
347         pinctrl-0 = <&i2c2_pins>;
348
349         clock-frequency = <100000>;
350
351         tlv320aic3x: tlv320aic3x@18 {
352                 compatible = "ti,tlv320aic3x";
353                 reg = <0x18>;
354                 gpio-reset = <&gpio2 28 GPIO_ACTIVE_HIGH>; /* 60 */
355                 ai3x-gpio-func = <
356                         0 /* AIC3X_GPIO1_FUNC_DISABLED */
357                         5 /* AIC3X_GPIO2_FUNC_DIGITAL_MIC_INPUT */
358                 >;
359
360                 AVDD-supply = <&vmmc2>;
361                 DRVDD-supply = <&vmmc2>;
362                 IOVDD-supply = <&vio>;
363                 DVDD-supply = <&vio>;
364         };
365
366         tlv320aic3x_aux: tlv320aic3x@19 {
367                 compatible = "ti,tlv320aic3x";
368                 reg = <0x19>;
369                 gpio-reset = <&gpio2 28 GPIO_ACTIVE_HIGH>; /* 60 */
370
371                 AVDD-supply = <&vmmc2>;
372                 DRVDD-supply = <&vmmc2>;
373                 IOVDD-supply = <&vio>;
374                 DVDD-supply = <&vio>;
375         };
376
377         tsl2563: tsl2563@29 {
378                 compatible = "amstaos,tsl2563";
379                 reg = <0x29>;
380
381                 amstaos,cover-comp-gain = <16>;
382         };
383
384         lp5523: lp5523@32 {
385                 compatible = "national,lp5523";
386                 reg = <0x32>;
387                 clock-mode = /bits/ 8 <0>; /* LP55XX_CLOCK_AUTO */
388                 enable-gpio = <&gpio2 9 GPIO_ACTIVE_HIGH>; /* 41 */
389
390                 chan0 {
391                         chan-name = "lp5523:kb1";
392                         led-cur = /bits/ 8 <50>;
393                         max-cur = /bits/ 8 <100>;
394                 };
395
396                 chan1 {
397                         chan-name = "lp5523:kb2";
398                         led-cur = /bits/ 8 <50>;
399                         max-cur = /bits/ 8 <100>;
400                 };
401
402                 chan2 {
403                         chan-name = "lp5523:kb3";
404                         led-cur = /bits/ 8 <50>;
405                         max-cur = /bits/ 8 <100>;
406                 };
407
408                 chan3 {
409                         chan-name = "lp5523:kb4";
410                         led-cur = /bits/ 8 <50>;
411                         max-cur = /bits/ 8 <100>;
412                 };
413
414                 chan4 {
415                         chan-name = "lp5523:b";
416                         led-cur = /bits/ 8 <50>;
417                         max-cur = /bits/ 8 <100>;
418                 };
419
420                 chan5 {
421                         chan-name = "lp5523:g";
422                         led-cur = /bits/ 8 <50>;
423                         max-cur = /bits/ 8 <100>;
424                 };
425
426                 chan6 {
427                         chan-name = "lp5523:r";
428                         led-cur = /bits/ 8 <50>;
429                         max-cur = /bits/ 8 <100>;
430                 };
431
432                 chan7 {
433                         chan-name = "lp5523:kb5";
434                         led-cur = /bits/ 8 <50>;
435                         max-cur = /bits/ 8 <100>;
436                 };
437
438                 chan8 {
439                         chan-name = "lp5523:kb6";
440                         led-cur = /bits/ 8 <50>;
441                         max-cur = /bits/ 8 <100>;
442                 };
443         };
444
445         bq27200: bq27200@55 {
446                 compatible = "ti,bq27200";
447                 reg = <0x55>;
448         };
449
450         tpa6130a2: tpa6130a2@60 {
451                 compatible = "ti,tpa6130a2";
452                 reg = <0x60>;
453
454                 Vdd-supply = <&vmmc2>;
455
456                 power-gpio = <&gpio4 2 GPIO_ACTIVE_HIGH>; /* 98 */
457         };
458
459         bq24150a: bq24150a@6b {
460                 compatible = "ti,bq24150a";
461                 reg = <0x6b>;
462
463                 ti,current-limit = <100>;
464                 ti,weak-battery-voltage = <3400>;
465                 ti,battery-regulation-voltage = <4200>;
466                 ti,charge-current = <650>;
467                 ti,termination-current = <100>;
468                 ti,resistor-sense = <68>;
469
470                 ti,usb-charger-detection = <&isp1704>;
471         };
472 };
473
474 &i2c3 {
475         pinctrl-names = "default";
476         pinctrl-0 = <&i2c3_pins>;
477
478         clock-frequency = <400000>;
479 };
480
481 &mmc1 {
482         pinctrl-names = "default";
483         pinctrl-0 = <&mmc1_pins>;
484         vmmc-supply = <&vmmc1>;
485         bus-width = <4>;
486         cd-gpios = <&gpio6 0 GPIO_ACTIVE_HIGH>; /* 160 */
487 };
488
489 /* most boards use vaux3, only some old versions use vmmc2 instead */
490 &mmc2 {
491         pinctrl-names = "default";
492         pinctrl-0 = <&mmc2_pins>;
493         vmmc-supply = <&vaux3>;
494         vmmc_aux-supply = <&vsim>;
495         bus-width = <8>;
496         non-removable;
497 };
498
499 &mmc3 {
500         status = "disabled";
501 };
502
503 &gpmc {
504         ranges = <0 0 0x04000000 0x10000000>; /* 256MB */
505
506         /* gpio-irq for dma: 65 */
507
508         onenand@0,0 {
509                 #address-cells = <1>;
510                 #size-cells = <1>;
511                 reg = <0 0 0x10000000>;
512
513                 gpmc,sync-read;
514                 gpmc,sync-write;
515                 gpmc,burst-length = <16>;
516                 gpmc,burst-read;
517                 gpmc,burst-wrap;
518                 gpmc,burst-write;
519                 gpmc,device-width = <2>; /* GPMC_DEVWIDTH_16BIT */
520                 gpmc,mux-add-data = <2>; /* GPMC_MUX_AD */
521                 gpmc,cs-on-ns = <0>;
522                 gpmc,cs-rd-off-ns = <87>;
523                 gpmc,cs-wr-off-ns = <87>;
524                 gpmc,adv-on-ns = <0>;
525                 gpmc,adv-rd-off-ns = <10>;
526                 gpmc,adv-wr-off-ns = <10>;
527                 gpmc,oe-on-ns = <15>;
528                 gpmc,oe-off-ns = <87>;
529                 gpmc,we-on-ns = <0>;
530                 gpmc,we-off-ns = <87>;
531                 gpmc,rd-cycle-ns = <112>;
532                 gpmc,wr-cycle-ns = <112>;
533                 gpmc,access-ns = <81>;
534                 gpmc,page-burst-access-ns = <15>;
535                 gpmc,bus-turnaround-ns = <0>;
536                 gpmc,cycle2cycle-delay-ns = <0>;
537                 gpmc,wait-monitoring-ns = <0>;
538                 gpmc,clk-activation-ns = <5>;
539                 gpmc,wr-data-mux-bus-ns = <30>;
540                 gpmc,wr-access-ns = <81>;
541                 gpmc,sync-clk-ps = <15000>;
542
543                 /*
544                  * MTD partition table corresponding to Nokia's
545                  * Maemo 5 (Fremantle) release.
546                  */
547                 partition@0 {
548                         label = "bootloader";
549                         reg = <0x00000000 0x00020000>;
550                         read-only;
551                 };
552                 partition@1 {
553                         label = "config";
554                         reg = <0x00020000 0x00060000>;
555                 };
556                 partition@2 {
557                         label = "log";
558                         reg = <0x00080000 0x00040000>;
559                 };
560                 partition@3 {
561                         label = "kernel";
562                         reg = <0x000c0000 0x00200000>;
563                 };
564                 partition@4 {
565                         label = "initfs";
566                         reg = <0x002c0000 0x00200000>;
567                 };
568                 partition@5 {
569                         label = "rootfs";
570                         reg = <0x004c0000 0x0fb40000>;
571                 };
572         };
573 };
574
575 &mcspi1 {
576         /*
577          * For some reason, touchscreen is necessary for screen to work at
578          * all on real hw. It works well without it on emulator.
579          *
580          * Also... order in the device tree actually matters here.
581          */
582         tsc2005@0 {
583                 compatible = "tsc2005";
584                 spi-max-frequency = <6000000>;
585                 reg = <0>;
586         };
587
588         acx565akm@2 {
589                 compatible = "sony,acx565akm";
590                 spi-max-frequency = <6000000>;
591                 reg = <2>;
592
593                 pinctrl-names = "default";
594                 pinctrl-0 = <&acx565akm_pins>;
595
596                 label = "lcd";
597                 reset-gpios = <&gpio3 26 GPIO_ACTIVE_HIGH>; /* 90 */
598
599                 port {
600                         lcd_in: endpoint {
601                                 remote-endpoint = <&sdi_out>;
602                         };
603                 };
604         };
605 };
606
607 &usb_otg_hs {
608         interface-type = <0>;
609         usb-phy = <&usb2_phy>;
610         phys = <&usb2_phy>;
611         phy-names = "usb2-phy";
612         mode = <2>;
613         power = <50>;
614 };
615
616 &uart1 {
617         status = "disabled";
618 };
619
620 &uart2 {
621         pinctrl-names = "default";
622         pinctrl-0 = <&uart2_pins>;
623 };
624
625 &uart3 {
626         pinctrl-names = "default";
627         pinctrl-0 = <&uart3_pins>;
628 };
629
630 &dss {
631         status = "ok";
632
633         pinctrl-names = "default";
634         pinctrl-0 = <&dss_sdi_pins>;
635
636         vdds_sdi-supply = <&vaux1>;
637
638         ports {
639                 #address-cells = <1>;
640                 #size-cells = <0>;
641
642                 port@1 {
643                         reg = <1>;
644
645                         sdi_out: endpoint {
646                                 remote-endpoint = <&lcd_in>;
647                                 datapairs = <2>;
648                         };
649                 };
650         };
651 };
652
653 &venc {
654         status = "ok";
655
656         vdda-supply = <&vdac>;
657
658         port {
659                 venc_out: endpoint {
660                         remote-endpoint = <&tv_connector_in>;
661                         ti,channels = <1>;
662                 };
663         };
664 };