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