Merge branch 'omap/dt' into next/omap-gpmc
[cascardo/linux.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 #include <dt-bindings/input/input.h>
14
15 / {
16         model = "Nokia N900";
17         compatible = "nokia,omap3-n900", "ti,omap3430", "ti,omap3";
18
19         cpus {
20                 cpu@0 {
21                         cpu0-supply = <&vcc>;
22                 };
23         };
24
25         leds {
26                 compatible = "gpio-leds";
27                 heartbeat {
28                         label = "debug::sleep";
29                         gpios = <&gpio6 2 GPIO_ACTIVE_HIGH>;  /* gpio162 */
30                         linux,default-trigger = "default-on";
31                         pinctrl-names = "default";
32                         pinctrl-0 = <&debug_leds>;
33                 };
34         };
35
36         memory {
37                 device_type = "memory";
38                 reg = <0x80000000 0x10000000>; /* 256 MB */
39         };
40
41         gpio_keys {
42                 compatible = "gpio-keys";
43
44                 camera_lens_cover {
45                         label = "Camera Lens Cover";
46                         gpios = <&gpio4 14 GPIO_ACTIVE_LOW>; /* 110 */
47                         linux,input-type = <5>; /* EV_SW */
48                         linux,code = <0x09>; /* SW_CAMERA_LENS_COVER */
49                         gpio-key,wakeup;
50                 };
51
52                 camera_focus {
53                         label = "Camera Focus";
54                         gpios = <&gpio3 4 GPIO_ACTIVE_LOW>; /* 68 */
55                         linux,code = <0x210>; /* KEY_CAMERA_FOCUS */
56                         gpio-key,wakeup;
57                 };
58
59                 camera_capture {
60                         label = "Camera Capture";
61                         gpios = <&gpio3 5 GPIO_ACTIVE_LOW>; /* 69 */
62                         linux,code = <0xd4>; /* KEY_CAMERA */
63                         gpio-key,wakeup;
64                 };
65
66                 lock_button {
67                         label = "Lock Button";
68                         gpios = <&gpio4 17 GPIO_ACTIVE_LOW>; /* 113 */
69                         linux,code = <0x98>; /* KEY_SCREENLOCK */
70                         gpio-key,wakeup;
71                 };
72
73                 keypad_slide {
74                         label = "Keypad Slide";
75                         gpios = <&gpio3 7 GPIO_ACTIVE_LOW>; /* 71 */
76                         linux,input-type = <5>; /* EV_SW */
77                         linux,code = <0x0a>; /* SW_KEYPAD_SLIDE */
78                         gpio-key,wakeup;
79                 };
80
81                 proximity_sensor {
82                         label = "Proximity Sensor";
83                         gpios = <&gpio3 25 GPIO_ACTIVE_HIGH>; /* 89 */
84                         linux,input-type = <5>; /* EV_SW */
85                         linux,code = <0x0b>; /* SW_FRONT_PROXIMITY */
86                 };
87         };
88
89         isp1704: isp1704 {
90                 compatible = "nxp,isp1704";
91                 nxp,enable-gpio = <&gpio3 3 GPIO_ACTIVE_HIGH>;
92                 usb-phy = <&usb2_phy>;
93         };
94
95         tv: connector {
96                 compatible = "composite-video-connector";
97                 label = "tv";
98
99                 port {
100                         tv_connector_in: endpoint {
101                                 remote-endpoint = <&venc_out>;
102                         };
103                 };
104         };
105
106         sound: n900-audio {
107                 compatible = "nokia,n900-audio";
108
109                 nokia,cpu-dai = <&mcbsp2>;
110                 nokia,audio-codec = <&tlv320aic3x>, <&tlv320aic3x_aux>;
111                 nokia,headphone-amplifier = <&tpa6130a2>;
112
113                 tvout-selection-gpios = <&gpio2 8 GPIO_ACTIVE_HIGH>; /* 40 */
114                 jack-detection-gpios = <&gpio6 17 GPIO_ACTIVE_HIGH>; /* 177 */
115                 eci-switch-gpios = <&gpio6 22 GPIO_ACTIVE_HIGH>; /* 182 */
116                 speaker-amplifier-gpios = <&twl_gpio 7 GPIO_ACTIVE_HIGH>;
117         };
118 };
119
120 &omap3_pmx_core {
121         pinctrl-names = "default";
122
123         uart2_pins: pinmux_uart2_pins {
124                 pinctrl-single,pins = <
125                         0x14a (PIN_INPUT | MUX_MODE0)           /* uart2_rx */
126                         0x148 (PIN_OUTPUT | MUX_MODE0)          /* uart2_tx */
127                 >;
128         };
129
130         uart3_pins: pinmux_uart3_pins {
131                 pinctrl-single,pins = <
132                         0x16e (PIN_INPUT | MUX_MODE0)           /* uart3_rx */
133                         0x170 (PIN_OUTPUT | MUX_MODE0)          /* uart3_tx */
134                 >;
135         };
136
137         ethernet_pins: pinmux_ethernet_pins {
138                 pinctrl-single,pins = <
139                         OMAP3_CORE1_IOPAD(0x20b4, PIN_INPUT_PULLDOWN | MUX_MODE4)       /* gpmc_ncs3.gpio_54 */
140                         OMAP3_CORE1_IOPAD(0x20fc, PIN_OUTPUT | MUX_MODE4)               /* dss_data16.gpio_86 */
141                         OMAP3_CORE1_IOPAD(0x219c, PIN_OUTPUT | MUX_MODE4)               /* uart3_rts_sd.gpio_164 */
142                 >;
143         };
144
145         gpmc_pins: pinmux_gpmc_pins {
146                 pinctrl-single,pins = <
147
148                         /* address lines */
149                         OMAP3_CORE1_IOPAD(0x207a, PIN_OUTPUT | MUX_MODE0)       /* gpmc_a1.gpmc_a1 */
150                         OMAP3_CORE1_IOPAD(0x207c, PIN_OUTPUT | MUX_MODE0)       /* gpmc_a2.gpmc_a2 */
151                         OMAP3_CORE1_IOPAD(0x207e, PIN_OUTPUT | MUX_MODE0)       /* gpmc_a3.gpmc_a3 */
152
153                         /* data lines, gpmc_d0..d7 not muxable according to TRM */
154                         OMAP3_CORE1_IOPAD(0x209e, PIN_INPUT | MUX_MODE0)        /* gpmc_d8.gpmc_d8 */
155                         OMAP3_CORE1_IOPAD(0x20a0, PIN_INPUT | MUX_MODE0)        /* gpmc_d9.gpmc_d9 */
156                         OMAP3_CORE1_IOPAD(0x20a2, PIN_INPUT | MUX_MODE0)        /* gpmc_d10.gpmc_d10 */
157                         OMAP3_CORE1_IOPAD(0x20a4, PIN_INPUT | MUX_MODE0)        /* gpmc_d11.gpmc_d11 */
158                         OMAP3_CORE1_IOPAD(0x20a6, PIN_INPUT | MUX_MODE0)        /* gpmc_d12.gpmc_d12 */
159                         OMAP3_CORE1_IOPAD(0x20a8, PIN_INPUT | MUX_MODE0)        /* gpmc_d13.gpmc_d13 */
160                         OMAP3_CORE1_IOPAD(0x20aa, PIN_INPUT | MUX_MODE0)        /* gpmc_d14.gpmc_d14 */
161                         OMAP3_CORE1_IOPAD(0x20ac, PIN_INPUT | MUX_MODE0)        /* gpmc_d15.gpmc_d15 */
162
163                         /*
164                          * gpmc_ncs0, gpmc_nadv_ale, gpmc_noe, gpmc_nwe, gpmc_wait0 not muxable
165                          * according to TRM. OneNAND seems to require PIN_INPUT on clock.
166                          */
167                         OMAP3_CORE1_IOPAD(0x20b0, PIN_OUTPUT | MUX_MODE0)       /* gpmc_ncs1.gpmc_ncs1 */
168                         OMAP3_CORE1_IOPAD(0x20be, PIN_INPUT | MUX_MODE0)        /* gpmc_clk.gpmc_clk */
169                 >;
170         };
171
172         i2c1_pins: pinmux_i2c1_pins {
173                 pinctrl-single,pins = <
174                         0x18a (PIN_INPUT | MUX_MODE0)           /* i2c1_scl */
175                         0x18c (PIN_INPUT | MUX_MODE0)           /* i2c1_sda */
176                 >;
177         };
178
179         i2c2_pins: pinmux_i2c2_pins {
180                 pinctrl-single,pins = <
181                         0x18e (PIN_INPUT | MUX_MODE0)           /* i2c2_scl */
182                         0x190 (PIN_INPUT | MUX_MODE0)           /* i2c2_sda */
183                 >;
184         };
185
186         i2c3_pins: pinmux_i2c3_pins {
187                 pinctrl-single,pins = <
188                         0x192 (PIN_INPUT | MUX_MODE0)           /* i2c3_scl */
189                         0x194 (PIN_INPUT | MUX_MODE0)           /* i2c3_sda */
190                 >;
191         };
192
193         debug_leds: pinmux_debug_led_pins {
194                 pinctrl-single,pins = <
195                         OMAP3_CORE1_IOPAD(0x2198, PIN_OUTPUT | MUX_MODE4)       /* mcbsp1_clkx.gpio_162 */
196                 >;
197         };
198
199         mcspi4_pins: pinmux_mcspi4_pins {
200                 pinctrl-single,pins = <
201                         0x15c (PIN_INPUT_PULLDOWN | MUX_MODE1) /* mcspi4_clk */
202                         0x162 (PIN_INPUT_PULLDOWN | MUX_MODE1) /* mcspi4_somi */
203                         0x160 (PIN_OUTPUT | MUX_MODE1) /* mcspi4_simo */
204                         0x166 (PIN_OUTPUT | MUX_MODE1) /* mcspi4_cs0 */
205                 >;
206         };
207
208         mmc1_pins: pinmux_mmc1_pins {
209                 pinctrl-single,pins = <
210                         0x114 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_clk */
211                         0x116 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_cmd */
212                         0x118 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat0 */
213                         0x11a (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat1 */
214                         0x11c (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat2 */
215                         0x11e (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat3 */
216                 >;
217         };
218
219         mmc2_pins: pinmux_mmc2_pins {
220                 pinctrl-single,pins = <
221                         0x128 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_clk */
222                         0x12a (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_cmd */
223                         0x12c (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat0 */
224                         0x12e (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat1 */
225                         0x130 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat2 */
226                         0x132 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat3 */
227                         0x134 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat4 */
228                         0x136 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat5 */
229                         0x138 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat6 */
230                         0x13a (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat7 */
231                 >;
232         };
233
234         acx565akm_pins: pinmux_acx565akm_pins {
235                 pinctrl-single,pins = <
236                         0x0d4 (PIN_OUTPUT | MUX_MODE4)          /* RX51_LCD_RESET_GPIO */
237                 >;
238         };
239
240         dss_sdi_pins: pinmux_dss_sdi_pins {
241                 pinctrl-single,pins = <
242                         0x0c0 (PIN_OUTPUT | MUX_MODE1)   /* dss_data10.sdi_dat1n */
243                         0x0c2 (PIN_OUTPUT | MUX_MODE1)   /* dss_data11.sdi_dat1p */
244                         0x0c4 (PIN_OUTPUT | MUX_MODE1)   /* dss_data12.sdi_dat2n */
245                         0x0c6 (PIN_OUTPUT | MUX_MODE1)   /* dss_data13.sdi_dat2p */
246
247                         0x0d8 (PIN_OUTPUT | MUX_MODE1)   /* dss_data22.sdi_clkp */
248                         0x0da (PIN_OUTPUT | MUX_MODE1)   /* dss_data23.sdi_clkn */
249                 >;
250         };
251
252         wl1251_pins: pinmux_wl1251 {
253                 pinctrl-single,pins = <
254                         0x0ce (PIN_OUTPUT | MUX_MODE4)          /* gpio 87 => wl1251 enable */
255                         0x05a (PIN_INPUT | MUX_MODE4)           /* gpio 42 => wl1251 irq */
256                 >;
257         };
258
259         ssi_pins: pinmux_ssi {
260                 pinctrl-single,pins = <
261                         0x150 (PIN_INPUT_PULLUP | MUX_MODE1)    /* ssi1_rdy_tx */
262                         0x14e (PIN_OUTPUT | MUX_MODE1)          /* ssi1_flag_tx */
263                         0x152 (PIN_INPUT | WAKEUP_EN | MUX_MODE4) /* ssi1_wake_tx (cawake) */
264                         0x14c (PIN_OUTPUT | MUX_MODE1)          /* ssi1_dat_tx */
265                         0x154 (PIN_INPUT | MUX_MODE1)           /* ssi1_dat_rx */
266                         0x156 (PIN_INPUT | MUX_MODE1)           /* ssi1_flag_rx */
267                         0x158 (PIN_OUTPUT | MUX_MODE1)          /* ssi1_rdy_rx */
268                         0x15a (PIN_OUTPUT | MUX_MODE1)          /* ssi1_wake */
269                 >;
270         };
271
272         modem_pins: pinmux_modem {
273                 pinctrl-single,pins = <
274                         0x0ac (PIN_OUTPUT | MUX_MODE4)          /* gpio 70 => cmt_apeslpx */
275                         0x0b0 (PIN_INPUT | WAKEUP_EN | MUX_MODE4) /* gpio 72 => ape_rst_rq */
276                         0x0b2 (PIN_OUTPUT | MUX_MODE4)          /* gpio 73 => cmt_rst_rq */
277                         0x0b4 (PIN_OUTPUT | MUX_MODE4)          /* gpio 74 => cmt_en */
278                         0x0b6 (PIN_OUTPUT | MUX_MODE4)          /* gpio 75 => cmt_rst */
279                         0x15e (PIN_OUTPUT | MUX_MODE4)          /* gpio 157 => cmt_bsi */
280                 >;
281         };
282 };
283
284 &i2c1 {
285         pinctrl-names = "default";
286         pinctrl-0 = <&i2c1_pins>;
287
288         clock-frequency = <2200000>;
289
290         twl: twl@48 {
291                 reg = <0x48>;
292                 interrupts = <7>; /* SYS_NIRQ cascaded to intc */
293                 interrupt-parent = <&intc>;
294         };
295 };
296
297 #include "twl4030.dtsi"
298 #include "twl4030_omap3.dtsi"
299
300 &vaux1 {
301         regulator-name = "V28";
302         regulator-min-microvolt = <2800000>;
303         regulator-max-microvolt = <2800000>;
304         regulator-always-on; /* due battery cover sensor */
305 };
306
307 &vaux2 {
308         regulator-name = "VCSI";
309         regulator-min-microvolt = <1800000>;
310         regulator-max-microvolt = <1800000>;
311 };
312
313 &vaux3 {
314         regulator-name = "VMMC2_30";
315         regulator-min-microvolt = <2800000>;
316         regulator-max-microvolt = <3000000>;
317 };
318
319 &vaux4 {
320         regulator-name = "VCAM_ANA_28";
321         regulator-min-microvolt = <2800000>;
322         regulator-max-microvolt = <2800000>;
323 };
324
325 &vmmc1 {
326         regulator-name = "VMMC1";
327         regulator-min-microvolt = <1850000>;
328         regulator-max-microvolt = <3150000>;
329 };
330
331 &vmmc2 {
332         regulator-name = "V28_A";
333         regulator-min-microvolt = <2800000>;
334         regulator-max-microvolt = <3000000>;
335         regulator-always-on; /* due VIO leak to AIC34 VDDs */
336 };
337
338 &vpll1 {
339         regulator-name = "VPLL";
340         regulator-min-microvolt = <1800000>;
341         regulator-max-microvolt = <1800000>;
342         regulator-always-on;
343 };
344
345 &vpll2 {
346         regulator-name = "VSDI_CSI";
347         regulator-min-microvolt = <1800000>;
348         regulator-max-microvolt = <1800000>;
349         regulator-always-on;
350 };
351
352 &vsim {
353         regulator-name = "VMMC2_IO_18";
354         regulator-min-microvolt = <1800000>;
355         regulator-max-microvolt = <1800000>;
356 };
357
358 &vio {
359         regulator-name = "VIO";
360         regulator-min-microvolt = <1800000>;
361         regulator-max-microvolt = <1800000>;
362
363 };
364
365 &vintana1 {
366         regulator-name = "VINTANA1";
367         /* fixed to 1500000 */
368         regulator-always-on;
369 };
370
371 &vintana2 {
372         regulator-name = "VINTANA2";
373         regulator-min-microvolt = <2750000>;
374         regulator-max-microvolt = <2750000>;
375         regulator-always-on;
376 };
377
378 &vintdig {
379         regulator-name = "VINTDIG";
380         /* fixed to 1500000 */
381         regulator-always-on;
382 };
383
384 &twl {
385         twl_audio: audio {
386                 compatible = "ti,twl4030-audio";
387                 ti,enable-vibra = <1>;
388         };
389
390         twl_power: power {
391                 compatible = "ti,twl4030-power-n900", "ti,twl4030-power-idle-osc-off";
392                 ti,use_poweroff;
393         };
394 };
395
396 &twl_keypad {
397         linux,keymap = < MATRIX_KEY(0x00, 0x00, KEY_Q)
398                          MATRIX_KEY(0x00, 0x01, KEY_O)
399                          MATRIX_KEY(0x00, 0x02, KEY_P)
400                          MATRIX_KEY(0x00, 0x03, KEY_COMMA)
401                          MATRIX_KEY(0x00, 0x04, KEY_BACKSPACE)
402                          MATRIX_KEY(0x00, 0x06, KEY_A)
403                          MATRIX_KEY(0x00, 0x07, KEY_S)
404
405                          MATRIX_KEY(0x01, 0x00, KEY_W)
406                          MATRIX_KEY(0x01, 0x01, KEY_D)
407                          MATRIX_KEY(0x01, 0x02, KEY_F)
408                          MATRIX_KEY(0x01, 0x03, KEY_G)
409                          MATRIX_KEY(0x01, 0x04, KEY_H)
410                          MATRIX_KEY(0x01, 0x05, KEY_J)
411                          MATRIX_KEY(0x01, 0x06, KEY_K)
412                          MATRIX_KEY(0x01, 0x07, KEY_L)
413
414                          MATRIX_KEY(0x02, 0x00, KEY_E)
415                          MATRIX_KEY(0x02, 0x01, KEY_DOT)
416                          MATRIX_KEY(0x02, 0x02, KEY_UP)
417                          MATRIX_KEY(0x02, 0x03, KEY_ENTER)
418                          MATRIX_KEY(0x02, 0x05, KEY_Z)
419                          MATRIX_KEY(0x02, 0x06, KEY_X)
420                          MATRIX_KEY(0x02, 0x07, KEY_C)
421                          MATRIX_KEY(0x02, 0x08, KEY_F9)
422
423                          MATRIX_KEY(0x03, 0x00, KEY_R)
424                          MATRIX_KEY(0x03, 0x01, KEY_V)
425                          MATRIX_KEY(0x03, 0x02, KEY_B)
426                          MATRIX_KEY(0x03, 0x03, KEY_N)
427                          MATRIX_KEY(0x03, 0x04, KEY_M)
428                          MATRIX_KEY(0x03, 0x05, KEY_SPACE)
429                          MATRIX_KEY(0x03, 0x06, KEY_SPACE)
430                          MATRIX_KEY(0x03, 0x07, KEY_LEFT)
431
432                          MATRIX_KEY(0x04, 0x00, KEY_T)
433                          MATRIX_KEY(0x04, 0x01, KEY_DOWN)
434                          MATRIX_KEY(0x04, 0x02, KEY_RIGHT)
435                          MATRIX_KEY(0x04, 0x04, KEY_LEFTCTRL)
436                          MATRIX_KEY(0x04, 0x05, KEY_RIGHTALT)
437                          MATRIX_KEY(0x04, 0x06, KEY_LEFTSHIFT)
438                          MATRIX_KEY(0x04, 0x08, KEY_F10)
439
440                          MATRIX_KEY(0x05, 0x00, KEY_Y)
441                          MATRIX_KEY(0x05, 0x08, KEY_F11)
442
443                          MATRIX_KEY(0x06, 0x00, KEY_U)
444
445                          MATRIX_KEY(0x07, 0x00, KEY_I)
446                          MATRIX_KEY(0x07, 0x01, KEY_F7)
447                          MATRIX_KEY(0x07, 0x02, KEY_F8)
448                          >;
449 };
450
451 &twl_gpio {
452         ti,pullups      = <0x0>;
453         ti,pulldowns    = <0x03ff3f>; /* BIT(0..5) | BIT(8..17) */
454 };
455
456 &i2c2 {
457         pinctrl-names = "default";
458         pinctrl-0 = <&i2c2_pins>;
459
460         clock-frequency = <100000>;
461
462         tlv320aic3x: tlv320aic3x@18 {
463                 compatible = "ti,tlv320aic3x";
464                 reg = <0x18>;
465                 gpio-reset = <&gpio2 28 GPIO_ACTIVE_HIGH>; /* 60 */
466                 ai3x-gpio-func = <
467                         0 /* AIC3X_GPIO1_FUNC_DISABLED */
468                         5 /* AIC3X_GPIO2_FUNC_DIGITAL_MIC_INPUT */
469                 >;
470
471                 AVDD-supply = <&vmmc2>;
472                 DRVDD-supply = <&vmmc2>;
473                 IOVDD-supply = <&vio>;
474                 DVDD-supply = <&vio>;
475         };
476
477         tlv320aic3x_aux: tlv320aic3x@19 {
478                 compatible = "ti,tlv320aic3x";
479                 reg = <0x19>;
480                 gpio-reset = <&gpio2 28 GPIO_ACTIVE_HIGH>; /* 60 */
481
482                 AVDD-supply = <&vmmc2>;
483                 DRVDD-supply = <&vmmc2>;
484                 IOVDD-supply = <&vio>;
485                 DVDD-supply = <&vio>;
486         };
487
488         tsl2563: tsl2563@29 {
489                 compatible = "amstaos,tsl2563";
490                 reg = <0x29>;
491
492                 amstaos,cover-comp-gain = <16>;
493         };
494
495         lp5523: lp5523@32 {
496                 compatible = "national,lp5523";
497                 reg = <0x32>;
498                 clock-mode = /bits/ 8 <0>; /* LP55XX_CLOCK_AUTO */
499                 enable-gpio = <&gpio2 9 GPIO_ACTIVE_HIGH>; /* 41 */
500
501                 chan0 {
502                         chan-name = "lp5523:kb1";
503                         led-cur = /bits/ 8 <50>;
504                         max-cur = /bits/ 8 <100>;
505                 };
506
507                 chan1 {
508                         chan-name = "lp5523:kb2";
509                         led-cur = /bits/ 8 <50>;
510                         max-cur = /bits/ 8 <100>;
511                 };
512
513                 chan2 {
514                         chan-name = "lp5523:kb3";
515                         led-cur = /bits/ 8 <50>;
516                         max-cur = /bits/ 8 <100>;
517                 };
518
519                 chan3 {
520                         chan-name = "lp5523:kb4";
521                         led-cur = /bits/ 8 <50>;
522                         max-cur = /bits/ 8 <100>;
523                 };
524
525                 chan4 {
526                         chan-name = "lp5523:b";
527                         led-cur = /bits/ 8 <50>;
528                         max-cur = /bits/ 8 <100>;
529                 };
530
531                 chan5 {
532                         chan-name = "lp5523:g";
533                         led-cur = /bits/ 8 <50>;
534                         max-cur = /bits/ 8 <100>;
535                 };
536
537                 chan6 {
538                         chan-name = "lp5523:r";
539                         led-cur = /bits/ 8 <50>;
540                         max-cur = /bits/ 8 <100>;
541                 };
542
543                 chan7 {
544                         chan-name = "lp5523:kb5";
545                         led-cur = /bits/ 8 <50>;
546                         max-cur = /bits/ 8 <100>;
547                 };
548
549                 chan8 {
550                         chan-name = "lp5523:kb6";
551                         led-cur = /bits/ 8 <50>;
552                         max-cur = /bits/ 8 <100>;
553                 };
554         };
555
556         bq27200: bq27200@55 {
557                 compatible = "ti,bq27200";
558                 reg = <0x55>;
559         };
560
561         tpa6130a2: tpa6130a2@60 {
562                 compatible = "ti,tpa6130a2";
563                 reg = <0x60>;
564
565                 Vdd-supply = <&vmmc2>;
566
567                 power-gpio = <&gpio4 2 GPIO_ACTIVE_HIGH>; /* 98 */
568         };
569
570         bq24150a: bq24150a@6b {
571                 compatible = "ti,bq24150a";
572                 reg = <0x6b>;
573
574                 ti,current-limit = <100>;
575                 ti,weak-battery-voltage = <3400>;
576                 ti,battery-regulation-voltage = <4200>;
577                 ti,charge-current = <650>;
578                 ti,termination-current = <100>;
579                 ti,resistor-sense = <68>;
580
581                 ti,usb-charger-detection = <&isp1704>;
582         };
583 };
584
585 &i2c3 {
586         pinctrl-names = "default";
587         pinctrl-0 = <&i2c3_pins>;
588
589         clock-frequency = <400000>;
590 };
591
592 &mmc1 {
593         pinctrl-names = "default";
594         pinctrl-0 = <&mmc1_pins>;
595         vmmc-supply = <&vmmc1>;
596         bus-width = <4>;
597         cd-gpios = <&gpio6 0 GPIO_ACTIVE_HIGH>; /* 160 */
598 };
599
600 /* most boards use vaux3, only some old versions use vmmc2 instead */
601 &mmc2 {
602         pinctrl-names = "default";
603         pinctrl-0 = <&mmc2_pins>;
604         vmmc-supply = <&vaux3>;
605         vmmc_aux-supply = <&vsim>;
606         bus-width = <8>;
607         non-removable;
608 };
609
610 &mmc3 {
611         status = "disabled";
612 };
613
614 &gpmc {
615         ranges = <0 0 0x01000000 0x01000000>,   /* 16 MB for OneNAND */
616                  <1 0 0x02000000 0x01000000>;   /* 16 MB for smc91c96 */
617         pinctrl-names = "default";
618         pinctrl-0 = <&gpmc_pins>;
619
620         /* sys_ndmareq1 could be used by the driver, not as gpio65 though */
621         onenand@0,0 {
622                 #address-cells = <1>;
623                 #size-cells = <1>;
624                 reg = <0 0 0x20000>;    /* CS0, offset 0, IO size 128K */
625
626                 gpmc,sync-read;
627                 gpmc,sync-write;
628                 gpmc,burst-length = <16>;
629                 gpmc,burst-read;
630                 gpmc,burst-wrap;
631                 gpmc,burst-write;
632                 gpmc,device-width = <2>; /* GPMC_DEVWIDTH_16BIT */
633                 gpmc,mux-add-data = <2>; /* GPMC_MUX_AD */
634                 gpmc,cs-on-ns = <0>;
635                 gpmc,cs-rd-off-ns = <87>;
636                 gpmc,cs-wr-off-ns = <87>;
637                 gpmc,adv-on-ns = <0>;
638                 gpmc,adv-rd-off-ns = <10>;
639                 gpmc,adv-wr-off-ns = <10>;
640                 gpmc,oe-on-ns = <15>;
641                 gpmc,oe-off-ns = <87>;
642                 gpmc,we-on-ns = <0>;
643                 gpmc,we-off-ns = <87>;
644                 gpmc,rd-cycle-ns = <112>;
645                 gpmc,wr-cycle-ns = <112>;
646                 gpmc,access-ns = <81>;
647                 gpmc,page-burst-access-ns = <15>;
648                 gpmc,bus-turnaround-ns = <0>;
649                 gpmc,cycle2cycle-delay-ns = <0>;
650                 gpmc,wait-monitoring-ns = <0>;
651                 gpmc,clk-activation-ns = <5>;
652                 gpmc,wr-data-mux-bus-ns = <30>;
653                 gpmc,wr-access-ns = <81>;
654                 gpmc,sync-clk-ps = <15000>;
655
656                 /*
657                  * MTD partition table corresponding to Nokia's
658                  * Maemo 5 (Fremantle) release.
659                  */
660                 partition@0 {
661                         label = "bootloader";
662                         reg = <0x00000000 0x00020000>;
663                         read-only;
664                 };
665                 partition@1 {
666                         label = "config";
667                         reg = <0x00020000 0x00060000>;
668                 };
669                 partition@2 {
670                         label = "log";
671                         reg = <0x00080000 0x00040000>;
672                 };
673                 partition@3 {
674                         label = "kernel";
675                         reg = <0x000c0000 0x00200000>;
676                 };
677                 partition@4 {
678                         label = "initfs";
679                         reg = <0x002c0000 0x00200000>;
680                 };
681                 partition@5 {
682                         label = "rootfs";
683                         reg = <0x004c0000 0x0fb40000>;
684                 };
685         };
686
687         ethernet@gpmc {
688                 compatible = "smsc,lan91c94";
689
690                 status = "disabled";
691
692                 interrupt-parent = <&gpio2>;
693                 interrupts = <22 IRQ_TYPE_LEVEL_HIGH>;  /* gpio54 */
694                 reg = <1 0x300 0xf>;            /* 16 byte IO range at offset 0x300 */
695                 bank-width = <2>;
696                 pinctrl-names = "default";
697                 pinctrl-0 = <&ethernet_pins>;
698                 power-gpios = <&gpio3 22 GPIO_ACTIVE_HIGH>;     /* gpio86 */
699                 reset-gpios = <&gpio6 4 GPIO_ACTIVE_HIGH>;      /* gpio164 */
700                 gpmc,device-width = <2>;
701                 gpmc,sync-clk-ps = <0>;
702                 gpmc,cs-on-ns = <0>;
703                 gpmc,cs-rd-off-ns = <48>;
704                 gpmc,cs-wr-off-ns = <24>;
705                 gpmc,adv-on-ns = <0>;
706                 gpmc,adv-rd-off-ns = <0>;
707                 gpmc,adv-wr-off-ns = <0>;
708                 gpmc,we-on-ns = <12>;
709                 gpmc,we-off-ns = <18>;
710                 gpmc,oe-on-ns = <12>;
711                 gpmc,oe-off-ns = <48>;
712                 gpmc,page-burst-access-ns = <0>;
713                 gpmc,access-ns = <42>;
714                 gpmc,rd-cycle-ns = <180>;
715                 gpmc,wr-cycle-ns = <180>;
716                 gpmc,bus-turnaround-ns = <0>;
717                 gpmc,cycle2cycle-delay-ns = <0>;
718                 gpmc,wait-monitoring-ns = <0>;
719                 gpmc,clk-activation-ns = <0>;
720                 gpmc,wr-access-ns = <0>;
721                 gpmc,wr-data-mux-bus-ns = <12>;
722         };
723 };
724
725 &mcspi1 {
726         /*
727          * For some reason, touchscreen is necessary for screen to work at
728          * all on real hw. It works well without it on emulator.
729          *
730          * Also... order in the device tree actually matters here.
731          */
732         tsc2005@0 {
733                 compatible = "ti,tsc2005";
734                 spi-max-frequency = <6000000>;
735                 reg = <0>;
736
737                 vio-supply = <&vio>;
738
739                 reset-gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>; /* 104 */
740                 interrupts-extended = <&gpio4 4 IRQ_TYPE_EDGE_RISING>; /* 100 */
741
742                 touchscreen-fuzz-x = <4>;
743                 touchscreen-fuzz-y = <7>;
744                 touchscreen-fuzz-pressure = <2>;
745                 touchscreen-max-x = <4096>;
746                 touchscreen-max-y = <4096>;
747                 touchscreen-max-pressure = <2048>;
748
749                 ti,x-plate-ohms = <280>;
750                 ti,esd-recovery-timeout-ms = <8000>;
751         };
752
753         acx565akm@2 {
754                 compatible = "sony,acx565akm";
755                 spi-max-frequency = <6000000>;
756                 reg = <2>;
757
758                 pinctrl-names = "default";
759                 pinctrl-0 = <&acx565akm_pins>;
760
761                 label = "lcd";
762                 reset-gpios = <&gpio3 26 GPIO_ACTIVE_HIGH>; /* 90 */
763
764                 port {
765                         lcd_in: endpoint {
766                                 remote-endpoint = <&sdi_out>;
767                         };
768                 };
769         };
770 };
771
772 &mcspi4 {
773         pinctrl-names = "default";
774         pinctrl-0 = <&mcspi4_pins>;
775
776         wl1251@0 {
777                 pinctrl-names = "default";
778                 pinctrl-0 = <&wl1251_pins>;
779
780                 vio-supply = <&vio>;
781
782                 compatible = "ti,wl1251";
783                 reg = <0>;
784                 spi-max-frequency = <48000000>;
785
786                 spi-cpol;
787                 spi-cpha;
788
789                 ti,power-gpio = <&gpio3 23 GPIO_ACTIVE_HIGH>; /* 87 */
790
791                 interrupt-parent = <&gpio2>;
792                 interrupts = <10 IRQ_TYPE_NONE>; /* gpio line 42 */
793         };
794 };
795
796 &usb_otg_hs {
797         interface-type = <0>;
798         usb-phy = <&usb2_phy>;
799         phys = <&usb2_phy>;
800         phy-names = "usb2-phy";
801         mode = <2>;
802         power = <50>;
803 };
804
805 &uart1 {
806         status = "disabled";
807 };
808
809 &uart2 {
810         interrupts-extended = <&intc 73 &omap3_pmx_core OMAP3_UART2_RX>;
811         pinctrl-names = "default";
812         pinctrl-0 = <&uart2_pins>;
813 };
814
815 &uart3 {
816         interrupts-extended = <&intc 74 &omap3_pmx_core OMAP3_UART3_RX>;
817         pinctrl-names = "default";
818         pinctrl-0 = <&uart3_pins>;
819 };
820
821 &dss {
822         status = "ok";
823
824         pinctrl-names = "default";
825         pinctrl-0 = <&dss_sdi_pins>;
826
827         vdds_sdi-supply = <&vaux1>;
828
829         ports {
830                 #address-cells = <1>;
831                 #size-cells = <0>;
832
833                 port@1 {
834                         reg = <1>;
835
836                         sdi_out: endpoint {
837                                 remote-endpoint = <&lcd_in>;
838                                 datapairs = <2>;
839                         };
840                 };
841         };
842 };
843
844 &venc {
845         status = "ok";
846
847         vdda-supply = <&vdac>;
848
849         port {
850                 venc_out: endpoint {
851                         remote-endpoint = <&tv_connector_in>;
852                         ti,channels = <1>;
853                 };
854         };
855 };
856
857 &mcbsp2 {
858         status = "ok";
859 };
860
861 &ssi_port1 {
862         pinctrl-names = "default";
863         pinctrl-0 = <&ssi_pins>;
864
865         ti,ssi-cawake-gpio = <&gpio5 23 GPIO_ACTIVE_HIGH>; /* 151 */
866
867         modem: hsi-client {
868                 compatible = "nokia,n900-modem";
869
870                 pinctrl-names = "default";
871                 pinctrl-0 = <&modem_pins>;
872
873                 hsi-channel-ids = <0>, <1>, <2>, <3>;
874                 hsi-channel-names = "mcsaab-control",
875                                     "speech-control",
876                                     "speech-data",
877                                     "mcsaab-data";
878                 hsi-speed-kbps = <55000>;
879                 hsi-mode = "frame";
880                 hsi-flow = "synchronized";
881                 hsi-arb-mode = "round-robin";
882
883                 interrupts-extended = <&gpio3 8 IRQ_TYPE_EDGE_FALLING>; /* 72 */
884
885                 gpios = <&gpio3  6 GPIO_ACTIVE_HIGH>, /* 70 */
886                         <&gpio3  9 GPIO_ACTIVE_HIGH>, /* 73 */
887                         <&gpio3 10 GPIO_ACTIVE_HIGH>, /* 74 */
888                         <&gpio3 11 GPIO_ACTIVE_HIGH>, /* 75 */
889                         <&gpio5 29 GPIO_ACTIVE_HIGH>; /* 157 */
890                 gpio-names = "cmt_apeslpx",
891                              "cmt_rst_rq",
892                              "cmt_en",
893                              "cmt_rst",
894                              "cmt_bsi";
895         };
896 };
897
898 &ssi_port2 {
899         status = "disabled";
900 };