ARM: dts: dra7-evm: Fix spi1 mux documentation
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / dra7-evm.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 "dra74x.dtsi"
11
12 / {
13         model = "TI DRA742";
14         compatible = "ti,dra7-evm", "ti,dra742", "ti,dra74", "ti,dra7";
15
16         memory {
17                 device_type = "memory";
18                 reg = <0x80000000 0x60000000>; /* 1536 MB */
19         };
20
21         mmc2_3v3: fixedregulator-mmc2 {
22                 compatible = "regulator-fixed";
23                 regulator-name = "mmc2_3v3";
24                 regulator-min-microvolt = <3300000>;
25                 regulator-max-microvolt = <3300000>;
26         };
27 };
28
29 &dra7_pmx_core {
30         i2c1_pins: pinmux_i2c1_pins {
31                 pinctrl-single,pins = <
32                         0x400 (PIN_INPUT | MUX_MODE0) /* i2c1_sda */
33                         0x404 (PIN_INPUT | MUX_MODE0) /* i2c1_scl */
34                 >;
35         };
36
37         i2c2_pins: pinmux_i2c2_pins {
38                 pinctrl-single,pins = <
39                         0x408 (PIN_INPUT | MUX_MODE0) /* i2c2_sda */
40                         0x40c (PIN_INPUT | MUX_MODE0) /* i2c2_scl */
41                 >;
42         };
43
44         i2c3_pins: pinmux_i2c3_pins {
45                 pinctrl-single,pins = <
46                         0x288 (PIN_INPUT | MUX_MODE9) /* gpio6_14.i2c3_sda */
47                         0x28c (PIN_INPUT | MUX_MODE9) /* gpio6_15.i2c3_scl */
48                 >;
49         };
50
51         mcspi1_pins: pinmux_mcspi1_pins {
52                 pinctrl-single,pins = <
53                         0x3a4 (PIN_INPUT | MUX_MODE0) /* spi1_sclk */
54                         0x3a8 (PIN_INPUT | MUX_MODE0) /* spi1_d1 */
55                         0x3ac (PIN_INPUT | MUX_MODE0) /* spi1_d0 */
56                         0x3b0 (PIN_INPUT_SLEW | MUX_MODE0) /* spi1_cs0 */
57                         0x3b4 (PIN_INPUT_SLEW | MUX_MODE0) /* spi1_cs1 */
58                         0x3b8 (PIN_INPUT_SLEW | MUX_MODE6) /* spi1_cs2.hdmi1_hpd */
59                         0x3bc (PIN_INPUT_SLEW | MUX_MODE6) /* spi1_cs3.hdmi1_cec */
60                 >;
61         };
62
63         mcspi2_pins: pinmux_mcspi2_pins {
64                 pinctrl-single,pins = <
65                         0x3c0 (PIN_INPUT | MUX_MODE0) /* spi2_sclk */
66                         0x3c4 (PIN_INPUT_SLEW | MUX_MODE0) /* spi2_d1 */
67                         0x3c8 (PIN_INPUT_SLEW | MUX_MODE0) /* spi2_d1 */
68                         0x3cc (PIN_INPUT_SLEW | MUX_MODE0) /* spi2_cs0 */
69                 >;
70         };
71
72         uart1_pins: pinmux_uart1_pins {
73                 pinctrl-single,pins = <
74                         0x3e0 (PIN_INPUT_SLEW | MUX_MODE0) /* uart1_rxd */
75                         0x3e4 (PIN_INPUT_SLEW | MUX_MODE0) /* uart1_txd */
76                         0x3e8 (PIN_INPUT | MUX_MODE3) /* uart1_ctsn */
77                         0x3ec (PIN_INPUT | MUX_MODE3) /* uart1_rtsn */
78                 >;
79         };
80
81         uart2_pins: pinmux_uart2_pins {
82                 pinctrl-single,pins = <
83                         0x3f0 (PIN_INPUT | MUX_MODE0) /* uart2_rxd */
84                         0x3f4 (PIN_INPUT | MUX_MODE0) /* uart2_txd */
85                         0x3f8 (PIN_INPUT | MUX_MODE0) /* uart2_ctsn */
86                         0x3fc (PIN_INPUT | MUX_MODE0) /* uart2_rtsn */
87                 >;
88         };
89
90         uart3_pins: pinmux_uart3_pins {
91                 pinctrl-single,pins = <
92                         0x248 (PIN_INPUT_SLEW | MUX_MODE0) /* uart3_rxd */
93                         0x24c (PIN_INPUT_SLEW | MUX_MODE0) /* uart3_txd */
94                 >;
95         };
96
97         qspi1_pins: pinmux_qspi1_pins {
98                 pinctrl-single,pins = <
99                         0x4c (PIN_INPUT | MUX_MODE1)  /* gpmc_a3.qspi1_cs2 */
100                         0x50 (PIN_INPUT | MUX_MODE1)  /* gpmc_a4.qspi1_cs3 */
101                         0x74 (PIN_INPUT | MUX_MODE1)  /* gpmc_a13.qspi1_rtclk */
102                         0x78 (PIN_INPUT | MUX_MODE1)  /* gpmc_a14.qspi1_d3 */
103                         0x7c (PIN_INPUT | MUX_MODE1)  /* gpmc_a15.qspi1_d2 */
104                         0x80 (PIN_INPUT | MUX_MODE1) /* gpmc_a16.qspi1_d1 */
105                         0x84 (PIN_INPUT | MUX_MODE1)  /* gpmc_a17.qspi1_d0 */
106                         0x88 (PIN_INPUT | MUX_MODE1)  /* qpmc_a18.qspi1_sclk */
107                         0xb8 (PIN_INPUT_PULLUP | MUX_MODE1)  /* gpmc_cs2.qspi1_cs0 */
108                         0xbc (PIN_INPUT_PULLUP | MUX_MODE1)  /* gpmc_cs3.qspi1_cs1 */
109                 >;
110         };
111
112         usb1_pins: pinmux_usb1_pins {
113                 pinctrl-single,pins = <
114                         0x280 (PIN_INPUT_SLEW | MUX_MODE0) /* usb1_drvvbus */
115                 >;
116         };
117
118         usb2_pins: pinmux_usb2_pins {
119                 pinctrl-single,pins = <
120                         0x284 (PIN_INPUT_SLEW | MUX_MODE0) /* usb2_drvvbus */
121                 >;
122         };
123
124         nand_flash_x16: nand_flash_x16 {
125                 /* On DRA7 EVM, GPMC_WPN and NAND_BOOTn comes from DIP switch
126                  * So NAND flash requires following switch settings:
127                  * SW5.9 (GPMC_WPN) = LOW
128                  * SW5.1 (NAND_BOOTn) = HIGH */
129                 pinctrl-single,pins = <
130                         0x0     (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad0     */
131                         0x4     (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad1     */
132                         0x8     (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad2     */
133                         0xc     (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad3     */
134                         0x10    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad4     */
135                         0x14    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad5     */
136                         0x18    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad6     */
137                         0x1c    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad7     */
138                         0x20    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad8     */
139                         0x24    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad9     */
140                         0x28    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad10    */
141                         0x2c    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad11    */
142                         0x30    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad12    */
143                         0x34    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad13    */
144                         0x38    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad14    */
145                         0x3c    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad15    */
146                         0xd8    (PIN_INPUT_PULLUP  | MUX_MODE0) /* gpmc_wait0   */
147                         0xcc    (PIN_OUTPUT | MUX_MODE0)        /* gpmc_wen     */
148                         0xb4    (PIN_OUTPUT_PULLUP | MUX_MODE0) /* gpmc_csn0    */
149                         0xc4    (PIN_OUTPUT | MUX_MODE0)        /* gpmc_advn_ale */
150                         0xc8    (PIN_OUTPUT | MUX_MODE0)        /* gpmc_oen_ren  */
151                         0xd0    (PIN_OUTPUT | MUX_MODE0)        /* gpmc_be0n_cle */
152                 >;
153         };
154 };
155
156 &i2c1 {
157         status = "okay";
158         pinctrl-names = "default";
159         pinctrl-0 = <&i2c1_pins>;
160         clock-frequency = <400000>;
161
162         tps659038: tps659038@58 {
163                 compatible = "ti,tps659038";
164                 reg = <0x58>;
165
166                 tps659038_pmic {
167                         compatible = "ti,tps659038-pmic";
168
169                         regulators {
170                                 smps123_reg: smps123 {
171                                         /* VDD_MPU */
172                                         regulator-name = "smps123";
173                                         regulator-min-microvolt = < 850000>;
174                                         regulator-max-microvolt = <1250000>;
175                                         regulator-always-on;
176                                         regulator-boot-on;
177                                 };
178
179                                 smps45_reg: smps45 {
180                                         /* VDD_DSPEVE */
181                                         regulator-name = "smps45";
182                                         regulator-min-microvolt = < 850000>;
183                                         regulator-max-microvolt = <1150000>;
184                                         regulator-boot-on;
185                                 };
186
187                                 smps6_reg: smps6 {
188                                         /* VDD_GPU - over VDD_SMPS6 */
189                                         regulator-name = "smps6";
190                                         regulator-min-microvolt = <850000>;
191                                         regulator-max-microvolt = <12500000>;
192                                         regulator-boot-on;
193                                 };
194
195                                 smps7_reg: smps7 {
196                                         /* CORE_VDD */
197                                         regulator-name = "smps7";
198                                         regulator-min-microvolt = <850000>;
199                                         regulator-max-microvolt = <1030000>;
200                                         regulator-always-on;
201                                         regulator-boot-on;
202                                 };
203
204                                 smps8_reg: smps8 {
205                                         /* VDD_IVAHD */
206                                         regulator-name = "smps8";
207                                         regulator-min-microvolt = < 850000>;
208                                         regulator-max-microvolt = <1250000>;
209                                         regulator-boot-on;
210                                 };
211
212                                 smps9_reg: smps9 {
213                                         /* VDDS1V8 */
214                                         regulator-name = "smps9";
215                                         regulator-min-microvolt = <1800000>;
216                                         regulator-max-microvolt = <1800000>;
217                                         regulator-always-on;
218                                         regulator-boot-on;
219                                 };
220
221                                 ldo1_reg: ldo1 {
222                                         /* LDO1_OUT --> SDIO  */
223                                         regulator-name = "ldo1";
224                                         regulator-min-microvolt = <1800000>;
225                                         regulator-max-microvolt = <3300000>;
226                                         regulator-boot-on;
227                                 };
228
229                                 ldo2_reg: ldo2 {
230                                         /* VDD_RTCIO */
231                                         /* LDO2 -> VDDSHV5, LDO2 also goes to CAN_PHY_3V3 */
232                                         regulator-name = "ldo2";
233                                         regulator-min-microvolt = <3300000>;
234                                         regulator-max-microvolt = <3300000>;
235                                         regulator-boot-on;
236                                 };
237
238                                 ldo3_reg: ldo3 {
239                                         /* VDDA_1V8_PHY */
240                                         regulator-name = "ldo3";
241                                         regulator-min-microvolt = <1800000>;
242                                         regulator-max-microvolt = <1800000>;
243                                         regulator-always-on;
244                                         regulator-boot-on;
245                                 };
246
247                                 ldo9_reg: ldo9 {
248                                         /* VDD_RTC */
249                                         regulator-name = "ldo9";
250                                         regulator-min-microvolt = <1050000>;
251                                         regulator-max-microvolt = <1050000>;
252                                         regulator-boot-on;
253                                 };
254
255                                 ldoln_reg: ldoln {
256                                         /* VDDA_1V8_PLL */
257                                         regulator-name = "ldoln";
258                                         regulator-min-microvolt = <1800000>;
259                                         regulator-max-microvolt = <1800000>;
260                                         regulator-always-on;
261                                         regulator-boot-on;
262                                 };
263
264                                 ldousb_reg: ldousb {
265                                         /* VDDA_3V_USB: VDDA_USBHS33 */
266                                         regulator-name = "ldousb";
267                                         regulator-min-microvolt = <3300000>;
268                                         regulator-max-microvolt = <3300000>;
269                                         regulator-boot-on;
270                                 };
271                         };
272                 };
273         };
274 };
275
276 &i2c2 {
277         status = "okay";
278         pinctrl-names = "default";
279         pinctrl-0 = <&i2c2_pins>;
280         clock-frequency = <400000>;
281 };
282
283 &i2c3 {
284         status = "okay";
285         pinctrl-names = "default";
286         pinctrl-0 = <&i2c3_pins>;
287         clock-frequency = <400000>;
288 };
289
290 &mcspi1 {
291         status = "okay";
292         pinctrl-names = "default";
293         pinctrl-0 = <&mcspi1_pins>;
294 };
295
296 &mcspi2 {
297         status = "okay";
298         pinctrl-names = "default";
299         pinctrl-0 = <&mcspi2_pins>;
300 };
301
302 &uart1 {
303         status = "okay";
304         pinctrl-names = "default";
305         pinctrl-0 = <&uart1_pins>;
306 };
307
308 &uart2 {
309         status = "okay";
310         pinctrl-names = "default";
311         pinctrl-0 = <&uart2_pins>;
312 };
313
314 &uart3 {
315         status = "okay";
316         pinctrl-names = "default";
317         pinctrl-0 = <&uart3_pins>;
318 };
319
320 &mmc1 {
321         status = "okay";
322         vmmc-supply = <&ldo1_reg>;
323         bus-width = <4>;
324 };
325
326 &mmc2 {
327         status = "okay";
328         vmmc-supply = <&mmc2_3v3>;
329         bus-width = <8>;
330 };
331
332 &cpu0 {
333         cpu0-supply = <&smps123_reg>;
334 };
335
336 &qspi {
337         status = "okay";
338         pinctrl-names = "default";
339         pinctrl-0 = <&qspi1_pins>;
340
341         spi-max-frequency = <48000000>;
342         m25p80@0 {
343                 compatible = "s25fl256s1";
344                 spi-max-frequency = <48000000>;
345                 reg = <0>;
346                 spi-tx-bus-width = <1>;
347                 spi-rx-bus-width = <4>;
348                 spi-cpol;
349                 spi-cpha;
350                 #address-cells = <1>;
351                 #size-cells = <1>;
352
353                 /* MTD partition table.
354                  * The ROM checks the first four physical blocks
355                  * for a valid file to boot and the flash here is
356                  * 64KiB block size.
357                  */
358                 partition@0 {
359                         label = "QSPI.SPL";
360                         reg = <0x00000000 0x000010000>;
361                 };
362                 partition@1 {
363                         label = "QSPI.SPL.backup1";
364                         reg = <0x00010000 0x00010000>;
365                 };
366                 partition@2 {
367                         label = "QSPI.SPL.backup2";
368                         reg = <0x00020000 0x00010000>;
369                 };
370                 partition@3 {
371                         label = "QSPI.SPL.backup3";
372                         reg = <0x00030000 0x00010000>;
373                 };
374                 partition@4 {
375                         label = "QSPI.u-boot";
376                         reg = <0x00040000 0x00100000>;
377                 };
378                 partition@5 {
379                         label = "QSPI.u-boot-spl-os";
380                         reg = <0x00140000 0x00010000>;
381                 };
382                 partition@6 {
383                         label = "QSPI.u-boot-env";
384                         reg = <0x00150000 0x00010000>;
385                 };
386                 partition@7 {
387                         label = "QSPI.u-boot-env.backup1";
388                         reg = <0x00160000 0x0010000>;
389                 };
390                 partition@8 {
391                         label = "QSPI.kernel";
392                         reg = <0x00170000 0x0800000>;
393                 };
394                 partition@9 {
395                         label = "QSPI.file-system";
396                         reg = <0x00970000 0x01690000>;
397                 };
398         };
399 };
400
401 &usb1 {
402         dr_mode = "peripheral";
403         pinctrl-names = "default";
404         pinctrl-0 = <&usb1_pins>;
405 };
406
407 &usb2 {
408         dr_mode = "host";
409         pinctrl-names = "default";
410         pinctrl-0 = <&usb2_pins>;
411 };
412
413 &elm {
414         status = "okay";
415 };
416
417 &gpmc {
418         status = "okay";
419         pinctrl-names = "default";
420         pinctrl-0 = <&nand_flash_x16>;
421         ranges = <0 0 0 0x01000000>;    /* minimum GPMC partition = 16MB */
422         nand@0,0 {
423                 reg = <0 0 4>;          /* device IO registers */
424                 ti,nand-ecc-opt = "bch8";
425                 ti,elm-id = <&elm>;
426                 nand-bus-width = <16>;
427                 gpmc,device-width = <2>;
428                 gpmc,sync-clk-ps = <0>;
429                 gpmc,cs-on-ns = <0>;
430                 gpmc,cs-rd-off-ns = <40>;
431                 gpmc,cs-wr-off-ns = <40>;
432                 gpmc,adv-on-ns = <0>;
433                 gpmc,adv-rd-off-ns = <30>;
434                 gpmc,adv-wr-off-ns = <30>;
435                 gpmc,we-on-ns = <5>;
436                 gpmc,we-off-ns = <25>;
437                 gpmc,oe-on-ns = <2>;
438                 gpmc,oe-off-ns = <20>;
439                 gpmc,access-ns = <20>;
440                 gpmc,wr-access-ns = <40>;
441                 gpmc,rd-cycle-ns = <40>;
442                 gpmc,wr-cycle-ns = <40>;
443                 gpmc,wait-pin = <0>;
444                 gpmc,wait-on-read;
445                 gpmc,wait-on-write;
446                 gpmc,bus-turnaround-ns = <0>;
447                 gpmc,cycle2cycle-delay-ns = <0>;
448                 gpmc,clk-activation-ns = <0>;
449                 gpmc,wait-monitoring-ns = <0>;
450                 gpmc,wr-data-mux-bus-ns = <0>;
451                 /* MTD partition table */
452                 /* All SPL-* partitions are sized to minimal length
453                  * which can be independently programmable. For
454                  * NAND flash this is equal to size of erase-block */
455                 #address-cells = <1>;
456                 #size-cells = <1>;
457                 partition@0 {
458                         label = "NAND.SPL";
459                         reg = <0x00000000 0x000020000>;
460                 };
461                 partition@1 {
462                         label = "NAND.SPL.backup1";
463                         reg = <0x00020000 0x00020000>;
464                 };
465                 partition@2 {
466                         label = "NAND.SPL.backup2";
467                         reg = <0x00040000 0x00020000>;
468                 };
469                 partition@3 {
470                         label = "NAND.SPL.backup3";
471                         reg = <0x00060000 0x00020000>;
472                 };
473                 partition@4 {
474                         label = "NAND.u-boot-spl-os";
475                         reg = <0x00080000 0x00040000>;
476                 };
477                 partition@5 {
478                         label = "NAND.u-boot";
479                         reg = <0x000c0000 0x00100000>;
480                 };
481                 partition@6 {
482                         label = "NAND.u-boot-env";
483                         reg = <0x001c0000 0x00020000>;
484                 };
485                 partition@7 {
486                         label = "NAND.u-boot-env.backup1";
487                         reg = <0x001e0000 0x00020000>;
488                 };
489                 partition@8 {
490                         label = "NAND.kernel";
491                         reg = <0x00200000 0x00800000>;
492                 };
493                 partition@9 {
494                         label = "NAND.file-system";
495                         reg = <0x00a00000 0x0f600000>;
496                 };
497         };
498 };
499
500 &usb2_phy1 {
501         phy-supply = <&ldousb_reg>;
502 };
503
504 &usb2_phy2 {
505         phy-supply = <&ldousb_reg>;
506 };