[U-Boot] [PATCH V2 2/2] imx: mx6ull-14x14-evk: enable DM QSPI driver
Stefano Babic
sbabic at denx.de
Fri Jan 12 13:32:42 UTC 2018
On 03/01/2018 01:52, Peng Fan wrote:
> To support QSPI DM driver
> - Add spi0 alias for qspi node. Which is used for bus number 0.
> - Modify the n25q256a at 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 at nxp.com>
> ---
>
> V2:
> None
>
> arch/arm/dts/imx6ull-14x14-evk.dts | 5 +++--
> arch/arm/dts/imx6ull.dtsi | 9 +++++----
> configs/mx6ull_14x14_evk_defconfig | 6 ++++++
> configs/mx6ull_14x14_evk_plugin_defconfig | 6 ++++++
> include/configs/mx6ullevk.h | 10 ++++++++++
> 5 files changed, 30 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/dts/imx6ull-14x14-evk.dts b/arch/arm/dts/imx6ull-14x14-evk.dts
> index 375bd4e..2a941bf 100644
> --- a/arch/arm/dts/imx6ull-14x14-evk.dts
> +++ b/arch/arm/dts/imx6ull-14x14-evk.dts
> @@ -67,7 +67,7 @@
> };
> };
>
> - spi4 {
> + spi5 {
> compatible = "spi-gpio";
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_spi4>;
> @@ -455,7 +455,8 @@
> flash0: n25q256a at 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>;
> diff --git a/arch/arm/dts/imx6ull.dtsi b/arch/arm/dts/imx6ull.dtsi
> index 65950e8..ea882a7 100644
> --- a/arch/arm/dts/imx6ull.dtsi
> +++ b/arch/arm/dts/imx6ull.dtsi
> @@ -38,10 +38,11 @@
> 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;
> };
> diff --git a/configs/mx6ull_14x14_evk_defconfig b/configs/mx6ull_14x14_evk_defconfig
> index 4960056..5305c12 100644
> --- a/configs/mx6ull_14x14_evk_defconfig
> +++ b/configs/mx6ull_14x14_evk_defconfig
> @@ -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
> diff --git a/configs/mx6ull_14x14_evk_plugin_defconfig b/configs/mx6ull_14x14_evk_plugin_defconfig
> index d07be22..f1023b2 100644
> --- a/configs/mx6ull_14x14_evk_plugin_defconfig
> +++ b/configs/mx6ull_14x14_evk_plugin_defconfig
> @@ -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
> diff --git a/include/configs/mx6ullevk.h b/include/configs/mx6ullevk.h
> index 8787df4..6a48742 100644
> --- a/include/configs/mx6ullevk.h
> +++ b/include/configs/mx6ullevk.h
> @@ -164,4 +164,14 @@
>
> #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
>
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
More information about the U-Boot
mailing list