summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTerry Lv <r65388@freescale.com>2009-07-22 17:30:12 +0800
committerFred Fan <r01011@freescale.com>2009-09-10 17:04:16 +0800
commit43ec730ccf4ce59e97b1ceb39c02e51661f1dfbb (patch)
tree0fa5ef8ad000270113e3588ce6c9e195bcbaf0c7 /include
parentabf0610e5250ed69cc542e19f19c8a6812f4914e (diff)
downloadu-boot-imx-43ec730ccf4ce59e97b1ceb39c02e51661f1dfbb.zip
u-boot-imx-43ec730ccf4ce59e97b1ceb39c02e51661f1dfbb.tar.gz
u-boot-imx-43ec730ccf4ce59e97b1ceb39c02e51661f1dfbb.tar.bz2
ENGR00114393: Support Atmel AT45DB321D SPI NOR flash.
Support Atmel AT45DB321D SPI NOR flash. Signed-off-by: Terry Lv <r65388@freescale.com>
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-mx51/imx_spi_nor.h16
-rw-r--r--include/configs/imx51.h2
2 files changed, 17 insertions, 1 deletions
diff --git a/include/asm-arm/arch-mx51/imx_spi_nor.h b/include/asm-arm/arch-mx51/imx_spi_nor.h
index a12247b..90c7ea7 100644
--- a/include/asm-arm/arch-mx51/imx_spi_nor.h
+++ b/include/asm-arm/arch-mx51/imx_spi_nor.h
@@ -47,6 +47,22 @@
/* + [1cmd + 2 data] + .. + [WRDI] + [RDSR] */
#define JEDEC_ID 0x9F /* read JEDEC ID. tx: 1 byte cmd; rx: 3 byte ID */
+/* Atmel SPI-NOR commands */
+#define WR_2_MEM_DIR 0x82
+#define BUF1_WR 0x84
+#define BUF2_WR 0x87
+#define BUF1_TO_MEM 0x83
+#define BUF2_TO_MEM 0x86
+#define STAT_READ 0xD7
+#define STAT_PG_SZ (1 << 0) /* 1=Page size is 512, 0=Page size is 528 (default 0) */
+#define STAT_PROT (1 << 1) /* 1=sector protection enabled (default 0) */
+#define STAT_COMP (1 << 6)
+#define STAT_BUSY (1 << 7) /* 1=Device not busy */
+#define CONFIG_REG1 0x3D
+#define CONFIG_REG2 0x2A
+#define CONFIG_REG3 0x80
+#define CONFIG_REG4 0xA6
+
#define SZ_64K 0x10000
#define SZ_32K 0x8000
#define SZ_4K 0x1000
diff --git a/include/configs/imx51.h b/include/configs/imx51.h
index 3257843..8d81fff 100644
--- a/include/configs/imx51.h
+++ b/include/configs/imx51.h
@@ -74,7 +74,7 @@
#define CONFIG_FSL_SF 1
#define CONFIG_CMD_SPI
#define CONFIG_CMD_SF
-#define CONFIG_SPI_FLASH_IMX
+#define CONFIG_SPI_FLASH_IMX_ATMEL 1
#define CONFIG_SPI_FLASH_CS 1
#define CONFIG_IMX_SPI
#define CONFIG_IMX_SPI_PMIC