GNU Linux-libre 4.19.264-gnu1
[releases.git] / arch / arm / boot / dts / omap3-ldp.dts
1 /*
2  * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  */
8 /dts-v1/;
9
10 #include <dt-bindings/input/input.h>
11 #include "omap34xx.dtsi"
12 #include "omap-gpmc-smsc911x.dtsi"
13
14 / {
15         model = "TI OMAP3430 LDP (Zoom1 Labrador)";
16         compatible = "ti,omap3-ldp", "ti,omap3";
17
18         memory@80000000 {
19                 device_type = "memory";
20                 reg = <0x80000000 0x8000000>; /* 128 MB */
21         };
22
23         cpus {
24                 cpu@0 {
25                         cpu0-supply = <&vcc>;
26                 };
27         };
28
29         gpio_keys {
30                 compatible = "gpio-keys";
31                 pinctrl-names = "default";
32                 pinctrl-0 = <&gpio_key_pins>;
33
34                 key_enter {
35                         label = "enter";
36                         gpios = <&gpio4 5 GPIO_ACTIVE_LOW>; /* gpio101 */
37                         linux,code = <KEY_ENTER>;
38                         wakeup-source;
39                 };
40
41                 key_f1 {
42                         label = "f1";
43                         gpios = <&gpio4 6 GPIO_ACTIVE_LOW>; /* gpio102 */
44                         linux,code = <KEY_F1>;
45                         wakeup-source;
46                 };
47
48                 key_f2 {
49                         label = "f2";
50                         gpios = <&gpio4 7 GPIO_ACTIVE_LOW>; /* gpio103 */
51                         linux,code = <KEY_F2>;
52                         wakeup-source;
53                 };
54
55                 key_f3 {
56                         label = "f3";
57                         gpios = <&gpio4 8 GPIO_ACTIVE_LOW>; /* gpio104 */
58                         linux,code = <KEY_F3>;
59                         wakeup-source;
60                 };
61
62                 key_f4 {
63                         label = "f4";
64                         gpios = <&gpio4 9 GPIO_ACTIVE_LOW>; /* gpio105 */
65                         linux,code = <KEY_F4>;
66                         wakeup-source;
67                 };
68
69                 key_left {
70                         label = "left";
71                         gpios = <&gpio4 10 GPIO_ACTIVE_LOW>; /* gpio106 */
72                         linux,code = <KEY_LEFT>;
73                         wakeup-source;
74                 };
75
76                 key_right {
77                         label = "right";
78                         gpios = <&gpio4 11 GPIO_ACTIVE_LOW>; /* gpio107 */
79                         linux,code = <KEY_RIGHT>;
80                         wakeup-source;
81                 };
82
83                 key_up {
84                         label = "up";
85                         gpios = <&gpio4 12 GPIO_ACTIVE_LOW>; /* gpio108 */
86                         linux,code = <KEY_UP>;
87                         wakeup-source;
88                 };
89
90                 key_down {
91                         label = "down";
92                         gpios = <&gpio4 13 GPIO_ACTIVE_LOW>; /* gpio109 */
93                         linux,code = <KEY_DOWN>;
94                         wakeup-source;
95                 };
96         };
97 };
98
99 &gpmc {
100         ranges = <0 0 0x30000000 0x1000000>,    /* CS0 space, 16MB */
101                  <1 0 0x08000000 0x1000000>;    /* CS1 space, 16MB */
102
103         nand@0,0 {
104                 compatible = "ti,omap2-nand";
105                 reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
106                 interrupt-parent = <&gpmc>;
107                 interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
108                              <1 IRQ_TYPE_NONE>; /* termcount */
109                 linux,mtd-name= "micron,nand";
110                 nand-bus-width = <16>;
111                 gpmc,device-width = <2>;
112                 ti,nand-ecc-opt = "bch8";
113
114                 gpmc,sync-clk-ps = <0>;
115                 gpmc,cs-on-ns = <0>;
116                 gpmc,cs-rd-off-ns = <44>;
117                 gpmc,cs-wr-off-ns = <44>;
118                 gpmc,adv-on-ns = <6>;
119                 gpmc,adv-rd-off-ns = <34>;
120                 gpmc,adv-wr-off-ns = <44>;
121                 gpmc,we-off-ns = <40>;
122                 gpmc,oe-off-ns = <54>;
123                 gpmc,access-ns = <64>;
124                 gpmc,rd-cycle-ns = <82>;
125                 gpmc,wr-cycle-ns = <82>;
126                 gpmc,wr-access-ns = <40>;
127                 gpmc,wr-data-mux-bus-ns = <0>;
128
129                 #address-cells = <1>;
130                 #size-cells = <1>;
131
132                 partition@0 {
133                         label = "X-Loader";
134                         reg = <0 0x80000>;
135                 };
136                 partition@80000 {
137                         label = "U-Boot";
138                         reg = <0x80000 0x140000>;
139                 };
140                 partition@1c0000 {
141                         label = "Environment";
142                         reg = <0x1c0000 0x40000>;
143                 };
144                 partition@200000 {
145                         label = "Kernel";
146                         reg = <0x200000 0x1e00000>;
147                 };
148                 partition@2000000 {
149                         label = "Filesystem";
150                         reg = <0x2000000 0x6000000>;
151                 };
152         };
153
154         ethernet@gpmc {
155                 interrupt-parent = <&gpio5>;
156                 interrupts = <24 IRQ_TYPE_LEVEL_LOW>;
157                 reg = <1 0 0xff>;
158         };
159 };
160
161 &i2c1 {
162         clock-frequency = <2600000>;
163
164         twl: twl@48 {
165                 reg = <0x48>;
166                 interrupts = <7>; /* SYS_NIRQ cascaded to intc */
167                 interrupt-parent = <&intc>;
168
169                 twl_power: power {
170                         compatible = "ti,twl4030-power-idle";
171                         ti,use_poweroff;
172                 };
173         };
174 };
175
176 #include "twl4030.dtsi"
177 #include "twl4030_omap3.dtsi"
178 #include "omap3-panel-sharp-ls037v7dw01.dtsi"
179
180 &backlight0 {
181         gpios = <&twl_gpio 7 GPIO_ACTIVE_HIGH>;
182 };
183
184 &i2c2 {
185         clock-frequency = <400000>;
186 };
187
188 &i2c3 {
189         clock-frequency = <400000>;
190 };
191
192 /* tps61130rsa enabled by twl4030 regen */
193 &lcd_3v3 {
194         regulator-always-on;
195 };
196
197 &lcd0 {
198         enable-gpios = <&twl_gpio 15 GPIO_ACTIVE_HIGH>; /* lcd INI */
199         reset-gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>;     /* gpio55, lcd RESB */
200         mode-gpios = <&gpio2 24 GPIO_ACTIVE_HIGH>;      /* gpio56, lcd MO */
201 };
202
203 &mcspi1 {
204         tsc2046@0 {
205                 interrupt-parent = <&gpio2>;
206                 interrupts = <22 0>;            /* gpio54 */
207                 pendown-gpio = <&gpio2 22 GPIO_ACTIVE_HIGH>;
208         };
209 };
210
211 &mmc1 {
212         /* See 35xx errata 2.1.1.128 in SPRZ278F */
213         compatible = "ti,omap3-pre-es3-hsmmc";
214         vmmc-supply = <&vmmc1>;
215         bus-width = <4>;
216         pinctrl-names = "default";
217         pinctrl-0 = <&mmc1_pins>;
218 };
219
220 &mmc2 {
221         status="disabled";
222 };
223
224 &mmc3 {
225         status="disabled";
226 };
227
228 &omap3_pmx_core {
229         gpio_key_pins: pinmux_gpio_key_pins {
230                 pinctrl-single,pins = <
231                         OMAP3_CORE1_IOPAD(0x211a, PIN_INPUT | MUX_MODE4)        /* cam_d2.gpio_101 */
232                         OMAP3_CORE1_IOPAD(0x211c, PIN_INPUT | MUX_MODE4)        /* cam_d3.gpio_102 */
233                         OMAP3_CORE1_IOPAD(0x211e, PIN_INPUT | MUX_MODE4)        /* cam_d4.gpio_103 */
234                         OMAP3_CORE1_IOPAD(0x2120, PIN_INPUT | MUX_MODE4)        /* cam_d5.gpio_104 */
235                         OMAP3_CORE1_IOPAD(0x2122, PIN_INPUT | MUX_MODE4)        /* cam_d6.gpio_105 */
236                         OMAP3_CORE1_IOPAD(0x2124, PIN_INPUT | MUX_MODE4)        /* cam_d7.gpio_106 */
237                         OMAP3_CORE1_IOPAD(0x2126, PIN_INPUT | MUX_MODE4)        /* cam_d8.gpio_107 */
238                         OMAP3_CORE1_IOPAD(0x2128, PIN_INPUT | MUX_MODE4)        /* cam_d9.gpio_108 */
239                         OMAP3_CORE1_IOPAD(0x212a, PIN_INPUT | MUX_MODE4)        /* cam_d10.gpio_109 */
240                 >;
241         };
242
243         musb_pins: pinmux_musb_pins {
244                 pinctrl-single,pins = <
245                         OMAP3_CORE1_IOPAD(0x21a2, PIN_INPUT | MUX_MODE0)        /* hsusb0_clk.hsusb0_clk */
246                         OMAP3_CORE1_IOPAD(0x21aa, PIN_INPUT | MUX_MODE0)        /* hsusb0_data0.hsusb0_data0 */
247                         OMAP3_CORE1_IOPAD(0x21ac, PIN_INPUT | MUX_MODE0)        /* hsusb0_data1.hsusb0_data1 */
248                         OMAP3_CORE1_IOPAD(0x21ae, PIN_INPUT | MUX_MODE0)        /* hsusb0_data2.hsusb0_data2 */
249                         OMAP3_CORE1_IOPAD(0x21b0, PIN_INPUT | MUX_MODE0)        /* hsusb0_data3.hsusb0_data3 */
250                         OMAP3_CORE1_IOPAD(0x21b2, PIN_INPUT | MUX_MODE0)        /* hsusb0_data4.hsusb0_data4 */
251                         OMAP3_CORE1_IOPAD(0x21b4, PIN_INPUT | MUX_MODE0)        /* hsusb0_data5.hsusb0_data5 */
252                         OMAP3_CORE1_IOPAD(0x21b6, PIN_INPUT | MUX_MODE0)        /* hsusb0_data6.hsusb0_data6 */
253                         OMAP3_CORE1_IOPAD(0x21b8, PIN_INPUT | MUX_MODE0)        /* hsusb0_data7.hsusb0_data7 */
254                         OMAP3_CORE1_IOPAD(0x21a6, PIN_INPUT | MUX_MODE0)        /* hsusb0_dir.hsusb0_dir */
255                         OMAP3_CORE1_IOPAD(0x21a8, PIN_INPUT | MUX_MODE0)        /* hsusb0_nxt.hsusb0_nxt */
256                         OMAP3_CORE1_IOPAD(0x21a4, PIN_OUTPUT | MUX_MODE0)       /* hsusb0_stp.hsusb0_stp */
257                 >;
258         };
259
260         mmc1_pins: pinmux_mmc1_pins {
261                 pinctrl-single,pins = <
262                         OMAP3_CORE1_IOPAD(0x2144, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_clk.mmc1_clk */
263                         OMAP3_CORE1_IOPAD(0x2146, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_cmd.mmc1_cmd */
264                         OMAP3_CORE1_IOPAD(0x2148, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat0.mmc1_dat0 */
265                         OMAP3_CORE1_IOPAD(0x214A, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat1.mmc1_dat1 */
266                         OMAP3_CORE1_IOPAD(0x214C, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat2.mmc1_dat2 */
267                         OMAP3_CORE1_IOPAD(0x214e, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat3.mmc1_dat3 */
268                 >;
269         };
270 };
271
272 &twl_keypad {
273         linux,keymap = <MATRIX_KEY(0, 0, KEY_1)
274                         MATRIX_KEY(0, 1, KEY_2)
275                         MATRIX_KEY(0, 2, KEY_3)
276                         MATRIX_KEY(1, 0, KEY_4)
277                         MATRIX_KEY(1, 1, KEY_5)
278                         MATRIX_KEY(1, 2, KEY_6)
279                         MATRIX_KEY(1, 3, KEY_F5)
280                         MATRIX_KEY(2, 0, KEY_7)
281                         MATRIX_KEY(2, 1, KEY_8)
282                         MATRIX_KEY(2, 2, KEY_9)
283                         MATRIX_KEY(2, 3, KEY_F6)
284                         MATRIX_KEY(3, 0, KEY_F7)
285                         MATRIX_KEY(3, 1, KEY_0)
286                         MATRIX_KEY(3, 2, KEY_F8)
287                         MATRIX_KEY(5, 4, KEY_RESERVED)
288                         MATRIX_KEY(4, 4, KEY_VOLUMEUP)
289                         MATRIX_KEY(5, 5, KEY_VOLUMEDOWN)>;
290 };
291
292 &uart3 {
293         interrupts-extended = <&intc 74 &omap3_pmx_core OMAP3_UART3_RX>;
294 };
295
296 &usb_otg_hs {
297         pinctrl-names = "default";
298         pinctrl-0 = <&musb_pins>;
299         interface-type = <0>;
300         usb-phy = <&usb2_phy>;
301         mode = <3>;
302         power = <50>;
303 };
304
305 &vaux1 {
306         /* Needed for ads7846 */
307         regulator-name = "vcc";
308 };