]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - src/arm/omap4-droid4-xt894.dts
Import latest DTS files from Linux 4.18
[FreeBSD/FreeBSD.git] / src / arm / 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                 };
132
133                 slider {
134                         label = "Keypad Slide";
135                         gpios = <&gpio4 26 GPIO_ACTIVE_HIGH>; /* gpio122 */
136                         linux,input-type = <EV_SW>;
137                         linux,code = <SW_KEYPAD_SLIDE>;
138                         linux,can-disable;
139
140                 };
141         };
142
143         soundcard {
144                 compatible = "audio-graph-card";
145                 label = "Droid 4 Audio";
146
147                 simple-graph-card,widgets =
148                         "Speaker", "Earpiece",
149                         "Speaker", "Loudspeaker",
150                         "Headphone", "Headphone Jack",
151                         "Microphone", "Internal Mic";
152
153                 simple-graph-card,routing =
154                         "Earpiece", "EP",
155                         "Loudspeaker", "SPKR",
156                         "Headphone Jack", "HSL",
157                         "Headphone Jack", "HSR",
158                         "MICR", "Internal Mic";
159
160                 dais = <&mcbsp2_port>, <&mcbsp3_port>;
161         };
162
163         pwm8: dmtimer-pwm-8 {
164                 pinctrl-names = "default";
165                 pinctrl-0 = <&vibrator_direction_pin>;
166
167                 compatible = "ti,omap-dmtimer-pwm";
168                 #pwm-cells = <3>;
169                 ti,timers = <&timer8>;
170                 ti,clock-source = <0x01>;
171         };
172
173         pwm9: dmtimer-pwm-9 {
174                 pinctrl-names = "default";
175                 pinctrl-0 = <&vibrator_enable_pin>;
176
177                 compatible = "ti,omap-dmtimer-pwm";
178                 #pwm-cells = <3>;
179                 ti,timers = <&timer9>;
180                 ti,clock-source = <0x01>;
181         };
182
183         vibrator {
184                 compatible = "pwm-vibrator";
185                 pwms = <&pwm9 0 10000000 0>, <&pwm8 0 10000000 0>;
186                 pwm-names = "enable", "direction";
187                 direction-duty-cycle-ns = <10000000>;
188         };
189 };
190
191 &dss {
192         status = "okay";
193 };
194
195 &dsi1 {
196         status = "okay";
197         vdd-supply = <&vcsi>;
198
199         port {
200                 dsi1_out_ep: endpoint {
201                         remote-endpoint = <&lcd0_in>;
202                         lanes = <0 1 2 3 4 5>;
203                 };
204         };
205
206         lcd0: display {
207                 compatible = "panel-dsi-cm";
208                 label = "lcd0";
209                 vddi-supply = <&lcd_regulator>;
210                 reset-gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>;      /* gpio101 */
211
212                 width-mm = <50>;
213                 height-mm = <89>;
214                 backlight = <&lcd_backlight>;
215
216                 panel-timing {
217                         clock-frequency = <0>;          /* Calculated by dsi */
218
219                         hback-porch = <2>;
220                         hactive = <540>;
221                         hfront-porch = <0>;
222                         hsync-len = <2>;
223
224                         vback-porch = <1>;
225                         vactive = <960>;
226                         vfront-porch = <0>;
227                         vsync-len = <1>;
228
229                         hsync-active = <0>;
230                         vsync-active = <0>;
231                         de-active = <1>;
232                         pixelclk-active = <1>;
233                 };
234
235                 port {
236                         lcd0_in: endpoint {
237                                 remote-endpoint = <&dsi1_out_ep>;
238                         };
239                 };
240         };
241 };
242
243 &hdmi {
244         status = "okay";
245         pinctrl-0 = <&dss_hdmi_pins>;
246         pinctrl-names = "default";
247         vdda-supply = <&vdac>;
248
249         port {
250                 hdmi_out: endpoint {
251                         remote-endpoint = <&hdmi_connector_in>;
252                         lanes = <1 0 3 2 5 4 7 6>;
253                 };
254         };
255 };
256
257 &i2c1 {
258         tmp105@48 {
259                 compatible = "ti,tmp105";
260                 reg = <0x48>;
261                 pinctrl-0 = <&tmp105_irq>;
262                 pinctrl-names = "default";
263                 /* kpd_row0.gpio_178 */
264                 interrupts-extended = <&gpio6 18 IRQ_TYPE_EDGE_FALLING
265                                        &omap4_pmx_core 0x14e>;
266                 interrupt-names = "irq", "wakeup";
267                 wakeup-source;
268         };
269 };
270
271 &keypad {
272         keypad,num-rows = <8>;
273         keypad,num-columns = <8>;
274         linux,keymap = <
275
276         /* Row 1 */
277         MATRIX_KEY(0, 2, KEY_1)
278         MATRIX_KEY(0, 6, KEY_2)
279         MATRIX_KEY(2, 3, KEY_3)
280         MATRIX_KEY(0, 7, KEY_4)
281         MATRIX_KEY(0, 4, KEY_5)
282         MATRIX_KEY(5, 5, KEY_6)
283         MATRIX_KEY(0, 1, KEY_7)
284         MATRIX_KEY(0, 5, KEY_8)
285         MATRIX_KEY(0, 0, KEY_9)
286         MATRIX_KEY(1, 6, KEY_0)
287
288         /* Row 2 */
289         MATRIX_KEY(3, 4, KEY_APOSTROPHE)
290         MATRIX_KEY(7, 6, KEY_Q)
291         MATRIX_KEY(7, 7, KEY_W)
292         MATRIX_KEY(7, 2, KEY_E)
293         MATRIX_KEY(1, 0, KEY_R)
294         MATRIX_KEY(4, 4, KEY_T)
295         MATRIX_KEY(1, 2, KEY_Y)
296         MATRIX_KEY(6, 7, KEY_U)
297         MATRIX_KEY(2, 2, KEY_I)
298         MATRIX_KEY(5, 6, KEY_O)
299         MATRIX_KEY(3, 7, KEY_P)
300         MATRIX_KEY(6, 5, KEY_BACKSPACE)
301
302         /* Row 3 */
303         MATRIX_KEY(5, 4, KEY_TAB)
304         MATRIX_KEY(5, 7, KEY_A)
305         MATRIX_KEY(2, 7, KEY_S)
306         MATRIX_KEY(7, 0, KEY_D)
307         MATRIX_KEY(2, 6, KEY_F)
308         MATRIX_KEY(6, 2, KEY_G)
309         MATRIX_KEY(6, 6, KEY_H)
310         MATRIX_KEY(1, 4, KEY_J)
311         MATRIX_KEY(3, 1, KEY_K)
312         MATRIX_KEY(2, 1, KEY_L)
313         MATRIX_KEY(4, 6, KEY_ENTER)
314
315         /* Row 4 */
316         MATRIX_KEY(3, 6, KEY_LEFTSHIFT)         /* KEY_CAPSLOCK */
317         MATRIX_KEY(6, 1, KEY_Z)
318         MATRIX_KEY(7, 4, KEY_X)
319         MATRIX_KEY(5, 1, KEY_C)
320         MATRIX_KEY(1, 7, KEY_V)
321         MATRIX_KEY(2, 4, KEY_B)
322         MATRIX_KEY(4, 1, KEY_N)
323         MATRIX_KEY(1, 1, KEY_M)
324         MATRIX_KEY(3, 5, KEY_COMMA)
325         MATRIX_KEY(5, 2, KEY_DOT)
326         MATRIX_KEY(6, 3, KEY_UP)
327         MATRIX_KEY(7, 3, KEY_OK)
328
329         /* Row 5 */
330         MATRIX_KEY(2, 5, KEY_LEFTCTRL)          /* KEY_LEFTSHIFT */
331         MATRIX_KEY(4, 5, KEY_LEFTALT)           /* SYM */
332         MATRIX_KEY(6, 0, KEY_MINUS)
333         MATRIX_KEY(4, 7, KEY_EQUAL)
334         MATRIX_KEY(1, 5, KEY_SPACE)
335         MATRIX_KEY(3, 2, KEY_SLASH)
336         MATRIX_KEY(4, 3, KEY_LEFT)
337         MATRIX_KEY(5, 3, KEY_DOWN)
338         MATRIX_KEY(3, 3, KEY_RIGHT)
339
340         /* Side buttons, KEY_VOLUMEDOWN and KEY_PWER are on CPCAP? */
341         MATRIX_KEY(5, 0, KEY_VOLUMEUP)
342         >;
343 };
344
345 &mmc1 {
346         vmmc-supply = <&vwlan2>;
347         bus-width = <4>;
348         cd-gpios = <&gpio6 16 GPIO_ACTIVE_LOW>; /* gpio176 */
349 };
350
351 &mmc2 {
352         vmmc-supply = <&vsdio>;
353         bus-width = <8>;
354         non-removable;
355 };
356
357 &mmc3 {
358         vmmc-supply = <&wl12xx_vmmc>;
359         interrupts-extended = <&wakeupgen GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH
360                                &omap4_pmx_core 0xde>;
361
362         non-removable;
363         bus-width = <4>;
364         cap-power-off-card;
365
366         #address-cells = <1>;
367         #size-cells = <0>;
368         wlcore: wlcore@2 {
369                 compatible = "ti,wl1285", "ti,wl1283";
370                 reg = <2>;
371                 interrupt-parent = <&gpio4>;
372                 interrupts = <4 IRQ_TYPE_LEVEL_HIGH>; /* gpio100 */
373                 ref-clock-frequency = <26000000>;
374                 tcxo-clock-frequency = <26000000>;
375         };
376 };
377
378 &i2c1 {
379         lm3532@38 {
380                 compatible = "ti,lm3532";
381                 reg = <0x38>;
382
383                 enable-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>;
384
385                 lcd_backlight: backlight {
386                         compatible = "ti,lm3532-backlight";
387
388                         lcd {
389                                 led-sources = <0 1 2>;
390                                 ramp-up-msec = <1>;
391                                 ramp-down-msec = <0>;
392                         };
393                 };
394         };
395 };
396
397 &i2c2 {
398         touchscreen@4a {
399                 compatible = "atmel,maxtouch";
400                 reg = <0x4a>;
401                 pinctrl-names = "default";
402                 pinctrl-0 = <&touchscreen_pins>;
403
404                 reset-gpios = <&gpio6 13 GPIO_ACTIVE_HIGH>; /* gpio173 */
405
406                 /* gpio_183 with sys_nirq2 pad as wakeup */
407                 interrupts-extended = <&gpio6 23 IRQ_TYPE_EDGE_FALLING>,
408                                       <&omap4_pmx_core 0x160>;
409                 interrupt-names = "irq", "wakeup";
410                 wakeup-source;
411         };
412
413         isl29030@44 {
414                 compatible = "isil,isl29030";
415                 reg = <0x44>;
416
417                 pinctrl-names = "default";
418                 pinctrl-0 = <&als_proximity_pins>;
419
420                 interrupt-parent = <&gpio6>;
421                 interrupts = <17 IRQ_TYPE_LEVEL_LOW>; /* gpio177 */
422         };
423 };
424
425 &omap4_pmx_core {
426
427         /* hdmi_hpd.gpio_63 */
428         hdmi_hpd_gpio: pinmux_hdmi_hpd_pins {
429                 pinctrl-single,pins = <
430                 OMAP4_IOPAD(0x098, PIN_INPUT | MUX_MODE3)
431                 >;
432         };
433
434         /* hdmi_cec.hdmi_cec, hdmi_scl.hdmi_scl, hdmi_sda.hdmi_sda */
435         dss_hdmi_pins: pinmux_dss_hdmi_pins {
436                 pinctrl-single,pins = <
437                 OMAP4_IOPAD(0x09a, PIN_INPUT | MUX_MODE0)
438                 OMAP4_IOPAD(0x09c, PIN_INPUT | MUX_MODE0)
439                 OMAP4_IOPAD(0x09e, PIN_INPUT | MUX_MODE0)
440                 >;
441         };
442
443         /* gpmc_ncs0.gpio_50 */
444         poweroff_gpio: pinmux_poweroff_pins {
445                 pinctrl-single,pins = <
446                 OMAP4_IOPAD(0x074, PIN_OUTPUT_PULLUP | MUX_MODE3)
447                 >;
448         };
449
450         /* kpd_row0.gpio_178 */
451         tmp105_irq: pinmux_tmp105_irq {
452                 pinctrl-single,pins = <
453                 OMAP4_IOPAD(0x18e, PIN_INPUT_PULLUP | MUX_MODE3)
454                 >;
455         };
456
457         usb_gpio_mux_sel1: pinmux_usb_gpio_mux_sel1_pins {
458                 /* gpio_60 */
459                 pinctrl-single,pins = <
460                 OMAP4_IOPAD(0x088, PIN_OUTPUT | MUX_MODE3)
461                 >;
462         };
463
464         touchscreen_pins: pinmux_touchscreen_pins {
465                 pinctrl-single,pins = <
466                 OMAP4_IOPAD(0x180, PIN_OUTPUT | MUX_MODE3)
467                 OMAP4_IOPAD(0x1a0, PIN_INPUT_PULLUP | MUX_MODE3)
468                 >;
469         };
470
471         als_proximity_pins: pinmux_als_proximity_pins {
472                 pinctrl-single,pins = <
473                 OMAP4_IOPAD(0x18c, PIN_INPUT_PULLUP | MUX_MODE3)
474                 >;
475         };
476
477         usb_mdm6600_pins: pinmux_usb_mdm6600_pins {
478                 pinctrl-single,pins = <
479                 /* enable 0x4a1000d8 usbb1_ulpitll_dat7.gpio_95 ag16 */
480                 OMAP4_IOPAD(0x0d8, PIN_INPUT | MUX_MODE3)
481
482                 /* power 0x4a10007c gpmc_nwp.gpio_54 c25 */
483                 OMAP4_IOPAD(0x07c, PIN_OUTPUT | MUX_MODE3)
484
485                 /* reset 0x4a100072 gpmc_a25.gpio_49 d20 */
486                 OMAP4_IOPAD(0x072, PIN_OUTPUT | MUX_MODE3)
487
488                 /* mode0/bpwake 0x4a10014e sdmmc5_dat1.gpio_148 af4 */
489                 OMAP4_IOPAD(0x14e, PIN_OUTPUT | MUX_MODE3)
490
491                 /* mode1/apwake 0x4a100150 sdmmc5_dat2.gpio_149 ag3 */
492                 OMAP4_IOPAD(0x150, PIN_OFF_OUTPUT_LOW | PIN_INPUT | MUX_MODE3)
493
494                 /* status0 0x4a10007e gpmc_clk.gpio_55 b22 */
495                 OMAP4_IOPAD(0x07e, PIN_INPUT | MUX_MODE3)
496
497                 /* status1 0x4a10007a gpmc_ncs3.gpio_53 c22 */
498                 OMAP4_IOPAD(0x07a, PIN_INPUT | MUX_MODE3)
499
500                 /* status2 0x4a100078 gpmc_ncs2.gpio_52 d21 */
501                 OMAP4_IOPAD(0x078, PIN_INPUT | MUX_MODE3)
502
503                 /* cmd0 0x4a100094 gpmc_ncs6.gpio_103 c24 */
504                 OMAP4_IOPAD(0x094, PIN_OUTPUT | MUX_MODE3)
505
506                 /* cmd1 0x4a100096 gpmc_ncs7.gpio_104 d24 */
507                 OMAP4_IOPAD(0x096, PIN_OUTPUT | MUX_MODE3)
508
509                 /* cmd2 0x4a100142 uart3_rts_sd.gpio_142 f28 */
510                 OMAP4_IOPAD(0x142, PIN_OUTPUT | MUX_MODE3)
511                 >;
512         };
513
514         usb_ulpi_pins: pinmux_usb_ulpi_pins {
515                 pinctrl-single,pins = <
516                 OMAP4_IOPAD(0x196, MUX_MODE7)
517                 OMAP4_IOPAD(0x198, MUX_MODE7)
518                 OMAP4_IOPAD(0x1b2, PIN_INPUT_PULLUP | MUX_MODE0)
519                 OMAP4_IOPAD(0x1b4, PIN_INPUT_PULLUP | MUX_MODE0)
520                 OMAP4_IOPAD(0x1b6, PIN_INPUT_PULLUP | MUX_MODE0)
521                 OMAP4_IOPAD(0x1b8, PIN_INPUT_PULLUP | MUX_MODE0)
522                 OMAP4_IOPAD(0x1ba, PIN_INPUT_PULLUP | MUX_MODE0)
523                 OMAP4_IOPAD(0x1bc, PIN_INPUT_PULLUP | MUX_MODE0)
524                 OMAP4_IOPAD(0x1be, PIN_INPUT_PULLUP | MUX_MODE0)
525                 OMAP4_IOPAD(0x1c0, PIN_INPUT_PULLUP | MUX_MODE0)
526                 OMAP4_IOPAD(0x1c2, PIN_INPUT_PULLUP | MUX_MODE0)
527                 OMAP4_IOPAD(0x1c4, PIN_INPUT_PULLUP | MUX_MODE0)
528                 OMAP4_IOPAD(0x1c6, PIN_INPUT_PULLUP | MUX_MODE0)
529                 OMAP4_IOPAD(0x1c8, PIN_INPUT_PULLUP | MUX_MODE0)
530                 >;
531         };
532
533         /* usb0_otg_dp and usb0_otg_dm */
534         usb_utmi_pins: pinmux_usb_utmi_pins {
535                 pinctrl-single,pins = <
536                 OMAP4_IOPAD(0x196, PIN_INPUT | MUX_MODE0)
537                 OMAP4_IOPAD(0x198, PIN_INPUT | MUX_MODE0)
538                 OMAP4_IOPAD(0x1b2, PIN_INPUT_PULLUP | MUX_MODE7)
539                 OMAP4_IOPAD(0x1b4, PIN_INPUT_PULLUP | MUX_MODE7)
540                 OMAP4_IOPAD(0x1b6, PIN_INPUT_PULLUP | MUX_MODE7)
541                 OMAP4_IOPAD(0x1b8, PIN_INPUT_PULLUP | MUX_MODE7)
542                 OMAP4_IOPAD(0x1ba, PIN_INPUT_PULLUP | MUX_MODE7)
543                 OMAP4_IOPAD(0x1bc, PIN_INPUT_PULLUP | MUX_MODE7)
544                 OMAP4_IOPAD(0x1be, PIN_INPUT_PULLUP | MUX_MODE7)
545                 OMAP4_IOPAD(0x1c0, PIN_INPUT_PULLUP | MUX_MODE7)
546                 OMAP4_IOPAD(0x1c2, PIN_INPUT_PULLUP | MUX_MODE7)
547                 OMAP4_IOPAD(0x1c4, PIN_INPUT_PULLUP | MUX_MODE7)
548                 OMAP4_IOPAD(0x1c6, PIN_INPUT_PULLUP | MUX_MODE7)
549                 OMAP4_IOPAD(0x1c8, PIN_INPUT_PULLUP | MUX_MODE7)
550                 >;
551         };
552
553         /*
554          * Note that the v3.0.8 stock userspace dynamically remuxes uart1
555          * rts pin probably for PM purposes to PIN_INPUT_PULLUP | MUX_MODE7
556          * when not used. If needed, we can add rts pin remux later based
557          * on power measurements.
558          */
559         uart1_pins: pinmux_uart1_pins {
560                 pinctrl-single,pins = <
561                 /* 0x4a10013c mcspi1_cs2.uart1_cts ag23 */
562                 OMAP4_IOPAD(0x13c, PIN_INPUT_PULLUP | MUX_MODE1)
563
564                 /* 0x4a10013e mcspi1_cs3.uart1_rts ah23 */
565                 OMAP4_IOPAD(0x13e, MUX_MODE1)
566
567                 /* 0x4a100140 uart3_cts_rctx.uart1_tx f27 */
568                 OMAP4_IOPAD(0x140, PIN_OUTPUT | MUX_MODE1)
569
570                 /* 0x4a1001ca dpm_emu14.uart1_rx aa3 */
571                 OMAP4_IOPAD(0x1ca, PIN_INPUT_PULLUP | MUX_MODE2)
572                 >;
573         };
574
575         /* uart3_tx_irtx and uart3_rx_irrx */
576         uart3_pins: pinmux_uart3_pins {
577                 pinctrl-single,pins = <
578                 OMAP4_IOPAD(0x196, MUX_MODE7)
579                 OMAP4_IOPAD(0x198, MUX_MODE7)
580                 OMAP4_IOPAD(0x1b2, PIN_INPUT_PULLUP | MUX_MODE7)
581                 OMAP4_IOPAD(0x1b4, PIN_INPUT_PULLUP | MUX_MODE7)
582                 OMAP4_IOPAD(0x1b6, PIN_INPUT_PULLUP | MUX_MODE7)
583                 OMAP4_IOPAD(0x1b8, PIN_INPUT_PULLUP | MUX_MODE7)
584                 OMAP4_IOPAD(0x1ba, MUX_MODE2)
585                 OMAP4_IOPAD(0x1bc, PIN_INPUT | MUX_MODE2)
586                 OMAP4_IOPAD(0x1be, PIN_INPUT_PULLUP | MUX_MODE7)
587                 OMAP4_IOPAD(0x1c0, PIN_INPUT_PULLUP | MUX_MODE7)
588                 OMAP4_IOPAD(0x1c2, PIN_INPUT_PULLUP | MUX_MODE7)
589                 OMAP4_IOPAD(0x1c4, PIN_INPUT_PULLUP | MUX_MODE7)
590                 OMAP4_IOPAD(0x1c6, PIN_INPUT_PULLUP | MUX_MODE7)
591                 OMAP4_IOPAD(0x1c8, PIN_INPUT_PULLUP | MUX_MODE7)
592                 >;
593         };
594
595         uart4_pins: pinmux_uart4_pins {
596                 pinctrl-single,pins = <
597                 OMAP4_IOPAD(0x15c, PIN_INPUT | MUX_MODE0)               /* uart4_rx */
598                 OMAP4_IOPAD(0x15e, PIN_OUTPUT | MUX_MODE0)              /* uart4_tx */
599                 OMAP4_IOPAD(0x110, PIN_INPUT_PULLUP | MUX_MODE5)        /* uart4_cts */
600                 OMAP4_IOPAD(0x112, PIN_OUTPUT_PULLUP | MUX_MODE5)       /* uart4_rts */
601                 >;
602         };
603
604         mcbsp2_pins: pinmux_mcbsp2_pins {
605                 pinctrl-single,pins = <
606                 OMAP4_IOPAD(0x0f6, PIN_INPUT | MUX_MODE0)       /* abe_mcbsp2_clkx */
607                 OMAP4_IOPAD(0x0f8, PIN_INPUT | MUX_MODE0)       /* abe_mcbsp2_dr */
608                 OMAP4_IOPAD(0x0fa, PIN_OUTPUT | MUX_MODE0)      /* abe_mcbsp2_dx */
609                 OMAP4_IOPAD(0x0fc, PIN_INPUT | MUX_MODE0)       /* abe_mcbsp2_fsx */
610                 >;
611         };
612
613         mcbsp3_pins: pinmux_mcbsp3_pins {
614                 pinctrl-single,pins = <
615                 OMAP4_IOPAD(0x106, PIN_INPUT | MUX_MODE1)       /* abe_mcbsp3_dr */
616                 OMAP4_IOPAD(0x108, PIN_OUTPUT | MUX_MODE1)      /* abe_mcbsp3_dx */
617                 OMAP4_IOPAD(0x10a, PIN_INPUT | MUX_MODE1)       /* abe_mcbsp3_clkx */
618                 OMAP4_IOPAD(0x10c, PIN_INPUT | MUX_MODE1)       /* abe_mcbsp3_fsx */
619                 >;
620         };
621 };
622
623 &omap4_pmx_wkup {
624         usb_gpio_mux_sel2: pinmux_usb_gpio_mux_sel2_pins {
625                 /* gpio_wk0 */
626                 pinctrl-single,pins = <
627                 OMAP4_IOPAD(0x040, PIN_OUTPUT_PULLDOWN | MUX_MODE3)
628                 >;
629         };
630
631         vibrator_direction_pin: pinmux_vibrator_direction_pin {
632                 pinctrl-single,pins = <
633                 OMAP4_IOPAD(0x1ce, PIN_OUTPUT | MUX_MODE1)      /* dmtimer8_pwm_evt (gpio_27) */
634                 >;
635         };
636
637         vibrator_enable_pin: pinmux_vibrator_enable_pin {
638                 pinctrl-single,pins = <
639                 OMAP4_IOPAD(0X1d0, PIN_OUTPUT | MUX_MODE1)      /* dmtimer9_pwm_evt (gpio_28) */
640                 >;
641         };
642 };
643
644 /*
645  * As uart1 is wired to mdm6600 with rts and cts, we can use the cts pin for
646  * uart1 wakeirq.
647  */
648 &uart1 {
649         pinctrl-names = "default";
650         pinctrl-0 = <&uart1_pins>;
651         interrupts-extended = <&wakeupgen GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH
652                                &omap4_pmx_core 0xfc>;
653 };
654
655 &uart3 {
656         interrupts-extended = <&wakeupgen GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH
657                                &omap4_pmx_core 0x17c>;
658 };
659
660 &uart4 {
661         pinctrl-names = "default";
662         pinctrl-0 = <&uart4_pins>;
663
664         bluetooth {
665                 compatible = "ti,wl1285-st";
666                 enable-gpios = <&gpio6 14 GPIO_ACTIVE_HIGH>; /* gpio 174 */
667                 max-speed = <3686400>;
668         };
669 };
670
671 &usbhsohci {
672         phys = <&fsusb1_phy>;
673         phy-names = "usb";
674 };
675
676 &usbhsehci {
677         phys = <&hsusb2_phy>;
678 };
679
680 &usbhshost {
681         port1-mode = "ohci-phy-4pin-dpdm";
682         port2-mode = "ehci-tll";
683 };
684
685 /* Internal UTMI+ PHY used for OTG, CPCAP ULPI PHY for detection and charger */
686 &usb_otg_hs {
687         interface-type = <1>;
688         mode = <3>;
689         power = <50>;
690 };
691
692 &i2c4 {
693         ak8975: magnetometer@c {
694                 compatible = "asahi-kasei,ak8975";
695                 reg = <0x0c>;
696
697                 vdd-supply = <&vhvio>;
698
699                 interrupt-parent = <&gpio6>;
700                 interrupts = <15 IRQ_TYPE_EDGE_RISING>; /* gpio175 */
701
702                 rotation-matrix = "-1", "0", "0",
703                                   "0", "1", "0",
704                                   "0", "0", "-1";
705
706         };
707
708         lis3dh: accelerometer@18 {
709                 compatible = "st,lis3dh-accel";
710                 reg = <0x18>;
711
712                 vdd-supply = <&vhvio>;
713
714                 interrupt-parent = <&gpio2>;
715                 interrupts = <2 IRQ_TYPE_EDGE_BOTH>; /* gpio34 */
716
717                 rotation-matrix = "0", "-1", "0",
718                                   "1", "0", "0",
719                                   "0", "0", "1";
720         };
721 };
722
723 &mcbsp2 {
724         #sound-dai-cells = <0>;
725         pinctrl-names = "default";
726         pinctrl-0 = <&mcbsp2_pins>;
727         status = "okay";
728
729         mcbsp2_port: port {
730                 cpu_dai2: endpoint {
731                         dai-format = "i2s";
732                         remote-endpoint = <&cpcap_audio_codec0>;
733                         frame-master = <&cpcap_audio_codec0>;
734                         bitclock-master = <&cpcap_audio_codec0>;
735                 };
736         };
737 };
738
739 &mcbsp3 {
740         #sound-dai-cells = <0>;
741         pinctrl-names = "default";
742         pinctrl-0 = <&mcbsp3_pins>;
743         status = "okay";
744
745         mcbsp3_port: port {
746                 cpu_dai3: endpoint {
747                         dai-format = "dsp_a";
748                         frame-master = <&cpcap_audio_codec1>;
749                         bitclock-master = <&cpcap_audio_codec1>;
750                         remote-endpoint = <&cpcap_audio_codec1>;
751                 };
752         };
753 };
754
755 &cpcap_audio_codec0 {
756         remote-endpoint = <&cpu_dai2>;
757 };
758
759 &cpcap_audio_codec1 {
760         remote-endpoint = <&cpu_dai3>;
761 };