EXYNOS5: Enable SPI
authorHatim RV <hatim.rv@samsung.com>
Fri, 2 Nov 2012 01:15:37 +0000 (01:15 +0000)
committerMinkyu Kang <mk7.kang@samsung.com>
Thu, 15 Nov 2012 12:08:21 +0000 (21:08 +0900)
This patch enables SPI driver for EXYNOS5.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
board/samsung/smdk5250/smdk5250.c
include/configs/smdk5250.h

index 18dd5d248ecc7c69478b63b2c8a30555a2566721..4c50342e5cdcb7145e3faa035243bab222688de4 100644 (file)
@@ -24,6 +24,7 @@
 #include <asm/io.h>
 #include <i2c.h>
 #include <netdev.h>
+#include <spi.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/mmc.h>
@@ -66,6 +67,9 @@ int board_init(void)
        gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL);
 #if defined(CONFIG_PMIC)
        pmic_init();
+#endif
+#ifdef CONFIG_EXYNOS_SPI
+       spi_init();
 #endif
        return 0;
 }
index 819493a8c7a9dbce409c3411ce5f7f08dd531bdf..4973c330ce6d7c689fa55707409cc5f84d95493b 100644 (file)
 #undef CONFIG_CMD_IMLS
 #define CONFIG_IDENT_STRING            " for SMDK5250"
 
-#define CONFIG_ENV_IS_IN_MMC
 #define CONFIG_SYS_MMC_ENV_DEV         0
 
 #define CONFIG_SECURE_BL1_ONLY
 #define CONFIG_PMIC_I2C
 #define CONFIG_PMIC_MAX77686
 
+/* SPI */
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_SPI_FLASH
+
+#ifdef CONFIG_SPI_FLASH
+#define CONFIG_EXYNOS_SPI
+#define CONFIG_CMD_SF
+#define CONFIG_CMD_SPI
+#define CONFIG_SPI_FLASH_WINBOND
+#define CONFIG_SF_DEFAULT_MODE         SPI_MODE_0
+#define CONFIG_SF_DEFAULT_SPEED                50000000
+#define EXYNOS5_SPI_NUM_CONTROLLERS    5
+#endif
+
+#ifdef CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_ENV_SPI_MODE    SPI_MODE_0
+#define CONFIG_ENV_SECT_SIZE   CONFIG_ENV_SIZE
+#define CONFIG_ENV_SPI_BUS     1
+#define CONFIG_ENV_SPI_MAX_HZ  50000000
+#endif
+
 /* Ethernet Controllor Driver */
 #ifdef CONFIG_CMD_NET
 #define CONFIG_SMC911X