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