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