• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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		widgets =
144			"Speaker", "Earpiece",
145			"Speaker", "Loudspeaker",
146			"Headphone", "Headphone Jack",
147			"Microphone", "Internal Mic";
148
149		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: 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: 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	backlight: backlight {
187		compatible = "led-backlight";
188
189		leds = <&backlight_led>;
190		brightness-levels = <31 63 95 127 159 191 223 255>;
191		default-brightness-level = <6>;
192	};
193};
194
195&cpu_thermal {
196	polling-delay = <10000>; /* milliseconds */
197};
198
199&cpu_alert0 {
200        temperature = <80000>; /* millicelsius */
201};
202
203&cpu0 {
204        /*
205	 * Note that the 1.2GiHz mode is enabled for all SoC variants for
206	 * the Motorola Android Linux v3.0.8 based kernel.
207	 */
208        operating-points = <
209	        /* kHz    uV */
210	        300000  1025000
211	        600000  1200000
212	        800000  1313000
213	        1008000 1375000
214		1200000 1375000
215        >;
216};
217
218&dss {
219	status = "okay";
220};
221
222&dsi1 {
223	status = "okay";
224	vdd-supply = <&vcsi>;
225
226	port {
227		dsi1_out_ep: endpoint {
228			remote-endpoint = <&lcd0_in>;
229			lanes = <0 1 2 3 4 5>;
230		};
231	};
232
233	lcd0: panel@0 {
234		compatible = "motorola,droid4-panel", "panel-dsi-cm";
235		reg = <0>;
236		label = "lcd0";
237		vddi-supply = <&lcd_regulator>;
238		reset-gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>;	/* gpio101 */
239
240		backlight = <&backlight>;
241
242		width-mm = <50>;
243		height-mm = <89>;
244		rotation = <90>;
245
246		panel-timing {
247			clock-frequency = <0>;		/* Calculated by dsi */
248
249			hback-porch = <2>;
250			hactive = <540>;
251			hfront-porch = <0>;
252			hsync-len = <2>;
253
254			vback-porch = <1>;
255			vactive = <960>;
256			vfront-porch = <0>;
257			vsync-len = <1>;
258
259			hsync-active = <0>;
260			vsync-active = <0>;
261			de-active = <1>;
262			pixelclk-active = <1>;
263		};
264
265		port {
266			lcd0_in: endpoint {
267				remote-endpoint = <&dsi1_out_ep>;
268			};
269		};
270	};
271};
272
273&hdmi {
274	status = "okay";
275	pinctrl-0 = <&dss_hdmi_pins>;
276	pinctrl-names = "default";
277	vdda-supply = <&vdac>;
278
279	port {
280		hdmi_out: endpoint {
281			remote-endpoint = <&hdmi_connector_in>;
282			lanes = <1 0 3 2 5 4 7 6>;
283		};
284	};
285};
286
287/* Battery NVRAM on 1-wire handled by w1_ds250x driver */
288&hdqw1w {
289	pinctrl-0 = <&hdq_pins>;
290	pinctrl-names = "default";
291	ti,mode = "1w";
292};
293
294&i2c1 {
295	tmp105@48 {
296		compatible = "ti,tmp105";
297		reg = <0x48>;
298		pinctrl-0 = <&tmp105_irq>;
299		pinctrl-names = "default";
300		/* kpd_row0.gpio_178 */
301		interrupts-extended = <&gpio6 18 IRQ_TYPE_EDGE_FALLING
302				       &omap4_pmx_core 0x14e>;
303		interrupt-names = "irq", "wakeup";
304		wakeup-source;
305	};
306};
307
308&keypad {
309	keypad,num-rows = <8>;
310	keypad,num-columns = <8>;
311	linux,keymap = <
312
313	/* Row 1 */
314	MATRIX_KEY(0, 2, KEY_1)
315	MATRIX_KEY(0, 6, KEY_2)
316	MATRIX_KEY(2, 3, KEY_3)
317	MATRIX_KEY(0, 7, KEY_4)
318	MATRIX_KEY(0, 4, KEY_5)
319	MATRIX_KEY(5, 5, KEY_6)
320	MATRIX_KEY(0, 1, KEY_7)
321	MATRIX_KEY(0, 5, KEY_8)
322	MATRIX_KEY(0, 0, KEY_9)
323	MATRIX_KEY(1, 6, KEY_0)
324
325	/* Row 2 */
326	MATRIX_KEY(3, 4, KEY_APOSTROPHE)
327	MATRIX_KEY(7, 6, KEY_Q)
328	MATRIX_KEY(7, 7, KEY_W)
329	MATRIX_KEY(7, 2, KEY_E)
330	MATRIX_KEY(1, 0, KEY_R)
331	MATRIX_KEY(4, 4, KEY_T)
332	MATRIX_KEY(1, 2, KEY_Y)
333	MATRIX_KEY(6, 7, KEY_U)
334	MATRIX_KEY(2, 2, KEY_I)
335	MATRIX_KEY(5, 6, KEY_O)
336	MATRIX_KEY(3, 7, KEY_P)
337	MATRIX_KEY(6, 5, KEY_BACKSPACE)
338
339	/* Row 3 */
340	MATRIX_KEY(5, 4, KEY_TAB)
341	MATRIX_KEY(5, 7, KEY_A)
342	MATRIX_KEY(2, 7, KEY_S)
343	MATRIX_KEY(7, 0, KEY_D)
344	MATRIX_KEY(2, 6, KEY_F)
345	MATRIX_KEY(6, 2, KEY_G)
346	MATRIX_KEY(6, 6, KEY_H)
347	MATRIX_KEY(1, 4, KEY_J)
348	MATRIX_KEY(3, 1, KEY_K)
349	MATRIX_KEY(2, 1, KEY_L)
350	MATRIX_KEY(4, 6, KEY_ENTER)
351
352	/* Row 4 */
353	MATRIX_KEY(3, 6, KEY_LEFTSHIFT)		/* KEY_CAPSLOCK */
354	MATRIX_KEY(6, 1, KEY_Z)
355	MATRIX_KEY(7, 4, KEY_X)
356	MATRIX_KEY(5, 1, KEY_C)
357	MATRIX_KEY(1, 7, KEY_V)
358	MATRIX_KEY(2, 4, KEY_B)
359	MATRIX_KEY(4, 1, KEY_N)
360	MATRIX_KEY(1, 1, KEY_M)
361	MATRIX_KEY(3, 5, KEY_COMMA)
362	MATRIX_KEY(5, 2, KEY_DOT)
363	MATRIX_KEY(6, 3, KEY_UP)
364	MATRIX_KEY(7, 3, KEY_OK)
365
366	/* Row 5 */
367	MATRIX_KEY(2, 5, KEY_LEFTCTRL)		/* KEY_LEFTSHIFT */
368	MATRIX_KEY(4, 5, KEY_LEFTALT)		/* SYM */
369	MATRIX_KEY(6, 0, KEY_MINUS)
370	MATRIX_KEY(4, 7, KEY_EQUAL)
371	MATRIX_KEY(1, 5, KEY_SPACE)
372	MATRIX_KEY(3, 2, KEY_SLASH)
373	MATRIX_KEY(4, 3, KEY_LEFT)
374	MATRIX_KEY(5, 3, KEY_DOWN)
375	MATRIX_KEY(3, 3, KEY_RIGHT)
376
377	/* Side buttons, KEY_VOLUMEDOWN and KEY_PWER are on CPCAP? */
378	MATRIX_KEY(5, 0, KEY_VOLUMEUP)
379	>;
380};
381
382&mmc1 {
383	vmmc-supply = <&vwlan2>;
384	bus-width = <4>;
385	cd-gpios = <&gpio6 16 GPIO_ACTIVE_LOW>;	/* gpio176 */
386};
387
388&mmc2 {
389	vmmc-supply = <&vsdio>;
390	bus-width = <8>;
391	ti,non-removable;
392};
393
394&mmc3 {
395	pinctrl-names = "default";
396	pinctrl-0 = <&mmc3_pins>;
397	vmmc-supply = <&wl12xx_vmmc>;
398	/* uart2_tx.sdmmc3_dat1 pad as wakeirq */
399	interrupts-extended = <&wakeupgen GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH
400			       &omap4_pmx_core 0xde>;
401	interrupt-names = "irq", "wakeup";
402	non-removable;
403	bus-width = <4>;
404	cap-power-off-card;
405	keep-power-in-suspend;
406
407	#address-cells = <1>;
408	#size-cells = <0>;
409	wlcore: wlcore@2 {
410		compatible = "ti,wl1285";
411		reg = <2>;
412		/* gpio_100 with gpmc_wait2 pad as wakeirq */
413		interrupts-extended = <&gpio4 4 IRQ_TYPE_LEVEL_HIGH>,
414				      <&omap4_pmx_core 0x4e>;
415		interrupt-names = "irq", "wakeup";
416		ref-clock-frequency = <26000000>;
417		tcxo-clock-frequency = <26000000>;
418	};
419};
420
421&i2c1 {
422	led-controller@38 {
423		compatible = "ti,lm3532";
424		#address-cells = <1>;
425		#size-cells = <0>;
426		reg = <0x38>;
427
428		enable-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>;
429
430		ramp-up-us = <1024>;
431		ramp-down-us = <8193>;
432
433		backlight_led: led@0 {
434			reg = <0>;
435			led-sources = <2>;
436			ti,led-mode = <0>;
437			label = ":backlight";
438		};
439
440		led@1 {
441			reg = <1>;
442			led-sources = <1>;
443			ti,led-mode = <0>;
444			label = ":kbd_backlight";
445		};
446	};
447};
448
449&i2c2 {
450	touchscreen@4a {
451		compatible = "atmel,maxtouch";
452		reg = <0x4a>;
453		pinctrl-names = "default";
454		pinctrl-0 = <&touchscreen_pins>;
455
456		reset-gpios = <&gpio6 13 GPIO_ACTIVE_LOW>; /* gpio173 */
457
458		/* gpio_183 with sys_nirq2 pad as wakeup */
459		interrupts-extended = <&gpio6 23 IRQ_TYPE_LEVEL_LOW>,
460				      <&omap4_pmx_core 0x160>;
461		interrupt-names = "irq", "wakeup";
462		wakeup-source;
463	};
464
465	isl29030@44 {
466		compatible = "isil,isl29030";
467		reg = <0x44>;
468
469		pinctrl-names = "default";
470		pinctrl-0 = <&als_proximity_pins>;
471
472		interrupt-parent = <&gpio6>;
473		interrupts = <17 IRQ_TYPE_LEVEL_LOW>; /* gpio177 */
474	};
475};
476
477&omap4_pmx_core {
478
479	/* hdmi_hpd.gpio_63 */
480	hdmi_hpd_gpio: pinmux_hdmi_hpd_pins {
481		pinctrl-single,pins = <
482		OMAP4_IOPAD(0x098, PIN_INPUT | MUX_MODE3)
483		>;
484	};
485
486	hdq_pins: pinmux_hdq_pins {
487		pinctrl-single,pins = <
488		/* 0x4a100120 hdq_sio.hdq_sio aa27 */
489		OMAP4_IOPAD(0x120, PIN_INPUT | MUX_MODE0)
490		>;
491	};
492
493	/* hdmi_cec.hdmi_cec, hdmi_scl.hdmi_scl, hdmi_sda.hdmi_sda */
494	dss_hdmi_pins: pinmux_dss_hdmi_pins {
495		pinctrl-single,pins = <
496		OMAP4_IOPAD(0x09a, PIN_INPUT | MUX_MODE0)
497		OMAP4_IOPAD(0x09c, PIN_INPUT | MUX_MODE0)
498		OMAP4_IOPAD(0x09e, PIN_INPUT | MUX_MODE0)
499		>;
500	};
501
502	/*
503	 * Android uses PIN_OFF_INPUT_PULLDOWN | PIN_INPUT_PULLUP | MUX_MODE3
504	 * for gpio_100, but the internal pull makes wlan flakey on some
505	 * devices. Off mode value should be tested if we have off mode working
506	 * later on.
507	 */
508	mmc3_pins: pinmux_mmc3_pins {
509		pinctrl-single,pins = <
510		/* 0x4a10008e gpmc_wait2.gpio_100 d23 */
511		OMAP4_IOPAD(0x08e, PIN_INPUT | MUX_MODE3)
512
513		/* 0x4a100102 abe_mcbsp1_dx.sdmmc3_dat2 ab25 */
514		OMAP4_IOPAD(0x102, PIN_INPUT_PULLUP | MUX_MODE1)
515
516		/* 0x4a100104 abe_mcbsp1_fsx.sdmmc3_dat3 ac27 */
517		OMAP4_IOPAD(0x104, PIN_INPUT_PULLUP | MUX_MODE1)
518
519		/* 0x4a100118 uart2_cts.sdmmc3_clk ab26 */
520		OMAP4_IOPAD(0x118, PIN_INPUT | MUX_MODE1)
521
522		/* 0x4a10011a uart2_rts.sdmmc3_cmd ab27 */
523		OMAP4_IOPAD(0x11a, PIN_INPUT_PULLUP | MUX_MODE1)
524
525		/* 0x4a10011c uart2_rx.sdmmc3_dat0 aa25 */
526		OMAP4_IOPAD(0x11c, PIN_INPUT_PULLUP | MUX_MODE1)
527
528		/* 0x4a10011e uart2_tx.sdmmc3_dat1 aa26 */
529		OMAP4_IOPAD(0x11e, PIN_INPUT_PULLUP | MUX_MODE1)
530		>;
531	};
532
533	/* gpmc_ncs0.gpio_50 */
534	poweroff_gpio: pinmux_poweroff_pins {
535		pinctrl-single,pins = <
536		OMAP4_IOPAD(0x074, PIN_OUTPUT_PULLUP | MUX_MODE3)
537		>;
538	};
539
540	/* kpd_row0.gpio_178 */
541	tmp105_irq: pinmux_tmp105_irq {
542		pinctrl-single,pins = <
543		OMAP4_IOPAD(0x18e, PIN_INPUT_PULLUP | MUX_MODE3)
544		>;
545	};
546
547	usb_gpio_mux_sel1: pinmux_usb_gpio_mux_sel1_pins {
548		/* gpio_60 */
549		pinctrl-single,pins = <
550		OMAP4_IOPAD(0x088, PIN_OUTPUT | MUX_MODE3)
551		>;
552	};
553
554	touchscreen_pins: pinmux_touchscreen_pins {
555		pinctrl-single,pins = <
556		OMAP4_IOPAD(0x180, PIN_OUTPUT | MUX_MODE3)
557		OMAP4_IOPAD(0x1a0, PIN_INPUT_PULLUP | MUX_MODE3)
558		>;
559	};
560
561	als_proximity_pins: pinmux_als_proximity_pins {
562		pinctrl-single,pins = <
563		OMAP4_IOPAD(0x18c, PIN_INPUT_PULLUP | MUX_MODE3)
564		>;
565	};
566
567	usb_mdm6600_pins: pinmux_usb_mdm6600_pins {
568		pinctrl-single,pins = <
569		/* enable 0x4a1000d8 usbb1_ulpitll_dat7.gpio_95 ag16 */
570		OMAP4_IOPAD(0x0d8, PIN_INPUT | MUX_MODE3)
571
572		/* power 0x4a10007c gpmc_nwp.gpio_54 c25 */
573		OMAP4_IOPAD(0x07c, PIN_OUTPUT | MUX_MODE3)
574
575		/* reset 0x4a100072 gpmc_a25.gpio_49 d20 */
576		OMAP4_IOPAD(0x072, PIN_OUTPUT | MUX_MODE3)
577
578		/* mode0/bpwake 0x4a10014e sdmmc5_dat1.gpio_148 af4 */
579		OMAP4_IOPAD(0x14e, PIN_OUTPUT | MUX_MODE3)
580
581		/* mode1/apwake 0x4a100150 sdmmc5_dat2.gpio_149 ag3 */
582		OMAP4_IOPAD(0x150, PIN_OFF_OUTPUT_LOW | PIN_INPUT | MUX_MODE3)
583
584		/* status0 0x4a10007e gpmc_clk.gpio_55 b22 */
585		OMAP4_IOPAD(0x07e, PIN_INPUT | MUX_MODE3)
586
587		/* status1 0x4a10007a gpmc_ncs3.gpio_53 c22 */
588		OMAP4_IOPAD(0x07a, PIN_INPUT | MUX_MODE3)
589
590		/* status2 0x4a100078 gpmc_ncs2.gpio_52 d21 */
591		OMAP4_IOPAD(0x078, PIN_INPUT | MUX_MODE3)
592
593		/* cmd0 0x4a100094 gpmc_ncs6.gpio_103 c24 */
594		OMAP4_IOPAD(0x094, PIN_OUTPUT | MUX_MODE3)
595
596		/* cmd1 0x4a100096 gpmc_ncs7.gpio_104 d24 */
597		OMAP4_IOPAD(0x096, PIN_OUTPUT | MUX_MODE3)
598
599		/* cmd2 0x4a100142 uart3_rts_sd.gpio_142 f28 */
600		OMAP4_IOPAD(0x142, PIN_OUTPUT | MUX_MODE3)
601		>;
602	};
603
604	usb_ulpi_pins: pinmux_usb_ulpi_pins {
605		pinctrl-single,pins = <
606		OMAP4_IOPAD(0x196, MUX_MODE7)
607		OMAP4_IOPAD(0x198, MUX_MODE7)
608		OMAP4_IOPAD(0x1b2, PIN_INPUT_PULLUP | MUX_MODE0)
609		OMAP4_IOPAD(0x1b4, PIN_INPUT_PULLUP | MUX_MODE0)
610		OMAP4_IOPAD(0x1b6, PIN_INPUT_PULLUP | MUX_MODE0)
611		OMAP4_IOPAD(0x1b8, PIN_INPUT_PULLUP | MUX_MODE0)
612		OMAP4_IOPAD(0x1ba, PIN_INPUT_PULLUP | MUX_MODE0)
613		OMAP4_IOPAD(0x1bc, PIN_INPUT_PULLUP | MUX_MODE0)
614		OMAP4_IOPAD(0x1be, PIN_INPUT_PULLUP | MUX_MODE0)
615		OMAP4_IOPAD(0x1c0, PIN_INPUT_PULLUP | MUX_MODE0)
616		OMAP4_IOPAD(0x1c2, PIN_INPUT_PULLUP | MUX_MODE0)
617		OMAP4_IOPAD(0x1c4, PIN_INPUT_PULLUP | MUX_MODE0)
618		OMAP4_IOPAD(0x1c6, PIN_INPUT_PULLUP | MUX_MODE0)
619		OMAP4_IOPAD(0x1c8, PIN_INPUT_PULLUP | MUX_MODE0)
620		>;
621	};
622
623	/* usb0_otg_dp and usb0_otg_dm */
624	usb_utmi_pins: pinmux_usb_utmi_pins {
625		pinctrl-single,pins = <
626		OMAP4_IOPAD(0x196, PIN_INPUT | MUX_MODE0)
627		OMAP4_IOPAD(0x198, PIN_INPUT | MUX_MODE0)
628		OMAP4_IOPAD(0x1b2, PIN_INPUT_PULLUP | MUX_MODE7)
629		OMAP4_IOPAD(0x1b4, PIN_INPUT_PULLUP | MUX_MODE7)
630		OMAP4_IOPAD(0x1b6, PIN_INPUT_PULLUP | MUX_MODE7)
631		OMAP4_IOPAD(0x1b8, PIN_INPUT_PULLUP | MUX_MODE7)
632		OMAP4_IOPAD(0x1ba, PIN_INPUT_PULLUP | MUX_MODE7)
633		OMAP4_IOPAD(0x1bc, PIN_INPUT_PULLUP | MUX_MODE7)
634		OMAP4_IOPAD(0x1be, PIN_INPUT_PULLUP | MUX_MODE7)
635		OMAP4_IOPAD(0x1c0, PIN_INPUT_PULLUP | MUX_MODE7)
636		OMAP4_IOPAD(0x1c2, PIN_INPUT_PULLUP | MUX_MODE7)
637		OMAP4_IOPAD(0x1c4, PIN_INPUT_PULLUP | MUX_MODE7)
638		OMAP4_IOPAD(0x1c6, PIN_INPUT_PULLUP | MUX_MODE7)
639		OMAP4_IOPAD(0x1c8, PIN_INPUT_PULLUP | MUX_MODE7)
640		>;
641	};
642
643	/*
644	 * Note that the v3.0.8 stock userspace dynamically remuxes uart1
645	 * rts pin probably for PM purposes to PIN_INPUT_PULLUP | MUX_MODE7
646	 * when not used. If needed, we can add rts pin remux later based
647	 * on power measurements.
648	 */
649	uart1_pins: pinmux_uart1_pins {
650		pinctrl-single,pins = <
651		/* 0x4a10013c mcspi1_cs2.uart1_cts ag23 */
652		OMAP4_IOPAD(0x13c, PIN_INPUT_PULLUP | MUX_MODE1)
653
654		/* 0x4a10013e mcspi1_cs3.uart1_rts ah23 */
655		OMAP4_IOPAD(0x13e, MUX_MODE1)
656
657		/* 0x4a100140 uart3_cts_rctx.uart1_tx f27 */
658		OMAP4_IOPAD(0x140, PIN_OUTPUT | MUX_MODE1)
659
660		/* 0x4a1001ca dpm_emu14.uart1_rx aa3 */
661		OMAP4_IOPAD(0x1ca, PIN_INPUT_PULLUP | MUX_MODE2)
662		>;
663	};
664
665	/* uart3_tx_irtx and uart3_rx_irrx */
666	uart3_pins: pinmux_uart3_pins {
667		pinctrl-single,pins = <
668		OMAP4_IOPAD(0x196, MUX_MODE7)
669		OMAP4_IOPAD(0x198, MUX_MODE7)
670		OMAP4_IOPAD(0x1b2, PIN_INPUT_PULLUP | MUX_MODE7)
671		OMAP4_IOPAD(0x1b4, PIN_INPUT_PULLUP | MUX_MODE7)
672		OMAP4_IOPAD(0x1b6, PIN_INPUT_PULLUP | MUX_MODE7)
673		OMAP4_IOPAD(0x1b8, PIN_INPUT_PULLUP | MUX_MODE7)
674		OMAP4_IOPAD(0x1ba, MUX_MODE2)
675		OMAP4_IOPAD(0x1bc, PIN_INPUT | MUX_MODE2)
676		OMAP4_IOPAD(0x1be, PIN_INPUT_PULLUP | MUX_MODE7)
677		OMAP4_IOPAD(0x1c0, PIN_INPUT_PULLUP | MUX_MODE7)
678		OMAP4_IOPAD(0x1c2, PIN_INPUT_PULLUP | MUX_MODE7)
679		OMAP4_IOPAD(0x1c4, PIN_INPUT_PULLUP | MUX_MODE7)
680		OMAP4_IOPAD(0x1c6, PIN_INPUT_PULLUP | MUX_MODE7)
681		OMAP4_IOPAD(0x1c8, PIN_INPUT_PULLUP | MUX_MODE7)
682		>;
683	};
684
685	uart4_pins: pinmux_uart4_pins {
686		pinctrl-single,pins = <
687		OMAP4_IOPAD(0x15c, PIN_INPUT | MUX_MODE0)		/* uart4_rx */
688		OMAP4_IOPAD(0x15e, PIN_OUTPUT | MUX_MODE0)		/* uart4_tx */
689		OMAP4_IOPAD(0x110, PIN_INPUT_PULLUP | MUX_MODE5)	/* uart4_cts */
690		OMAP4_IOPAD(0x112, PIN_OUTPUT_PULLUP | MUX_MODE5)	/* uart4_rts */
691		>;
692	};
693
694	mcbsp2_pins: pinmux_mcbsp2_pins {
695		pinctrl-single,pins = <
696		OMAP4_IOPAD(0x0f6, PIN_INPUT | MUX_MODE0)	/* abe_mcbsp2_clkx */
697		OMAP4_IOPAD(0x0f8, PIN_INPUT | MUX_MODE0)	/* abe_mcbsp2_dr */
698		OMAP4_IOPAD(0x0fa, PIN_OUTPUT | MUX_MODE0)	/* abe_mcbsp2_dx */
699		OMAP4_IOPAD(0x0fc, PIN_INPUT | MUX_MODE0)	/* abe_mcbsp2_fsx */
700		>;
701	};
702
703	mcbsp3_pins: pinmux_mcbsp3_pins {
704		pinctrl-single,pins = <
705		OMAP4_IOPAD(0x106, PIN_INPUT | MUX_MODE1)	/* abe_mcbsp3_dr */
706		OMAP4_IOPAD(0x108, PIN_OUTPUT | MUX_MODE1)	/* abe_mcbsp3_dx */
707		OMAP4_IOPAD(0x10a, PIN_INPUT | MUX_MODE1)	/* abe_mcbsp3_clkx */
708		OMAP4_IOPAD(0x10c, PIN_INPUT | MUX_MODE1)	/* abe_mcbsp3_fsx */
709		>;
710	};
711
712	vibrator_direction_pin: pinmux_vibrator_direction_pin {
713		pinctrl-single,pins = <
714		OMAP4_IOPAD(0x1ce, PIN_OUTPUT | MUX_MODE1)	/* dmtimer8_pwm_evt (gpio_27) */
715		>;
716	};
717
718	vibrator_enable_pin: pinmux_vibrator_enable_pin {
719		pinctrl-single,pins = <
720		OMAP4_IOPAD(0X1d0, PIN_OUTPUT | MUX_MODE1)	/* dmtimer9_pwm_evt (gpio_28) */
721		>;
722	};
723};
724
725&omap4_pmx_wkup {
726	usb_gpio_mux_sel2: pinmux_usb_gpio_mux_sel2_pins {
727		/* gpio_wk0 */
728		pinctrl-single,pins = <
729		OMAP4_IOPAD(0x040, PIN_OUTPUT_PULLDOWN | MUX_MODE3)
730		>;
731	};
732};
733
734/* RNG is used by secure mode and not accessible */
735&rng_target {
736	status = "disabled";
737};
738
739/* Configure pwm clock source for timers 8 & 9 */
740&timer8 {
741	assigned-clocks = <&abe_clkctrl OMAP4_TIMER8_CLKCTRL 24>;
742	assigned-clock-parents = <&sys_32k_ck>;
743};
744
745&timer9 {
746	assigned-clocks = <&l4_per_clkctrl OMAP4_TIMER9_CLKCTRL 24>;
747	assigned-clock-parents = <&sys_32k_ck>;
748};
749
750/*
751 * The uart1 port is wired to mdm6600 with rts and cts. The modem uses gpio_149
752 * for wake-up events for both the USB PHY and the UART. We can use gpio_149
753 * pad as the shared wakeirq for the UART rather than the RX or CTS pad as we
754 * have gpio_149 trigger before the UART transfer starts.
755 */
756&uart1 {
757	pinctrl-names = "default";
758	pinctrl-0 = <&uart1_pins>;
759	interrupts-extended = <&wakeupgen GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH
760			       &omap4_pmx_core 0x110>;
761	uart-has-rtscts;
762	current-speed = <115200>;
763};
764
765&uart3 {
766	interrupts-extended = <&wakeupgen GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH
767			       &omap4_pmx_core 0x17c>;
768	overrun-throttle-ms = <500>;
769};
770
771&uart4 {
772	pinctrl-names = "default";
773	pinctrl-0 = <&uart4_pins>;
774
775	bluetooth {
776		compatible = "ti,wl1285-st";
777		enable-gpios = <&gpio6 14 GPIO_ACTIVE_HIGH>; /* gpio 174 */
778		max-speed = <3686400>;
779	};
780};
781
782&usbhsohci {
783	phys = <&fsusb1_phy>;
784	phy-names = "usb";
785};
786
787&usbhsehci {
788	phys = <&hsusb2_phy>;
789};
790
791&usbhshost {
792	port1-mode = "ohci-phy-4pin-dpdm";
793	port2-mode = "ehci-tll";
794};
795
796/* Internal UTMI+ PHY used for OTG, CPCAP ULPI PHY for detection and charger */
797&usb_otg_hs {
798	interface-type = <1>;
799	mode = <3>;
800
801	/*
802	 * Max 300 mA steps based on similar PMIC MC13783UG.pdf "Table 10-4.
803	 * VBUS Regulator Main Characteristics". Binding uses 2 mA units.
804	 */
805	power = <150>;
806};
807
808&i2c4 {
809	ak8975: magnetometer@c {
810		compatible = "asahi-kasei,ak8975";
811		reg = <0x0c>;
812
813		vdd-supply = <&vhvio>;
814
815		interrupt-parent = <&gpio6>;
816		interrupts = <15 IRQ_TYPE_EDGE_RISING>; /* gpio175 */
817
818		rotation-matrix = "-1", "0", "0",
819				  "0", "1", "0",
820				  "0", "0", "-1";
821
822	};
823
824	lis3dh: accelerometer@18 {
825		compatible = "st,lis3dh-accel";
826		reg = <0x18>;
827
828		vdd-supply = <&vhvio>;
829
830		interrupt-parent = <&gpio2>;
831		interrupts = <2 IRQ_TYPE_EDGE_BOTH>; /* gpio34 */
832
833		rotation-matrix = "0", "-1", "0",
834				  "1", "0", "0",
835				  "0", "0", "1";
836	};
837};
838
839&mcbsp2 {
840	#sound-dai-cells = <0>;
841	pinctrl-names = "default";
842	pinctrl-0 = <&mcbsp2_pins>;
843	status = "okay";
844
845	mcbsp2_port: port {
846		cpu_dai2: endpoint {
847			dai-format = "i2s";
848			remote-endpoint = <&cpcap_audio_codec0>;
849			frame-master = <&cpcap_audio_codec0>;
850			bitclock-master = <&cpcap_audio_codec0>;
851		};
852	};
853};
854
855&mcbsp3 {
856	#sound-dai-cells = <0>;
857	pinctrl-names = "default";
858	pinctrl-0 = <&mcbsp3_pins>;
859	status = "okay";
860
861	mcbsp3_port: port {
862		cpu_dai3: endpoint {
863			dai-format = "dsp_a";
864			frame-master = <&cpcap_audio_codec1>;
865			bitclock-master = <&cpcap_audio_codec1>;
866			remote-endpoint = <&cpcap_audio_codec1>;
867		};
868	};
869};
870
871&cpcap_audio_codec0 {
872	remote-endpoint = <&cpu_dai2>;
873};
874
875&cpcap_audio_codec1 {
876	remote-endpoint = <&cpu_dai3>;
877};
878