0001 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
0002 /*
0003 * MYIR Tech MYD-LPC4357 Development Board with 800x480 7" TFT panel
0004 *
0005 * Copyright (C) 2016-2018 Vladimir Zapolskiy <vz@mleia.com>
0006 */
0007
0008 /dts-v1/;
0009
0010 #include "lpc18xx.dtsi"
0011 #include "lpc4357.dtsi"
0012
0013 #include <dt-bindings/gpio/gpio.h>
0014
0015 / {
0016 model = "MYIR Tech LPC4357 Development Board";
0017 compatible = "myir,myd-lpc4357", "nxp,lpc4357";
0018
0019 chosen {
0020 stdout-path = "serial3:115200n8";
0021 };
0022
0023 memory@28000000 {
0024 device_type = "memory";
0025 reg = <0x28000000 0x2000000>;
0026 };
0027
0028 leds {
0029 compatible = "gpio-leds";
0030 pinctrl-names = "default";
0031 pinctrl-0 = <&led_pins>;
0032
0033 led1 {
0034 gpios = <&gpio LPC_GPIO(6,15) GPIO_ACTIVE_LOW>;
0035 default-state = "off";
0036 };
0037
0038 led2 {
0039 gpios = <&gpio LPC_GPIO(6,16) GPIO_ACTIVE_LOW>;
0040 default-state = "off";
0041 };
0042
0043 led3 {
0044 gpios = <&gpio LPC_GPIO(6,17) GPIO_ACTIVE_LOW>;
0045 default-state = "off";
0046 };
0047
0048 led4 {
0049 gpios = <&gpio LPC_GPIO(6,10) GPIO_ACTIVE_LOW>;
0050 default-state = "off";
0051 };
0052
0053 led5 {
0054 gpios = <&gpio LPC_GPIO(7,14) GPIO_ACTIVE_LOW>;
0055 default-state = "off";
0056 };
0057
0058 led6 {
0059 gpios = <&gpio LPC_GPIO(6,14) GPIO_ACTIVE_LOW>;
0060 default-state = "off";
0061 };
0062 };
0063
0064 panel: panel {
0065 compatible = "innolux,at070tn92";
0066
0067 port {
0068 panel_input: endpoint {
0069 remote-endpoint = <&lcdc_output>;
0070 };
0071 };
0072 };
0073
0074 vcc: vcc_fixed {
0075 compatible = "regulator-fixed";
0076 regulator-name = "vcc-supply";
0077 regulator-min-microvolt = <3300000>;
0078 regulator-max-microvolt = <3300000>;
0079 };
0080
0081 vmmc: vmmc_fixed {
0082 compatible = "regulator-fixed";
0083 regulator-name = "vmmc-supply";
0084 regulator-min-microvolt = <3300000>;
0085 regulator-max-microvolt = <3300000>;
0086 };
0087 };
0088
0089 &pinctrl {
0090 can0_pins: can0-pins {
0091 can_rd_cfg {
0092 pins = "p3_1";
0093 function = "can0";
0094 input-enable;
0095 };
0096
0097 can_td_cfg {
0098 pins = "p3_2";
0099 function = "can0";
0100 };
0101 };
0102
0103 can1_pins: can1-pins {
0104 can_rd_cfg {
0105 pins = "pe_1";
0106 function = "can1";
0107 input-enable;
0108 };
0109
0110 can_td_cfg {
0111 pins = "pe_0";
0112 function = "can1";
0113 };
0114 };
0115
0116 emc_pins: emc-pins {
0117 emc_addr0_22_cfg {
0118 pins = "p2_9", "p2_10", "p2_11", "p2_12",
0119 "p2_13", "p1_0", "p1_1", "p1_2",
0120 "p2_8", "p2_7", "p2_6", "p2_2",
0121 "p2_1", "p2_0", "p6_8", "p6_7",
0122 "pd_16", "pd_15", "pe_0", "pe_1",
0123 "pe_2", "pe_3", "pe_4";
0124 function = "emc";
0125 slew-rate = <1>;
0126 bias-disable;
0127 };
0128
0129 emc_data0_15_cfg {
0130 pins = "p1_7", "p1_8", "p1_9", "p1_10",
0131 "p1_11", "p1_12", "p1_13", "p1_14",
0132 "p5_4", "p5_5", "p5_6", "p5_7",
0133 "p5_0", "p5_1", "p5_2", "p5_3";
0134 function = "emc";
0135 input-enable;
0136 input-schmitt-disable;
0137 slew-rate = <1>;
0138 bias-disable;
0139 };
0140
0141 emc_we_oe_cfg {
0142 pins = "p1_6", "p1_3";
0143 function = "emc";
0144 slew-rate = <1>;
0145 bias-disable;
0146 };
0147
0148 emc_cs0_cfg {
0149 pins = "p1_5";
0150 function = "emc";
0151 slew-rate = <1>;
0152 bias-disable;
0153 };
0154
0155 emc_sdram_dqm0_1_cfg {
0156 pins = "p6_12", "p6_10";
0157 function = "emc";
0158 slew-rate = <1>;
0159 bias-disable;
0160 };
0161
0162 emc_sdram_ras_cas_cfg {
0163 pins = "p6_5", "p6_4";
0164 function = "emc";
0165 slew-rate = <1>;
0166 bias-disable;
0167 };
0168
0169 emc_sdram_dycs0_cfg {
0170 pins = "p6_9";
0171 function = "emc";
0172 slew-rate = <1>;
0173 bias-disable;
0174 };
0175
0176 emc_sdram_cke_cfg {
0177 pins = "p6_11";
0178 function = "emc";
0179 slew-rate = <1>;
0180 bias-disable;
0181 };
0182
0183 emc_sdram_clock_cfg {
0184 pins = "clk0";
0185 function = "emc";
0186 input-enable;
0187 input-schmitt-disable;
0188 slew-rate = <1>;
0189 bias-disable;
0190 };
0191 };
0192
0193 enet_rmii_pins: enet-rmii-pins {
0194 enet_rmii_rxd_cfg {
0195 pins = "p1_15", "p0_0";
0196 function = "enet";
0197 input-enable;
0198 input-schmitt-disable;
0199 slew-rate = <1>;
0200 bias-disable;
0201 };
0202
0203 enet_rmii_txd_cfg {
0204 pins = "p1_18", "p1_20";
0205 function = "enet";
0206 slew-rate = <1>;
0207 bias-disable;
0208 };
0209
0210 enet_rmii_rx_dv_cfg {
0211 pins = "p1_16";
0212 function = "enet";
0213 input-enable;
0214 input-schmitt-disable;
0215 bias-disable;
0216 };
0217
0218 enet_mdio_cfg {
0219 pins = "p1_17";
0220 function = "enet";
0221 input-enable;
0222 input-schmitt-disable;
0223 bias-disable;
0224 };
0225
0226 enet_mdc_cfg {
0227 pins = "pc_1";
0228 function = "enet";
0229 slew-rate = <1>;
0230 bias-disable;
0231 };
0232
0233 enet_rmii_tx_en_cfg {
0234 pins = "p0_1";
0235 function = "enet";
0236 bias-disable;
0237 };
0238
0239 enet_ref_clk_cfg {
0240 pins = "p1_19";
0241 function = "enet";
0242 slew-rate = <1>;
0243 input-enable;
0244 input-schmitt-disable;
0245 bias-disable;
0246 };
0247 };
0248
0249 i2c0_pins: i2c0-pins {
0250 i2c0_pins_cfg {
0251 pins = "i2c0_scl", "i2c0_sda";
0252 function = "i2c0";
0253 input-enable;
0254 };
0255 };
0256
0257 i2c1_pins: i2c1-pins {
0258 i2c1_pins_cfg {
0259 pins = "pe_15", "pe_13";
0260 function = "i2c1";
0261 input-enable;
0262 };
0263 };
0264
0265 lcd_pins: lcd-pins {
0266 lcd_vd0_23_cfg {
0267 pins = "p4_1", "p4_4", "p4_3", "p4_2",
0268 "p8_7", "p8_6", "p8_5", "p8_4",
0269 "p7_5", "p4_8", "p4_10", "p4_9",
0270 "p8_3", "pb_6", "pb_5", "pb_4",
0271 "p7_4", "p7_3", "p7_2", "p7_1",
0272 "pb_3", "pb_2", "pb_1", "pb_0";
0273 function = "lcd";
0274 };
0275
0276 lcd_vsync_en_dclk_lp_pwr_cfg {
0277 pins = "p4_5", "p4_6", "p4_7", "p7_6", "p7_7";
0278 function = "lcd";
0279 };
0280 };
0281
0282 led_pins: led-pins {
0283 led_1_6_cfg {
0284 pins = "pd_1", "pd_2", "pd_3", "pc_11", "pe_14", "pd_0";
0285 function = "gpio";
0286 bias-pull-down;
0287 };
0288 };
0289
0290 sdmmc_pins: sdmmc-pins {
0291 sdmmc_clk_cfg {
0292 pins = "pc_0";
0293 function = "sdmmc";
0294 slew-rate = <1>;
0295 bias-pull-down;
0296 };
0297
0298 sdmmc_cmd_dat0_3_cfg {
0299 pins = "pc_4", "pc_5", "pc_6", "pc_7", "pc_10";
0300 function = "sdmmc";
0301 input-enable;
0302 input-schmitt-disable;
0303 slew-rate = <1>;
0304 bias-disable;
0305 };
0306
0307 sdmmc_cd_cfg {
0308 pins = "pc_8";
0309 function = "sdmmc";
0310 input-enable;
0311 bias-pull-down;
0312 };
0313 };
0314
0315 spifi_pins: spifi-pins {
0316 spifi_sck_cfg {
0317 pins = "p3_3";
0318 function = "spifi";
0319 input-enable;
0320 input-schmitt-disable;
0321 slew-rate = <1>;
0322 bias-disable;
0323 };
0324
0325 spifi_mosi_miso_sio2_sio3_cfg {
0326 pins = "p3_7", "p3_6", "p3_5", "p3_4";
0327 function = "spifi";
0328 input-enable;
0329 input-schmitt-disable;
0330 slew-rate = <1>;
0331 bias-disable;
0332 };
0333
0334 spifi_cs_cfg {
0335 pins = "p3_8";
0336 function = "spifi";
0337 bias-disable;
0338 };
0339 };
0340
0341 ssp1_pins: ssp1-pins {
0342 ssp1_sck_cfg {
0343 pins = "pf_4";
0344 function = "ssp1";
0345 slew-rate = <1>;
0346 bias-pull-down;
0347 };
0348
0349 ssp1_miso_cfg {
0350 pins = "pf_6";
0351 function = "ssp1";
0352 input-enable;
0353 input-schmitt-disable;
0354 slew-rate = <1>;
0355 bias-pull-down;
0356 };
0357
0358 ssp1_mosi_cfg {
0359 pins = "pf_7";
0360 function = "ssp1";
0361 slew-rate = <1>;
0362 bias-pull-down;
0363 };
0364
0365 ssp1_ssel_cfg {
0366 pins = "pf_5";
0367 function = "gpio";
0368 bias-disable;
0369 };
0370 };
0371
0372 uart0_pins: uart0-pins {
0373 uart0_rxd_cfg {
0374 pins = "pf_11";
0375 function = "uart0";
0376 input-enable;
0377 input-schmitt-disable;
0378 bias-disable;
0379 };
0380
0381 uart0_clk_dir_txd_cfg {
0382 pins = "pf_8", "pf_9", "pf_10";
0383 function = "uart0";
0384 bias-pull-down;
0385 };
0386 };
0387
0388 uart1_pins: uart1-pins {
0389 uart1_rxd_cfg {
0390 pins = "pc_14";
0391 function = "uart1";
0392 bias-disable;
0393 input-enable;
0394 input-schmitt-disable;
0395 };
0396
0397 uart1_dtr_txd_cfg {
0398 pins = "pc_12", "pc_13";
0399 function = "uart1";
0400 bias-pull-down;
0401 };
0402 };
0403
0404 uart2_pins: uart2-pins {
0405 uart2_rxd_cfg {
0406 pins = "pa_2";
0407 function = "uart2";
0408 bias-disable;
0409 input-enable;
0410 input-schmitt-disable;
0411 };
0412
0413 uart2_txd_cfg {
0414 pins = "pa_1";
0415 function = "uart2";
0416 bias-pull-down;
0417 };
0418 };
0419
0420 uart3_pins: uart3-pins {
0421 uart3_rx_cfg {
0422 pins = "p2_4";
0423 function = "uart3";
0424 bias-disable;
0425 input-enable;
0426 input-schmitt-disable;
0427 };
0428
0429 uart3_tx_cfg {
0430 pins = "p2_3";
0431 function = "uart3";
0432 bias-pull-down;
0433 };
0434 };
0435
0436 usb0_pins: usb0-pins {
0437 usb0_pwr_enable_cfg {
0438 pins = "p6_3";
0439 function = "usb0";
0440 };
0441
0442 usb0_pwr_fault_cfg {
0443 pins = "p8_0";
0444 function = "usb0";
0445 bias-disable;
0446 input-enable;
0447 };
0448 };
0449 };
0450
0451 &adc1 {
0452 status = "okay";
0453 vref-supply = <&vcc>;
0454 };
0455
0456 &can0 {
0457 status = "okay";
0458 pinctrl-names = "default";
0459 pinctrl-0 = <&can0_pins>;
0460 };
0461
0462 /* Pin conflict with EMC, muxed by JP5 and JP6 */
0463 &can1 {
0464 status = "disabled";
0465 pinctrl-names = "default";
0466 pinctrl-0 = <&can1_pins>;
0467 };
0468
0469 &emc {
0470 status = "okay";
0471 pinctrl-names = "default";
0472 pinctrl-0 = <&emc_pins>;
0473
0474 cs0 {
0475 #address-cells = <2>;
0476 #size-cells = <1>;
0477 ranges;
0478
0479 mpmc,cs = <0>;
0480 mpmc,memory-width = <16>;
0481 mpmc,byte-lane-low;
0482 mpmc,write-enable-delay = <0>;
0483 mpmc,output-enable-delay = <0>;
0484 mpmc,read-access-delay = <70>;
0485 mpmc,page-mode-read-delay = <70>;
0486
0487 /* SST/Microchip SST39VF1601 */
0488 flash@0,0 {
0489 compatible = "cfi-flash";
0490 reg = <0 0 0x400000>;
0491 bank-width = <2>;
0492 };
0493 };
0494 };
0495
0496 &enet_tx_clk {
0497 clock-frequency = <50000000>;
0498 };
0499
0500 &i2c0 {
0501 status = "okay";
0502 pinctrl-names = "default";
0503 pinctrl-0 = <&i2c0_pins>;
0504 clock-frequency = <400000>;
0505 };
0506
0507 &i2c1 {
0508 status = "okay";
0509 pinctrl-names = "default";
0510 pinctrl-0 = <&i2c1_pins>;
0511 clock-frequency = <400000>;
0512
0513 sensor@49 {
0514 compatible = "lm75";
0515 reg = <0x49>;
0516 };
0517
0518 eeprom@50 {
0519 compatible = "atmel,24c512";
0520 reg = <0x50>;
0521 };
0522 };
0523
0524 &lcdc {
0525 status = "okay";
0526 pinctrl-names = "default";
0527 pinctrl-0 = <&lcd_pins>;
0528
0529 max-memory-bandwidth = <92240000>;
0530
0531 port {
0532 lcdc_output: endpoint {
0533 remote-endpoint = <&panel_input>;
0534 arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
0535 };
0536 };
0537 };
0538
0539 &mac {
0540 status = "okay";
0541 phy-mode = "rmii";
0542 pinctrl-names = "default";
0543 pinctrl-0 = <&enet_rmii_pins>;
0544 phy-handle = <&phy1>;
0545
0546 mdio0 {
0547 #address-cells = <1>;
0548 #size-cells = <0>;
0549 compatible = "snps,dwmac-mdio";
0550
0551 phy1: ethernet-phy@1 {
0552 reg = <1>;
0553 };
0554 };
0555 };
0556
0557 &mmcsd {
0558 status = "okay";
0559 pinctrl-names = "default";
0560 pinctrl-0 = <&sdmmc_pins>;
0561 bus-width = <4>;
0562 vmmc-supply = <&vmmc>;
0563 };
0564
0565 /* Pin conflict with SSP0, the latter is routed to J17 pin header */
0566 &spifi {
0567 status = "okay";
0568 pinctrl-names = "default";
0569 pinctrl-0 = <&spifi_pins>;
0570
0571 /* Atmel AT25DF321A */
0572 flash {
0573 compatible = "jedec,spi-nor";
0574 spi-max-frequency = <51000000>;
0575 spi-cpol;
0576 spi-cpha;
0577 };
0578 };
0579
0580 &ssp1 {
0581 status = "okay";
0582 pinctrl-names = "default";
0583 pinctrl-0 = <&ssp1_pins>;
0584 num-cs = <1>;
0585 cs-gpios = <&gpio LPC_GPIO(7,19) GPIO_ACTIVE_LOW>;
0586 };
0587
0588 /* Routed to J17 pin header */
0589 &uart0 {
0590 status = "okay";
0591 pinctrl-names = "default";
0592 pinctrl-0 = <&uart0_pins>;
0593 };
0594
0595 /* RS485 */
0596 &uart1 {
0597 status = "okay";
0598 pinctrl-names = "default";
0599 pinctrl-0 = <&uart1_pins>;
0600 };
0601
0602 /* Routed to J17 pin header */
0603 &uart2 {
0604 status = "okay";
0605 pinctrl-names = "default";
0606 pinctrl-0 = <&uart2_pins>;
0607 };
0608
0609 &uart3 {
0610 status = "okay";
0611 pinctrl-names = "default";
0612 pinctrl-0 = <&uart3_pins>;
0613 };
0614
0615 &usb0 {
0616 status = "okay";
0617 pinctrl-names = "default";
0618 pinctrl-0 = <&usb0_pins>;
0619 };