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