blob: 4d2d74a064c43ed51a1260c935d1a2db0302483e [file] [log] [blame]
Joachim Eastwood56bd3772015-05-12 00:00:51 +02001/*
2 * Embedded Artist LPC4357 Developer's Kit
3 *
4 * Copyright 2015 Joachim Eastwood <manabian@gmail.com>
5 *
6 * This code is released using a dual license strategy: BSD/GPL
7 * You can choose the licence that better fits your requirements.
8 *
9 * Released under the terms of 3-clause BSD License
10 * Released under the terms of GNU General Public License Version 2.0
11 *
12 */
13/dts-v1/;
14
15#include "lpc18xx.dtsi"
16#include "lpc4357.dtsi"
17
Joachim Eastwood95dafb22015-04-02 05:55:32 +020018#include "dt-bindings/input/input.h"
19#include "dt-bindings/gpio/gpio.h"
20
Joachim Eastwood56bd3772015-05-12 00:00:51 +020021/ {
22 model = "Embedded Artists' LPC4357 Developer's Kit";
23 compatible = "ea,lpc4357-developers-kit", "nxp,lpc4357", "nxp,lpc4350";
24
25 aliases {
26 serial0 = &uart0;
27 serial1 = &uart1;
28 serial2 = &uart2;
29 serial3 = &uart3;
30 };
31
32 chosen {
33 stdout-path = &uart0;
34 };
35
36 memory {
37 device_type = "memory";
38 reg = <0x28000000 0x2000000>; /* 32 MB */
39 };
Joachim Eastwoodbfd0b492015-04-02 05:54:29 +020040
41 /* vmmc is controlled by sdmmc host internally */
42 vmmc: vmmc_fixed {
43 compatible = "regulator-fixed";
44 regulator-name = "vmmc-supply";
45 regulator-min-microvolt = <3300000>;
46 regulator-max-microvolt = <3300000>;
47 };
Joachim Eastwood95dafb22015-04-02 05:55:32 +020048
49 gpio_joystick {
50 compatible = "gpio-keys-polled";
51 pinctrl-names = "default";
52 pinctrl-0 = <&gpio_joystick_pins>;
53 #address-cells = <1>;
54 #size-cells = <0>;
55 poll-interval = <100>;
56 autorepeat;
57
58 button@0 {
59 label = "joy_enter";
60 linux,code = <KEY_ENTER>;
61 gpios = <&gpio LPC_GPIO(4,8) GPIO_ACTIVE_LOW>;
62 };
63
64 button@1 {
65 label = "joy_left";
66 linux,code = <KEY_LEFT>;
67 gpios = <&gpio LPC_GPIO(4,9) GPIO_ACTIVE_LOW>;
68 };
69
70 button@2 {
71 label = "joy_up";
72 linux,code = <KEY_UP>;
73 gpios = <&gpio LPC_GPIO(4,10) GPIO_ACTIVE_LOW>;
74 };
75
76 button@3 {
77 label = "joy_right";
78 linux,code = <KEY_RIGHT>;
79 gpios = <&gpio LPC_GPIO(4,12) GPIO_ACTIVE_LOW>;
80 };
81
82 button@4 {
83 label = "joy_down";
84 linux,code = <KEY_DOWN>;
85 gpios = <&gpio LPC_GPIO(4,13) GPIO_ACTIVE_LOW>;
86 };
87 };
Joachim Eastwood41a0dec2015-07-31 00:24:24 +020088
89 leds_mmio {
90 compatible = "gpio-leds";
91
92 led1 {
93 gpios = <&mmio_leds 15 GPIO_ACTIVE_HIGH>;
94 linux,default-trigger = "heartbeat";
95 };
96
97 led2 {
98 gpios = <&mmio_leds 14 GPIO_ACTIVE_HIGH>;
99 };
100
101 led3 {
102 gpios = <&mmio_leds 13 GPIO_ACTIVE_HIGH>;
103 };
104
105 led4 {
106 gpios = <&mmio_leds 12 GPIO_ACTIVE_HIGH>;
107 };
108
109 led5 {
110 gpios = <&mmio_leds 11 GPIO_ACTIVE_HIGH>;
111 };
112
113 led6 {
114 gpios = <&mmio_leds 10 GPIO_ACTIVE_HIGH>;
115 };
116
117 led7 {
118 gpios = <&mmio_leds 9 GPIO_ACTIVE_HIGH>;
119 };
120
121 led8 {
122 gpios = <&mmio_leds 8 GPIO_ACTIVE_HIGH>;
123 };
124
125 led9 {
126 gpios = <&mmio_leds 7 GPIO_ACTIVE_HIGH>;
127 };
128
129 led10 {
130 gpios = <&mmio_leds 6 GPIO_ACTIVE_HIGH>;
131 };
132
133 led11 {
134 gpios = <&mmio_leds 5 GPIO_ACTIVE_HIGH>;
135 };
136
137 led12 {
138 gpios = <&mmio_leds 4 GPIO_ACTIVE_HIGH>;
139 };
140
141 led13 {
142 gpios = <&mmio_leds 3 GPIO_ACTIVE_HIGH>;
143 };
144
145 led14 {
146 gpios = <&mmio_leds 2 GPIO_ACTIVE_HIGH>;
147 };
148
149 led15 {
150 gpios = <&mmio_leds 1 GPIO_ACTIVE_HIGH>;
151 };
152
153 led16 {
154 gpios = <&mmio_leds 0 GPIO_ACTIVE_HIGH>;
155 };
156 };
Joachim Eastwood56bd3772015-05-12 00:00:51 +0200157};
158
Joachim Eastwoodc97a63c2015-04-02 05:51:20 +0200159&pinctrl {
Joachim Eastwood3c6abb92015-07-31 00:24:23 +0200160 emc_pins: emc-pins {
161 emc_addr0_23_cfg {
162 pins = "p2_9", "p2_10", "p2_11", "p2_12",
163 "p2_13", "p1_0", "p1_1", "p1_2",
164 "p2_8", "p2_7", "p2_6", "p2_2",
165 "p2_1", "p2_0", "p6_8", "p6_7",
166 "pd_16", "pd_15", "pe_0", "pe_1",
167 "pe_2", "pe_3", "pe_4", "pa_4";
168 function = "emc";
169 slew-rate = <1>;
170 bias-disable;
171 input-enable;
172 input-schmitt-disable;
173 };
174
175 emc_data0_31_cfg {
176 pins = "p1_7", "p1_8", "p1_9", "p1_10",
177 "p1_11", "p1_12", "p1_13", "p1_14",
178 "p5_4", "p5_5", "p5_6", "p5_7",
179 "p5_0", "p5_1", "p5_2", "p5_3",
180 "pd_2", "pd_3", "pd_4", "pd_5",
181 "pd_6", "pd_7", "pd_8", "pd_9",
182 "pe_5", "pe_6", "pe_7", "pe_8",
183 "pe_9", "pe_10", "pe_11", "pe_12";
184 function = "emc";
185 slew-rate = <1>;
186 bias-disable;
187 input-enable;
188 input-schmitt-disable;
189 };
190
191 emc_we_oe_cfg {
192 pins = "p1_6", "p1_3";
193 function = "emc";
194 slew-rate = <1>;
195 bias-disable;
196 input-enable;
197 input-schmitt-disable;
198 };
199
200 emc_bls0_3_cfg {
201 pins = "p1_4", "p6_6", "pd_13", "pd_10";
202 function = "emc";
203 slew-rate = <1>;
204 bias-disable;
205 input-enable;
206 input-schmitt-disable;
207 };
208
209 emc_cs0_3_cfg {
210 pins = "p1_5", "p6_3", "pd_12", "pd_11";
211 function = "emc";
212 slew-rate = <1>;
213 bias-disable;
214 input-enable;
215 input-schmitt-disable;
216 };
217
218 emc_sdram_dqm0_3_cfg {
219 pins = "p6_12", "p6_10", "pd_0", "pe_13";
220 function = "emc";
221 slew-rate = <1>;
222 bias-disable;
223 input-enable;
224 input-schmitt-disable;
225 };
226
227 emc_sdram_ras_cas_cfg {
228 pins = "p6_5", "p6_4";
229 function = "emc";
230 slew-rate = <1>;
231 bias-disable;
232 input-enable;
233 input-schmitt-disable;
234 };
235
236 emc_sdram_dycs0_cfg {
237 pins = "p6_9";
238 function = "emc";
239 slew-rate = <1>;
240 bias-disable;
241 input-enable;
242 input-schmitt-disable;
243 };
244
245 emc_sdram_cke_cfg {
246 pins = "p6_11";
247 function = "emc";
248 slew-rate = <1>;
249 bias-disable;
250 input-enable;
251 input-schmitt-disable;
252 };
253
254 emc_sdram_clock_cfg {
255 pins = "clk0", "clk1", "clk2", "clk3";
256 function = "emc";
257 slew-rate = <1>;
258 bias-disable;
259 input-enable;
260 input-schmitt-disable;
261 };
262 };
263
Joachim Eastwood7de98f22015-04-02 05:56:57 +0200264 enet_rmii_pins: enet-rmii-pins {
265 enet_rmii_rxd_cfg {
266 pins = "p1_15", "p0_0";
267 function = "enet";
268 slew-rate = <1>;
269 bias-disable;
270 input-enable;
271 input-schmitt-disable;
272 };
273
274 enet_rmii_txd_cfg {
275 pins = "p1_18", "p1_20";
276 function = "enet";
277 slew-rate = <1>;
278 bias-disable;
279 input-enable;
280 input-schmitt-disable;
281 };
282
283 enet_rmii_rx_dv_cfg {
284 pins = "p1_16";
285 function = "enet";
286 bias-disable;
287 input-enable;
288 input-schmitt-disable;
289 };
290
291 enet_rmii_tx_en_cfg {
292 pins = "p0_1";
293 function = "enet";
294 bias-disable;
295 input-enable;
296 input-schmitt-disable;
297 };
298
299 enet_ref_clk_cfg {
300 pins = "p1_19";
301 function = "enet";
302 slew-rate = <1>;
303 bias-disable;
304 input-enable;
305 input-schmitt-disable;
306 };
307
308 enet_mdio_cfg {
309 pins = "p1_17";
310 function = "enet";
311 bias-disable;
312 input-enable;
313 input-schmitt-disable;
314 };
315
316 enet_mdc_cfg {
317 pins = "pc_1";
318 function = "enet";
319 slew-rate = <1>;
320 bias-disable;
321 input-enable;
322 input-schmitt-disable;
323 };
324 };
325
Joachim Eastwood95dafb22015-04-02 05:55:32 +0200326 gpio_joystick_pins: gpio-joystick-pins {
327 gpio_joystick_cfg {
328 pins = "p9_0", "p9_1", "pa_1", "pa_2", "pa_3";
329 function = "gpio";
330 input-enable;
331 bias-disable;
332 };
333 };
334
Joachim Eastwoodbfd0b492015-04-02 05:54:29 +0200335 sdmmc_pins: sdmmc-pins {
336 sdmmc_clk_cfg {
337 pins = "pc_0";
338 function = "sdmmc";
339 slew-rate = <1>;
340 bias-pull-down;
341 };
342
343 sdmmc_cmd_dat0_3_cfg {
344 pins = "pc_4", "pc_5", "pc_6", "pc_7", "pc_10";
345 function = "sdmmc";
346 slew-rate = <1>;
347 bias-disable;
348 input-enable;
349 input-schmitt-disable;
350 };
351
352 sdmmc_cd_cfg {
353 pins = "pc_8";
354 function = "sdmmc";
355 bias-pull-down;
356 input-enable;
357 };
358
359 sdmmc_pow_cfg {
360 pins = "pc_9";
361 function = "sdmmc";
362 bias-pull-down;
363 };
364 };
365
Joachim Eastwoodf3593482015-06-20 15:25:13 +0200366 spifi_pins: spifi-pins {
367 spifi_clk_cfg {
368 pins = "p3_3";
369 function = "spifi";
370 slew-rate = <1>;
371 bias-disable;
372 input-enable;
373 input-schmitt-disable;
374 };
375
376 spifi_mosi_miso_sio2_3_cfg {
377 pins = "p3_7", "p3_6", "p3_5", "p3_4";
378 function = "spifi";
379 slew-rate = <0>;
380 bias-disable;
381 input-enable;
382 input-schmitt-disable;
383 };
384
385 spifi_cs_cfg {
386 pins = "p3_8";
387 function = "spifi";
388 bias-disable;
389 };
390 };
391
Joachim Eastwood09d03992015-05-30 19:31:25 +0200392 ssp0_pins: ssp0-pins {
393 ssp0_sck_miso_mosi {
394 pins = "pf_0", "pf_2", "pf_3";
395 function = "ssp0";
396 slew-rate = <1>;
397 bias-pull-down;
398 input-enable;
399 input-schmitt-disable;
400 };
401
402 ssp0_ssel {
403 pins = "pf_1";
404 function = "ssp0";
405 bias-pull-up;
406 };
407 };
408
Joachim Eastwoodc97a63c2015-04-02 05:51:20 +0200409 uart0_pins: uart0-pins {
410 uart0_rx_cfg {
411 pins = "pf_11";
412 function = "uart0";
413 input-schmitt-disable;
414 bias-disable;
415 input-enable;
416 };
417
418 uart0_tx_cfg {
419 pins = "pf_10";
420 function = "uart0";
421 bias-pull-down;
422 };
423 };
Joachim Eastwood930a43e2015-05-29 23:09:52 +0200424
425 uart3_pins: uart3-pins {
426 uart3_rx_cfg {
427 pins = "p2_4";
428 function = "uart3";
429 input-schmitt-disable;
430 bias-disable;
431 input-enable;
432 };
433
434 uart3_tx_cfg {
435 pins = "p9_3";
436 function = "uart3";
437 bias-pull-down;
438 };
439 };
Joachim Eastwoodfd0cb232015-07-31 00:24:22 +0200440
441 usb0_pins: usb0-pins {
442 usb0_pwr_enable {
443 pins = "p2_3";
444 function = "usb0";
445 };
446
447 usb0_pwr_fault {
448 pins = "p8_0";
449 function = "usb0";
450 bias-disable;
451 input-enable;
452 };
453 };
Joachim Eastwoodc97a63c2015-04-02 05:51:20 +0200454};
455
Joachim Eastwood3c6abb92015-07-31 00:24:23 +0200456&emc {
457 status = "okay";
458 pinctrl-names = "default";
459 pinctrl-0 = <&emc_pins>;
460
461 cs0 {
462 #address-cells = <2>;
463 #size-cells = <1>;
464 ranges;
465
466 mpmc,cs = <0>;
467 mpmc,memory-width = <16>;
468 mpmc,byte-lane-low;
469 mpmc,write-enable-delay = <0>;
470 mpmc,output-enable-delay = <0>;
471 mpmc,read-access-delay = <70>;
472 mpmc,page-mode-read-delay = <70>;
473
474 flash@0,0 {
475 compatible = "sst,sst39vf320", "cfi-flash";
476 reg = <0 0 0x400000>;
477 bank-width = <2>;
478 #address-cells = <1>;
479 #size-cells = <1>;
480
481 partition@0 {
482 label = "bootloader";
483 reg = <0x000000 0x040000>; /* 256 KiB */
484 };
485
486 partition@1 {
487 label = "kernel";
488 reg = <0x040000 0x2c0000>; /* 2.75 MiB */
489 };
490
491 partition@2 {
492 label = "rootfs";
493 reg = <0x300000 0x100000>; /* 1 MiB */
494 };
495 };
496 };
497
498 cs2 {
499 #address-cells = <2>;
500 #size-cells = <1>;
501 ranges;
502
503 mpmc,cs = <2>;
504 mpmc,memory-width = <16>;
505
506 mmio_leds: gpio@2,0 {
507 compatible = "ti,7416374";
508 reg = <2 0 0x2>;
509 gpio-controller;
510 #gpio-cells = <2>;
511 };
512
513 };
514};
515
Joachim Eastwood7de98f22015-04-02 05:56:57 +0200516&enet_tx_clk {
517 clock-frequency = <50000000>;
518};
519
520&mac {
521 status = "okay";
522 phy-mode = "rmii";
523 pinctrl-names = "default";
524 pinctrl-0 = <&enet_rmii_pins>;
525};
526
Joachim Eastwoodbfd0b492015-04-02 05:54:29 +0200527&mmcsd {
528 status = "okay";
529 bus-width = <4>;
530 vmmc-supply = <&vmmc>;
531 pinctrl-names = "default";
532 pinctrl-0 = <&sdmmc_pins>;
533};
534
Joachim Eastwoodf3593482015-06-20 15:25:13 +0200535&spifi {
536 status = "okay";
537 pinctrl-names = "default";
538 pinctrl-0 = <&spifi_pins>;
539
540 flash@0 {
541 compatible = "jedec,spi-nor";
542 spi-cpol;
543 spi-cpha;
544 spi-rx-bus-width = <4>;
545 #address-cells = <1>;
546 #size-cells = <1>;
547
548 partition@0 {
549 label = "data";
550 reg = <0 0x200000>;
551 };
552 };
553};
554
Joachim Eastwood09d03992015-05-30 19:31:25 +0200555&ssp0 {
556 status = "okay";
557 pinctrl-names = "default";
558 pinctrl-0 = <&ssp0_pins>;
559 num-cs = <1>;
560};
561
Joachim Eastwood56bd3772015-05-12 00:00:51 +0200562&uart0 {
563 status = "okay";
Joachim Eastwoodc97a63c2015-04-02 05:51:20 +0200564 pinctrl-names = "default";
565 pinctrl-0 = <&uart0_pins>;
Joachim Eastwood56bd3772015-05-12 00:00:51 +0200566};
Joachim Eastwood930a43e2015-05-29 23:09:52 +0200567
568&uart3 {
569 status = "okay";
570 pinctrl-names = "default";
571 pinctrl-0 = <&uart3_pins>;
572};
Joachim Eastwoodfd0cb232015-07-31 00:24:22 +0200573
574&usb0 {
575 status = "okay";
576 pinctrl-names = "default";
577 pinctrl-0 = <&usb0_pins>;
578};