gta04 dts fixes.
[gta04.git] / arch / arm / boot / dts / omap3-gta04.dts
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 #define RFKILL_TYPE_GPS 6
12 #include "omap36xx.dtsi"
13
14 / {
15         model = "OMAP3 GTA04";
16         compatible = "ti,omap3-gta04", "ti,omap3";
17         chosen {
18                 bootargs = "console=ttyO2,115200n8 vram=12M omapfb.rotate_type=0 omapdss.def_disp=lcd root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait twl4030_charger.allow_usb=1 musb_hdrc.preserve_vbus=1 log_buf_len=8M ignore_loglevel no_console_suspend";
19         };
20
21         cpus {
22                 cpu@0 {
23                         cpu0-supply = <&vcc>;
24                 };
25         };
26
27         memory {
28                 device_type = "memory";
29                 reg = <0x80000000 0x20000000>; /* 512 MB */
30         };
31
32         aux-keys {
33                 compatible = "gpio-keys";
34
35                 aux-button {
36                         label = "aux";
37                         linux,code = <169>;
38                         gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
39                         gpio-key,wakeup;
40                         pinctrl-names = "default";
41                         pinctrl-0 = <&aux_pins>;
42                 };
43         };
44
45         incoming-keys {
46                 compatible = "gpio-keys";
47
48                 incoming-button {
49                         label = "Option";
50                         linux,code = <240>;
51                         /* 176 for A3, 10 for A4 */
52                         gpios = <&gpio6 16 GPIO_ACTIVE_HIGH>;
53                         gpio-key,wakeup;
54                         pinctrl-names = "default";
55                         pinctrl-0 = <&incoming_pins>;
56                 };
57         };
58
59         sound {
60                 compatible = "ti,omap-twl4030";
61                 ti,model = "gta04";
62
63                 ti,mcbsp = <&mcbsp2>;
64                 ti,codec = <&twl_audio>;
65         };
66
67         panel {
68                 compatible = "tpo,td028ttec1";
69                 display-name = "lcd";
70                 source     = "dpi.0";
71                 data-lines = <24>;
72                 cs-gpio    = <&gpio1 19 0>;
73                 scl-gpio   = <&gpio1 12 0>;
74                 din-gpio   = <&gpio1 18 0>;
75                 dout-gpio  = <&gpio1 20 0>;
76         };
77
78         backlight {
79                 compatible = "pwm-backlight";
80                 label = "pwm-backlight";
81                 pwms = <&pwm 0 2000000>;
82                 brightness-levels = <0 11 20 30 40 50 60 70 80 90 100>;
83                 default-brightness-level = <10>;
84                 pinctrl-names = "default";
85                 pinctrl-0 = <&backlight_pins>;
86         };
87
88         pwm: omap-pwm {
89                 compatible = "ti,omap-pwm";
90                 timers = <&timer11>;
91                 #pwm-cells = <2>;
92         };
93
94         /* need to connect uart1 DTR line to vaux4 */
95         btdtr: gpio-reg.bt {
96                 compatible = "gpio_regulator";
97                 vgpio-supply = <&vaux4>;
98                 microvolt = <3150000>;
99                 gpio-controller;
100                 #gpio-cells = <2>;
101         };
102
103         gps-rfkill {
104                 compatible = "rfkill-regulator";
105                 label = "GPS";
106                 type = <RFKILL_TYPE_GPS>;
107                 vrfkill-supply = <&vsim>;
108         };
109
110         gpsdtr: gps-onoff {
111                 compatible = "gpio-w2sg0004";
112                 gpios = <&gpio5 17 0>, <&gpio5 19 0>;
113                 /* MODE0 PULL_ENA(8) INPUT_EN(256) PULL_UP(16) */
114                 state-on = <280>;
115                 /* MODE4 PULL_ENA(8) INPUT_EN(256) PULL_UP(16) */
116                 state-off = <284>;
117                 gpio-controller;
118                 #gpio-cells = <2>;
119         };
120
121         antenna-detect {
122                 compatible = "linux,extcon-gpio";
123                 label = "gps_antenna";
124                 gpios = <&gpio5 16 0>; /* GPIO144 */
125                 debounce-delay-ms = <10>;
126                 irq-flags = <IRQ_TYPE_EDGE_BOTH>;
127                 state-on = "external";
128                 state-off = "internal";
129         };
130 };
131
132 &omap3_pmx_core {
133         uart1_pins: pinmux_uart1_pins {
134                 pinctrl-single,pins = <
135                         0x152 (PIN_INPUT | MUX_MODE0)           /* uart1_rx.uart1_rx */
136                         0x14c (PIN_OUTPUT |MUX_MODE0)           /* uart1_tx.uart1_tx */
137                 >;
138         };
139
140         uart2_pins: pinmux_uart2_pins {
141                 pinctrl-single,pins = <
142                         0x14a (PIN_INPUT | MUX_MODE0)           /* uart2_rx.uart2_rx */
143                         0x148 (PIN_OUTPUT | MUX_MODE0)          /* uart2_tx.uart2_tx */
144                 >;
145         };
146
147         uart3_pins: pinmux_uart3_pins {
148                 pinctrl-single,pins = <
149                         0x16e (PIN_INPUT | MUX_MODE0)           /* uart3_rx.uart3_rx */
150                         0x170 (PIN_OUTPUT | MUX_MODE0)          /* uart3_tx.uart3_tx */
151                 >;
152         };
153
154         mmc1_pins: pinmux_mmc1_pins {
155                 pinctrl-single,pins = <
156                         0x114 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_clk.sdmmc1_clk */
157                         0x116 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_cmd.sdmmc1_cmd */
158                         0x118 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat0.sdmmc1_dat0 */
159                         0x11a (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat1.sdmmc1_dat1 */
160                         0x11c (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat2.sdmmc1_dat2 */
161                         0x11e (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat3.sdmmc1_dat3 */
162                 >;
163         };
164
165         incoming_pins: pinmux_incoming_pins {
166                 pinctrl-single.pins = <
167                         0x1a2 (PIN_INPUT_PULLUP | MUX_MODE4)    /* mcspi1_cs2.gpio_176 */
168                 >;
169         };
170
171         aux_pins: pinmux_aux_pins {
172                 pinctrl-single,pins = <
173                         0x9e4 (PIN_INPUT_PULLUP | MUX_MODE4) /* sys_boot5 */
174                 >;
175         };
176
177         backlight_pins: pinmux_backlight_pins {
178                 pinctrl-single,pins = <
179                         0x08a (PIN_OUTPUT | MUX_MODE3) /* gpmc_ncs6.gpt11_pwm_evt */
180                 >;
181         };
182
183         mmc2_pins: pinmux_mmc2_pins {
184                 pinctrl-single,pins = <
185                         0x128 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_clk.sdmmc2_clk */
186                         0x12a (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_cmd.sdmmc2_cmd */
187                         0x12c (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat0.sdmmc2_dat0 */
188                         0x12e (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat1.sdmmc2_dat1 */
189                         0x130 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat2.sdmmc2_dat2 */
190                         0x132 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat3.sdmmc1_dat3 */
191                 >;
192         };
193         mmc2_cirq_pin: pinmux_cirq_pin {
194                 pinctrl-single,pins = <
195                         0x012e (PIN_INPUT_PULLUP | MUX_MODE4)   /* MMC2_DAT1 as GPIO5_5 */
196                 >;
197         };
198 };
199
200 &i2c1 {
201         clock-frequency = <2600000>;
202
203         twl: twl@48 {
204                 reg = <0x48>;
205                 interrupts = <7>; /* SYS_NIRQ cascaded to intc */
206                 interrupt-parent = <&intc>;
207
208                 twl_audio: audio {
209                         compatible = "ti,twl4030-audio";
210                         codec {
211                         };
212                 };
213                 vaux4: regulator-vaux4 {
214                         compatible = "ti,twl4030-vaux4";
215                         regulator-min-microvolt = <2800000>;
216                         regulator-max-microvolt = <3150000>;
217                         ti,allow_unsupported;
218                 };
219                 /* vaux1 is unused */
220                 vaux1: regulator-vaux1 {
221                         compatible = "ti,twl4030-vaux1";
222                         regulator-min-microvolt = <2500000>;
223                         regulator-max-microvolt = <3000000>;
224                 };
225                 /* vaux2 is sensors : 68 and 1e */
226                 vaux2: regulator-vaux2 {
227                         compatible = "ti,twl4030-vaux2";
228                         regulator-min-microvolt = <2800000>;
229                         regulator-max-microvolt = <2800000>;
230                         regulator-always-on;
231                 };
232                 /* vaux3 is camera */
233                 vaux3: regulator-vaux3 {
234                         compatible = "ti,twl4030-vaux3";
235                         regulator-min-microvolt = <2500000>;
236                         regulator-max-microvolt = <2500000>;
237                 };
238         };
239 };
240
241 #include "twl4030.dtsi"
242 #include "twl4030_omap3.dtsi"
243
244 &i2c2 {
245         clock-frequency = <400000>;
246
247         /* touch screen */
248         tsc2007: tsc2007@48 {
249                 compatible = "tsc2007";
250                 reg = <0x48>;
251                 interrupt-parent = <&gpio6>;
252                 interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
253                 model-number = <2007>;
254                 x-plate-ohms = <600>;
255                 pen-gpio = <&gpio6 0 GPIO_ACTIVE_LOW>;
256         };
257
258         /* pressure sensor */
259         bmp085@77 {
260                 compatible = "bosch,bmp085";
261                 reg = <0x77>;
262         };
263
264         /* accelerometer */
265         bma180@41 {
266                 compatible = "bosch,bma180";
267                 reg = <0x41>;
268                 interrupt-parent = <&gpio3>;
269                 interrupts = <19 IRQ_TYPE_LEVEL_HIGH>;
270         };
271
272         /* leds */
273         tca: tca6507@45 {
274                 compatible = "ti,tca6507";
275                 #address-cells = <1>;
276                 #size-cells = <0>;
277                 reg = <0x45>;
278
279                 gpio-controller;
280                 #gpio-cells = <2>;
281
282                 gta04_led0: red_aux@0 {
283                         label = "gta04:red:aux";
284                         reg = <0x0>;
285                 };
286
287                 gta04_led1: green_aux@1 {
288                         label = "gta04:green:aux";
289                         reg = <0x1>;
290                 };
291
292                 gta04_led3: red_power@3 {
293                         label = "gta04:red:power";
294                         reg = <0x3>;
295                         linux,default-trigger = "default-on";
296                 };
297
298                 gta04_led4: green_power@4 {
299                         label = "gta04:green:power";
300                         reg = <0x4>;
301                 };
302
303                 wifi_reset@6 {
304                         label = "gta04:wlan:reset";
305                         reg = <0x6>;
306                         make-gpio;
307                 };
308         };
309
310         /* gyroscope */
311         itg3200@68 {
312                 compatible = "invensense,itg3200";
313                 reg = <0x68>;
314         };
315
316         /* compass aka magnetometer */
317         hmc5843@1e {
318                 compatible = "honeywell,hmc5843";
319                 reg = <0x1e>;
320         };
321 };
322
323 &i2c3 {
324         clock-frequency = <100000>;
325 };
326
327 &usb_otg_hs {
328         interface-type = <0>;
329         usb-phy = <&usb2_phy>;
330         mode = <3>;
331         power = <50>;
332 };
333
334 &mmc1 {
335         pinctrl-names = "default";
336         pinctrl-0 = <&mmc1_pins>;
337         vmmc-supply = <&vmmc1>;
338         bus-width = <4>;
339         ti,non-removable;
340         cap-power-off-card;
341 };
342
343 &mmc2 {
344         vmmc-supply = <&vaux4>;
345         bus-width = <4>;
346         ti,non-removable;
347         cap-power-off-card;
348         reset-gpios = <&tca 0 GPIO_ACTIVE_HIGH>;
349
350         ti,quirk-swakeup-missing;
351         pinctrl-names = "default", "active", "idle";
352         pinctrl-0 = <&mmc2_pins>;
353         pinctrl-1 = <&mmc2_pins>;
354         pinctrl-2 = <&mmc2_cirq_pin>;
355         ti,cirq-gpio = <&gpio5 5 0>; /* GPIO133 = 128+5 */
356 };
357
358 &mmc3 {
359         status = "disabled";
360 };
361
362 &uart1 {
363         pinctrl-names = "default";
364         pinctrl-0 = <&uart1_pins>;
365 };
366
367 &uart2 {
368        pinctrl-names = "default";
369        pinctrl-0 = <&uart2_pins>;
370 };
371
372 &uart3 {
373         pinctrl-names = "default";
374         pinctrl-0 = <&uart3_pins>;
375 };
376
377 &charger {
378         bb_uvolt = <3200000>;
379         bb_uamp = <150>;
380 };
381
382 &twl_power {
383         ti,use_poweroff;
384 };
385
386 &vpll2 {
387         supply-dev = "omapdss_dpi.0";
388         supply = "vdds_dsi";
389 };
390
391 /* uart1 is bluetooth - need to connect DTR */
392 &uart1 {
393         dtr = <&btdtr 0 GPIO_ACTIVE_HIGH>;
394 };
395 &uart2 {
396         dtr = <&gpsdtr 0 GPIO_ACTIVE_HIGH>;
397 };
398
399 &vsim {
400         regulator-min-microvolt = <2800000>;
401         regulator-max-microvolt = <2800000>;
402 };