0001 /*
0002 * Embedded Artist LPC4357 Developer's Kit
0003 *
0004 * Copyright 2015 Joachim Eastwood <manabian@gmail.com>
0005 *
0006 * This code is released using a dual license strategy: BSD/GPL
0007 * You can choose the licence that better fits your requirements.
0008 *
0009 * Released under the terms of 3-clause BSD License
0010 * Released under the terms of GNU General Public License Version 2.0
0011 *
0012 */
0013 /dts-v1/;
0014
0015 #include "lpc18xx.dtsi"
0016 #include "lpc4357.dtsi"
0017
0018 #include "dt-bindings/input/input.h"
0019 #include "dt-bindings/gpio/gpio.h"
0020
0021 / {
0022 model = "Embedded Artists' LPC4357 Developer's Kit";
0023 compatible = "ea,lpc4357-developers-kit", "nxp,lpc4357", "nxp,lpc4350";
0024
0025 aliases {
0026 serial0 = &uart0;
0027 serial1 = &uart1;
0028 serial2 = &uart2;
0029 serial3 = &uart3;
0030 };
0031
0032 chosen {
0033 stdout-path = &uart0;
0034 };
0035
0036 memory@28000000 {
0037 device_type = "memory";
0038 reg = <0x28000000 0x2000000>; /* 32 MB */
0039 };
0040
0041 vcc: vcc_fixed {
0042 compatible = "regulator-fixed";
0043 regulator-name = "3v3-supply";
0044 regulator-min-microvolt = <3300000>;
0045 regulator-max-microvolt = <3300000>;
0046 };
0047
0048 /* vmmc is controlled by sdmmc host internally */
0049 vmmc: vmmc_fixed {
0050 compatible = "regulator-fixed";
0051 regulator-name = "vmmc-supply";
0052 regulator-min-microvolt = <3300000>;
0053 regulator-max-microvolt = <3300000>;
0054 };
0055
0056 gpio_joystick {
0057 compatible = "gpio-keys-polled";
0058 pinctrl-names = "default";
0059 pinctrl-0 = <&gpio_joystick_pins>;
0060 poll-interval = <100>;
0061 autorepeat;
0062
0063 button0 {
0064 label = "joy_enter";
0065 linux,code = <KEY_ENTER>;
0066 gpios = <&gpio LPC_GPIO(4,8) GPIO_ACTIVE_LOW>;
0067 };
0068
0069 button1 {
0070 label = "joy_left";
0071 linux,code = <KEY_LEFT>;
0072 gpios = <&gpio LPC_GPIO(4,9) GPIO_ACTIVE_LOW>;
0073 };
0074
0075 button2 {
0076 label = "joy_up";
0077 linux,code = <KEY_UP>;
0078 gpios = <&gpio LPC_GPIO(4,10) GPIO_ACTIVE_LOW>;
0079 };
0080
0081 button3 {
0082 label = "joy_right";
0083 linux,code = <KEY_RIGHT>;
0084 gpios = <&gpio LPC_GPIO(4,12) GPIO_ACTIVE_LOW>;
0085 };
0086
0087 button4 {
0088 label = "joy_down";
0089 linux,code = <KEY_DOWN>;
0090 gpios = <&gpio LPC_GPIO(4,13) GPIO_ACTIVE_LOW>;
0091 };
0092 };
0093
0094 leds_mmio {
0095 compatible = "gpio-leds";
0096
0097 led1 {
0098 gpios = <&mmio_leds 15 GPIO_ACTIVE_HIGH>;
0099 linux,default-trigger = "heartbeat";
0100 };
0101
0102 led2 {
0103 gpios = <&mmio_leds 14 GPIO_ACTIVE_HIGH>;
0104 };
0105
0106 led3 {
0107 gpios = <&mmio_leds 13 GPIO_ACTIVE_HIGH>;
0108 };
0109
0110 led4 {
0111 gpios = <&mmio_leds 12 GPIO_ACTIVE_HIGH>;
0112 };
0113
0114 led5 {
0115 gpios = <&mmio_leds 11 GPIO_ACTIVE_HIGH>;
0116 };
0117
0118 led6 {
0119 gpios = <&mmio_leds 10 GPIO_ACTIVE_HIGH>;
0120 };
0121
0122 led7 {
0123 gpios = <&mmio_leds 9 GPIO_ACTIVE_HIGH>;
0124 };
0125
0126 led8 {
0127 gpios = <&mmio_leds 8 GPIO_ACTIVE_HIGH>;
0128 };
0129
0130 led9 {
0131 gpios = <&mmio_leds 7 GPIO_ACTIVE_HIGH>;
0132 };
0133
0134 led10 {
0135 gpios = <&mmio_leds 6 GPIO_ACTIVE_HIGH>;
0136 };
0137
0138 led11 {
0139 gpios = <&mmio_leds 5 GPIO_ACTIVE_HIGH>;
0140 };
0141
0142 led12 {
0143 gpios = <&mmio_leds 4 GPIO_ACTIVE_HIGH>;
0144 };
0145
0146 led13 {
0147 gpios = <&mmio_leds 3 GPIO_ACTIVE_HIGH>;
0148 };
0149
0150 led14 {
0151 gpios = <&mmio_leds 2 GPIO_ACTIVE_HIGH>;
0152 };
0153
0154 led15 {
0155 gpios = <&mmio_leds 1 GPIO_ACTIVE_HIGH>;
0156 };
0157
0158 led16 {
0159 gpios = <&mmio_leds 0 GPIO_ACTIVE_HIGH>;
0160 };
0161 };
0162 };
0163
0164 &pinctrl {
0165 emc_pins: emc-pins {
0166 emc_addr0_23_cfg {
0167 pins = "p2_9", "p2_10", "p2_11", "p2_12",
0168 "p2_13", "p1_0", "p1_1", "p1_2",
0169 "p2_8", "p2_7", "p2_6", "p2_2",
0170 "p2_1", "p2_0", "p6_8", "p6_7",
0171 "pd_16", "pd_15", "pe_0", "pe_1",
0172 "pe_2", "pe_3", "pe_4", "pa_4";
0173 function = "emc";
0174 slew-rate = <1>;
0175 bias-disable;
0176 input-enable;
0177 input-schmitt-disable;
0178 };
0179
0180 emc_data0_31_cfg {
0181 pins = "p1_7", "p1_8", "p1_9", "p1_10",
0182 "p1_11", "p1_12", "p1_13", "p1_14",
0183 "p5_4", "p5_5", "p5_6", "p5_7",
0184 "p5_0", "p5_1", "p5_2", "p5_3",
0185 "pd_2", "pd_3", "pd_4", "pd_5",
0186 "pd_6", "pd_7", "pd_8", "pd_9",
0187 "pe_5", "pe_6", "pe_7", "pe_8",
0188 "pe_9", "pe_10", "pe_11", "pe_12";
0189 function = "emc";
0190 slew-rate = <1>;
0191 bias-disable;
0192 input-enable;
0193 input-schmitt-disable;
0194 };
0195
0196 emc_we_oe_cfg {
0197 pins = "p1_6", "p1_3";
0198 function = "emc";
0199 slew-rate = <1>;
0200 bias-disable;
0201 input-enable;
0202 input-schmitt-disable;
0203 };
0204
0205 emc_bls0_3_cfg {
0206 pins = "p1_4", "p6_6", "pd_13", "pd_10";
0207 function = "emc";
0208 slew-rate = <1>;
0209 bias-disable;
0210 input-enable;
0211 input-schmitt-disable;
0212 };
0213
0214 emc_cs0_3_cfg {
0215 pins = "p1_5", "p6_3", "pd_12", "pd_11";
0216 function = "emc";
0217 slew-rate = <1>;
0218 bias-disable;
0219 input-enable;
0220 input-schmitt-disable;
0221 };
0222
0223 emc_sdram_dqm0_3_cfg {
0224 pins = "p6_12", "p6_10", "pd_0", "pe_13";
0225 function = "emc";
0226 slew-rate = <1>;
0227 bias-disable;
0228 input-enable;
0229 input-schmitt-disable;
0230 };
0231
0232 emc_sdram_ras_cas_cfg {
0233 pins = "p6_5", "p6_4";
0234 function = "emc";
0235 slew-rate = <1>;
0236 bias-disable;
0237 input-enable;
0238 input-schmitt-disable;
0239 };
0240
0241 emc_sdram_dycs0_cfg {
0242 pins = "p6_9";
0243 function = "emc";
0244 slew-rate = <1>;
0245 bias-disable;
0246 input-enable;
0247 input-schmitt-disable;
0248 };
0249
0250 emc_sdram_cke_cfg {
0251 pins = "p6_11";
0252 function = "emc";
0253 slew-rate = <1>;
0254 bias-disable;
0255 input-enable;
0256 input-schmitt-disable;
0257 };
0258
0259 emc_sdram_clock_cfg {
0260 pins = "clk0", "clk1", "clk2", "clk3";
0261 function = "emc";
0262 slew-rate = <1>;
0263 bias-disable;
0264 input-enable;
0265 input-schmitt-disable;
0266 };
0267 };
0268
0269 enet_rmii_pins: enet-rmii-pins {
0270 enet_rmii_rxd_cfg {
0271 pins = "p1_15", "p0_0";
0272 function = "enet";
0273 slew-rate = <1>;
0274 bias-disable;
0275 input-enable;
0276 input-schmitt-disable;
0277 };
0278
0279 enet_rmii_txd_cfg {
0280 pins = "p1_18", "p1_20";
0281 function = "enet";
0282 slew-rate = <1>;
0283 bias-disable;
0284 input-enable;
0285 input-schmitt-disable;
0286 };
0287
0288 enet_rmii_rx_dv_cfg {
0289 pins = "p1_16";
0290 function = "enet";
0291 bias-disable;
0292 input-enable;
0293 input-schmitt-disable;
0294 };
0295
0296 enet_rmii_tx_en_cfg {
0297 pins = "p0_1";
0298 function = "enet";
0299 bias-disable;
0300 input-enable;
0301 input-schmitt-disable;
0302 };
0303
0304 enet_ref_clk_cfg {
0305 pins = "p1_19";
0306 function = "enet";
0307 slew-rate = <1>;
0308 bias-disable;
0309 input-enable;
0310 input-schmitt-disable;
0311 };
0312
0313 enet_mdio_cfg {
0314 pins = "p1_17";
0315 function = "enet";
0316 bias-disable;
0317 input-enable;
0318 input-schmitt-disable;
0319 };
0320
0321 enet_mdc_cfg {
0322 pins = "pc_1";
0323 function = "enet";
0324 slew-rate = <1>;
0325 bias-disable;
0326 input-enable;
0327 input-schmitt-disable;
0328 };
0329 };
0330
0331 gpio_joystick_pins: gpio-joystick-pins {
0332 gpio_joystick_cfg {
0333 pins = "p9_0", "p9_1", "pa_1", "pa_2", "pa_3";
0334 function = "gpio";
0335 input-enable;
0336 bias-disable;
0337 };
0338 };
0339
0340 i2c0_pins: i2c0-pins {
0341 i2c0_pins_cfg {
0342 pins = "i2c0_scl", "i2c0_sda";
0343 function = "i2c0";
0344 input-enable;
0345 };
0346 };
0347
0348 sdmmc_pins: sdmmc-pins {
0349 sdmmc_clk_cfg {
0350 pins = "pc_0";
0351 function = "sdmmc";
0352 slew-rate = <1>;
0353 bias-pull-down;
0354 };
0355
0356 sdmmc_cmd_dat0_3_cfg {
0357 pins = "pc_4", "pc_5", "pc_6", "pc_7", "pc_10";
0358 function = "sdmmc";
0359 slew-rate = <1>;
0360 bias-disable;
0361 input-enable;
0362 input-schmitt-disable;
0363 };
0364
0365 sdmmc_cd_cfg {
0366 pins = "pc_8";
0367 function = "sdmmc";
0368 bias-pull-down;
0369 input-enable;
0370 };
0371
0372 sdmmc_pow_cfg {
0373 pins = "pc_9";
0374 function = "sdmmc";
0375 bias-pull-down;
0376 };
0377 };
0378
0379 spifi_pins: spifi-pins {
0380 spifi_clk_cfg {
0381 pins = "p3_3";
0382 function = "spifi";
0383 slew-rate = <1>;
0384 bias-disable;
0385 input-enable;
0386 input-schmitt-disable;
0387 };
0388
0389 spifi_mosi_miso_sio2_3_cfg {
0390 pins = "p3_7", "p3_6", "p3_5", "p3_4";
0391 function = "spifi";
0392 slew-rate = <0>;
0393 bias-disable;
0394 input-enable;
0395 input-schmitt-disable;
0396 };
0397
0398 spifi_cs_cfg {
0399 pins = "p3_8";
0400 function = "spifi";
0401 bias-disable;
0402 };
0403 };
0404
0405 ssp0_pins: ssp0-pins {
0406 ssp0_sck_miso_mosi {
0407 pins = "pf_0", "pf_2", "pf_3";
0408 function = "ssp0";
0409 slew-rate = <1>;
0410 bias-pull-down;
0411 input-enable;
0412 input-schmitt-disable;
0413 };
0414
0415 ssp0_ssel {
0416 pins = "pf_1";
0417 function = "ssp0";
0418 bias-pull-up;
0419 };
0420 };
0421
0422 uart0_pins: uart0-pins {
0423 uart0_rx_cfg {
0424 pins = "pf_11";
0425 function = "uart0";
0426 input-schmitt-disable;
0427 bias-disable;
0428 input-enable;
0429 };
0430
0431 uart0_tx_cfg {
0432 pins = "pf_10";
0433 function = "uart0";
0434 bias-pull-down;
0435 };
0436 };
0437
0438 uart3_pins: uart3-pins {
0439 uart3_rx_cfg {
0440 pins = "p2_4";
0441 function = "uart3";
0442 input-schmitt-disable;
0443 bias-disable;
0444 input-enable;
0445 };
0446
0447 uart3_tx_cfg {
0448 pins = "p9_3";
0449 function = "uart3";
0450 bias-pull-down;
0451 };
0452 };
0453
0454 usb0_pins: usb0-pins {
0455 usb0_pwr_enable {
0456 pins = "p2_3";
0457 function = "usb0";
0458 };
0459
0460 usb0_pwr_fault {
0461 pins = "p8_0";
0462 function = "usb0";
0463 bias-disable;
0464 input-enable;
0465 };
0466 };
0467 };
0468
0469 &adc0 {
0470 status = "okay";
0471 vref-supply = <&vcc>;
0472 };
0473
0474 &i2c0 {
0475 status = "okay";
0476 pinctrl-names = "default";
0477 pinctrl-0 = <&i2c0_pins>;
0478 clock-frequency = <400000>;
0479
0480 mma7455@1d {
0481 compatible = "fsl,mma7455";
0482 reg = <0x1d>;
0483 };
0484
0485 lm75@48 {
0486 compatible = "nxp,lm75";
0487 reg = <0x48>;
0488 };
0489
0490 eeprom@57 {
0491 compatible = "microchip,24c64", "atmel,24c64";
0492 reg = <0x57>;
0493 };
0494 };
0495
0496 &dac {
0497 status = "okay";
0498 vref-supply = <&vcc>;
0499 };
0500
0501 &emc {
0502 status = "okay";
0503 pinctrl-names = "default";
0504 pinctrl-0 = <&emc_pins>;
0505
0506 cs0 {
0507 #address-cells = <2>;
0508 #size-cells = <1>;
0509 ranges;
0510
0511 mpmc,cs = <0>;
0512 mpmc,memory-width = <16>;
0513 mpmc,byte-lane-low;
0514 mpmc,write-enable-delay = <0>;
0515 mpmc,output-enable-delay = <0>;
0516 mpmc,read-access-delay = <70>;
0517 mpmc,page-mode-read-delay = <70>;
0518
0519 flash@0,0 {
0520 compatible = "sst,sst39vf320", "cfi-flash";
0521 reg = <0 0 0x400000>;
0522 bank-width = <2>;
0523 #address-cells = <1>;
0524 #size-cells = <1>;
0525
0526 partition@0 {
0527 label = "bootloader";
0528 reg = <0x000000 0x040000>; /* 256 KiB */
0529 };
0530
0531 partition@1 {
0532 label = "kernel";
0533 reg = <0x040000 0x2c0000>; /* 2.75 MiB */
0534 };
0535
0536 partition@2 {
0537 label = "rootfs";
0538 reg = <0x300000 0x100000>; /* 1 MiB */
0539 };
0540 };
0541 };
0542
0543 cs2 {
0544 #address-cells = <2>;
0545 #size-cells = <1>;
0546 ranges;
0547
0548 mpmc,cs = <2>;
0549 mpmc,memory-width = <16>;
0550
0551 mmio_leds: gpio@2,0 {
0552 compatible = "ti,7416374";
0553 reg = <2 0 0x2>;
0554 gpio-controller;
0555 #gpio-cells = <2>;
0556 };
0557
0558 };
0559 };
0560
0561 &enet_tx_clk {
0562 clock-frequency = <50000000>;
0563 };
0564
0565 &mac {
0566 status = "okay";
0567 phy-mode = "rmii";
0568 pinctrl-names = "default";
0569 pinctrl-0 = <&enet_rmii_pins>;
0570 };
0571
0572 &mmcsd {
0573 status = "okay";
0574 bus-width = <4>;
0575 vmmc-supply = <&vmmc>;
0576 pinctrl-names = "default";
0577 pinctrl-0 = <&sdmmc_pins>;
0578 };
0579
0580 &spifi {
0581 status = "okay";
0582 pinctrl-names = "default";
0583 pinctrl-0 = <&spifi_pins>;
0584
0585 flash {
0586 compatible = "jedec,spi-nor";
0587 spi-cpol;
0588 spi-cpha;
0589 spi-rx-bus-width = <4>;
0590 #address-cells = <1>;
0591 #size-cells = <1>;
0592
0593 partition@0 {
0594 label = "data";
0595 reg = <0 0x200000>;
0596 };
0597 };
0598 };
0599
0600 &ssp0 {
0601 status = "okay";
0602 pinctrl-names = "default";
0603 pinctrl-0 = <&ssp0_pins>;
0604 num-cs = <1>;
0605 };
0606
0607 &uart0 {
0608 status = "okay";
0609 pinctrl-names = "default";
0610 pinctrl-0 = <&uart0_pins>;
0611 };
0612
0613 &uart3 {
0614 status = "okay";
0615 pinctrl-names = "default";
0616 pinctrl-0 = <&uart3_pins>;
0617 };
0618
0619 &usb0 {
0620 status = "okay";
0621 pinctrl-names = "default";
0622 pinctrl-0 = <&usb0_pins>;
0623 };