35#ifndef XQSPIPSU_FLASH_CONFIG_H_
36#define XQSPIPSU_FLASH_CONFIG_H_
44#include "xparameters.h"
53#define WRITE_STATUS_CMD 0x01
56#define WRITE_DISABLE_CMD 0x04
57#define READ_STATUS_CMD 0x05
58#define WRITE_ENABLE_CMD 0x06
59#define VOLATILE_WRITE_ENABLE_CMD 0x50
60#define QUAD_MODE_ENABLE_BIT 0x06
61#define FAST_READ_CMD 0x0B
62#define DUAL_READ_CMD 0x3B
63#define QUAD_READ_CMD 0x6B
64#define BULK_ERASE_CMD 0xC7
65#define SEC_ERASE_CMD 0xD8
68#define READ_CONFIG_CMD 0x35
69#define WRITE_CONFIG_CMD 0x01
70#define ENTER_4B_ADDR_MODE 0xB7
71#define EXIT_4B_ADDR_MODE 0xE9
72#define EXIT_4B_ADDR_MODE_ISSI 0x29
74#define READ_CMD_4B 0x13
75#define FAST_READ_CMD_4B 0x0C
76#define DUAL_READ_CMD_4B 0x3C
77#define QUAD_READ_CMD_4B 0x6C
78#define WRITE_CMD_4B 0x12
79#define SEC_ERASE_CMD_4B 0xDC
81#define BANK_REG_RD 0x16
82#define BANK_REG_WR 0x17
83#define READ_ECCSR 0x18
85#define EXTADD_REG_RD 0xC8
86#define EXTADD_REG_WR 0xC5
87#define DIE_ERASE_CMD 0xC4
88#define READ_FLAG_STATUS_CMD 0x70
90#define WRITE_STATUS_REG_2_CMD 0x31
91#define READ_STATUS_REG_2_CMD 0x35
92#define WB_QUAD_MODE_ENABLE_BIT 0x01
101#define COMMAND_OFFSET 0
102#define ADDRESS_1_OFFSET 1
103#define ADDRESS_2_OFFSET 2
104#define ADDRESS_3_OFFSET 3
105#define ADDRESS_4_OFFSET 4
109#define DUMMY_OFFSET 4
115#define DUMMY_CLOCKS 8
119#define BULK_ERASE_SIZE 1
120#define SEC_ERASE_SIZE 4
121#define BANK_SEL_SIZE 2
130#define DIE_ERASE_SIZE 4
137#define OVERHEAD_SIZE 4
142#define FLASH1BASE 0x0000000
147#define SIXTEENMB 0x1000000
153#define FLASH_QUAD_EN_MASK 0x02
155#define FLASH_SRWD_MASK 0x80
160#define BANKMASK 0xF000000
165#define BUSWIDTH_SINGLE 0
166#define BUSWIDTH_DOUBLE 1
181#define MICRON_ID_BYTE0 0x20
182#define SPANSION_ID_BYTE0 0x01
183#define WINBOND_ID_BYTE0 0xEF
184#define MACRONIX_ID_BYTE0 0xC2
185#define ISSI_ID_BYTE0 0x9D
218 0x8000, 0x800000, 0xFFFF0000, 1},
221 0x10000, 0x1000000, 0xFFFF0000, 1},
224 0x20000, 0x2000000, 0xFFFF0000, 1},
227 0x20000, 0x4000000, 0xFFFC0000, 1},
232 0x10000, 0x1000000, 0xFFFF0000, 1},
235 0x10000, 0x1000000, 0xFFFF0000, 1},
238 0x20000, 0x2000000, 0xFFFF0000, 1},
241 0x20000, 0x2000000, 0xFFFF0000, 1},
244 0x40000, 0x4000000, 0xFFFF0000, 2},
247 0x40000, 0x4000000, 0xFFFF0000, 2},
250 0x80000, 0x8000000, 0xFFFF0000, 4},
253 0x80000, 0x8000000, 0xFFFF0000, 4},
256 0x100000, 0x10000000, 0xFFFF0000, 4},
259 0x100000, 0x10000000, 0xFFFF0000, 4},
263 0x10000, 0x1000000, 0xFFFF0000, 1},
266 0x10000, 0x1000000, 0xFFFF0000, 1},
269 0x100000, 0x10000000, 0xFFFF0000, 4},
273 0x80000, 0x8000000, 0xFFFF0000, 4},
276 0x80000, 0x8000000, 0xFFFF0000, 4},
279 0x80000, 0x8000000, 0xFFFF0000, 4},
282 0x100000, 0x10000000, 0xFFFF0000, 1},
285 0x100000, 0x10000000, 0xFFFF0000, 1},
289 0x1000, 0x100000, 0xFFFF0000, 1},
292 0x1000, 0x100000, 0xFFFF0000, 1},
295 0x2000, 0x200000, 0xFFFF0000, 1},
298 0x2000, 0x200000, 0xFFFF0000, 1},
301 0x4000, 0x400000, 0xFFFF0000, 1},
304 0x4000, 0x400000, 0xFFFF0000, 1},
307 0x8000, 0x800000, 0xFFFF0000, 1},
310 0x8000, 0x800000, 0xFFFF0000, 1},
313 0x10000, 0x1000000, 0xFFFF0000, 1},
316 0x10000, 0x1000000, 0xFFFF0000, 1},
319 0x20000, 0x2000000, 0xFFFF0000, 1},
322 0x20000, 0x2000000, 0xFFFF0000, 1},
325 0x40000, 0x4000000, 0xFFFF0000, 2},
328 0x40000, 0x4000000, 0xFFFF0000, 2},
331 0x80000, 0x8000000, 0xFFFF0000, 1},
334 0x80000, 0x8000000, 0xFFFF0000, 1}
337static INLINE u32 CalculateFCTIndex(u32 ReadId, u32 *FCTIndex)
341 for (Index = 0; Index <
sizeof(Flash_Config_Table)/
sizeof(Flash_Config_Table[0]);
343 if (ReadId == Flash_Config_Table[Index].jedec_id) {
#define NUM_OF_SECTORS512
Definition: xqspipsu.h:300
#define NUM_OF_SECTORS16
Definition: xqspipsu.h:295
#define SECTOR_SIZE_256K
Definition: xqspipsu.h:307
#define NUM_OF_SECTORS1024
Definition: xqspipsu.h:301
#define NUM_OF_SECTORS256
Definition: xqspipsu.h:299
#define NUM_OF_SECTORS64
Definition: xqspipsu.h:297
#define NUM_OF_SECTORS2048
Definition: xqspipsu.h:302
#define NUM_OF_SECTORS32
Definition: xqspipsu.h:296
#define NUM_OF_SECTORS4096
Definition: xqspipsu.h:303
#define BYTES256_PER_PAGE
Definition: xqspipsu.h:284
#define NUM_OF_SECTORS128
Definition: xqspipsu.h:298
#define SECTOR_SIZE_64K
Definition: xqspipsu.h:305
#define BYTES512_PER_PAGE
Definition: xqspipsu.h:285
Definition: xqspipsu_flash_config.h:175