]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: imx: dh-imx6: Convert SPI support to DM
authorMarek Vasut <marex@denx.de>
Fri, 17 May 2019 14:58:54 +0000 (16:58 +0200)
committerStefano Babic <sbabic@denx.de>
Tue, 11 Jun 2019 08:42:48 +0000 (10:42 +0200)
Enable DM SPI and SF support on DHCOM iMX6 PDK2.
Convert board code to match the DM support.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Ludwig Zenz <lzenz@dh-electronics.com>
Cc: Stefano Babic <sbabic@denx.de>
board/dhelectronics/dh_imx6/dh_imx6.c
configs/dh_imx6_defconfig
include/configs/dh_imx6.h

index 737d9c6be3695d3a3bd3a620bb03244c163da97b..50e3cb50a3594fbd825dccb170e57dfe1a351c73 100644 (file)
@@ -272,16 +272,6 @@ int board_early_init_f(void)
        return 0;
 }
 
-#ifdef CONFIG_MXC_SPI
-int board_spi_cs_gpio(unsigned bus, unsigned cs)
-{
-       if (bus == 0 && cs == 0)
-               return IMX_GPIO_NR(2, 30);
-       else
-               return -1;
-}
-#endif
-
 int board_init(void)
 {
        struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
index 60faff8bdc655efd05fb17009ac3334fe6a1f8ed..70f02770406548ec2a7eab74f16dfcdaa59cf1ad 100644 (file)
@@ -47,13 +47,16 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_DWC_AHSATA=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_FSL_ESDHC=y
+CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SF_DEFAULT_MODE=0
 CONFIG_SF_DEFAULT_SPEED=25000000
+CONFIG_SPI_FLASH_SFDP_SUPPORT=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_SPI_FLASH_MTD=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
@@ -63,6 +66,7 @@ CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
 CONFIG_DM_SCSI=y
 CONFIG_SPI=y
+CONFIG_DM_SPI=y
 CONFIG_MXC_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
index e68467dda354e31c82b29b85b0cb8e4fd86610bd..3b1d0a99a19016dcb4f8bc5a7dd7048b2ef3d220 100644 (file)
 #define CONFIG_LBA48
 
 /* SPI Flash Configs */
+#if defined(CONFIG_SPL_BUILD)
+#undef CONFIG_DM_SPI
+#undef CONFIG_DM_SPI_FLASH
+#undef CONFIG_SPI_FLASH_MTD
+#endif
 
 /* UART */
 #define CONFIG_MXC_UART