1 /*
2  * Copyright (c) 2019, MADMACHINE LIMITED
3  *
4  * refer to hal_nxp board file
5  *
6  * SPDX-License-Identifier: Apache-2.0
7  */
8 
9 #include <flexspi_nor_config.h>
10 
11 #ifdef CONFIG_NXP_IMX_RT_BOOT_HEADER
12 #if defined(__CC_ARM) || defined(__ARMCC_VERSION) || defined(__GNUC__)
13 __attribute__((section(".boot_hdr.conf")))
14 #elif defined(__ICCARM__)
15 #pragma location = ".boot_hdr.conf"
16 #endif
17 
18 const struct flexspi_nor_config_t Qspiflash_config = {
19 	.memConfig = {
20 		.tag = FLEXSPI_CFG_BLK_TAG,
21 		.version = FLEXSPI_CFG_BLK_VERSION,
22 		.readSampleClkSrc =
23 			kFlexSPIReadSampleClk_LoopbackFromDqsPad,
24 		.csHoldTime = 3u,
25 		.csSetupTime = 3u,
26 		.sflashPadType = kSerialFlash_4Pads,
27 		.serialClkFreq = kFlexSpiSerialClk_100MHz,
28 		.sflashA1Size = 8u * 1024u * 1024u,
29 		.lookupTable = {
30 			FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD,
31 					0xEB, RADDR_SDR,
32 					FLEXSPI_4PAD, 0x18),
33 			FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD,
34 					0x06, READ_SDR,
35 					FLEXSPI_4PAD, 0x04),
36 		},
37 	},
38 	.pageSize = 256u,
39 	.sectorSize = 4u * 1024u,
40 	.blockSize = 256u * 1024u,
41 	.isUniformBlockSize = false,
42 };
43 #endif /* CONFIG_NXP_IMX_RT_BOOT_HEADER */
44