1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2015
4 *   Nikolaus Schaller <hns@goldelico.com>
5 *
6 * Common device tree include for OpenPandora devices.
7 */
8
9#include <dt-bindings/input/input.h>
10
11/ {
12	cpus {
13		cpu@0 {
14			cpu0-supply = <&vcc>;
15		};
16	};
17
18	memory@80000000 {
19		device_type = "memory";
20		reg = <0x80000000 0x20000000>; /* 512 MB */
21	};
22
23	aliases {
24		display0 = &lcd;
25	};
26
27	/* fixed 26MHz oscillator */
28	hfclk_26m: oscillator {
29		#clock-cells = <0>;
30		compatible = "fixed-clock";
31		clock-frequency = <26000000>;
32	};
33
34	tv: connector {
35		compatible = "connector-analog-tv";
36		label = "tv";
37
38		port {
39			tv_connector_in: endpoint {
40				remote-endpoint = <&venc_out>;
41			};
42		};
43	};
44
45	gpio-leds {
46
47		compatible = "gpio-leds";
48
49		pinctrl-names = "default";
50		pinctrl-0 = <&led_pins>;
51
52		led1 {
53			label = "pandora::sd1";
54			gpios = <&gpio5 0 GPIO_ACTIVE_HIGH>;	/* GPIO_128 */
55			linux,default-trigger = "mmc0";
56			default-state = "off";
57		};
58
59		led2 {
60			label = "pandora::sd2";
61			gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;	/* GPIO_129 */
62			linux,default-trigger = "mmc1";
63			default-state = "off";
64		};
65
66		led3 {
67			label = "pandora::bluetooth";
68			gpios = <&gpio5 30 GPIO_ACTIVE_HIGH>;	/* GPIO_158 */
69			linux,default-trigger = "heartbeat";
70			default-state = "off";
71		};
72
73		led4 {
74			label = "pandora::wifi";
75			gpios = <&gpio5 31 GPIO_ACTIVE_HIGH>;	/* GPIO_159 */
76			linux,default-trigger = "mmc2";
77			default-state = "off";
78		};
79	};
80
81	gpio-keys {
82		compatible = "gpio-keys";
83
84		pinctrl-names = "default";
85		pinctrl-0 = <&button_pins>;
86
87		up-button {
88			label = "up";
89			linux,code = <KEY_UP>;
90			gpios = <&gpio4 14 GPIO_ACTIVE_LOW>;	/* GPIO_110 */
91			wakeup-source;
92		};
93
94		down-button {
95			label = "down";
96			linux,code = <KEY_DOWN>;
97			gpios = <&gpio4 7 GPIO_ACTIVE_LOW>;	/* GPIO_103 */
98			wakeup-source;
99		};
100
101		left-button {
102			label = "left";
103			linux,code = <KEY_LEFT>;
104			gpios = <&gpio4 0 GPIO_ACTIVE_LOW>;	/* GPIO_96 */
105			wakeup-source;
106		};
107
108		right-button {
109			label = "right";
110			linux,code = <KEY_RIGHT>;
111			gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;	/* GPIO_98 */
112			wakeup-source;
113		};
114
115		pageup-button {
116			label = "game 1";
117			linux,code = <KEY_PAGEUP>;
118			gpios = <&gpio4 13 GPIO_ACTIVE_LOW>;	/* GPIO_109 */
119			wakeup-source;
120		};
121
122		pagedown-button {
123			label = "game 3";
124			linux,code = <KEY_PAGEDOWN>;
125			gpios = <&gpio4 10 GPIO_ACTIVE_LOW>;	/* GPIO_106 */
126			wakeup-source;
127		};
128
129		home-button {
130			label = "game 4";
131			linux,code = <KEY_HOME>;
132			gpios = <&gpio4 5 GPIO_ACTIVE_LOW>;	/* GPIO_101 */
133			wakeup-source;
134		};
135
136		end-button {
137			label = "game 2";
138			linux,code = <KEY_END>;
139			gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;	/* GPIO_111 */
140			wakeup-source;
141		};
142
143		right-shift {
144			label = "l";
145			linux,code = <KEY_RIGHTSHIFT>;
146			gpios = <&gpio4 6 GPIO_ACTIVE_LOW>;	/* GPIO_102 */
147			wakeup-source;
148		};
149
150		kp-plus {
151			label = "l2";
152			linux,code = <KEY_KPPLUS>;
153			gpios = <&gpio4 1 GPIO_ACTIVE_LOW>;	/* GPIO_97 */
154			wakeup-source;
155		};
156
157		right-ctrl {
158			label = "r";
159			linux,code = <KEY_RIGHTCTRL>;
160			gpios = <&gpio4 9 GPIO_ACTIVE_LOW>;	/* GPIO_105 */
161			wakeup-source;
162		};
163
164		kp-minus {
165			label = "r2";
166			linux,code = <KEY_KPMINUS>;
167			gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;	/* GPIO_107 */
168			wakeup-source;
169		};
170
171		left-ctrl {
172			label = "ctrl";
173			linux,code = <KEY_LEFTCTRL>;
174			gpios = <&gpio4 8 GPIO_ACTIVE_LOW>;	/* GPIO_104 */
175			wakeup-source;
176		};
177
178		menu {
179			label = "menu";
180			linux,code = <KEY_MENU>;
181			gpios = <&gpio4 3 GPIO_ACTIVE_LOW>;	/* GPIO_99 */
182			wakeup-source;
183		};
184
185		hold {
186			label = "hold";
187			linux,code = <KEY_COFFEE>;
188			gpios = <&gpio6 16 GPIO_ACTIVE_LOW>;	/* GPIO_176 */
189			wakeup-source;
190		};
191
192		left-alt {
193			label = "alt";
194			linux,code = <KEY_LEFTALT>;
195			gpios = <&gpio4 4 GPIO_ACTIVE_HIGH>;	/* GPIO_100 */
196			wakeup-source;
197		};
198
199		lid {
200			label = "lid";
201			linux,code = <0x00>;    /* SW_LID lid shut */
202			linux,input-type = <0x05>;    /* EV_SW */
203			gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;   /* GPIO_108 */
204		};
205	};
206
207	/* HS USB Host PHY on PORT 2 */
208	hsusb2_phy: hsusb2_phy {
209		compatible = "usb-nop-xceiv";
210		reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; /* GPIO_16 */
211		vcc-supply = <&vaux2>;
212		#phy-cells = <0>;
213	};
214
215	/* HS USB Host VBUS supply
216	 * disabling this regulator causes current leakage, and LCD flicker
217	 * on earlier (CC) board revisions, so keep it always on */
218	usb_host_5v: fixed-regulator-usb_host_5v {
219		compatible = "regulator-fixed";
220		regulator-name = "usb_host_5v";
221		regulator-min-microvolt = <5000000>;
222		regulator-max-microvolt = <5000000>;
223		regulator-always-on;
224		regulator-boot-on;
225		enable-active-high;
226		gpio = <&gpio6 4 GPIO_ACTIVE_HIGH>;	/* GPIO_164 */
227	};
228
229	/* wg7210 (wifi+bt module) 32k clock buffer */
230	wg7210_32k: fixed-regulator-wg7210_32k {
231		compatible = "regulator-fixed";
232		regulator-name = "wg7210_32k";
233		regulator-min-microvolt = <1800000>;
234		regulator-max-microvolt = <1800000>;
235		regulator-always-on;
236		enable-active-high;
237		gpio = <&twl_gpio 13 GPIO_ACTIVE_HIGH>;
238	};
239};
240
241&omap3_pmx_core {
242
243	mmc1_pins: pinmux_mmc1_pins {
244		pinctrl-single,pins = <
245			OMAP3_CORE1_IOPAD(0x2144, PIN_INPUT_PULLUP | MUX_MODE0)		/* sdmmc1_clk.sdmmc1_clk */
246			OMAP3_CORE1_IOPAD(0x2146, PIN_INPUT_PULLUP | MUX_MODE0)		/* sdmmc1_cmd.sdmmc1_cmd */
247			OMAP3_CORE1_IOPAD(0x2148, PIN_INPUT_PULLUP | MUX_MODE0)		/* sdmmc1_dat0.sdmmc1_dat0 */
248			OMAP3_CORE1_IOPAD(0x214a, PIN_INPUT_PULLUP | MUX_MODE0)		/* sdmmc1_dat1.sdmmc1_dat1 */
249			OMAP3_CORE1_IOPAD(0x214c, PIN_INPUT_PULLUP | MUX_MODE0)		/* sdmmc1_dat2.sdmmc1_dat2 */
250			OMAP3_CORE1_IOPAD(0x214e, PIN_INPUT_PULLUP | MUX_MODE0)		/* sdmmc1_dat3.sdmmc1_dat3 */
251		>;
252	};
253
254	mmc2_pins: pinmux_mmc2_pins {
255		pinctrl-single,pins = <
256			OMAP3_CORE1_IOPAD(0x2158, PIN_INPUT_PULLUP | MUX_MODE0)		/* sdmmc2_clk.sdmmc2_clk */
257			OMAP3_CORE1_IOPAD(0x215a, PIN_INPUT_PULLUP | MUX_MODE0)		/* sdmmc2_cmd.sdmmc2_cmd */
258			OMAP3_CORE1_IOPAD(0x215c, PIN_INPUT_PULLUP | MUX_MODE0)		/* sdmmc2_dat0.sdmmc2_dat0 */
259			OMAP3_CORE1_IOPAD(0x215e, PIN_INPUT_PULLUP | MUX_MODE0)		/* sdmmc2_dat1.sdmmc2_dat1 */
260			OMAP3_CORE1_IOPAD(0x2160, PIN_INPUT_PULLUP | MUX_MODE0)		/* sdmmc2_dat2.sdmmc2_dat2 */
261			OMAP3_CORE1_IOPAD(0x2162, PIN_INPUT_PULLUP | MUX_MODE0)		/* sdmmc2_dat3.sdmmc2_dat3 */
262			OMAP3_CORE1_IOPAD(0x2164, PIN_OUTPUT_PULLUP | MUX_MODE1)	/* sdmmc2_dat4.sdmmc2_dirdat0 */
263			OMAP3_CORE1_IOPAD(0x2166, PIN_OUTPUT_PULLUP | MUX_MODE1)	/* sdmmc2_dat5.sdmmc2_dirdat1 */
264			OMAP3_CORE1_IOPAD(0x2168, PIN_OUTPUT_PULLUP | MUX_MODE1)	/* sdmmc2_dat6.sdmmc2_dircmd */
265			OMAP3_CORE1_IOPAD(0x216a, PIN_INPUT_PULLUP | MUX_MODE1)		/* sdmmc2_dat7.sdmmc2_clkin */
266		>;
267	};
268
269	dss_dpi_pins: pinmux_dss_dpi_pins {
270		pinctrl-single,pins = <
271			OMAP3_CORE1_IOPAD(0x20d4, PIN_OUTPUT | MUX_MODE0)	/* dss_pclk.dss_pclk */
272			OMAP3_CORE1_IOPAD(0x20d6, PIN_OUTPUT | MUX_MODE0)	/* dss_hsync.dss_hsync */
273			OMAP3_CORE1_IOPAD(0x20d8, PIN_OUTPUT | MUX_MODE0)	/* dss_vsync.dss_vsync */
274			OMAP3_CORE1_IOPAD(0x20da, PIN_OUTPUT | MUX_MODE0)	/* dss_acbias.dss_acbias */
275			OMAP3_CORE1_IOPAD(0x20dc, PIN_OUTPUT | MUX_MODE0)	/* dss_data0.dss_data0 */
276			OMAP3_CORE1_IOPAD(0x20de, PIN_OUTPUT | MUX_MODE0)	/* dss_data1.dss_data1 */
277			OMAP3_CORE1_IOPAD(0x20e0, PIN_OUTPUT | MUX_MODE0)	/* dss_data2.dss_data2 */
278			OMAP3_CORE1_IOPAD(0x20e2, PIN_OUTPUT | MUX_MODE0)	/* dss_data3.dss_data3 */
279			OMAP3_CORE1_IOPAD(0x20e4, PIN_OUTPUT | MUX_MODE0)	/* dss_data4.dss_data4 */
280			OMAP3_CORE1_IOPAD(0x20e6, PIN_OUTPUT | MUX_MODE0)	/* dss_data5.dss_data5 */
281			OMAP3_CORE1_IOPAD(0x20e8, PIN_OUTPUT | MUX_MODE0)	/* dss_data6.dss_data6 */
282			OMAP3_CORE1_IOPAD(0x20ea, PIN_OUTPUT | MUX_MODE0)	/* dss_data7.dss_data7 */
283			OMAP3_CORE1_IOPAD(0x20ec, PIN_OUTPUT | MUX_MODE0)	/* dss_data8.dss_data8 */
284			OMAP3_CORE1_IOPAD(0x20ee, PIN_OUTPUT | MUX_MODE0)	/* dss_data9.dss_data9 */
285			OMAP3_CORE1_IOPAD(0x20f0, PIN_OUTPUT | MUX_MODE0)	/* dss_data10.dss_data10 */
286			OMAP3_CORE1_IOPAD(0x20f2, PIN_OUTPUT | MUX_MODE0)	/* dss_data11.dss_data11 */
287			OMAP3_CORE1_IOPAD(0x20f4, PIN_OUTPUT | MUX_MODE0)	/* dss_data12.dss_data12 */
288			OMAP3_CORE1_IOPAD(0x20f6, PIN_OUTPUT | MUX_MODE0)	/* dss_data13.dss_data13 */
289			OMAP3_CORE1_IOPAD(0x20f8, PIN_OUTPUT | MUX_MODE0)	/* dss_data14.dss_data14 */
290			OMAP3_CORE1_IOPAD(0x20fa, PIN_OUTPUT | MUX_MODE0)	/* dss_data15.dss_data15 */
291			OMAP3_CORE1_IOPAD(0x20fc, PIN_OUTPUT | MUX_MODE0)	/* dss_data16.dss_data16 */
292			OMAP3_CORE1_IOPAD(0x20fe, PIN_OUTPUT | MUX_MODE0)	/* dss_data17.dss_data17 */
293			OMAP3_CORE1_IOPAD(0x2100, PIN_OUTPUT | MUX_MODE0)	/* dss_data18.dss_data18 */
294			OMAP3_CORE1_IOPAD(0x2102, PIN_OUTPUT | MUX_MODE0)	/* dss_data19.dss_data19 */
295			OMAP3_CORE1_IOPAD(0x2104, PIN_OUTPUT | MUX_MODE0)	/* dss_data20.dss_data20 */
296			OMAP3_CORE1_IOPAD(0x2106, PIN_OUTPUT | MUX_MODE0)	/* dss_data21.dss_data21 */
297			OMAP3_CORE1_IOPAD(0x2108, PIN_OUTPUT | MUX_MODE0)	/* dss_data22.dss_data22 */
298			OMAP3_CORE1_IOPAD(0x210a, PIN_OUTPUT | MUX_MODE0)	/* dss_data23.dss_data23 */
299			OMAP3_CORE1_IOPAD(0x218e, PIN_OUTPUT | MUX_MODE4)	/* GPIO_157 = lcd reset */
300		>;
301	};
302
303	uart3_pins: pinmux_uart3_pins {
304		pinctrl-single,pins = <
305			OMAP3_CORE1_IOPAD(0x219e, PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE0)	/* uart3_rx_irrx.uart3_rx_irrx */
306			OMAP3_CORE1_IOPAD(0x21a0, PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx.uart3_tx_irtx */
307		>;
308	};
309
310	led_pins: pinmux_leds_pins {
311		pinctrl-single,pins = <
312			OMAP3_CORE1_IOPAD(0x2154, PIN_OUTPUT | MUX_MODE4)	/* GPIO_128 */
313			OMAP3_CORE1_IOPAD(0x2156, PIN_OUTPUT | MUX_MODE4)	/* GPIO_129 */
314			OMAP3_CORE1_IOPAD(0x2190, PIN_OUTPUT | MUX_MODE4)	/* GPIO_158 */
315			OMAP3_CORE1_IOPAD(0x2192, PIN_OUTPUT | MUX_MODE4)	/* GPIO_159 */
316		>;
317	};
318
319	button_pins: pinmux_button_pins {
320		pinctrl-single,pins = <
321			OMAP3_CORE1_IOPAD(0x2110, PIN_INPUT | MUX_MODE4)	/* GPIO_96 */
322			OMAP3_CORE1_IOPAD(0x2112, PIN_INPUT | MUX_MODE4)	/* GPIO_97 */
323			OMAP3_CORE1_IOPAD(0x2114, PIN_INPUT | MUX_MODE4)	/* GPIO_98 */
324			OMAP3_CORE1_IOPAD(0x2116, PIN_INPUT | MUX_MODE4)	/* GPIO_99 */
325			OMAP3_CORE1_IOPAD(0x2118, PIN_INPUT | MUX_MODE4)	/* GPIO_100 */
326			OMAP3_CORE1_IOPAD(0x211a, PIN_INPUT | MUX_MODE4)	/* GPIO_101 */
327			OMAP3_CORE1_IOPAD(0x211c, PIN_INPUT | MUX_MODE4)	/* GPIO_102 */
328			OMAP3_CORE1_IOPAD(0x211e, PIN_INPUT | MUX_MODE4)	/* GPIO_103 */
329			OMAP3_CORE1_IOPAD(0x2120, PIN_INPUT | MUX_MODE4)	/* GPIO_104 */
330			OMAP3_CORE1_IOPAD(0x2122, PIN_INPUT | MUX_MODE4)	/* GPIO_105 */
331			OMAP3_CORE1_IOPAD(0x2124, PIN_INPUT | MUX_MODE4)	/* GPIO_106 */
332			OMAP3_CORE1_IOPAD(0x2126, PIN_INPUT | MUX_MODE4)	/* GPIO_107 */
333			OMAP3_CORE1_IOPAD(0x2128, PIN_INPUT | MUX_MODE4)	/* GPIO_108 */
334			OMAP3_CORE1_IOPAD(0x212a, PIN_INPUT | MUX_MODE4)	/* GPIO_109 */
335			OMAP3_CORE1_IOPAD(0x212c, PIN_INPUT | MUX_MODE4)	/* GPIO_110 */
336			OMAP3_CORE1_IOPAD(0x212e, PIN_INPUT | MUX_MODE4)	/* GPIO_111 */
337			OMAP3_CORE1_IOPAD(0x21d2, PIN_INPUT | MUX_MODE4)	/* GPIO_176 */
338		>;
339	};
340
341	penirq_pins: pinmux_penirq_pins {
342		pinctrl-single,pins = <
343			/* here we could enable to wakeup the cpu from suspend by a pen touch */
344			OMAP3_CORE1_IOPAD(0x210c, PIN_INPUT | MUX_MODE4)	/* GPIO_94 */
345		>;
346	};
347
348};
349
350&omap3_pmx_core2 {
351	/* define in CPU specific file that includes this one
352	 * use either OMAP3430_CORE2_IOPAD() or OMAP3630_CORE2_IOPAD()
353	 */
354};
355
356&i2c1 {
357	clock-frequency = <2600000>;
358
359	twl: twl@48 {
360		reg = <0x48>;
361		interrupts = <7>; /* SYS_NIRQ cascaded to intc */
362		interrupt-parent = <&intc>;
363
364		clocks = <&hfclk_26m>;
365		clock-names = "fck";
366
367		twl_power: power {
368			compatible = "ti,twl4030-power-reset";
369			ti,use_poweroff;
370		};
371
372		twl_audio: audio {
373			compatible = "ti,twl4030-audio";
374
375			codec {
376				ti,ramp_delay_value = <3>;
377			};
378		};
379	};
380};
381
382#include "twl4030.dtsi"
383#include "twl4030_omap3.dtsi"
384
385&twl_keypad {
386	keypad,num-rows = <8>;
387	keypad,num-columns = <6>;
388	linux,keymap = <
389		MATRIX_KEY(0, 0, KEY_9)
390		MATRIX_KEY(0, 1, KEY_8)
391		MATRIX_KEY(0, 2, KEY_I)
392		MATRIX_KEY(0, 3, KEY_J)
393		MATRIX_KEY(0, 4, KEY_N)
394		MATRIX_KEY(0, 5, KEY_M)
395		MATRIX_KEY(1, 0, KEY_0)
396		MATRIX_KEY(1, 1, KEY_7)
397		MATRIX_KEY(1, 2, KEY_U)
398		MATRIX_KEY(1, 3, KEY_H)
399		MATRIX_KEY(1, 4, KEY_B)
400		MATRIX_KEY(1, 5, KEY_SPACE)
401		MATRIX_KEY(2, 0, KEY_BACKSPACE)
402		MATRIX_KEY(2, 1, KEY_6)
403		MATRIX_KEY(2, 2, KEY_Y)
404		MATRIX_KEY(2, 3, KEY_G)
405		MATRIX_KEY(2, 4, KEY_V)
406		MATRIX_KEY(2, 5, KEY_FN)
407		MATRIX_KEY(3, 0, KEY_O)
408		MATRIX_KEY(3, 1, KEY_5)
409		MATRIX_KEY(3, 2, KEY_T)
410		MATRIX_KEY(3, 3, KEY_F)
411		MATRIX_KEY(3, 4, KEY_C)
412		MATRIX_KEY(4, 0, KEY_P)
413		MATRIX_KEY(4, 1, KEY_4)
414		MATRIX_KEY(4, 2, KEY_R)
415		MATRIX_KEY(4, 3, KEY_D)
416		MATRIX_KEY(4, 4, KEY_X)
417		MATRIX_KEY(5, 0, KEY_K)
418		MATRIX_KEY(5, 1, KEY_3)
419		MATRIX_KEY(5, 2, KEY_E)
420		MATRIX_KEY(5, 3, KEY_S)
421		MATRIX_KEY(5, 4, KEY_Z)
422		MATRIX_KEY(6, 0, KEY_L)
423		MATRIX_KEY(6, 1, KEY_2)
424		MATRIX_KEY(6, 2, KEY_W)
425		MATRIX_KEY(6, 3, KEY_A)
426		MATRIX_KEY(6, 4, KEY_RIGHTBRACE)
427		MATRIX_KEY(7, 0, KEY_ENTER)
428		MATRIX_KEY(7, 1, KEY_1)
429		MATRIX_KEY(7, 2, KEY_Q)
430		MATRIX_KEY(7, 3, KEY_LEFTSHIFT)
431		MATRIX_KEY(7, 4, KEY_LEFTBRACE )
432	 >;
433};
434
435/* backup battery charger */
436&charger {
437	ti,bb-uvolt = <3200000>;
438	ti,bb-uamp = <150>;
439};
440
441/* MMC2 */
442&vmmc2 {
443	regulator-min-microvolt = <1850000>;
444	regulator-max-microvolt = <3150000>;
445};
446
447/* LCD */
448&vaux1 {
449	regulator-min-microvolt = <3000000>;
450	regulator-max-microvolt = <3000000>;
451};
452
453/* USB Host PHY */
454&vaux2 {
455	regulator-min-microvolt = <1800000>;
456	regulator-max-microvolt = <1800000>;
457};
458
459/* available on expansion connector */
460&vaux3 {
461	regulator-min-microvolt = <2800000>;
462	regulator-max-microvolt = <2800000>;
463};
464
465/* ADS7846 and nubs */
466&vaux4 {
467	regulator-min-microvolt = <2800000>;
468	regulator-max-microvolt = <2800000>;
469};
470
471/* power audio DAC and LID sensor */
472&vsim {
473	regulator-min-microvolt = <2800000>;
474	regulator-max-microvolt = <2800000>;
475	regulator-always-on;
476};
477
478&i2c2 {
479	clock-frequency = <100000>;
480	/* no clients so we should disable clock */
481};
482
483&i2c3 {
484	clock-frequency = <100000>;
485
486	bq27500@55 {
487		compatible = "ti,bq27500";
488		reg = <0x55>;
489	};
490
491};
492
493&usb_otg_hs {
494	interface-type = <0>;
495	usb-phy = <&usb2_phy>;
496	phys = <&usb2_phy>;
497	phy-names = "usb2-phy";
498	mode = <3>;
499	power = <50>;
500};
501
502/*
503 * Many pandora boards have been produced with defective write-protect switches
504 * on either slot, so it was decided not to use this feature. If you know
505 * your board has good switches, feel free to uncomment wp-gpios below.
506 */
507&mmc1 {
508	pinctrl-names = "default";
509	pinctrl-0 = <&mmc1_pins>;
510	vmmc-supply = <&vmmc1>;
511	bus-width = <4>;
512	cd-gpios = <&twl_gpio 0 GPIO_ACTIVE_LOW>;
513	/*wp-gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>;*/	/* GPIO_126 */
514};
515
516&mmc2 {
517	pinctrl-names = "default";
518	pinctrl-0 = <&mmc2_pins>;
519	vmmc-supply = <&vmmc2>;
520	bus-width = <4>;
521	cd-gpios = <&twl_gpio 1 GPIO_ACTIVE_LOW>;
522	/*wp-gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>;*/	/* GPIO_127 */
523};
524
525/* mmc3 is probed using pdata-quirks to pass wl1251 card data */
526&mmc3 {
527	status = "disabled";
528};
529
530/* bluetooth*/
531&uart1 {
532};
533
534/* spare (expansion connector) */
535&uart2 {
536};
537
538/* console (expansion connector) */
539&uart3 {
540	pinctrl-names = "default";
541	pinctrl-0 = <&uart3_pins>;
542	interrupts-extended = <&intc 74 &omap3_pmx_core OMAP3_UART3_RX>;
543};
544
545&usbhshost {
546	port2-mode = "ehci-phy";
547};
548
549&usbhsehci {
550	phys = <0 &hsusb2_phy>;
551};
552
553&gpmc {
554	ranges = <0 0 0x30000000 0x1000000>; /* CS0: 16MB for NAND */
555
556	nand@0,0 {
557		compatible = "ti,omap2-nand";
558		reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
559		interrupt-parent = <&gpmc>;
560		interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
561			     <1 IRQ_TYPE_NONE>;	/* termcount */
562		nand-bus-width = <16>;
563		ti,nand-ecc-opt = "sw";
564
565		gpmc,sync-clk-ps = <0>;
566		gpmc,cs-on-ns = <0>;
567		gpmc,cs-rd-off-ns = <44>;
568		gpmc,cs-wr-off-ns = <44>;
569		gpmc,adv-on-ns = <6>;
570		gpmc,adv-rd-off-ns = <34>;
571		gpmc,adv-wr-off-ns = <44>;
572		gpmc,we-off-ns = <40>;
573		gpmc,oe-off-ns = <54>;
574		gpmc,access-ns = <64>;
575		gpmc,rd-cycle-ns = <82>;
576		gpmc,wr-cycle-ns = <82>;
577		gpmc,wr-access-ns = <40>;
578		gpmc,wr-data-mux-bus-ns = <0>;
579		gpmc,device-width = <2>;
580
581		#address-cells = <1>;
582		#size-cells = <1>;
583
584		/* u-boot uses mtdparts=nand:512k(xloader),1920k(uboot),128k(uboot-env),10m(boot),-(rootfs) */
585
586		x-loader@0 {
587			label = "xloader";
588			reg = <0 0x80000>;
589		};
590
591		bootloaders@80000 {
592			label = "uboot";
593			reg = <0x80000 0x1e0000>;
594		};
595
596		bootloaders_env@260000 {
597			label = "uboot-env";
598			reg = <0x260000 0x20000>;
599		};
600
601		kernel@280000 {
602			label = "boot";
603			reg = <0x280000 0xa00000>;
604		};
605
606		filesystem@c80000 {
607			label = "rootfs";
608			reg = <0xc80000 0>;	/* 0 = MTDPART_SIZ_FULL */
609		};
610	};
611};
612
613&mcspi1 {
614	tsc2046@0 {
615		reg = <0>;	/* CS0 */
616		compatible = "ti,tsc2046";
617		spi-max-frequency = <1000000>;
618		pinctrl-names = "default";
619		pinctrl-0 = <&penirq_pins>;
620		interrupt-parent = <&gpio3>;
621		interrupts = <30 IRQ_TYPE_NONE>;	/* GPIO_94 */
622		pendown-gpio = <&gpio3 30 GPIO_ACTIVE_HIGH>;
623		vcc-supply = <&vaux4>;
624
625		ti,x-min = /bits/ 16 <0>;
626		ti,x-max = /bits/ 16 <8000>;
627		ti,y-min = /bits/ 16 <0>;
628		ti,y-max = /bits/ 16 <4800>;
629		ti,x-plate-ohms = /bits/ 16 <40>;
630		ti,pressure-max = /bits/ 16 <255>;
631
632		wakeup-source;
633	};
634
635	lcd: lcd@1 {
636		reg = <1>;	/* CS1 */
637		compatible =	"tpo,td043mtea1";
638		spi-max-frequency = <100000>;
639		spi-cpol;
640		spi-cpha;
641
642		label = "lcd";
643		reset-gpios = <&gpio5 29 GPIO_ACTIVE_LOW>;	/* GPIO_157 */
644		vcc-supply = <&vaux1>;
645
646		port {
647			lcd_in: endpoint {
648				remote-endpoint = <&dpi_out>;
649			};
650		};
651	};
652
653
654};
655
656/* n/a - used as GPIOs */
657&mcbsp1 {
658};
659
660/* audio DAC */
661&mcbsp2 {
662};
663
664/* bluetooth */
665&mcbsp3 {
666};
667
668/* to twl4030*/
669&mcbsp4 {
670};
671
672&venc {
673	status = "ok";
674
675	vdda-supply = <&vdac>;
676
677	port {
678		venc_out: endpoint {
679			remote-endpoint = <&tv_connector_in>;
680			ti,channels = <2>;
681		};
682	};
683};
684
685&dss {
686	pinctrl-names = "default";
687	pinctrl-0 = < &dss_dpi_pins >;
688
689	status = "ok";
690	vdds_dsi-supply = <&vpll2>;
691
692	port {
693		dpi_out: endpoint {
694			remote-endpoint = <&lcd_in>;
695			data-lines = <24>;
696		};
697	};
698};
699