Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / omap4-droid4-xt894.dts
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License version 2 as
4  * published by the Free Software Foundation.
5  */
6 /dts-v1/;
7
8 #include <dt-bindings/input/input.h>
9 #include "omap443x.dtsi"
10 #include "motorola-cpcap-mapphone.dtsi"
11
12 / {
13         model = "Motorola Droid 4 XT894";
14         compatible = "motorola,droid4", "ti,omap4430", "ti,omap4";
15
16         chosen {
17                 stdout-path = &uart3;
18         };
19
20         aliases {
21                 display0 = &lcd0;
22                 display1 = &hdmi0;
23         };
24
25         /*
26          * We seem to have only 1021 MB accessible, 1021 - 1022 is locked,
27          * then 1023 - 1024 seems to contain mbm.
28          */
29         memory {
30                 device_type = "memory";
31                 reg = <0x80000000 0x3fd00000>;  /* 1021 MB */
32         };
33
34         /* Poweroff GPIO probably connected to CPCAP */
35         gpio-poweroff {
36                 compatible = "gpio-poweroff";
37                 pinctrl-0 = <&poweroff_gpio>;
38                 pinctrl-names = "default";
39                 gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;    /* gpio50 */
40         };
41
42         hdmi0: connector {
43                 compatible = "hdmi-connector";
44                 pinctrl-0 = <&hdmi_hpd_gpio>;
45                 pinctrl-names = "default";
46                 label = "hdmi";
47                 type = "d";
48
49                 hpd-gpios = <&gpio2 31 GPIO_ACTIVE_HIGH>;       /* gpio63 */
50
51                 port {
52                         hdmi_connector_in: endpoint {
53                                 remote-endpoint = <&hdmi_out>;
54                         };
55                 };
56         };
57
58         /*
59          * HDMI 5V regulator probably sourced from battery. Let's keep
60          * keep this as always enabled for HDMI to work until we've
61          * figured what the encoder chip is.
62          */
63         hdmi_regulator: regulator-hdmi {
64                 compatible = "regulator-fixed";
65                 regulator-name = "hdmi";
66                 regulator-min-microvolt = <5000000>;
67                 regulator-max-microvolt = <5000000>;
68                 gpio = <&gpio2 27 GPIO_ACTIVE_HIGH>;    /* gpio59 */
69                 enable-active-high;
70                 regulator-always-on;
71         };
72
73         /* FS USB Host PHY on port 1 for mdm6600 */
74         fsusb1_phy: usb-phy@1 {
75                 compatible = "motorola,mapphone-mdm6600";
76                 pinctrl-0 = <&usb_mdm6600_pins>;
77                 pinctrl-names = "default";
78                 enable-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>;     /* gpio_95 */
79                 power-gpios = <&gpio2 22 GPIO_ACTIVE_HIGH>;     /* gpio_54 */
80                 reset-gpios = <&gpio2 17 GPIO_ACTIVE_HIGH>;     /* gpio_49 */
81                 /* mode: gpio_148 gpio_149 */
82                 motorola,mode-gpios = <&gpio5 20 GPIO_ACTIVE_HIGH>,
83                                       <&gpio5 21 GPIO_ACTIVE_HIGH>;
84                 /* cmd: gpio_103 gpio_104 gpio_142 */
85                 motorola,cmd-gpios = <&gpio4 7 GPIO_ACTIVE_HIGH>,
86                                      <&gpio4 8 GPIO_ACTIVE_HIGH>,
87                                      <&gpio5 14 GPIO_ACTIVE_HIGH>;
88                 /* status: gpio_52 gpio_53 gpio_55 */
89                 motorola,status-gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>,
90                                         <&gpio2 21 GPIO_ACTIVE_HIGH>,
91                                         <&gpio2 23 GPIO_ACTIVE_HIGH>;
92                 #phy-cells = <0>;
93         };
94
95         /* HS USB host TLL nop-phy on port 2 for w3glte */
96         hsusb2_phy: usb-phy@2 {
97                 compatible = "usb-nop-xceiv";
98                 #phy-cells = <0>;
99         };
100
101         /* LCD regulator from sw5 source */
102         lcd_regulator: regulator-lcd {
103                 compatible = "regulator-fixed";
104                 regulator-name = "lcd";
105                 regulator-min-microvolt = <5050000>;
106                 regulator-max-microvolt = <5050000>;
107                 gpio = <&gpio4 0 GPIO_ACTIVE_HIGH>;     /* gpio96 */
108                 enable-active-high;
109                 vin-supply = <&sw5>;
110         };
111
112         /* This is probably coming straight from the battery.. */
113         wl12xx_vmmc: regulator-wl12xx {
114                 compatible = "regulator-fixed";
115                 regulator-name = "vwl1271";
116                 regulator-min-microvolt = <1650000>;
117                 regulator-max-microvolt = <1650000>;
118                 gpio = <&gpio3 30 GPIO_ACTIVE_HIGH>;    /* gpio94 */
119                 startup-delay-us = <70000>;
120                 enable-active-high;
121         };
122
123         gpio_keys {
124                 compatible = "gpio-keys";
125
126                 volume_down {
127                         label = "Volume Down";
128                         gpios = <&gpio5 26 GPIO_ACTIVE_LOW>; /* gpio154 */
129                         linux,code = <KEY_VOLUMEDOWN>;
130                         linux,can-disable;
131                         /* Value above 7.95ms for no GPIO hardware debounce */
132                         debounce-interval = <10>;
133                 };
134
135                 slider {
136                         label = "Keypad Slide";
137                         gpios = <&gpio4 26 GPIO_ACTIVE_HIGH>; /* gpio122 */
138                         linux,input-type = <EV_SW>;
139                         linux,code = <SW_KEYPAD_SLIDE>;
140                         linux,can-disable;
141                         /* Value above 7.95ms for no GPIO hardware debounce */
142                         debounce-interval = <10>;
143                 };
144         };
145
146         soundcard {
147                 compatible = "audio-graph-card";
148                 label = "Droid 4 Audio";
149
150                 simple-graph-card,widgets =
151                         "Speaker", "Earpiece",
152                         "Speaker", "Loudspeaker",
153                         "Headphone", "Headphone Jack",
154                         "Microphone", "Internal Mic";
155
156                 simple-graph-card,routing =
157                         "Earpiece", "EP",
158                         "Loudspeaker", "SPKR",
159                         "Headphone Jack", "HSL",
160                         "Headphone Jack", "HSR",
161                         "MICR", "Internal Mic";
162
163                 dais = <&mcbsp2_port>, <&mcbsp3_port>;
164         };
165
166         pwm8: dmtimer-pwm-8 {
167                 pinctrl-names = "default";
168                 pinctrl-0 = <&vibrator_direction_pin>;
169
170                 compatible = "ti,omap-dmtimer-pwm";
171                 #pwm-cells = <3>;
172                 ti,timers = <&timer8>;
173                 ti,clock-source = <0x01>;
174         };
175
176         pwm9: dmtimer-pwm-9 {
177                 pinctrl-names = "default";
178                 pinctrl-0 = <&vibrator_enable_pin>;
179
180                 compatible = "ti,omap-dmtimer-pwm";
181                 #pwm-cells = <3>;
182                 ti,timers = <&timer9>;
183                 ti,clock-source = <0x01>;
184         };
185
186         vibrator {
187                 compatible = "pwm-vibrator";
188                 pwms = <&pwm9 0 10000000 0>, <&pwm8 0 10000000 0>;
189                 pwm-names = "enable", "direction";
190                 direction-duty-cycle-ns = <10000000>;
191         };
192 };
193
194 &dss {
195         status = "okay";
196 };
197
198 &dsi1 {
199         status = "okay";
200         vdd-supply = <&vcsi>;
201
202         port {
203                 dsi1_out_ep: endpoint {
204                         remote-endpoint = <&lcd0_in>;
205                         lanes = <0 1 2 3 4 5>;
206                 };
207         };
208
209         lcd0: display {
210                 compatible = "panel-dsi-cm";
211                 label = "lcd0";
212                 vddi-supply = <&lcd_regulator>;
213                 reset-gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>;      /* gpio101 */
214
215                 width-mm = <50>;
216                 height-mm = <89>;
217
218                 panel-timing {
219                         clock-frequency = <0>;          /* Calculated by dsi */
220
221                         hback-porch = <2>;
222                         hactive = <540>;
223                         hfront-porch = <0>;
224                         hsync-len = <2>;
225
226                         vback-porch = <1>;
227                         vactive = <960>;
228                         vfront-porch = <0>;
229                         vsync-len = <1>;
230
231                         hsync-active = <0>;
232                         vsync-active = <0>;
233                         de-active = <1>;
234                         pixelclk-active = <1>;
235                 };
236
237                 port {
238                         lcd0_in: endpoint {
239                                 remote-endpoint = <&dsi1_out_ep>;
240                         };
241                 };
242         };
243 };
244
245 &hdmi {
246         status = "okay";
247         pinctrl-0 = <&dss_hdmi_pins>;
248         pinctrl-names = "default";
249         vdda-supply = <&vdac>;
250
251         port {
252                 hdmi_out: endpoint {
253                         remote-endpoint = <&hdmi_connector_in>;
254                         lanes = <1 0 3 2 5 4 7 6>;
255                 };
256         };
257 };
258
259 &i2c1 {
260         tmp105@48 {
261                 compatible = "ti,tmp105";
262                 reg = <0x48>;
263                 pinctrl-0 = <&tmp105_irq>;
264                 pinctrl-names = "default";
265                 /* kpd_row0.gpio_178 */
266                 interrupts-extended = <&gpio6 18 IRQ_TYPE_EDGE_FALLING
267                                        &omap4_pmx_core 0x14e>;
268                 interrupt-names = "irq", "wakeup";
269                 wakeup-source;
270         };
271 };
272
273 &keypad {
274         keypad,num-rows = <8>;
275         keypad,num-columns = <8>;
276         linux,keymap = <
277
278         /* Row 1 */
279         MATRIX_KEY(0, 2, KEY_1)
280         MATRIX_KEY(0, 6, KEY_2)
281         MATRIX_KEY(2, 3, KEY_3)
282         MATRIX_KEY(0, 7, KEY_4)
283         MATRIX_KEY(0, 4, KEY_5)
284         MATRIX_KEY(5, 5, KEY_6)
285         MATRIX_KEY(0, 1, KEY_7)
286         MATRIX_KEY(0, 5, KEY_8)
287         MATRIX_KEY(0, 0, KEY_9)
288         MATRIX_KEY(1, 6, KEY_0)
289
290         /* Row 2 */
291         MATRIX_KEY(3, 4, KEY_APOSTROPHE)
292         MATRIX_KEY(7, 6, KEY_Q)
293         MATRIX_KEY(7, 7, KEY_W)
294         MATRIX_KEY(7, 2, KEY_E)
295         MATRIX_KEY(1, 0, KEY_R)
296         MATRIX_KEY(4, 4, KEY_T)
297         MATRIX_KEY(1, 2, KEY_Y)
298         MATRIX_KEY(6, 7, KEY_U)
299         MATRIX_KEY(2, 2, KEY_I)
300         MATRIX_KEY(5, 6, KEY_O)
301         MATRIX_KEY(3, 7, KEY_P)
302         MATRIX_KEY(6, 5, KEY_BACKSPACE)
303
304         /* Row 3 */
305         MATRIX_KEY(5, 4, KEY_TAB)
306         MATRIX_KEY(5, 7, KEY_A)
307         MATRIX_KEY(2, 7, KEY_S)
308         MATRIX_KEY(7, 0, KEY_D)
309         MATRIX_KEY(2, 6, KEY_F)
310         MATRIX_KEY(6, 2, KEY_G)
311         MATRIX_KEY(6, 6, KEY_H)
312         MATRIX_KEY(1, 4, KEY_J)
313         MATRIX_KEY(3, 1, KEY_K)
314         MATRIX_KEY(2, 1, KEY_L)
315         MATRIX_KEY(4, 6, KEY_ENTER)
316
317         /* Row 4 */
318         MATRIX_KEY(3, 6, KEY_LEFTSHIFT)         /* KEY_CAPSLOCK */
319         MATRIX_KEY(6, 1, KEY_Z)
320         MATRIX_KEY(7, 4, KEY_X)
321         MATRIX_KEY(5, 1, KEY_C)
322         MATRIX_KEY(1, 7, KEY_V)
323         MATRIX_KEY(2, 4, KEY_B)
324         MATRIX_KEY(4, 1, KEY_N)
325         MATRIX_KEY(1, 1, KEY_M)
326         MATRIX_KEY(3, 5, KEY_COMMA)
327         MATRIX_KEY(5, 2, KEY_DOT)
328         MATRIX_KEY(6, 3, KEY_UP)
329         MATRIX_KEY(7, 3, KEY_OK)
330
331         /* Row 5 */
332         MATRIX_KEY(2, 5, KEY_LEFTCTRL)          /* KEY_LEFTSHIFT */
333         MATRIX_KEY(4, 5, KEY_LEFTALT)           /* SYM */
334         MATRIX_KEY(6, 0, KEY_MINUS)
335         MATRIX_KEY(4, 7, KEY_EQUAL)
336         MATRIX_KEY(1, 5, KEY_SPACE)
337         MATRIX_KEY(3, 2, KEY_SLASH)
338         MATRIX_KEY(4, 3, KEY_LEFT)
339         MATRIX_KEY(5, 3, KEY_DOWN)
340         MATRIX_KEY(3, 3, KEY_RIGHT)
341
342         /* Side buttons, KEY_VOLUMEDOWN and KEY_PWER are on CPCAP? */
343         MATRIX_KEY(5, 0, KEY_VOLUMEUP)
344         >;
345 };
346
347 &mmc1 {
348         vmmc-supply = <&vwlan2>;
349         bus-width = <4>;
350         cd-gpios = <&gpio6 16 GPIO_ACTIVE_LOW>; /* gpio176 */
351 };
352
353 &mmc2 {
354         vmmc-supply = <&vsdio>;
355         bus-width = <8>;
356         ti,non-removable;
357 };
358
359 &mmc3 {
360         vmmc-supply = <&wl12xx_vmmc>;
361         /* uart2_tx.sdmmc3_dat1 pad as wakeirq */
362         interrupts-extended = <&wakeupgen GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH
363                                &omap4_pmx_core 0xde>;
364         interrupt-names = "irq", "wakeup";
365         non-removable;
366         bus-width = <4>;
367         cap-power-off-card;
368         keep-power-in-suspend;
369
370         #address-cells = <1>;
371         #size-cells = <0>;
372         wlcore: wlcore@2 {
373                 compatible = "ti,wl1285", "ti,wl1283";
374                 reg = <2>;
375                 /* gpio_100 with gpmc_wait2 pad as wakeirq */
376                 interrupts-extended = <&gpio4 4 IRQ_TYPE_EDGE_RISING>,
377                                       <&omap4_pmx_core 0x4e>;
378                 interrupt-names = "irq", "wakeup";
379                 ref-clock-frequency = <26000000>;
380                 tcxo-clock-frequency = <26000000>;
381         };
382 };
383
384 &i2c1 {
385         led-controller@38 {
386                 compatible = "ti,lm3532";
387                 #address-cells = <1>;
388                 #size-cells = <0>;
389                 reg = <0x38>;
390
391                 enable-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>;
392
393                 ramp-up-us = <1024>;
394                 ramp-down-us = <8193>;
395
396                 led@0 {
397                         reg = <0>;
398                         led-sources = <2>;
399                         ti,led-mode = <0>;
400                         label = ":backlight";
401                         linux,default-trigger = "backlight";
402                 };
403
404                 led@1 {
405                         reg = <1>;
406                         led-sources = <1>;
407                         ti,led-mode = <0>;
408                         label = ":kbd_backlight";
409                 };
410         };
411 };
412
413 &i2c2 {
414         touchscreen@4a {
415                 compatible = "atmel,maxtouch";
416                 reg = <0x4a>;
417                 pinctrl-names = "default";
418                 pinctrl-0 = <&touchscreen_pins>;
419
420                 reset-gpios = <&gpio6 13 GPIO_ACTIVE_HIGH>; /* gpio173 */
421
422                 /* gpio_183 with sys_nirq2 pad as wakeup */
423                 interrupts-extended = <&gpio6 23 IRQ_TYPE_EDGE_FALLING>,
424                                       <&omap4_pmx_core 0x160>;
425                 interrupt-names = "irq", "wakeup";
426                 wakeup-source;
427         };
428
429         isl29030@44 {
430                 compatible = "isil,isl29030";
431                 reg = <0x44>;
432
433                 pinctrl-names = "default";
434                 pinctrl-0 = <&als_proximity_pins>;
435
436                 interrupt-parent = <&gpio6>;
437                 interrupts = <17 IRQ_TYPE_LEVEL_LOW>; /* gpio177 */
438         };
439 };
440
441 &omap4_pmx_core {
442
443         /* hdmi_hpd.gpio_63 */
444         hdmi_hpd_gpio: pinmux_hdmi_hpd_pins {
445                 pinctrl-single,pins = <
446                 OMAP4_IOPAD(0x098, PIN_INPUT | MUX_MODE3)
447                 >;
448         };
449
450         /* hdmi_cec.hdmi_cec, hdmi_scl.hdmi_scl, hdmi_sda.hdmi_sda */
451         dss_hdmi_pins: pinmux_dss_hdmi_pins {
452                 pinctrl-single,pins = <
453                 OMAP4_IOPAD(0x09a, PIN_INPUT | MUX_MODE0)
454                 OMAP4_IOPAD(0x09c, PIN_INPUT | MUX_MODE0)
455                 OMAP4_IOPAD(0x09e, PIN_INPUT | MUX_MODE0)
456                 >;
457         };
458
459         /* gpmc_ncs0.gpio_50 */
460         poweroff_gpio: pinmux_poweroff_pins {
461                 pinctrl-single,pins = <
462                 OMAP4_IOPAD(0x074, PIN_OUTPUT_PULLUP | MUX_MODE3)
463                 >;
464         };
465
466         /* kpd_row0.gpio_178 */
467         tmp105_irq: pinmux_tmp105_irq {
468                 pinctrl-single,pins = <
469                 OMAP4_IOPAD(0x18e, PIN_INPUT_PULLUP | MUX_MODE3)
470                 >;
471         };
472
473         usb_gpio_mux_sel1: pinmux_usb_gpio_mux_sel1_pins {
474                 /* gpio_60 */
475                 pinctrl-single,pins = <
476                 OMAP4_IOPAD(0x088, PIN_OUTPUT | MUX_MODE3)
477                 >;
478         };
479
480         touchscreen_pins: pinmux_touchscreen_pins {
481                 pinctrl-single,pins = <
482                 OMAP4_IOPAD(0x180, PIN_OUTPUT | MUX_MODE3)
483                 OMAP4_IOPAD(0x1a0, PIN_INPUT_PULLUP | MUX_MODE3)
484                 >;
485         };
486
487         als_proximity_pins: pinmux_als_proximity_pins {
488                 pinctrl-single,pins = <
489                 OMAP4_IOPAD(0x18c, PIN_INPUT_PULLUP | MUX_MODE3)
490                 >;
491         };
492
493         usb_mdm6600_pins: pinmux_usb_mdm6600_pins {
494                 pinctrl-single,pins = <
495                 /* enable 0x4a1000d8 usbb1_ulpitll_dat7.gpio_95 ag16 */
496                 OMAP4_IOPAD(0x0d8, PIN_INPUT | MUX_MODE3)
497
498                 /* power 0x4a10007c gpmc_nwp.gpio_54 c25 */
499                 OMAP4_IOPAD(0x07c, PIN_OUTPUT | MUX_MODE3)
500
501                 /* reset 0x4a100072 gpmc_a25.gpio_49 d20 */
502                 OMAP4_IOPAD(0x072, PIN_OUTPUT | MUX_MODE3)
503
504                 /* mode0/bpwake 0x4a10014e sdmmc5_dat1.gpio_148 af4 */
505                 OMAP4_IOPAD(0x14e, PIN_OUTPUT | MUX_MODE3)
506
507                 /* mode1/apwake 0x4a100150 sdmmc5_dat2.gpio_149 ag3 */
508                 OMAP4_IOPAD(0x150, PIN_OFF_OUTPUT_LOW | PIN_INPUT | MUX_MODE3)
509
510                 /* status0 0x4a10007e gpmc_clk.gpio_55 b22 */
511                 OMAP4_IOPAD(0x07e, PIN_INPUT | MUX_MODE3)
512
513                 /* status1 0x4a10007a gpmc_ncs3.gpio_53 c22 */
514                 OMAP4_IOPAD(0x07a, PIN_INPUT | MUX_MODE3)
515
516                 /* status2 0x4a100078 gpmc_ncs2.gpio_52 d21 */
517                 OMAP4_IOPAD(0x078, PIN_INPUT | MUX_MODE3)
518
519                 /* cmd0 0x4a100094 gpmc_ncs6.gpio_103 c24 */
520                 OMAP4_IOPAD(0x094, PIN_OUTPUT | MUX_MODE3)
521
522                 /* cmd1 0x4a100096 gpmc_ncs7.gpio_104 d24 */
523                 OMAP4_IOPAD(0x096, PIN_OUTPUT | MUX_MODE3)
524
525                 /* cmd2 0x4a100142 uart3_rts_sd.gpio_142 f28 */
526                 OMAP4_IOPAD(0x142, PIN_OUTPUT | MUX_MODE3)
527                 >;
528         };
529
530         usb_ulpi_pins: pinmux_usb_ulpi_pins {
531                 pinctrl-single,pins = <
532                 OMAP4_IOPAD(0x196, MUX_MODE7)
533                 OMAP4_IOPAD(0x198, MUX_MODE7)
534                 OMAP4_IOPAD(0x1b2, PIN_INPUT_PULLUP | MUX_MODE0)
535                 OMAP4_IOPAD(0x1b4, PIN_INPUT_PULLUP | MUX_MODE0)
536                 OMAP4_IOPAD(0x1b6, PIN_INPUT_PULLUP | MUX_MODE0)
537                 OMAP4_IOPAD(0x1b8, PIN_INPUT_PULLUP | MUX_MODE0)
538                 OMAP4_IOPAD(0x1ba, PIN_INPUT_PULLUP | MUX_MODE0)
539                 OMAP4_IOPAD(0x1bc, PIN_INPUT_PULLUP | MUX_MODE0)
540                 OMAP4_IOPAD(0x1be, PIN_INPUT_PULLUP | MUX_MODE0)
541                 OMAP4_IOPAD(0x1c0, PIN_INPUT_PULLUP | MUX_MODE0)
542                 OMAP4_IOPAD(0x1c2, PIN_INPUT_PULLUP | MUX_MODE0)
543                 OMAP4_IOPAD(0x1c4, PIN_INPUT_PULLUP | MUX_MODE0)
544                 OMAP4_IOPAD(0x1c6, PIN_INPUT_PULLUP | MUX_MODE0)
545                 OMAP4_IOPAD(0x1c8, PIN_INPUT_PULLUP | MUX_MODE0)
546                 >;
547         };
548
549         /* usb0_otg_dp and usb0_otg_dm */
550         usb_utmi_pins: pinmux_usb_utmi_pins {
551                 pinctrl-single,pins = <
552                 OMAP4_IOPAD(0x196, PIN_INPUT | MUX_MODE0)
553                 OMAP4_IOPAD(0x198, PIN_INPUT | MUX_MODE0)
554                 OMAP4_IOPAD(0x1b2, PIN_INPUT_PULLUP | MUX_MODE7)
555                 OMAP4_IOPAD(0x1b4, PIN_INPUT_PULLUP | MUX_MODE7)
556                 OMAP4_IOPAD(0x1b6, PIN_INPUT_PULLUP | MUX_MODE7)
557                 OMAP4_IOPAD(0x1b8, PIN_INPUT_PULLUP | MUX_MODE7)
558                 OMAP4_IOPAD(0x1ba, PIN_INPUT_PULLUP | MUX_MODE7)
559                 OMAP4_IOPAD(0x1bc, PIN_INPUT_PULLUP | MUX_MODE7)
560                 OMAP4_IOPAD(0x1be, PIN_INPUT_PULLUP | MUX_MODE7)
561                 OMAP4_IOPAD(0x1c0, PIN_INPUT_PULLUP | MUX_MODE7)
562                 OMAP4_IOPAD(0x1c2, PIN_INPUT_PULLUP | MUX_MODE7)
563                 OMAP4_IOPAD(0x1c4, PIN_INPUT_PULLUP | MUX_MODE7)
564                 OMAP4_IOPAD(0x1c6, PIN_INPUT_PULLUP | MUX_MODE7)
565                 OMAP4_IOPAD(0x1c8, PIN_INPUT_PULLUP | MUX_MODE7)
566                 >;
567         };
568
569         /*
570          * Note that the v3.0.8 stock userspace dynamically remuxes uart1
571          * rts pin probably for PM purposes to PIN_INPUT_PULLUP | MUX_MODE7
572          * when not used. If needed, we can add rts pin remux later based
573          * on power measurements.
574          */
575         uart1_pins: pinmux_uart1_pins {
576                 pinctrl-single,pins = <
577                 /* 0x4a10013c mcspi1_cs2.uart1_cts ag23 */
578                 OMAP4_IOPAD(0x13c, PIN_INPUT_PULLUP | MUX_MODE1)
579
580                 /* 0x4a10013e mcspi1_cs3.uart1_rts ah23 */
581                 OMAP4_IOPAD(0x13e, MUX_MODE1)
582
583                 /* 0x4a100140 uart3_cts_rctx.uart1_tx f27 */
584                 OMAP4_IOPAD(0x140, PIN_OUTPUT | MUX_MODE1)
585
586                 /* 0x4a1001ca dpm_emu14.uart1_rx aa3 */
587                 OMAP4_IOPAD(0x1ca, PIN_INPUT_PULLUP | MUX_MODE2)
588                 >;
589         };
590
591         /* uart3_tx_irtx and uart3_rx_irrx */
592         uart3_pins: pinmux_uart3_pins {
593                 pinctrl-single,pins = <
594                 OMAP4_IOPAD(0x196, MUX_MODE7)
595                 OMAP4_IOPAD(0x198, MUX_MODE7)
596                 OMAP4_IOPAD(0x1b2, PIN_INPUT_PULLUP | MUX_MODE7)
597                 OMAP4_IOPAD(0x1b4, PIN_INPUT_PULLUP | MUX_MODE7)
598                 OMAP4_IOPAD(0x1b6, PIN_INPUT_PULLUP | MUX_MODE7)
599                 OMAP4_IOPAD(0x1b8, PIN_INPUT_PULLUP | MUX_MODE7)
600                 OMAP4_IOPAD(0x1ba, MUX_MODE2)
601                 OMAP4_IOPAD(0x1bc, PIN_INPUT | MUX_MODE2)
602                 OMAP4_IOPAD(0x1be, PIN_INPUT_PULLUP | MUX_MODE7)
603                 OMAP4_IOPAD(0x1c0, PIN_INPUT_PULLUP | MUX_MODE7)
604                 OMAP4_IOPAD(0x1c2, PIN_INPUT_PULLUP | MUX_MODE7)
605                 OMAP4_IOPAD(0x1c4, PIN_INPUT_PULLUP | MUX_MODE7)
606                 OMAP4_IOPAD(0x1c6, PIN_INPUT_PULLUP | MUX_MODE7)
607                 OMAP4_IOPAD(0x1c8, PIN_INPUT_PULLUP | MUX_MODE7)
608                 >;
609         };
610
611         uart4_pins: pinmux_uart4_pins {
612                 pinctrl-single,pins = <
613                 OMAP4_IOPAD(0x15c, PIN_INPUT | MUX_MODE0)               /* uart4_rx */
614                 OMAP4_IOPAD(0x15e, PIN_OUTPUT | MUX_MODE0)              /* uart4_tx */
615                 OMAP4_IOPAD(0x110, PIN_INPUT_PULLUP | MUX_MODE5)        /* uart4_cts */
616                 OMAP4_IOPAD(0x112, PIN_OUTPUT_PULLUP | MUX_MODE5)       /* uart4_rts */
617                 >;
618         };
619
620         mcbsp2_pins: pinmux_mcbsp2_pins {
621                 pinctrl-single,pins = <
622                 OMAP4_IOPAD(0x0f6, PIN_INPUT | MUX_MODE0)       /* abe_mcbsp2_clkx */
623                 OMAP4_IOPAD(0x0f8, PIN_INPUT | MUX_MODE0)       /* abe_mcbsp2_dr */
624                 OMAP4_IOPAD(0x0fa, PIN_OUTPUT | MUX_MODE0)      /* abe_mcbsp2_dx */
625                 OMAP4_IOPAD(0x0fc, PIN_INPUT | MUX_MODE0)       /* abe_mcbsp2_fsx */
626                 >;
627         };
628
629         mcbsp3_pins: pinmux_mcbsp3_pins {
630                 pinctrl-single,pins = <
631                 OMAP4_IOPAD(0x106, PIN_INPUT | MUX_MODE1)       /* abe_mcbsp3_dr */
632                 OMAP4_IOPAD(0x108, PIN_OUTPUT | MUX_MODE1)      /* abe_mcbsp3_dx */
633                 OMAP4_IOPAD(0x10a, PIN_INPUT | MUX_MODE1)       /* abe_mcbsp3_clkx */
634                 OMAP4_IOPAD(0x10c, PIN_INPUT | MUX_MODE1)       /* abe_mcbsp3_fsx */
635                 >;
636         };
637
638         vibrator_direction_pin: pinmux_vibrator_direction_pin {
639                 pinctrl-single,pins = <
640                 OMAP4_IOPAD(0x1ce, PIN_OUTPUT | MUX_MODE1)      /* dmtimer8_pwm_evt (gpio_27) */
641                 >;
642         };
643
644         vibrator_enable_pin: pinmux_vibrator_enable_pin {
645                 pinctrl-single,pins = <
646                 OMAP4_IOPAD(0X1d0, PIN_OUTPUT | MUX_MODE1)      /* dmtimer9_pwm_evt (gpio_28) */
647                 >;
648         };
649 };
650
651 &omap4_pmx_wkup {
652         usb_gpio_mux_sel2: pinmux_usb_gpio_mux_sel2_pins {
653                 /* gpio_wk0 */
654                 pinctrl-single,pins = <
655                 OMAP4_IOPAD(0x040, PIN_OUTPUT_PULLDOWN | MUX_MODE3)
656                 >;
657         };
658 };
659
660 /* Configure pwm clock source for timers 8 & 9 */
661 &timer8 {
662         assigned-clocks = <&abe_clkctrl OMAP4_TIMER8_CLKCTRL 24>;
663         assigned-clock-parents = <&sys_clkin_ck>;
664 };
665
666 &timer9 {
667         assigned-clocks = <&l4_per_clkctrl OMAP4_TIMER9_CLKCTRL 24>;
668         assigned-clock-parents = <&sys_clkin_ck>;
669 };
670
671 /*
672  * As uart1 is wired to mdm6600 with rts and cts, we can use the cts pin for
673  * uart1 wakeirq.
674  */
675 &uart1 {
676         pinctrl-names = "default";
677         pinctrl-0 = <&uart1_pins>;
678         interrupts-extended = <&wakeupgen GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH
679                                &omap4_pmx_core 0xfc>;
680 };
681
682 &uart3 {
683         interrupts-extended = <&wakeupgen GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH
684                                &omap4_pmx_core 0x17c>;
685 };
686
687 &uart4 {
688         pinctrl-names = "default";
689         pinctrl-0 = <&uart4_pins>;
690
691         bluetooth {
692                 compatible = "ti,wl1285-st";
693                 enable-gpios = <&gpio6 14 GPIO_ACTIVE_HIGH>; /* gpio 174 */
694                 max-speed = <3686400>;
695         };
696 };
697
698 &usbhsohci {
699         phys = <&fsusb1_phy>;
700         phy-names = "usb";
701 };
702
703 &usbhsehci {
704         phys = <&hsusb2_phy>;
705 };
706
707 &usbhshost {
708         port1-mode = "ohci-phy-4pin-dpdm";
709         port2-mode = "ehci-tll";
710 };
711
712 /* Internal UTMI+ PHY used for OTG, CPCAP ULPI PHY for detection and charger */
713 &usb_otg_hs {
714         interface-type = <1>;
715         mode = <3>;
716         power = <50>;
717 };
718
719 &i2c4 {
720         ak8975: magnetometer@c {
721                 compatible = "asahi-kasei,ak8975";
722                 reg = <0x0c>;
723
724                 vdd-supply = <&vhvio>;
725
726                 interrupt-parent = <&gpio6>;
727                 interrupts = <15 IRQ_TYPE_EDGE_RISING>; /* gpio175 */
728
729                 rotation-matrix = "-1", "0", "0",
730                                   "0", "1", "0",
731                                   "0", "0", "-1";
732
733         };
734
735         lis3dh: accelerometer@18 {
736                 compatible = "st,lis3dh-accel";
737                 reg = <0x18>;
738
739                 vdd-supply = <&vhvio>;
740
741                 interrupt-parent = <&gpio2>;
742                 interrupts = <2 IRQ_TYPE_EDGE_BOTH>; /* gpio34 */
743
744                 rotation-matrix = "0", "-1", "0",
745                                   "1", "0", "0",
746                                   "0", "0", "1";
747         };
748 };
749
750 &mcbsp2 {
751         #sound-dai-cells = <0>;
752         pinctrl-names = "default";
753         pinctrl-0 = <&mcbsp2_pins>;
754         status = "okay";
755
756         mcbsp2_port: port {
757                 cpu_dai2: endpoint {
758                         dai-format = "i2s";
759                         remote-endpoint = <&cpcap_audio_codec0>;
760                         frame-master = <&cpcap_audio_codec0>;
761                         bitclock-master = <&cpcap_audio_codec0>;
762                 };
763         };
764 };
765
766 &mcbsp3 {
767         #sound-dai-cells = <0>;
768         pinctrl-names = "default";
769         pinctrl-0 = <&mcbsp3_pins>;
770         status = "okay";
771
772         mcbsp3_port: port {
773                 cpu_dai3: endpoint {
774                         dai-format = "dsp_a";
775                         frame-master = <&cpcap_audio_codec1>;
776                         bitclock-master = <&cpcap_audio_codec1>;
777                         remote-endpoint = <&cpcap_audio_codec1>;
778                 };
779         };
780 };
781
782 &cpcap_audio_codec0 {
783         remote-endpoint = <&cpu_dai2>;
784 };
785
786 &cpcap_audio_codec1 {
787         remote-endpoint = <&cpu_dai3>;
788 };