]> git.karo-electronics.de Git - karo-tx-linux.git/blob - arch/arm/boot/dts/omap4-droid4-xt894.dts
Merge tag 'sunxi-dt-h3-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git...
[karo-tx-linux.git] / arch / arm / boot / dts / omap4-droid4-xt894.dts
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License version 2 as
4  * published by the Free Software Foundation.
5  */
6 /dts-v1/;
7
8 #include <dt-bindings/input/input.h>
9 #include "omap443x.dtsi"
10 #include "motorola-cpcap-mapphone.dtsi"
11
12 / {
13         model = "Motorola Droid 4 XT894";
14         compatible = "motorola,droid4", "ti,omap4430", "ti,omap4";
15
16         chosen {
17                 stdout-path = &uart3;
18         };
19
20         aliases {
21                 display0 = &lcd0;
22                 display1 = &hdmi0;
23         };
24
25         /*
26          * We seem to have only 1021 MB accessible, 1021 - 1022 is locked,
27          * then 1023 - 1024 seems to contain mbm. For SRAM, see the notes
28          * below about SRAM and L3_ICLK2 being unused by default,
29          */
30         memory {
31                 device_type = "memory";
32                 reg = <0x80000000 0x3fd00000>;  /* 1021 MB */
33         };
34
35         /* Poweroff GPIO probably connected to CPCAP */
36         gpio-poweroff {
37                 compatible = "gpio-poweroff";
38                 pinctrl-0 = <&poweroff_gpio>;
39                 pinctrl-names = "default";
40                 gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;    /* gpio50 */
41         };
42
43         hdmi0: connector {
44                 compatible = "hdmi-connector";
45                 pinctrl-0 = <&hdmi_hpd_gpio>;
46                 pinctrl-names = "default";
47                 label = "hdmi";
48                 type = "d";
49
50                 hpd-gpios = <&gpio2 31 GPIO_ACTIVE_HIGH>;       /* gpio63 */
51
52                 port {
53                         hdmi_connector_in: endpoint {
54                                 remote-endpoint = <&hdmi_out>;
55                         };
56                 };
57         };
58
59         /*
60          * HDMI 5V regulator probably sourced from battery. Let's keep
61          * keep this as always enabled for HDMI to work until we've
62          * figured what the encoder chip is.
63          */
64         hdmi_regulator: regulator-hdmi {
65                 compatible = "regulator-fixed";
66                 regulator-name = "hdmi";
67                 regulator-min-microvolt = <5000000>;
68                 regulator-max-microvolt = <5000000>;
69                 gpio = <&gpio2 27 GPIO_ACTIVE_HIGH>;    /* gpio59 */
70                 enable-active-high;
71                 regulator-always-on;
72         };
73
74         /* HS USB Host PHY on PORT 1 */
75         hsusb1_phy: hsusb1_phy {
76                 compatible = "usb-nop-xceiv";
77         };
78
79         /* LCD regulator from sw5 source */
80         lcd_regulator: regulator-lcd {
81                 compatible = "regulator-fixed";
82                 regulator-name = "lcd";
83                 regulator-min-microvolt = <5050000>;
84                 regulator-max-microvolt = <5050000>;
85                 gpio = <&gpio4 0 GPIO_ACTIVE_HIGH>;     /* gpio96 */
86                 enable-active-high;
87                 vin-supply = <&sw5>;
88         };
89
90         /* This is probably coming straight from the battery.. */
91         wl12xx_vmmc: regulator-wl12xx {
92                 compatible = "regulator-fixed";
93                 regulator-name = "vwl1271";
94                 regulator-min-microvolt = <1650000>;
95                 regulator-max-microvolt = <1650000>;
96                 gpio = <&gpio3 30 GPIO_ACTIVE_HIGH>;    /* gpio94 */
97                 startup-delay-us = <70000>;
98                 enable-active-high;
99         };
100
101         gpio_keys {
102                 compatible = "gpio-keys";
103
104                 volume_down {
105                         label = "Volume Down";
106                         gpios = <&gpio5 26 GPIO_ACTIVE_LOW>; /* gpio154 */
107                         linux,code = <KEY_VOLUMEDOWN>;
108                         linux,can-disable;
109                 };
110
111                 slider {
112                         label = "Keypad Slide";
113                         gpios = <&gpio4 26 GPIO_ACTIVE_HIGH>; /* gpio122 */
114                         linux,input-type = <EV_SW>;
115                         linux,code = <SW_KEYPAD_SLIDE>;
116                         linux,can-disable;
117
118                 };
119         };
120 };
121
122 &dss {
123         status = "okay";
124 };
125
126 &gpio6 {
127         touchscreen_reset {
128                 gpio-hog;
129                 gpios = <13 0>;
130                 output-high;
131                 line-name = "touchscreen-reset";
132         };
133 };
134
135 &dsi1 {
136         status = "okay";
137         vdd-supply = <&vcsi>;
138
139         port {
140                 dsi1_out_ep: endpoint {
141                         remote-endpoint = <&lcd0_in>;
142                         lanes = <0 1 2 3 4 5>;
143                 };
144         };
145
146         lcd0: display {
147                 compatible = "panel-dsi-cm";
148                 label = "lcd0";
149                 vddi-supply = <&lcd_regulator>;
150                 reset-gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>;      /* gpio101 */
151
152                 panel-timing {
153                         clock-frequency = <0>;          /* Calculated by dsi */
154
155                         hback-porch = <2>;
156                         hactive = <540>;
157                         hfront-porch = <0>;
158                         hsync-len = <2>;
159
160                         vback-porch = <1>;
161                         vactive = <960>;
162                         vfront-porch = <0>;
163                         vsync-len = <1>;
164
165                         hsync-active = <0>;
166                         vsync-active = <0>;
167                         de-active = <1>;
168                         pixelclk-active = <1>;
169                 };
170
171                 port {
172                         lcd0_in: endpoint {
173                                 remote-endpoint = <&dsi1_out_ep>;
174                         };
175                 };
176         };
177 };
178
179 /* L3_2 interconnect is unused, SRAM, GPMC and L3_ICLK2 disabled */
180 &gpmc {
181         status = "disabled";
182 };
183
184 &hdmi {
185         status = "okay";
186         pinctrl-0 = <&dss_hdmi_pins>;
187         pinctrl-names = "default";
188         vdda-supply = <&vdac>;
189
190         port {
191                 hdmi_out: endpoint {
192                         remote-endpoint = <&hdmi_connector_in>;
193                         lanes = <1 0 3 2 5 4 7 6>;
194                 };
195         };
196 };
197
198 &i2c1 {
199         tmp105@48 {
200                 compatible = "ti,tmp105";
201                 reg = <0x48>;
202                 pinctrl-0 = <&tmp105_irq>;
203                 pinctrl-names = "default";
204                 /* kpd_row0.gpio_178 */
205                 interrupts-extended = <&gpio6 18 IRQ_TYPE_EDGE_FALLING
206                                        &omap4_pmx_core 0x14e>;
207                 interrupt-names = "irq", "wakeup";
208                 wakeup-source;
209         };
210 };
211
212 &keypad {
213         keypad,num-rows = <8>;
214         keypad,num-columns = <8>;
215         linux,keymap = <
216
217         /* Row 1 */
218         MATRIX_KEY(0, 2, KEY_1)
219         MATRIX_KEY(0, 6, KEY_2)
220         MATRIX_KEY(2, 3, KEY_3)
221         MATRIX_KEY(0, 7, KEY_4)
222         MATRIX_KEY(0, 4, KEY_5)
223         MATRIX_KEY(5, 5, KEY_6)
224         MATRIX_KEY(0, 1, KEY_7)
225         MATRIX_KEY(0, 5, KEY_8)
226         MATRIX_KEY(0, 0, KEY_9)
227         MATRIX_KEY(1, 6, KEY_0)
228
229         /* Row 2 */
230         MATRIX_KEY(3, 4, KEY_APOSTROPHE)
231         MATRIX_KEY(7, 6, KEY_Q)
232         MATRIX_KEY(7, 7, KEY_W)
233         MATRIX_KEY(7, 2, KEY_E)
234         MATRIX_KEY(1, 0, KEY_R)
235         MATRIX_KEY(4, 4, KEY_T)
236         MATRIX_KEY(1, 2, KEY_Y)
237         MATRIX_KEY(6, 7, KEY_U)
238         MATRIX_KEY(2, 2, KEY_I)
239         MATRIX_KEY(5, 6, KEY_O)
240         MATRIX_KEY(3, 7, KEY_P)
241         MATRIX_KEY(6, 5, KEY_BACKSPACE)
242
243         /* Row 3 */
244         MATRIX_KEY(5, 4, KEY_TAB)
245         MATRIX_KEY(5, 7, KEY_A)
246         MATRIX_KEY(2, 7, KEY_S)
247         MATRIX_KEY(7, 0, KEY_D)
248         MATRIX_KEY(2, 6, KEY_F)
249         MATRIX_KEY(6, 2, KEY_G)
250         MATRIX_KEY(6, 6, KEY_H)
251         MATRIX_KEY(1, 4, KEY_J)
252         MATRIX_KEY(3, 1, KEY_K)
253         MATRIX_KEY(2, 1, KEY_L)
254         MATRIX_KEY(4, 6, KEY_ENTER)
255
256         /* Row 4 */
257         MATRIX_KEY(3, 6, KEY_LEFTSHIFT)         /* KEY_CAPSLOCK */
258         MATRIX_KEY(6, 1, KEY_Z)
259         MATRIX_KEY(7, 4, KEY_X)
260         MATRIX_KEY(5, 1, KEY_C)
261         MATRIX_KEY(1, 7, KEY_V)
262         MATRIX_KEY(2, 4, KEY_B)
263         MATRIX_KEY(4, 1, KEY_N)
264         MATRIX_KEY(1, 1, KEY_M)
265         MATRIX_KEY(3, 5, KEY_COMMA)
266         MATRIX_KEY(5, 2, KEY_DOT)
267         MATRIX_KEY(6, 3, KEY_UP)
268         MATRIX_KEY(7, 3, KEY_OK)
269
270         /* Row 5 */
271         MATRIX_KEY(2, 5, KEY_LEFTCTRL)          /* KEY_LEFTSHIFT */
272         MATRIX_KEY(4, 5, KEY_LEFTALT)           /* SYM */
273         MATRIX_KEY(6, 0, KEY_MINUS)
274         MATRIX_KEY(4, 7, KEY_EQUAL)
275         MATRIX_KEY(1, 5, KEY_SPACE)
276         MATRIX_KEY(3, 2, KEY_SLASH)
277         MATRIX_KEY(4, 3, KEY_LEFT)
278         MATRIX_KEY(5, 3, KEY_DOWN)
279         MATRIX_KEY(3, 3, KEY_RIGHT)
280
281         /* Side buttons, KEY_VOLUMEDOWN and KEY_PWER are on CPCAP? */
282         MATRIX_KEY(5, 0, KEY_VOLUMEUP)
283         >;
284 };
285
286 &mmc1 {
287         vmmc-supply = <&vwlan2>;
288         bus-width = <4>;
289         cd-gpios = <&gpio6 16 GPIO_ACTIVE_LOW>; /* gpio176 */
290 };
291
292 &mmc2 {
293         vmmc-supply = <&vsdio>;
294         bus-width = <8>;
295         non-removable;
296 };
297
298 &mmc3 {
299         vmmc-supply = <&wl12xx_vmmc>;
300         interrupts-extended = <&wakeupgen GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH
301                                &omap4_pmx_core 0xde>;
302
303         non-removable;
304         bus-width = <4>;
305         cap-power-off-card;
306
307         #address-cells = <1>;
308         #size-cells = <0>;
309         wlcore: wlcore@2 {
310                 compatible = "ti,wl1283";
311                 reg = <2>;
312                 interrupt-parent = <&gpio4>;
313                 interrupts = <4 IRQ_TYPE_LEVEL_HIGH>; /* gpio100 */
314                 ref-clock-frequency = <26000000>;
315                 tcxo-clock-frequency = <26000000>;
316         };
317 };
318
319 &i2c1 {
320         lm3532@38 {
321                 compatible = "ti,lm3532";
322                 reg = <0x38>;
323
324                 enable-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>;
325
326                 backlight {
327                         compatible = "ti,lm3532-backlight";
328
329                         lcd {
330                                 led-sources = <0 1 2>;
331                                 ramp-up-msec = <1>;
332                                 ramp-down-msec = <0>;
333                         };
334                 };
335         };
336 };
337
338 /*
339  * REVISIT: Add gpio173 reset pin handling to the driver, see gpio-hog above.
340  * If the GPIO reset is used, we probably need to have /lib/firmware/maxtouch.fw
341  * available. See "mxt-app" and "droid4-touchscreen-firmware" tools for more
342  * information.
343  */
344 &i2c2 {
345         tsp@4a {
346                 compatible = "atmel,maxtouch";
347                 reg = <0x4a>;
348                 pinctrl-names = "default";
349                 pinctrl-0 = <&touchscreen_pins>;
350
351                 /* gpio_183 with sys_nirq2 pad as wakeup */
352                 interrupts-extended = <&gpio6 23 IRQ_TYPE_EDGE_FALLING
353                                        &omap4_pmx_core 0x160>;
354                 interrupt-names = "irq", "wakeup";
355                 wakeup-source;
356         };
357 };
358
359 /* L3_2 interconnect is unused, SRAM, GPMC and L3_ICLK2 disabled */
360 &ocmcram {
361         status = "disabled";
362 };
363
364 &omap4_pmx_core {
365
366         /* hdmi_hpd.gpio_63 */
367         hdmi_hpd_gpio: pinmux_hdmi_hpd_pins {
368                 pinctrl-single,pins = <
369                 OMAP4_IOPAD(0x098, PIN_INPUT | MUX_MODE3)
370                 >;
371         };
372
373         /* hdmi_cec.hdmi_cec, hdmi_scl.hdmi_scl, hdmi_sda.hdmi_sda */
374         dss_hdmi_pins: pinmux_dss_hdmi_pins {
375                 pinctrl-single,pins = <
376                 OMAP4_IOPAD(0x09a, PIN_INPUT_PULLUP | MUX_MODE0)
377                 OMAP4_IOPAD(0x09c, PIN_INPUT | MUX_MODE0)
378                 OMAP4_IOPAD(0x09e, PIN_INPUT | MUX_MODE0)
379                 >;
380         };
381
382         /* gpmc_ncs0.gpio_50 */
383         poweroff_gpio: pinmux_poweroff_pins {
384                 pinctrl-single,pins = <
385                 OMAP4_IOPAD(0x074, PIN_OUTPUT_PULLUP | MUX_MODE3)
386                 >;
387         };
388
389         /* kpd_row0.gpio_178 */
390         tmp105_irq: pinmux_tmp105_irq {
391                 pinctrl-single,pins = <
392                 OMAP4_IOPAD(0x18e, PIN_INPUT_PULLUP | MUX_MODE3)
393                 >;
394         };
395
396         usb_gpio_mux_sel1: pinmux_usb_gpio_mux_sel1_pins {
397                 /* gpio_60 */
398                 pinctrl-single,pins = <
399                 OMAP4_IOPAD(0x088, PIN_OUTPUT | MUX_MODE3)
400                 >;
401         };
402
403         touchscreen_pins: pinmux_touchscreen_pins {
404                 pinctrl-single,pins = <
405                 OMAP4_IOPAD(0x1a0, PIN_INPUT_PULLUP | MUX_MODE3)
406                 >;
407         };
408
409         usb_ulpi_pins: pinmux_usb_ulpi_pins {
410                 pinctrl-single,pins = <
411                 OMAP4_IOPAD(0x196, MUX_MODE7)
412                 OMAP4_IOPAD(0x198, MUX_MODE7)
413                 OMAP4_IOPAD(0x1b2, PIN_INPUT_PULLUP | MUX_MODE0)
414                 OMAP4_IOPAD(0x1b4, PIN_INPUT_PULLUP | MUX_MODE0)
415                 OMAP4_IOPAD(0x1b6, PIN_INPUT_PULLUP | MUX_MODE0)
416                 OMAP4_IOPAD(0x1b8, PIN_INPUT_PULLUP | MUX_MODE0)
417                 OMAP4_IOPAD(0x1ba, PIN_INPUT_PULLUP | MUX_MODE0)
418                 OMAP4_IOPAD(0x1bc, PIN_INPUT_PULLUP | MUX_MODE0)
419                 OMAP4_IOPAD(0x1be, PIN_INPUT_PULLUP | MUX_MODE0)
420                 OMAP4_IOPAD(0x1c0, PIN_INPUT_PULLUP | MUX_MODE0)
421                 OMAP4_IOPAD(0x1c2, PIN_INPUT_PULLUP | MUX_MODE0)
422                 OMAP4_IOPAD(0x1c4, PIN_INPUT_PULLUP | MUX_MODE0)
423                 OMAP4_IOPAD(0x1c6, PIN_INPUT_PULLUP | MUX_MODE0)
424                 OMAP4_IOPAD(0x1c8, PIN_INPUT_PULLUP | MUX_MODE0)
425                 >;
426         };
427
428         /* usb0_otg_dp and usb0_otg_dm */
429         usb_utmi_pins: pinmux_usb_utmi_pins {
430                 pinctrl-single,pins = <
431                 OMAP4_IOPAD(0x196, PIN_INPUT | MUX_MODE0)
432                 OMAP4_IOPAD(0x198, PIN_INPUT | MUX_MODE0)
433                 OMAP4_IOPAD(0x1b2, PIN_INPUT_PULLUP | MUX_MODE7)
434                 OMAP4_IOPAD(0x1b4, PIN_INPUT_PULLUP | MUX_MODE7)
435                 OMAP4_IOPAD(0x1b6, PIN_INPUT_PULLUP | MUX_MODE7)
436                 OMAP4_IOPAD(0x1b8, PIN_INPUT_PULLUP | MUX_MODE7)
437                 OMAP4_IOPAD(0x1ba, PIN_INPUT_PULLUP | MUX_MODE7)
438                 OMAP4_IOPAD(0x1bc, PIN_INPUT_PULLUP | MUX_MODE7)
439                 OMAP4_IOPAD(0x1be, PIN_INPUT_PULLUP | MUX_MODE7)
440                 OMAP4_IOPAD(0x1c0, PIN_INPUT_PULLUP | MUX_MODE7)
441                 OMAP4_IOPAD(0x1c2, PIN_INPUT_PULLUP | MUX_MODE7)
442                 OMAP4_IOPAD(0x1c4, PIN_INPUT_PULLUP | MUX_MODE7)
443                 OMAP4_IOPAD(0x1c6, PIN_INPUT_PULLUP | MUX_MODE7)
444                 OMAP4_IOPAD(0x1c8, PIN_INPUT_PULLUP | MUX_MODE7)
445                 >;
446         };
447
448         /* uart3_tx_irtx and uart3_rx_irrx */
449         uart3_pins: pinmux_uart3_pins {
450                 pinctrl-single,pins = <
451                 OMAP4_IOPAD(0x196, MUX_MODE7)
452                 OMAP4_IOPAD(0x198, MUX_MODE7)
453                 OMAP4_IOPAD(0x1b2, PIN_INPUT_PULLUP | MUX_MODE7)
454                 OMAP4_IOPAD(0x1b4, PIN_INPUT_PULLUP | MUX_MODE7)
455                 OMAP4_IOPAD(0x1b6, PIN_INPUT_PULLUP | MUX_MODE7)
456                 OMAP4_IOPAD(0x1b8, PIN_INPUT_PULLUP | MUX_MODE7)
457                 OMAP4_IOPAD(0x1ba, MUX_MODE2)
458                 OMAP4_IOPAD(0x1bc, PIN_INPUT | MUX_MODE2)
459                 OMAP4_IOPAD(0x1be, PIN_INPUT_PULLUP | MUX_MODE7)
460                 OMAP4_IOPAD(0x1c0, PIN_INPUT_PULLUP | MUX_MODE7)
461                 OMAP4_IOPAD(0x1c2, PIN_INPUT_PULLUP | MUX_MODE7)
462                 OMAP4_IOPAD(0x1c4, PIN_INPUT_PULLUP | MUX_MODE7)
463                 OMAP4_IOPAD(0x1c6, PIN_INPUT_PULLUP | MUX_MODE7)
464                 OMAP4_IOPAD(0x1c8, PIN_INPUT_PULLUP | MUX_MODE7)
465                 >;
466         };
467 };
468
469 &omap4_pmx_wkup {
470         usb_gpio_mux_sel2: pinmux_usb_gpio_mux_sel2_pins {
471                 /* gpio_wk0 */
472                 pinctrl-single,pins = <
473                 OMAP4_IOPAD(0x040, PIN_OUTPUT_PULLDOWN | MUX_MODE3)
474                 >;
475         };
476 };
477
478 &uart3 {
479         interrupts-extended = <&wakeupgen GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH
480                                &omap4_pmx_core 0x17c>;
481 };
482
483 &usbhsehci {
484         phys = <&hsusb1_phy>;
485 };
486
487 &usbhshost {
488         port1-mode = "ohci-phy-4pin-dpdm";
489         port2-mode = "ehci-tll";
490 };
491
492 /* Internal UTMI+ PHY used for OTG, CPCAP ULPI PHY for detection and charger */
493 &usb_otg_hs {
494         interface-type = <1>;
495         mode = <3>;
496         power = <50>;
497 };
498
499 &i2c4 {
500         ak8975: magnetometer@c {
501                 compatible = "asahi-kasei,ak8975";
502                 reg = <0x0c>;
503
504                 vdd-supply = <&vhvio>;
505
506                 interrupt-parent = <&gpio6>;
507                 interrupts = <15 IRQ_TYPE_EDGE_RISING>; /* gpio175 */
508
509                 rotation-matrix = "-1", "0", "0",
510                                   "0", "1", "0",
511                                   "0", "0", "-1";
512
513         };
514
515         lis3dh: accelerometer@18 {
516                 compatible = "st,lis3dh-accel";
517                 reg = <0x18>;
518
519                 vdd-supply = <&vhvio>;
520
521                 interrupt-parent = <&gpio2>;
522                 interrupts = <2 IRQ_TYPE_EDGE_BOTH>; /* gpio34 */
523
524                 rotation-matrix = "0", "-1", "0",
525                                   "1", "0", "0",
526                                   "0", "0", "1";
527         };
528 };