• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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	/* HS USB Host PHY on PORT 1 */
74	hsusb1_phy: hsusb1_phy {
75		compatible = "usb-nop-xceiv";
76	};
77
78	/* LCD regulator from sw5 source */
79	lcd_regulator: regulator-lcd {
80		compatible = "regulator-fixed";
81		regulator-name = "lcd";
82		regulator-min-microvolt = <5050000>;
83		regulator-max-microvolt = <5050000>;
84		gpio = <&gpio4 0 GPIO_ACTIVE_HIGH>;	/* gpio96 */
85		enable-active-high;
86		vin-supply = <&sw5>;
87	};
88
89	/* This is probably coming straight from the battery.. */
90	wl12xx_vmmc: regulator-wl12xx {
91		compatible = "regulator-fixed";
92		regulator-name = "vwl1271";
93		regulator-min-microvolt = <1650000>;
94		regulator-max-microvolt = <1650000>;
95		gpio = <&gpio3 30 GPIO_ACTIVE_HIGH>;	/* gpio94 */
96		startup-delay-us = <70000>;
97		enable-active-high;
98	};
99
100	gpio_keys {
101		compatible = "gpio-keys";
102
103		volume_down {
104			label = "Volume Down";
105			gpios = <&gpio5 26 GPIO_ACTIVE_LOW>; /* gpio154 */
106			linux,code = <KEY_VOLUMEDOWN>;
107			linux,can-disable;
108		};
109
110		slider {
111			label = "Keypad Slide";
112			gpios = <&gpio4 26 GPIO_ACTIVE_HIGH>; /* gpio122 */
113			linux,input-type = <EV_SW>;
114			linux,code = <SW_KEYPAD_SLIDE>;
115			linux,can-disable;
116
117		};
118	};
119};
120
121&dss {
122	status = "okay";
123};
124
125&gpio6 {
126	touchscreen_reset {
127		gpio-hog;
128		gpios = <13 0>;
129		output-high;
130		line-name = "touchscreen-reset";
131	};
132
133	pwm8: dmtimer-pwm-8 {
134		pinctrl-names = "default";
135		pinctrl-0 = <&vibrator_direction_pin>;
136
137		compatible = "ti,omap-dmtimer-pwm";
138		#pwm-cells = <3>;
139		ti,timers = <&timer8>;
140		ti,clock-source = <0x01>;
141	};
142
143	pwm9: dmtimer-pwm-9 {
144		pinctrl-names = "default";
145		pinctrl-0 = <&vibrator_enable_pin>;
146
147		compatible = "ti,omap-dmtimer-pwm";
148		#pwm-cells = <3>;
149		ti,timers = <&timer9>;
150		ti,clock-source = <0x01>;
151	};
152
153	vibrator {
154		compatible = "pwm-vibrator";
155		pwms = <&pwm9 0 10000000 0>, <&pwm8 0 10000000 0>;
156		pwm-names = "enable", "direction";
157		direction-duty-cycle-ns = <10000000>;
158	};
159
160};
161
162&dsi1 {
163	status = "okay";
164	vdd-supply = <&vcsi>;
165
166	port {
167		dsi1_out_ep: endpoint {
168			remote-endpoint = <&lcd0_in>;
169			lanes = <0 1 2 3 4 5>;
170		};
171	};
172
173	lcd0: display {
174		compatible = "panel-dsi-cm";
175		label = "lcd0";
176		vddi-supply = <&lcd_regulator>;
177		reset-gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>;	/* gpio101 */
178
179		panel-timing {
180			clock-frequency = <0>;		/* Calculated by dsi */
181
182			hback-porch = <2>;
183			hactive = <540>;
184			hfront-porch = <0>;
185			hsync-len = <2>;
186
187			vback-porch = <1>;
188			vactive = <960>;
189			vfront-porch = <0>;
190			vsync-len = <1>;
191
192			hsync-active = <0>;
193			vsync-active = <0>;
194			de-active = <1>;
195			pixelclk-active = <1>;
196		};
197
198		port {
199			lcd0_in: endpoint {
200				remote-endpoint = <&dsi1_out_ep>;
201			};
202		};
203	};
204};
205
206&hdmi {
207	status = "okay";
208	pinctrl-0 = <&dss_hdmi_pins>;
209	pinctrl-names = "default";
210	vdda-supply = <&vdac>;
211
212	port {
213		hdmi_out: endpoint {
214			remote-endpoint = <&hdmi_connector_in>;
215			lanes = <1 0 3 2 5 4 7 6>;
216		};
217	};
218};
219
220&i2c1 {
221	tmp105@48 {
222		compatible = "ti,tmp105";
223		reg = <0x48>;
224		pinctrl-0 = <&tmp105_irq>;
225		pinctrl-names = "default";
226		/* kpd_row0.gpio_178 */
227		interrupts-extended = <&gpio6 18 IRQ_TYPE_EDGE_FALLING
228				       &omap4_pmx_core 0x14e>;
229		interrupt-names = "irq", "wakeup";
230		wakeup-source;
231	};
232};
233
234&keypad {
235	keypad,num-rows = <8>;
236	keypad,num-columns = <8>;
237	linux,keymap = <
238
239	/* Row 1 */
240	MATRIX_KEY(0, 2, KEY_1)
241	MATRIX_KEY(0, 6, KEY_2)
242	MATRIX_KEY(2, 3, KEY_3)
243	MATRIX_KEY(0, 7, KEY_4)
244	MATRIX_KEY(0, 4, KEY_5)
245	MATRIX_KEY(5, 5, KEY_6)
246	MATRIX_KEY(0, 1, KEY_7)
247	MATRIX_KEY(0, 5, KEY_8)
248	MATRIX_KEY(0, 0, KEY_9)
249	MATRIX_KEY(1, 6, KEY_0)
250
251	/* Row 2 */
252	MATRIX_KEY(3, 4, KEY_APOSTROPHE)
253	MATRIX_KEY(7, 6, KEY_Q)
254	MATRIX_KEY(7, 7, KEY_W)
255	MATRIX_KEY(7, 2, KEY_E)
256	MATRIX_KEY(1, 0, KEY_R)
257	MATRIX_KEY(4, 4, KEY_T)
258	MATRIX_KEY(1, 2, KEY_Y)
259	MATRIX_KEY(6, 7, KEY_U)
260	MATRIX_KEY(2, 2, KEY_I)
261	MATRIX_KEY(5, 6, KEY_O)
262	MATRIX_KEY(3, 7, KEY_P)
263	MATRIX_KEY(6, 5, KEY_BACKSPACE)
264
265	/* Row 3 */
266	MATRIX_KEY(5, 4, KEY_TAB)
267	MATRIX_KEY(5, 7, KEY_A)
268	MATRIX_KEY(2, 7, KEY_S)
269	MATRIX_KEY(7, 0, KEY_D)
270	MATRIX_KEY(2, 6, KEY_F)
271	MATRIX_KEY(6, 2, KEY_G)
272	MATRIX_KEY(6, 6, KEY_H)
273	MATRIX_KEY(1, 4, KEY_J)
274	MATRIX_KEY(3, 1, KEY_K)
275	MATRIX_KEY(2, 1, KEY_L)
276	MATRIX_KEY(4, 6, KEY_ENTER)
277
278	/* Row 4 */
279	MATRIX_KEY(3, 6, KEY_LEFTSHIFT)		/* KEY_CAPSLOCK */
280	MATRIX_KEY(6, 1, KEY_Z)
281	MATRIX_KEY(7, 4, KEY_X)
282	MATRIX_KEY(5, 1, KEY_C)
283	MATRIX_KEY(1, 7, KEY_V)
284	MATRIX_KEY(2, 4, KEY_B)
285	MATRIX_KEY(4, 1, KEY_N)
286	MATRIX_KEY(1, 1, KEY_M)
287	MATRIX_KEY(3, 5, KEY_COMMA)
288	MATRIX_KEY(5, 2, KEY_DOT)
289	MATRIX_KEY(6, 3, KEY_UP)
290	MATRIX_KEY(7, 3, KEY_OK)
291
292	/* Row 5 */
293	MATRIX_KEY(2, 5, KEY_LEFTCTRL)		/* KEY_LEFTSHIFT */
294	MATRIX_KEY(4, 5, KEY_LEFTALT)		/* SYM */
295	MATRIX_KEY(6, 0, KEY_MINUS)
296	MATRIX_KEY(4, 7, KEY_EQUAL)
297	MATRIX_KEY(1, 5, KEY_SPACE)
298	MATRIX_KEY(3, 2, KEY_SLASH)
299	MATRIX_KEY(4, 3, KEY_LEFT)
300	MATRIX_KEY(5, 3, KEY_DOWN)
301	MATRIX_KEY(3, 3, KEY_RIGHT)
302
303	/* Side buttons, KEY_VOLUMEDOWN and KEY_PWER are on CPCAP? */
304	MATRIX_KEY(5, 0, KEY_VOLUMEUP)
305	>;
306};
307
308&mmc1 {
309	vmmc-supply = <&vwlan2>;
310	bus-width = <4>;
311	cd-gpios = <&gpio6 16 GPIO_ACTIVE_LOW>;	/* gpio176 */
312};
313
314&mmc2 {
315	vmmc-supply = <&vsdio>;
316	bus-width = <8>;
317	ti,non-removable;
318};
319
320&mmc3 {
321	vmmc-supply = <&wl12xx_vmmc>;
322	interrupts-extended = <&wakeupgen GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH
323			       &omap4_pmx_core 0xde>;
324
325	non-removable;
326	bus-width = <4>;
327	cap-power-off-card;
328
329	#address-cells = <1>;
330	#size-cells = <0>;
331	wlcore: wlcore@2 {
332		compatible = "ti,wl1285", "ti,wl1283";
333		reg = <2>;
334		interrupt-parent = <&gpio4>;
335		interrupts = <4 IRQ_TYPE_LEVEL_HIGH>; /* gpio100 */
336		ref-clock-frequency = <26000000>;
337		tcxo-clock-frequency = <26000000>;
338	};
339};
340
341&i2c1 {
342	lm3532@38 {
343		compatible = "ti,lm3532";
344		reg = <0x38>;
345
346		enable-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>;
347
348		backlight {
349			compatible = "ti,lm3532-backlight";
350
351			lcd {
352				led-sources = <0 1 2>;
353				ramp-up-msec = <1>;
354				ramp-down-msec = <0>;
355			};
356		};
357	};
358};
359
360/*
361 * REVISIT: Add gpio173 reset pin handling to the driver, see gpio-hog above.
362 * If the GPIO reset is used, we probably need to have /lib/firmware/maxtouch.fw
363 * available. See "mxt-app" and "droid4-touchscreen-firmware" tools for more
364 * information.
365 */
366&i2c2 {
367	tsp@4a {
368		compatible = "atmel,maxtouch";
369		reg = <0x4a>;
370		pinctrl-names = "default";
371		pinctrl-0 = <&touchscreen_pins>;
372
373		/* gpio_183 with sys_nirq2 pad as wakeup */
374		interrupts-extended = <&gpio6 23 IRQ_TYPE_EDGE_FALLING
375				       &omap4_pmx_core 0x160>;
376		interrupt-names = "irq", "wakeup";
377		wakeup-source;
378	};
379
380	isl29030@44 {
381		compatible = "isil,isl29030";
382		reg = <0x44>;
383
384		pinctrl-names = "default";
385		pinctrl-0 = <&als_proximity_pins>;
386
387		interrupt-parent = <&gpio6>;
388		interrupts = <17 IRQ_TYPE_LEVEL_LOW>; /* gpio177 */
389	};
390};
391
392&omap4_pmx_core {
393
394	/* hdmi_hpd.gpio_63 */
395	hdmi_hpd_gpio: pinmux_hdmi_hpd_pins {
396		pinctrl-single,pins = <
397		OMAP4_IOPAD(0x098, PIN_INPUT | MUX_MODE3)
398		>;
399	};
400
401	/* hdmi_cec.hdmi_cec, hdmi_scl.hdmi_scl, hdmi_sda.hdmi_sda */
402	dss_hdmi_pins: pinmux_dss_hdmi_pins {
403		pinctrl-single,pins = <
404		OMAP4_IOPAD(0x09a, PIN_INPUT | MUX_MODE0)
405		OMAP4_IOPAD(0x09c, PIN_INPUT | MUX_MODE0)
406		OMAP4_IOPAD(0x09e, PIN_INPUT | MUX_MODE0)
407		>;
408	};
409
410	/* gpmc_ncs0.gpio_50 */
411	poweroff_gpio: pinmux_poweroff_pins {
412		pinctrl-single,pins = <
413		OMAP4_IOPAD(0x074, PIN_OUTPUT_PULLUP | MUX_MODE3)
414		>;
415	};
416
417	/* kpd_row0.gpio_178 */
418	tmp105_irq: pinmux_tmp105_irq {
419		pinctrl-single,pins = <
420		OMAP4_IOPAD(0x18e, PIN_INPUT_PULLUP | MUX_MODE3)
421		>;
422	};
423
424	usb_gpio_mux_sel1: pinmux_usb_gpio_mux_sel1_pins {
425		/* gpio_60 */
426		pinctrl-single,pins = <
427		OMAP4_IOPAD(0x088, PIN_OUTPUT | MUX_MODE3)
428		>;
429	};
430
431	touchscreen_pins: pinmux_touchscreen_pins {
432		pinctrl-single,pins = <
433		OMAP4_IOPAD(0x1a0, PIN_INPUT_PULLUP | MUX_MODE3)
434		>;
435	};
436
437	als_proximity_pins: pinmux_als_proximity_pins {
438		pinctrl-single,pins = <
439		OMAP4_IOPAD(0x18c, PIN_INPUT_PULLUP | MUX_MODE3)
440		>;
441	};
442
443	usb_ulpi_pins: pinmux_usb_ulpi_pins {
444		pinctrl-single,pins = <
445		OMAP4_IOPAD(0x196, MUX_MODE7)
446		OMAP4_IOPAD(0x198, MUX_MODE7)
447		OMAP4_IOPAD(0x1b2, PIN_INPUT_PULLUP | MUX_MODE0)
448		OMAP4_IOPAD(0x1b4, PIN_INPUT_PULLUP | MUX_MODE0)
449		OMAP4_IOPAD(0x1b6, PIN_INPUT_PULLUP | MUX_MODE0)
450		OMAP4_IOPAD(0x1b8, PIN_INPUT_PULLUP | MUX_MODE0)
451		OMAP4_IOPAD(0x1ba, PIN_INPUT_PULLUP | MUX_MODE0)
452		OMAP4_IOPAD(0x1bc, PIN_INPUT_PULLUP | MUX_MODE0)
453		OMAP4_IOPAD(0x1be, PIN_INPUT_PULLUP | MUX_MODE0)
454		OMAP4_IOPAD(0x1c0, PIN_INPUT_PULLUP | MUX_MODE0)
455		OMAP4_IOPAD(0x1c2, PIN_INPUT_PULLUP | MUX_MODE0)
456		OMAP4_IOPAD(0x1c4, PIN_INPUT_PULLUP | MUX_MODE0)
457		OMAP4_IOPAD(0x1c6, PIN_INPUT_PULLUP | MUX_MODE0)
458		OMAP4_IOPAD(0x1c8, PIN_INPUT_PULLUP | MUX_MODE0)
459		>;
460	};
461
462	/* usb0_otg_dp and usb0_otg_dm */
463	usb_utmi_pins: pinmux_usb_utmi_pins {
464		pinctrl-single,pins = <
465		OMAP4_IOPAD(0x196, PIN_INPUT | MUX_MODE0)
466		OMAP4_IOPAD(0x198, PIN_INPUT | MUX_MODE0)
467		OMAP4_IOPAD(0x1b2, PIN_INPUT_PULLUP | MUX_MODE7)
468		OMAP4_IOPAD(0x1b4, PIN_INPUT_PULLUP | MUX_MODE7)
469		OMAP4_IOPAD(0x1b6, PIN_INPUT_PULLUP | MUX_MODE7)
470		OMAP4_IOPAD(0x1b8, PIN_INPUT_PULLUP | MUX_MODE7)
471		OMAP4_IOPAD(0x1ba, PIN_INPUT_PULLUP | MUX_MODE7)
472		OMAP4_IOPAD(0x1bc, PIN_INPUT_PULLUP | MUX_MODE7)
473		OMAP4_IOPAD(0x1be, PIN_INPUT_PULLUP | MUX_MODE7)
474		OMAP4_IOPAD(0x1c0, PIN_INPUT_PULLUP | MUX_MODE7)
475		OMAP4_IOPAD(0x1c2, PIN_INPUT_PULLUP | MUX_MODE7)
476		OMAP4_IOPAD(0x1c4, PIN_INPUT_PULLUP | MUX_MODE7)
477		OMAP4_IOPAD(0x1c6, PIN_INPUT_PULLUP | MUX_MODE7)
478		OMAP4_IOPAD(0x1c8, PIN_INPUT_PULLUP | MUX_MODE7)
479		>;
480	};
481
482	/* uart3_tx_irtx and uart3_rx_irrx */
483	uart3_pins: pinmux_uart3_pins {
484		pinctrl-single,pins = <
485		OMAP4_IOPAD(0x196, MUX_MODE7)
486		OMAP4_IOPAD(0x198, MUX_MODE7)
487		OMAP4_IOPAD(0x1b2, PIN_INPUT_PULLUP | MUX_MODE7)
488		OMAP4_IOPAD(0x1b4, PIN_INPUT_PULLUP | MUX_MODE7)
489		OMAP4_IOPAD(0x1b6, PIN_INPUT_PULLUP | MUX_MODE7)
490		OMAP4_IOPAD(0x1b8, PIN_INPUT_PULLUP | MUX_MODE7)
491		OMAP4_IOPAD(0x1ba, MUX_MODE2)
492		OMAP4_IOPAD(0x1bc, PIN_INPUT | MUX_MODE2)
493		OMAP4_IOPAD(0x1be, PIN_INPUT_PULLUP | MUX_MODE7)
494		OMAP4_IOPAD(0x1c0, PIN_INPUT_PULLUP | MUX_MODE7)
495		OMAP4_IOPAD(0x1c2, PIN_INPUT_PULLUP | MUX_MODE7)
496		OMAP4_IOPAD(0x1c4, PIN_INPUT_PULLUP | MUX_MODE7)
497		OMAP4_IOPAD(0x1c6, PIN_INPUT_PULLUP | MUX_MODE7)
498		OMAP4_IOPAD(0x1c8, PIN_INPUT_PULLUP | MUX_MODE7)
499		>;
500	};
501
502	uart4_pins: pinmux_uart4_pins {
503		pinctrl-single,pins = <
504		OMAP4_IOPAD(0x15c, PIN_INPUT | MUX_MODE0)		/* uart4_rx */
505		OMAP4_IOPAD(0x15e, PIN_OUTPUT | MUX_MODE0)		/* uart4_tx */
506		OMAP4_IOPAD(0x110, PIN_INPUT_PULLUP | MUX_MODE5)	/* uart4_cts */
507		OMAP4_IOPAD(0x112, PIN_OUTPUT_PULLUP | MUX_MODE5)	/* uart4_rts */
508		>;
509	};
510};
511
512&omap4_pmx_wkup {
513	usb_gpio_mux_sel2: pinmux_usb_gpio_mux_sel2_pins {
514		/* gpio_wk0 */
515		pinctrl-single,pins = <
516		OMAP4_IOPAD(0x040, PIN_OUTPUT_PULLDOWN | MUX_MODE3)
517		>;
518	};
519
520	vibrator_direction_pin: pinmux_vibrator_direction_pin {
521		pinctrl-single,pins = <
522		OMAP4_IOPAD(0x1ce, PIN_OUTPUT | MUX_MODE1)	/* dmtimer8_pwm_evt (gpio_27) */
523		>;
524	};
525
526	vibrator_enable_pin: pinmux_vibrator_enable_pin {
527		pinctrl-single,pins = <
528		OMAP4_IOPAD(0X1d0, PIN_OUTPUT | MUX_MODE1)	/* dmtimer9_pwm_evt (gpio_28) */
529		>;
530	};
531};
532
533&uart3 {
534	interrupts-extended = <&wakeupgen GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH
535			       &omap4_pmx_core 0x17c>;
536};
537
538&uart4 {
539	pinctrl-names = "default";
540	pinctrl-0 = <&uart4_pins>;
541
542	bluetooth {
543		compatible = "ti,wl1285-st";
544		enable-gpios = <&gpio6 14 GPIO_ACTIVE_HIGH>; /* gpio 174 */
545		max-speed = <3686400>;
546	};
547};
548
549&usbhsehci {
550	phys = <&hsusb1_phy>;
551};
552
553&usbhshost {
554	port1-mode = "ohci-phy-4pin-dpdm";
555	port2-mode = "ehci-tll";
556};
557
558/* Internal UTMI+ PHY used for OTG, CPCAP ULPI PHY for detection and charger */
559&usb_otg_hs {
560	interface-type = <1>;
561	mode = <3>;
562	power = <50>;
563};
564
565&i2c4 {
566	ak8975: magnetometer@c {
567		compatible = "asahi-kasei,ak8975";
568		reg = <0x0c>;
569
570		vdd-supply = <&vhvio>;
571
572		interrupt-parent = <&gpio6>;
573		interrupts = <15 IRQ_TYPE_EDGE_RISING>; /* gpio175 */
574
575		rotation-matrix = "-1", "0", "0",
576				  "0", "1", "0",
577				  "0", "0", "-1";
578
579	};
580
581	lis3dh: accelerometer@18 {
582		compatible = "st,lis3dh-accel";
583		reg = <0x18>;
584
585		vdd-supply = <&vhvio>;
586
587		interrupt-parent = <&gpio2>;
588		interrupts = <2 IRQ_TYPE_EDGE_BOTH>; /* gpio34 */
589
590		rotation-matrix = "0", "-1", "0",
591				  "1", "0", "0",
592				  "0", "0", "1";
593	};
594};
595