Kuldeep Singh | 5a0f9da | 2020-12-09 14:02:39 +0530 | [diff] [blame] | 1 | // SPDX-License-Identifier: BSD-3-Clause |
| 2 | /* |
| 3 | * Copyright 2020 NXP |
| 4 | */ |
| 5 | |
| 6 | /** |
| 7 | * @Flash info |
| 8 | * |
| 9 | */ |
| 10 | #ifndef FLASH_INFO_H |
| 11 | #define FLASH_INFO_H |
| 12 | |
| 13 | #define SZ_16M_BYTES 0x1000000U |
| 14 | |
| 15 | #if defined(CONFIG_MT25QU512A) |
| 16 | #define F_SECTOR_64K 0x10000U |
| 17 | #define F_PAGE_256 0x100U |
| 18 | #define F_SECTOR_4K 0x1000U |
| 19 | #define F_FLASH_SIZE_BYTES 0x4000000U |
| 20 | #define F_SECTOR_ERASE_SZ F_SECTOR_64K |
| 21 | #ifdef CONFIG_FSPI_4K_ERASE |
| 22 | #define F_SECTOR_ERASE_SZ F_SECTOR_4K |
| 23 | #endif |
| 24 | |
| 25 | #elif defined(CONFIG_MX25U25645G) |
| 26 | #define F_SECTOR_64K 0x10000U |
| 27 | #define F_PAGE_256 0x100U |
| 28 | #define F_SECTOR_4K 0x1000U |
| 29 | #define F_FLASH_SIZE_BYTES 0x2000000U |
| 30 | #define F_SECTOR_ERASE_SZ F_SECTOR_64K |
| 31 | #ifdef CONFIG_FSPI_4K_ERASE |
| 32 | #define F_SECTOR_ERASE_SZ F_SECTOR_4K |
| 33 | #endif |
| 34 | |
| 35 | #elif defined(CONFIG_MX25U51245G) |
| 36 | #define F_SECTOR_64K 0x10000U |
| 37 | #define F_PAGE_256 0x100U |
| 38 | #define F_SECTOR_4K 0x1000U |
| 39 | #define F_FLASH_SIZE_BYTES 0x4000000U |
| 40 | #define F_SECTOR_ERASE_SZ F_SECTOR_64K |
| 41 | #ifdef CONFIG_FSPI_4K_ERASE |
| 42 | #define F_SECTOR_ERASE_SZ F_SECTOR_4K |
| 43 | #endif |
| 44 | |
| 45 | #elif defined(CONFIG_MT35XU512A) |
| 46 | #define F_SECTOR_128K 0x20000U |
| 47 | #define F_SECTOR_32K 0x8000U |
| 48 | #define F_PAGE_256 0x100U |
| 49 | #define F_SECTOR_4K 0x1000U |
| 50 | #define F_FLASH_SIZE_BYTES 0x4000000U |
| 51 | #define F_SECTOR_ERASE_SZ F_SECTOR_128K |
| 52 | #ifdef CONFIG_FSPI_4K_ERASE |
| 53 | #define F_SECTOR_ERASE_SZ F_SECTOR_4K |
| 54 | #endif |
| 55 | |
| 56 | #ifdef NXP_WARM_BOOT |
| 57 | #define FLASH_WR_COMP_WAIT_BY_NOP_COUNT 0x20000 |
| 58 | #endif |
| 59 | |
| 60 | #endif |
| 61 | #endif /* FLASH_INFO_H */ |