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