Linux Audio

Check our new training course

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