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