Linux Audio

Check our new training course

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