MLK-20440 dts: ecspi: Add ecspi and its slave dts files for imx6ul
authorClark Wang <xiaoning.wang@nxp.com>
Wed, 21 Nov 2018 11:13:47 +0000 (19:13 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
For ECSPI test, add these two dts files.
imx6ul-14x14-evk-ecspi.dts: enable ecspi4 function. Because ethernet2
uses the same pins with ecspi4, so disable fec1/fec2.
imx6ul-14x14-evk-ecspi-slave.dts: Add "spi-slave" attribute to enable
slave mode.

Wire Connection:
J1704:
3 - SCS
4 - MOSI
5 - MISO
6 - SCK
7 - GND

Modify "Makefile" to build these two dts files.

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/imx6ul-14x14-evk-ecspi-slave.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6ul-14x14-evk-ecspi.dts [new file with mode: 0644]

index 469a3db..1b953cb 100644 (file)
@@ -614,6 +614,8 @@ dtb-$(CONFIG_SOC_IMX6UL) += \
        imx6ul-14x14-evk-btwifi-oob.dtb \
        imx6ul-14x14-evk-csi.dtb \
        imx6ul-14x14-evk-emmc.dtb \
+       imx6ul-14x14-evk-ecspi.dtb \
+       imx6ul-14x14-evk-ecspi-slave.dtb \
        imx6ul-14x14-evk-gpmi-weim.dtb \
        imx6ul-14x14-evk-usb-certi.dtb \
        imx6ul-geam.dtb \
diff --git a/arch/arm/boot/dts/imx6ul-14x14-evk-ecspi-slave.dts b/arch/arm/boot/dts/imx6ul-14x14-evk-ecspi-slave.dts
new file mode 100644 (file)
index 0000000..9c91f25
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2018 NXP
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/*
+ * DTS file for ECSPI Slave Certification at i.mx6ul 14x14 evk board.
+ * NOTE: Because Ethernet2 use the same pins with ecspi4, so disable
+ *       fec1/fec2 for ECSPI4 test.
+ */
+
+#include "imx6ul-14x14-evk-ecspi.dts"
+
+/delete-node/&spidev0;
+
+&ecspi4 {
+       spi-slave;
+};
diff --git a/arch/arm/boot/dts/imx6ul-14x14-evk-ecspi.dts b/arch/arm/boot/dts/imx6ul-14x14-evk-ecspi.dts
new file mode 100644 (file)
index 0000000..1467002
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2018 NXP
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/*
+ * DTS file for ECSPI Certification at i.mx6ul 14x14 evk board.
+ * NOTE: Because Ethernet2 use the same pins with ecspi4, so disable
+ *       fec1/fec2 for ECSPI4 test.
+ */
+
+#include "imx6ul-14x14-evk.dts"
+
+&iomuxc {
+       pinctrl_ecspi4: ecspi4grp {
+               fsl,pins = <
+                       MX6UL_PAD_ENET2_TX_DATA1__ECSPI4_SCLK   0x70a1
+                       MX6UL_PAD_ENET2_TX_EN__ECSPI4_MOSI      0x70a1
+                       MX6UL_PAD_ENET2_TX_CLK__ECSPI4_MISO     0x70a1
+                       MX6UL_PAD_ENET2_RX_ER__ECSPI4_SS0       0x70a1
+               >;
+       };
+};
+
+&ecspi4 {
+       #address-cells = <1>;
+       #size-cells = <0>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_ecspi4>;
+       status = "okay";
+
+       spidev0: spi@0 {
+               reg = <0>;
+               compatible = "rohm,dh2228fv";
+               spi-max-frequency = <20000000>;
+       };
+};
+
+&fec1 {
+       status = "disabled";
+};
+
+&fec2 {
+       status = "disabled";
+};