xref: /freebsd-12.1/sys/gnu/dts/arm/omap3-gta04.dtsi (revision 43faf498)
1/*
2 * Copyright (C) 2013 Marek Belisko <[email protected]>
3 *
4 * Based on omap3-beagle-xm.dts
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10/dts-v1/;
11
12#include "omap36xx.dtsi"
13#include <dt-bindings/input/input.h>
14
15/ {
16	model = "OMAP3 GTA04";
17	compatible = "ti,omap3-gta04", "ti,omap36xx", "ti,omap3";
18
19	cpus {
20		cpu@0 {
21			cpu0-supply = <&vcc>;
22		};
23	};
24
25	memory@80000000 {
26		device_type = "memory";
27		reg = <0x80000000 0x20000000>; /* 512 MB */
28	};
29
30	aliases {
31		display0 = &lcd;
32		display1 = &tv0;
33	};
34
35	ldo_3v3: fixedregulator {
36		compatible = "regulator-fixed";
37		regulator-name = "ldo_3v3";
38		regulator-min-microvolt = <3300000>;
39		regulator-max-microvolt = <3300000>;
40		regulator-always-on;
41	};
42
43	/* fixed 26MHz oscillator */
44	hfclk_26m: oscillator {
45		#clock-cells = <0>;
46		compatible = "fixed-clock";
47		clock-frequency = <26000000>;
48	};
49
50	gpio-keys {
51		compatible = "gpio-keys";
52
53		aux-button {
54			label = "aux";
55			linux,code = <KEY_PHONE>;
56			gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
57			wakeup-source;
58		};
59	};
60
61	antenna-detect {
62		compatible = "gpio-keys";
63
64		gps_antenna_button: gps-antenna-button {
65			label = "GPS_EXT_ANT";
66			linux,input-type = <EV_SW>;
67			linux,code = <SW_LINEIN_INSERT>;
68			gpios = <&gpio5 16 GPIO_ACTIVE_HIGH>; /* GPIO144 */
69			interrupt-parent = <&gpio5>;
70			interrupts = <16 IRQ_TYPE_EDGE_BOTH>;
71			debounce-interval = <10>;
72			wakeup-source;
73		};
74	};
75
76	sound {
77		compatible = "ti,omap-twl4030";
78		ti,model = "gta04";
79
80		ti,mcbsp = <&mcbsp2>;
81	};
82
83	/* GSM audio */
84	sound_telephony {
85		compatible = "simple-audio-card";
86		simple-audio-card,name = "GTA04 voice";
87		simple-audio-card,bitclock-master = <&telephony_link_master>;
88		simple-audio-card,frame-master = <&telephony_link_master>;
89		simple-audio-card,format = "i2s";
90		simple-audio-card,bitclock-inversion;
91		simple-audio-card,frame-inversion;
92		simple-audio-card,cpu {
93			sound-dai = <&mcbsp4>;
94		};
95
96		telephony_link_master: simple-audio-card,codec {
97			sound-dai = <&gtm601_codec>;
98		};
99	};
100
101	gtm601_codec: gsm_codec {
102		compatible = "option,gtm601";
103		#sound-dai-cells = <0>;
104	};
105
106	spi_lcd: spi_lcd {
107		compatible = "spi-gpio";
108		#address-cells = <0x1>;
109		#size-cells = <0x0>;
110		pinctrl-names = "default";
111		pinctrl-0 = <&spi_gpio_pins>;
112
113		gpio-sck = <&gpio1 12 GPIO_ACTIVE_HIGH>;
114		gpio-miso = <&gpio1 18 GPIO_ACTIVE_HIGH>;
115		gpio-mosi = <&gpio1 20 GPIO_ACTIVE_HIGH>;
116		cs-gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>;
117		num-chipselects = <1>;
118
119		/* lcd panel */
120		lcd: td028ttec1@0 {
121			compatible = "tpo,td028ttec1";
122			reg = <0>;
123			spi-max-frequency = <100000>;
124			spi-cpol;
125			spi-cpha;
126
127			backlight= <&backlight>;
128			label = "lcd";
129			port {
130				lcd_in: endpoint {
131					remote-endpoint = <&dpi_out>;
132				};
133			};
134		};
135	};
136
137	backlight: backlight {
138		compatible = "pwm-backlight";
139		pwms = <&pwm11 0 12000000 0>;
140		pwm-names = "backlight";
141		brightness-levels = <0 11 20 30 40 50 60 70 80 90 100>;
142		default-brightness-level = <9>;	/* => 90 */
143		pinctrl-names = "default";
144		pinctrl-0 = <&backlight_pins>;
145	};
146
147	pwm11: dmtimer-pwm {
148		compatible = "ti,omap-dmtimer-pwm";
149		ti,timers = <&timer11>;
150		#pwm-cells = <3>;
151	};
152
153	hsusb2_phy: hsusb2_phy {
154		compatible = "usb-nop-xceiv";
155		reset-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
156		#phy-cells = <0>;
157	};
158
159	tv0: connector {
160		compatible = "composite-video-connector";
161		label = "tv";
162
163		port {
164			tv_connector_in: endpoint {
165				remote-endpoint = <&opa_out>;
166			};
167		};
168	};
169
170	tv_amp: opa362 {
171		compatible = "ti,opa362";
172		enable-gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;	/* GPIO_23 to enable video out amplifier */
173
174		ports {
175			#address-cells = <1>;
176			#size-cells = <0>;
177
178			port@0 {
179				reg = <0>;
180				opa_in: endpoint {
181					remote-endpoint = <&venc_out>;
182				};
183			};
184
185			port@1 {
186				reg = <1>;
187				opa_out: endpoint {
188					remote-endpoint = <&tv_connector_in>;
189				};
190			};
191		};
192	};
193
194	wifi_pwrseq: wifi_pwrseq {
195		compatible = "mmc-pwrseq-simple";
196		reset-gpios = <&tca6507 0 GPIO_ACTIVE_LOW>;	/* W2CBW003 reset through tca6507 */
197	};
198
199	/* devconf0 setup for mcbsp1 clock pins */
200	pinmux_mcbsp1@48002274 {
201		compatible = "pinctrl-single";
202		reg = <0x48002274 4>;   /* CONTROL_DEVCONF0 */
203		#address-cells = <1>;
204		#size-cells = <0>;
205		pinctrl-single,bit-per-mux;
206		pinctrl-single,register-width = <32>;
207		pinctrl-single,function-mask = <0x7>;	/* MCBSP1 CLK pinmux */
208		#pinctrl-cells = <2>;
209		pinctrl-names = "default";
210		pinctrl-0 = <&mcbsp1_devconf0_pins>;
211		mcbsp1_devconf0_pins: pinmux_mcbsp1_devconf0_pins {
212			/*                   offset bits mask */
213			pinctrl-single,bits = <0x00 0x08 0x1c>;	/* set MCBSP1_CLKR */
214		};
215	};
216
217	/* devconf1 setup for tvout pins */
218	pinmux_tv_out@480022d8 {
219		compatible = "pinctrl-single";
220		reg = <0x480022d8 4>;	/* CONTROL_DEVCONF1 */
221		#address-cells = <1>;
222		#size-cells = <0>;
223		pinctrl-single,bit-per-mux;
224		pinctrl-single,register-width = <32>;
225		pinctrl-single,function-mask = <0x81>;	/* TV out pin control */
226		#pinctrl-cells = <2>;
227		pinctrl-names = "default";
228		pinctrl-0 = <&tv_acbias_devconf1_pins>;
229		tv_acbias_devconf1_pins: pinmux_tv_acbias_devconf1_pins {
230			/*			offset	bits	mask */
231			pinctrl-single,bits = <0x00 0x40800 0x40800>;	/* set TVOUTBYPASS and TVOUTACEN */
232		};
233	};
234};
235
236&omap3_pmx_wkup {
237	gpio1_pins: pinmux_gpio1_pins {
238		pinctrl-single,pins = <
239			OMAP3_WKUP_IOPAD(0x2a14, PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE4) /* sys_boot5.gpio_7 */
240			OMAP3_WKUP_IOPAD(0x2a1a, PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE4) /* sys_clkout.gpio_10 */
241		>;
242	};
243};
244
245&omap3_pmx_core {
246	pinctrl-names = "default";
247	pinctrl-0 = <
248			&hsusb2_pins
249	>;
250
251	hsusb2_pins: pinmux_hsusb2_pins {
252		pinctrl-single,pins = <
253			OMAP3_CORE1_IOPAD(0x21d4, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* mcspi1_cs3.hsusb2_data2 */
254			OMAP3_CORE1_IOPAD(0x21d6, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* mcspi2_clk.hsusb2_data7 */
255			OMAP3_CORE1_IOPAD(0x21d8, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* mcspi2_simo.hsusb2_data4 */
256			OMAP3_CORE1_IOPAD(0x21da, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* mcspi2_somi.hsusb2_data5 */
257			OMAP3_CORE1_IOPAD(0x21dc, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* mcspi2_cs0.hsusb2_data6 */
258			OMAP3_CORE1_IOPAD(0x21de, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* mcspi2_cs1.hsusb2_data3 */
259		>;
260	};
261
262	uart1_pins: pinmux_uart1_pins {
263		pinctrl-single,pins = <
264			OMAP3_CORE1_IOPAD(0x2182, PIN_INPUT | MUX_MODE0)		/* uart1_rx.uart1_rx */
265			OMAP3_CORE1_IOPAD(0x217c, PIN_OUTPUT | MUX_MODE0)		/* uart1_tx.uart1_tx */
266		>;
267	};
268
269	uart2_pins: pinmux_uart2_pins {
270		pinctrl-single,pins = <
271			OMAP3_CORE1_IOPAD(0x217a, PIN_INPUT | MUX_MODE0)		/* uart2_rx.uart2_rx */
272			OMAP3_CORE1_IOPAD(0x2178, PIN_OUTPUT | MUX_MODE0)		/* uart2_tx.uart2_tx */
273		>;
274	};
275
276	uart3_pins: pinmux_uart3_pins {
277		pinctrl-single,pins = <
278			OMAP3_CORE1_IOPAD(0x219e, PIN_INPUT | MUX_MODE0)		/* uart3_rx.uart3_rx */
279			OMAP3_CORE1_IOPAD(0x21a0, PIN_OUTPUT | MUX_MODE0)		/* uart3_tx.uart3_tx */
280		>;
281	};
282
283	mmc1_pins: pinmux_mmc1_pins {
284		pinctrl-single,pins = <
285			OMAP3_CORE1_IOPAD(0x2144, PIN_INPUT_PULLUP | MUX_MODE0)		/* sdmmc1_clk.sdmmc1_clk */
286			OMAP3_CORE1_IOPAD(0x2146, PIN_INPUT_PULLUP | MUX_MODE0)		/* sdmmc1_cmd.sdmmc1_cmd */
287			OMAP3_CORE1_IOPAD(0x2148, PIN_INPUT_PULLUP | MUX_MODE0)		/* sdmmc1_dat0.sdmmc1_dat0 */
288			OMAP3_CORE1_IOPAD(0x214a, PIN_INPUT_PULLUP | MUX_MODE0)		/* sdmmc1_dat1.sdmmc1_dat1 */
289			OMAP3_CORE1_IOPAD(0x214c, PIN_INPUT_PULLUP | MUX_MODE0)		/* sdmmc1_dat2.sdmmc1_dat2 */
290			OMAP3_CORE1_IOPAD(0x214e, PIN_INPUT_PULLUP | MUX_MODE0)		/* sdmmc1_dat3.sdmmc1_dat3 */
291		>;
292	};
293
294	backlight_pins: backlight_pins_pinmux {
295		pinctrl-single,pins = <
296			OMAP3_CORE1_IOPAD(0x20ba, MUX_MODE3)		/* gpt11/gpio57 */
297		>;
298	};
299
300	dss_dpi_pins: pinmux_dss_dpi_pins {
301		pinctrl-single,pins = <
302			OMAP3_CORE1_IOPAD(0x20d4, PIN_OUTPUT | MUX_MODE0)   /* dss_pclk.dss_pclk */
303			OMAP3_CORE1_IOPAD(0x20d6, PIN_OUTPUT | MUX_MODE0)   /* dss_hsync.dss_hsync */
304			OMAP3_CORE1_IOPAD(0x20d8, PIN_OUTPUT | MUX_MODE0)   /* dss_vsync.dss_vsync */
305			OMAP3_CORE1_IOPAD(0x20da, PIN_OUTPUT | MUX_MODE0)   /* dss_acbias.dss_acbias */
306			OMAP3_CORE1_IOPAD(0x20dc, PIN_OUTPUT | MUX_MODE0)   /* dss_data0.dss_data0 */
307			OMAP3_CORE1_IOPAD(0x20de, PIN_OUTPUT | MUX_MODE0)   /* dss_data1.dss_data1 */
308			OMAP3_CORE1_IOPAD(0x20e0, PIN_OUTPUT | MUX_MODE0)   /* dss_data2.dss_data2 */
309			OMAP3_CORE1_IOPAD(0x20e2, PIN_OUTPUT | MUX_MODE0)   /* dss_data3.dss_data3 */
310			OMAP3_CORE1_IOPAD(0x20e4, PIN_OUTPUT | MUX_MODE0)   /* dss_data4.dss_data4 */
311			OMAP3_CORE1_IOPAD(0x20e6, PIN_OUTPUT | MUX_MODE0)   /* dss_data5.dss_data5 */
312			OMAP3_CORE1_IOPAD(0x20e8, PIN_OUTPUT | MUX_MODE0)   /* dss_data6.dss_data6 */
313			OMAP3_CORE1_IOPAD(0x20ea, PIN_OUTPUT | MUX_MODE0)   /* dss_data7.dss_data7 */
314			OMAP3_CORE1_IOPAD(0x20ec, PIN_OUTPUT | MUX_MODE0)   /* dss_data8.dss_data8 */
315			OMAP3_CORE1_IOPAD(0x20ee, PIN_OUTPUT | MUX_MODE0)   /* dss_data9.dss_data9 */
316			OMAP3_CORE1_IOPAD(0x20f0, PIN_OUTPUT | MUX_MODE0)   /* dss_data10.dss_data10 */
317			OMAP3_CORE1_IOPAD(0x20f2, PIN_OUTPUT | MUX_MODE0)   /* dss_data11.dss_data11 */
318			OMAP3_CORE1_IOPAD(0x20f4, PIN_OUTPUT | MUX_MODE0)   /* dss_data12.dss_data12 */
319			OMAP3_CORE1_IOPAD(0x20f6, PIN_OUTPUT | MUX_MODE0)   /* dss_data13.dss_data13 */
320			OMAP3_CORE1_IOPAD(0x20f8, PIN_OUTPUT | MUX_MODE0)   /* dss_data14.dss_data14 */
321			OMAP3_CORE1_IOPAD(0x20fa, PIN_OUTPUT | MUX_MODE0)   /* dss_data15.dss_data15 */
322			OMAP3_CORE1_IOPAD(0x20fc, PIN_OUTPUT | MUX_MODE0)   /* dss_data16.dss_data16 */
323			OMAP3_CORE1_IOPAD(0x20fe, PIN_OUTPUT | MUX_MODE0)   /* dss_data17.dss_data17 */
324			OMAP3_CORE1_IOPAD(0x2100, PIN_OUTPUT | MUX_MODE0)   /* dss_data18.dss_data18 */
325			OMAP3_CORE1_IOPAD(0x2102, PIN_OUTPUT | MUX_MODE0)   /* dss_data19.dss_data19 */
326			OMAP3_CORE1_IOPAD(0x2104, PIN_OUTPUT | MUX_MODE0)   /* dss_data20.dss_data20 */
327			OMAP3_CORE1_IOPAD(0x2106, PIN_OUTPUT | MUX_MODE0)   /* dss_data21.dss_data21 */
328			OMAP3_CORE1_IOPAD(0x2108, PIN_OUTPUT | MUX_MODE0)   /* dss_data22.dss_data22 */
329			OMAP3_CORE1_IOPAD(0x210a, PIN_OUTPUT | MUX_MODE0)   /* dss_data23.dss_data23 */
330		>;
331       };
332
333	gps_pins: pinmux_gps_pins {
334		pinctrl-single,pins = <
335			OMAP3_CORE1_IOPAD(0x2176, PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* gpio145 */
336		>;
337	};
338
339	hdq_pins: hdq_pins {
340		pinctrl-single,pins = <
341			OMAP3_CORE1_IOPAD(0x21c6, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_sda.hdq */
342		>;
343	};
344
345	bmp085_pins: pinmux_bmp085_pins {
346		pinctrl-single,pins = <
347			OMAP3_CORE1_IOPAD(0x2136, PIN_INPUT_PULLUP | MUX_MODE4) /* gpio113 */
348		>;
349	};
350
351	bma180_pins: pinmux_bma180_pins {
352		pinctrl-single,pins = <
353			OMAP3_CORE1_IOPAD(0x213a, PIN_INPUT_PULLUP | MUX_MODE4) /* gpio115 */
354		>;
355	};
356
357	itg3200_pins: pinmux_itg3200_pins {
358		pinctrl-single,pins = <
359			OMAP3_CORE1_IOPAD(0x20b8, PIN_INPUT_PULLUP | MUX_MODE4) /* gpio56 */
360		>;
361	};
362
363	hmc5843_pins: pinmux_hmc5843_pins {
364		pinctrl-single,pins = <
365			OMAP3_CORE1_IOPAD(0x2134, PIN_INPUT_PULLUP | MUX_MODE4) /* gpio112 */
366		>;
367	};
368
369	penirq_pins: pinmux_penirq_pins {
370		pinctrl-single,pins = <
371			/* here we could enable to wakeup the cpu from suspend by a pen touch */
372			OMAP3_CORE1_IOPAD(0x2194, PIN_INPUT_PULLUP | MUX_MODE4) /* gpio160 */
373		>;
374	};
375
376	camera_pins: pinmux_camera_pins {
377		pinctrl-single,pins = <
378			/* set up parallel camera interface */
379			OMAP3_CORE1_IOPAD(0x210c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_hs */
380			OMAP3_CORE1_IOPAD(0x210e, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_vs */
381			OMAP3_CORE1_IOPAD(0x2110, PIN_OUTPUT | MUX_MODE0) /* cam_xclka */
382			OMAP3_CORE1_IOPAD(0x2112, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_pclk */
383			OMAP3_CORE1_IOPAD(0x2114, PIN_OUTPUT | MUX_MODE4) /* cam_fld = gpio_98 */
384			OMAP3_CORE1_IOPAD(0x2116, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d0 */
385			OMAP3_CORE1_IOPAD(0x2118, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d1 */
386			OMAP3_CORE1_IOPAD(0x211a, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d2 */
387			OMAP3_CORE1_IOPAD(0x211c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d3 */
388			OMAP3_CORE1_IOPAD(0x211e, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d4 */
389			OMAP3_CORE1_IOPAD(0x2120, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d5 */
390			OMAP3_CORE1_IOPAD(0x2122, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d6 */
391			OMAP3_CORE1_IOPAD(0x2124, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d7 */
392			OMAP3_CORE1_IOPAD(0x2126, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d8 */
393			OMAP3_CORE1_IOPAD(0x2128, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d9 */
394			OMAP3_CORE1_IOPAD(0x212a, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d10 */
395			OMAP3_CORE1_IOPAD(0x212c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d10 */
396			OMAP3_CORE1_IOPAD(0x212e, PIN_OUTPUT | MUX_MODE0) /* cam_xclkb */
397			OMAP3_CORE1_IOPAD(0x2130, PIN_OUTPUT | MUX_MODE4) /* cam_wen = gpio_167 */
398			OMAP3_CORE1_IOPAD(0x2132, PIN_INPUT_PULLDOWN | MUX_MODE4) /* cam_strobe */
399		>;
400	};
401
402	mcbsp1_pins: pinmux_mcbsp1_pins {
403		pinctrl-single,pins = <
404			OMAP3_CORE1_IOPAD(0x218c, PIN_INPUT | MUX_MODE4)	/* mcbsp1_clkr.mcbsp1_clkr - gpio_156 FM interrupt */
405			OMAP3_CORE1_IOPAD(0x218e, PIN_OUTPUT | MUX_MODE0)	/* mcbsp1_clkr.mcbsp1_fsr */
406			OMAP3_CORE1_IOPAD(0x2190, PIN_OUTPUT | MUX_MODE0)	/* mcbsp1_dx.mcbsp1_dx */
407			OMAP3_CORE1_IOPAD(0x2192, PIN_INPUT | MUX_MODE0)	/* mcbsp1_dx.mcbsp1_dr */
408			/* mcbsp_clks is used as PENIRQ */
409			/* OMAP3_CORE1_IOPAD(0x2194, PIN_INPUT | MUX_MODE0)	   mcbsp_clks.mcbsp_clks */
410			OMAP3_CORE1_IOPAD(0x2196, PIN_INPUT | MUX_MODE0)	/* mcbsp_clks.mcbsp1_fsx */
411			OMAP3_CORE1_IOPAD(0x2198, PIN_INPUT | MUX_MODE0)	/* mcbsp1_clkx.mcbsp1_clkx */
412		>;
413	};
414
415	mcbsp2_pins: pinmux_mcbsp2_pins {
416		pinctrl-single,pins = <
417			OMAP3_CORE1_IOPAD(0x213c, PIN_INPUT | MUX_MODE0)	/* mcbsp2_fsx.mcbsp2_fsx */
418			OMAP3_CORE1_IOPAD(0x213e, PIN_INPUT | MUX_MODE0)	/* mcbsp2_fsx.mcbsp2_clkx */
419			OMAP3_CORE1_IOPAD(0x2140, PIN_INPUT | MUX_MODE0)	/* mcbsp2_dr.mcbsp2_dr */
420			OMAP3_CORE1_IOPAD(0x2142, PIN_OUTPUT | MUX_MODE0)	/* mcbsp2_dr.mcbsp2_dx */
421		>;
422	};
423
424	mcbsp3_pins: pinmux_mcbsp3_pins {
425		pinctrl-single,pins = <
426			OMAP3_CORE1_IOPAD(0x216c, PIN_OUTPUT | MUX_MODE0)	/* mcbsp3_dx.mcbsp3_dx */
427			OMAP3_CORE1_IOPAD(0x216e, PIN_INPUT | MUX_MODE0)	/* mcbsp3_dx.mcbsp3_dr */
428			OMAP3_CORE1_IOPAD(0x2170, PIN_INPUT | MUX_MODE0)	/* mcbsp3_clkx.mcbsp3_clkx */
429			OMAP3_CORE1_IOPAD(0x2172, PIN_INPUT | MUX_MODE0)	/* mcbsp3_clkx.mcbsp3_fsx */
430		>;
431	};
432
433	mcbsp4_pins: pinmux_mcbsp4_pins {
434		pinctrl-single,pins = <
435			OMAP3_CORE1_IOPAD(0x2184, PIN_INPUT_PULLDOWN | MUX_MODE0)	/* mcbsp4_clkx.mcbsp4_clkx */
436			OMAP3_CORE1_IOPAD(0x2186, PIN_INPUT_PULLDOWN | MUX_MODE0)	/* mcbsp4_clkx.mcbsp4_dr */
437			OMAP3_CORE1_IOPAD(0x218a, PIN_INPUT_PULLDOWN | MUX_MODE0)	/* mcbsp4_dx.mcbsp4_fsx */
438		>;
439	};
440};
441
442&omap3_pmx_core2 {
443	pinctrl-names = "default";
444	pinctrl-0 = <
445			&hsusb2_2_pins
446	>;
447
448	hsusb2_2_pins: pinmux_hsusb2_2_pins {
449		pinctrl-single,pins = <
450			OMAP3630_CORE2_IOPAD(0x25f0, PIN_OUTPUT | MUX_MODE3)		/* etk_d10.hsusb2_clk */
451			OMAP3630_CORE2_IOPAD(0x25f2, PIN_OUTPUT | MUX_MODE3)		/* etk_d11.hsusb2_stp */
452			OMAP3630_CORE2_IOPAD(0x25f4, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d12.hsusb2_dir */
453			OMAP3630_CORE2_IOPAD(0x25f6, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d13.hsusb2_nxt */
454			OMAP3630_CORE2_IOPAD(0x25f8, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d14.hsusb2_data0 */
455			OMAP3630_CORE2_IOPAD(0x25fa, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d15.hsusb2_data1 */
456		>;
457	};
458
459	spi_gpio_pins: spi_gpio_pinmux {
460		pinctrl-single,pins = <
461			OMAP3630_CORE2_IOPAD(0x25d8, PIN_OUTPUT | MUX_MODE4) /* clk */
462			OMAP3630_CORE2_IOPAD(0x25e6, PIN_OUTPUT | MUX_MODE4) /* cs */
463			OMAP3630_CORE2_IOPAD(0x25e8, PIN_OUTPUT | MUX_MODE4) /* tx */
464			OMAP3630_CORE2_IOPAD(0x25e4, PIN_INPUT | MUX_MODE4) /* rx */
465		>;
466	};
467};
468
469&i2c1 {
470	clock-frequency = <2600000>;
471
472	twl: twl@48 {
473		reg = <0x48>;
474		interrupts = <7>; /* SYS_NIRQ cascaded to intc */
475		interrupt-parent = <&intc>;
476
477		clocks = <&hfclk_26m>;
478		clock-names = "fck";
479
480		twl_audio: audio {
481			compatible = "ti,twl4030-audio";
482			ti,enable-vibra = <1>;
483			codec {
484				ti,ramp_delay_value = <3>;
485			};
486		};
487
488		twl_power: power {
489			compatible = "ti,twl4030-power";
490			ti,use_poweroff;
491		};
492	};
493};
494
495#include "twl4030.dtsi"
496#include "twl4030_omap3.dtsi"
497
498&i2c2 {
499	clock-frequency = <400000>;
500
501	/* pressure sensor */
502	bmp085@77 {
503		compatible = "bosch,bmp085";
504		reg = <0x77>;
505		pinctrl-names = "default";
506		pinctrl-0 = <&bmp085_pins>;
507		interrupt-parent = <&gpio4>;
508		interrupts = <17 IRQ_TYPE_EDGE_RISING>; /* GPIO_113 */
509	};
510
511	/* accelerometer */
512	bma180@41 {
513		compatible = "bosch,bma180";
514		reg = <0x41>;
515		pinctrl-names = "default";
516		pintcrl-0 = <&bma180_pins>;
517		interrupt-parent = <&gpio4>;
518		interrupts = <19 IRQ_TYPE_LEVEL_HIGH>; /* GPIO_115 */
519	};
520
521	/* gyroscope */
522	itg3200@68 {
523		compatible = "invensense,itg3200";
524		reg = <0x68>;
525		pinctrl-names = "default";
526		pinctrl-0 = <&itg3200_pins>;
527		interrupt-parent = <&gpio2>;
528		interrupts = <24 IRQ_TYPE_EDGE_FALLING>; /* GPIO_56 */
529	};
530
531	/* leds + gpios */
532	tca6507: tca6507@45 {
533		compatible = "ti,tca6507";
534		#address-cells = <1>;
535		#size-cells = <0>;
536		reg = <0x45>;
537
538		gpio-controller;
539		#gpio-cells = <2>;
540
541		gta04_led0: red_aux@0 {
542			label = "gta04:red:aux";
543			reg = <0x0>;
544		};
545
546		gta04_led1: green_aux@1 {
547			label = "gta04:green:aux";
548			reg = <0x1>;
549		};
550
551		gta04_led3: red_power@3 {
552			label = "gta04:red:power";
553			reg = <0x3>;
554			linux,default-trigger = "default-on";
555		};
556
557		gta04_led4: green_power@4 {
558			label = "gta04:green:power";
559			reg = <0x4>;
560		};
561
562		wifi_reset: wifi_reset@6 { /* reference as <&tca_gpios 0 0> since it is currently the only GPIO */
563			reg = <0x6>;
564			compatible = "gpio";
565		};
566	};
567
568	/* compass aka magnetometer */
569	hmc5843@1e {
570		compatible = "honeywell,hmc5883l";
571		reg = <0x1e>;
572		pinctrl-names = "default";
573		pinctrl-0 = <&hmc5843_pins>;
574		interrupt-parent = <&gpio4>;
575		interrupts = <16 IRQ_TYPE_EDGE_FALLING>;	/* gpio112 */
576	};
577
578	/* touchscreen */
579	tsc2007@48 {
580		compatible = "ti,tsc2007";
581		reg = <0x48>;
582		pinctrl-names = "default";
583		pinctrl-0 = <&penirq_pins>;
584		interrupt-parent = <&gpio6>;
585		interrupts = <0 IRQ_TYPE_EDGE_FALLING>; /* GPIO_160 */
586		gpios = <&gpio6 0 GPIO_ACTIVE_LOW>;	/* GPIO_160 */
587		ti,x-plate-ohms = <600>;
588		touchscreen-size-x = <480>;
589		touchscreen-size-y = <640>;
590		touchscreen-max-pressure = <1000>;
591		touchscreen-fuzz-x = <3>;
592		touchscreen-fuzz-y = <8>;
593		touchscreen-fuzz-pressure = <10>;
594		touchscreen-inverted-y;
595	};
596
597	/* RFID EEPROM */
598	m24lr64@50 {
599		compatible = "atmel,24c64";
600		reg = <0x50>;
601	};
602};
603
604&i2c3 {
605	clock-frequency = <100000>;
606};
607
608&usb_otg_hs {
609	interface-type = <0>;
610	usb-phy = <&usb2_phy>;
611	phys = <&usb2_phy>;
612	phy-names = "usb2-phy";
613	mode = <3>;
614	power = <50>;
615};
616
617&usbhshost {
618	port2-mode = "ehci-phy";
619};
620
621&usbhsehci {
622	phys = <0 &hsusb2_phy>;
623};
624
625&mmc1 {
626	pinctrl-names = "default";
627	pinctrl-0 = <&mmc1_pins>;
628	vmmc-supply = <&vmmc1>;
629	bus-width = <4>;
630	ti,non-removable;
631	broken-cd;	/* hardware has no CD */
632};
633
634&mmc2 {
635	vmmc-supply = <&vaux4>;
636	bus-width = <4>;
637	ti,non-removable;
638	cap-power-off-card;
639	mmc-pwrseq = <&wifi_pwrseq>;
640};
641
642&mmc3 {
643	status = "disabled";
644};
645
646#define BIT(x) (1 << (x))
647&twl_gpio {
648	/* pullups: BIT(2) */
649	ti,pullups = <BIT(2)>;
650	/*
651	 * pulldowns:
652	 * BIT(0),  BIT(1), BIT(6), BIT(7), BIT(8), BIT(13)
653	 * BIT(15), BIT(16), BIT(17)
654	 */
655	ti,pulldowns = <(BIT(0) | BIT(1) | BIT(6) | BIT(7) | BIT(8) |
656			 BIT(13) | BIT(15) | BIT(16) | BIT(17))>;
657};
658
659&twl_keypad {
660	status = "disabled";
661};
662
663&gpio1 {
664	pinctrl-names = "default";
665	pinctrl-0 = <&gpio1_pins>;
666};
667
668&uart1 {
669	pinctrl-names = "default";
670	pinctrl-0 = <&uart1_pins>;
671};
672
673&uart2 {
674	pinctrl-names = "default";
675	pinctrl-0 = <&uart2_pins>;
676	gnss: gnss {
677		compatible = "wi2wi,w2sg0004";
678		pinctrl-names = "default";
679		pinctrl-0 = <&gps_pins>;
680		sirf,onoff-gpios = <&gpio5 17 GPIO_ACTIVE_HIGH>;
681		lna-supply = <&vsim>;
682		vcc-supply = <&ldo_3v3>;
683	};
684};
685
686&uart3 {
687	pinctrl-names = "default";
688	pinctrl-0 = <&uart3_pins>;
689	interrupts-extended = <&intc 74 &omap3_pmx_core OMAP3_UART3_RX>;
690};
691
692&charger {
693	ti,bb-uvolt = <3200000>;
694	ti,bb-uamp = <150>;
695};
696
697/* spare */
698&vaux1 {
699	regulator-min-microvolt = <2500000>;
700	regulator-max-microvolt = <3000000>;
701};
702
703/* sensors */
704&vaux2 {
705	regulator-min-microvolt = <2800000>;
706	regulator-max-microvolt = <2800000>;
707	regulator-always-on;	/* we should never switch off while vio is on! */
708};
709
710/* camera */
711&vaux3 {
712	regulator-min-microvolt = <2500000>;
713	regulator-max-microvolt = <2500000>;
714};
715
716/* WLAN/BT */
717&vaux4 {
718	regulator-min-microvolt = <2800000>;
719	regulator-max-microvolt = <3150000>;
720};
721
722/* GPS LNA */
723&vsim {
724	regulator-min-microvolt = <2800000>;
725	regulator-max-microvolt = <3150000>;
726};
727
728/* Needed to power the DPI pins */
729
730&vpll2 {
731	regulator-always-on;
732};
733
734&dss {
735	pinctrl-names = "default";
736	pinctrl-0 = < &dss_dpi_pins >;
737
738	status = "okay";
739	vdds_dsi-supply = <&vpll2>;
740
741	port {
742		dpi_out: endpoint {
743			remote-endpoint = <&lcd_in>;
744			data-lines = <24>;
745		};
746	};
747};
748
749&venc {
750	status = "okay";
751
752	vdda-supply = <&vdac>;
753
754	port {
755		venc_out: endpoint {
756			remote-endpoint = <&opa_in>;
757			ti,channels = <1>;
758			ti,invert-polarity;
759		};
760	};
761};
762
763&gpmc {
764	ranges = <0 0 0x30000000 0x1000000>; /* CS0: 16MB for NAND */
765
766	nand@0,0 {
767		compatible = "ti,omap2-nand";
768		reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
769		interrupt-parent = <&gpmc>;
770		interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
771			     <1 IRQ_TYPE_NONE>;	/* termcount */
772		ti,nand-ecc-opt = "ham1";
773		rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
774		nand-bus-width = <16>;
775		#address-cells = <1>;
776		#size-cells = <1>;
777
778		gpmc,device-width = <2>;
779		gpmc,cs-on-ns = <0>;
780		gpmc,cs-rd-off-ns = <44>;
781		gpmc,cs-wr-off-ns = <44>;
782		gpmc,adv-on-ns = <6>;
783		gpmc,adv-rd-off-ns = <34>;
784		gpmc,adv-wr-off-ns = <44>;
785		gpmc,oe-off-ns = <54>;
786		gpmc,we-off-ns = <40>;
787		gpmc,access-ns = <64>;
788		gpmc,rd-cycle-ns = <82>;
789		gpmc,wr-cycle-ns = <82>;
790		gpmc,wr-access-ns = <40>;
791		gpmc,wr-data-mux-bus-ns = <0>;
792		gpmc,sync-clk-ps = <0>;
793
794		x-loader@0 {
795			label = "X-Loader";
796			reg = <0 0x80000>;
797		};
798
799		bootloaders@80000 {
800			label = "U-Boot";
801			reg = <0x80000 0x1c0000>;
802		};
803
804		bootloaders_env@240000 {
805			label = "U-Boot Env";
806			reg = <0x240000 0x40000>;
807		};
808
809		kernel@280000 {
810			label = "Kernel";
811			reg = <0x280000 0x600000>;
812		};
813
814		filesystem@880000 {
815			label = "File System";
816			reg = <0x880000 0>;	/* 0 = MTDPART_SIZ_FULL */
817		};
818	};
819};
820
821&mcbsp1 { /* FM Transceiver PCM */
822	status = "ok";
823	#sound-dai-cells = <0>;
824	pinctrl-names = "default";
825	pinctrl-0 = <&mcbsp1_pins>;
826};
827
828&mcbsp2 { /* TPS65950 I2S */
829	status = "ok";
830	pinctrl-names = "default";
831	pinctrl-0 = <&mcbsp2_pins>;
832};
833
834&mcbsp3 { /* Bluetooth PCM */
835	status = "ok";
836	#sound-dai-cells = <0>;
837	pinctrl-names = "default";
838	pinctrl-0 = <&mcbsp3_pins>;
839};
840
841&mcbsp4 { /* GSM voice PCM */
842	status = "ok";
843	#sound-dai-cells = <0>;
844	pinctrl-names = "default";
845	pinctrl-0 = <&mcbsp4_pins>;
846};
847
848&hdqw1w {
849        pinctrl-names = "default";
850        pinctrl-0 = <&hdq_pins>;
851};
852
853/* image signal processor within OMAP3 SoC */
854&isp {
855	ports {
856		port@0 {
857			reg = <0>;
858			parallel_ep: endpoint {
859				ti,isp-clock-divisor = <1>;
860				ti,strobe-mode;
861				bus-width = <8>;/* Used data lines */
862				data-shift = <2>; /* Lines 9:2 are used */
863				hsync-active = <0>; /* Active low */
864				vsync-active = <1>; /* Active high */
865				data-active = <1>;/* Active high */
866				pclk-sample = <1>;/* Falling */
867			};
868		};
869		/* port@1 and port@2 are not used by GTA04 */
870	};
871};
872