]> git.sur5r.net Git - u-boot/commitdiff
imx: mx6ull-14x14-evk: enable DM QSPI driver
authorPeng Fan <peng.fan@nxp.com>
Wed, 3 Jan 2018 00:52:03 +0000 (08:52 +0800)
committerStefano Babic <sbabic@denx.de>
Fri, 12 Jan 2018 13:28:04 +0000 (14:28 +0100)
To support QSPI DM driver
 - Add spi0 alias for qspi node. Which is used for bus number 0.
 - Modify the n25q256a@0 compatible property to "spi-flash".
 - Modify spi4 (gpio_spi) node to spi5
 - Define DM SPI/QSPI related config to enable QSPI

Signed-off-by: Peng Fan <peng.fan@nxp.com>
arch/arm/dts/imx6ull-14x14-evk.dts
arch/arm/dts/imx6ull.dtsi
configs/mx6ull_14x14_evk_defconfig
configs/mx6ull_14x14_evk_plugin_defconfig
include/configs/mx6ullevk.h

index 375bd4ea3190cbf5c06df463ecb8fc98404551be..2a941bff1ce9c8b158de65c422ebaec60647c2ca 100644 (file)
@@ -67,7 +67,7 @@
                };
        };
 
-       spi4 {
+       spi5 {
                compatible = "spi-gpio";
                pinctrl-names = "default";
                pinctrl-0 = <&pinctrl_spi4>;
        flash0: n25q256a@0 {
                #address-cells = <1>;
                #size-cells = <1>;
-               compatible = "micron,n25q256a";
+               /* compatible = "micron,n25q256a"; */
+               compatible = "spi-flash";
                spi-max-frequency = <29000000>;
                spi-nor,ddr-quad-read-dummy = <6>;
                reg = <0>;
index 65950e8019d4540ca2b8ebf7f12374e35f06f314..ea882a7f140a3a4979cb87e6f59a51fc27771e2c 100644 (file)
                serial5 = &uart6;
                serial6 = &uart7;
                serial7 = &uart8;
-               spi0 = &ecspi1;
-               spi1 = &ecspi2;
-               spi2 = &ecspi3;
-               spi3 = &ecspi4;
+               spi0 = &qspi;
+               spi1 = &ecspi1;
+               spi2 = &ecspi2;
+               spi3 = &ecspi3;
+               spi4 = &ecspi4;
                usbphy0 = &usbphy1;
                usbphy1 = &usbphy2;
        };
index 4960056fe4d64c10558858b3e62d9ebe9758f0fe..5305c12fdbcd53c6266df3c7946c1ca975c6a517 100644 (file)
@@ -10,6 +10,7 @@ CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_SF=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
@@ -24,7 +25,12 @@ CONFIG_DM_GPIO=y
 CONFIG_DM_74X164=y
 CONFIG_DM_I2C=y
 CONFIG_DM_MMC=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_BAR=y
+CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_SPI=y
+CONFIG_FSL_QSPI=y
index d07be226f55380e72e65815ff9a1a057656a9e06..f1023b2aaecfba9b1af375cacc50ff26a046de85 100644 (file)
@@ -11,6 +11,7 @@ CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_SF=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
@@ -25,7 +26,12 @@ CONFIG_DM_GPIO=y
 CONFIG_DM_74X164=y
 CONFIG_DM_I2C=y
 CONFIG_DM_MMC=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_BAR=y
+CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_SPI=y
+CONFIG_FSL_QSPI=y
index 8787df4907115085636e5efdac54e4a1ba444181..6a48742fd0aaffe87ee8c8eebc164ebed8ce462d 100644 (file)
 
 #define CONFIG_SOFT_SPI
 
+#ifdef CONFIG_FSL_QSPI
+#define CONFIG_SYS_FSL_QSPI_AHB
+#define CONFIG_SF_DEFAULT_BUS          0
+#define CONFIG_SF_DEFAULT_CS           0
+#define CONFIG_SF_DEFAULT_SPEED        40000000
+#define CONFIG_SF_DEFAULT_MODE         SPI_MODE_0
+#define FSL_QSPI_FLASH_NUM             1
+#define FSL_QSPI_FLASH_SIZE            SZ_32M
+#endif
+
 #endif