Patchwork [U-Boot,19/31] M28EVK: Enable SPI and SPI flash

login
register
mail settings
Submitter Marek Vasut
Date Sept. 8, 2011, 8:42 p.m.
Message ID <1315514579-19215-20-git-send-email-marek.vasut@gmail.com>
Download mbox | patch
Permalink /patch/113971/
State Changes Requested
Headers show

Comments

Marek Vasut - Sept. 8, 2011, 8:42 p.m.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
---
 include/configs/m28evk.h |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

Patch

diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h
index b48fdd4..dee276c 100644
--- a/include/configs/m28evk.h
+++ b/include/configs/m28evk.h
@@ -57,6 +57,8 @@ 
 #define	CONFIG_CMD_NFS
 #define	CONFIG_CMD_PING
 #define	CONFIG_CMD_SETEXPR
+#define	CONFIG_CMD_SF
+#define	CONFIG_CMD_SPI
 
 /*
  * Memory configurations
@@ -157,6 +159,31 @@ 
 #endif
 
 /*
+ * SPI
+ */
+#ifdef	CONFIG_CMD_SPI
+#define	CONFIG_HARD_SPI
+#define	CONFIG_MXS_SPI
+#define	CONFIG_SPI_HALF_DUPLEX
+#define	CONFIG_DEFAULT_SPI_BUS		2
+#define	CONFIG_DEFAULT_SPI_MODE		SPI_MODE_0
+
+/* SPI FLASH */
+#ifdef	CONFIG_CMD_SF
+#define	CONFIG_SPI_FLASH
+#define	CONFIG_SPI_FLASH_STMICRO
+#define	CONFIG_SPI_FLASH_CS		2
+#define	CONFIG_SF_DEFAULT_MODE		SPI_MODE_0
+#define	CONFIG_SF_DEFAULT_SPEED		24000000
+
+#define	CONFIG_ENV_SPI_CS		0
+#define	CONFIG_ENV_SPI_BUS		2
+#define	CONFIG_ENV_SPI_MAX_HZ		24000000
+#define	CONFIG_ENV_SPI_MODE		SPI_MODE_0
+#endif
+#endif
+
+/*
  * Boot Linux
  */
 #define	CONFIG_CMDLINE_TAG