From 43ec730ccf4ce59e97b1ceb39c02e51661f1dfbb Mon Sep 17 00:00:00 2001 From: Terry Lv Date: Wed, 22 Jul 2009 17:30:12 +0800 Subject: ENGR00114393: Support Atmel AT45DB321D SPI NOR flash. Support Atmel AT45DB321D SPI NOR flash. Signed-off-by: Terry Lv --- include/asm-arm/arch-mx51/imx_spi_nor.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include/asm-arm') 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 -- cgit v1.1