1 /* 2 * Copyright 2021-2024 NXP 3 * All rights reserved. 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 8 #include <flash_config.h> 9 10 __attribute__((section(".flash_conf"), used)) const fc_flexspi_nor_config_t 11 flexspi_config = { 12 .memConfig = { 13 .tag = FC_BLOCK_TAG, 14 .version = FC_BLOCK_VERSION, 15 .readSampleClkSrc = 1, 16 .csHoldTime = 3, 17 .csSetupTime = 3, 18 .deviceModeCfgEnable = 1, 19 .deviceModeSeq = {.seqNum = 1, .seqId = 2}, 20 .deviceModeArg = 0x02, 21 .configCmdEnable = 0, 22 .deviceType = 0x1, 23 .sflashPadType = kSerialFlash_4Pads, 24 .serialClkFreq = 5, 25 .sflashA1Size = 0x4000000U, 26 .sflashA2Size = 0, 27 .sflashB1Size = 0, 28 .sflashB2Size = 0, 29 .lookupTable = { 30 31 [0] = FC_FLEXSPI_LUT_SEQ( 32 FC_CMD_SDR, FC_FLEXSPI_1PAD, 0xEC, 33 FC_RADDR_SDR, FC_FLEXSPI_4PAD, 34 0x20), 35 [1] = FC_FLEXSPI_LUT_SEQ( 36 FC_MODE8_SDR, FC_FLEXSPI_4PAD, 0xF0, 37 FC_DUMMY_SDR, FC_FLEXSPI_4PAD, 38 0x04), 39 [2] = FC_FLEXSPI_LUT_SEQ( 40 FC_READ_SDR, FC_FLEXSPI_4PAD, 0x04, 41 FC_STOP_EXE, FC_FLEXSPI_1PAD, 0x00), 42 43 44 [4 * 1 + 0] = FC_FLEXSPI_LUT_SEQ( 45 FC_CMD_SDR, FC_FLEXSPI_1PAD, 0x05, 46 FC_READ_SDR, FC_FLEXSPI_1PAD, 0x04), 47 48 49 [4 * 2 + 0] = 50 FC_FLEXSPI_LUT_SEQ(FC_CMD_SDR, 51 FC_FLEXSPI_1PAD, 52 0x31, FC_WRITE_SDR, 53 FC_FLEXSPI_1PAD, 54 0x01), 55 56 57 [4 * 3 + 0] = 58 FC_FLEXSPI_LUT_SEQ(FC_CMD_SDR, 59 FC_FLEXSPI_1PAD, 60 0x06, FC_STOP_EXE, FC_FLEXSPI_1PAD, 61 0x00), 62 63 64 [4 * 5 + 0] = 65 FC_FLEXSPI_LUT_SEQ(FC_CMD_SDR, 66 FC_FLEXSPI_1PAD, 67 0x21, FC_RADDR_SDR, 68 FC_FLEXSPI_1PAD, 69 0x20), 70 71 72 [4 * 8 + 0] = 73 FC_FLEXSPI_LUT_SEQ(FC_CMD_SDR, 74 FC_FLEXSPI_1PAD, 75 0xDC, FC_RADDR_SDR, 76 FC_FLEXSPI_1PAD, 77 0x20), 78 79 80 [4 * 9 + 0] = 81 FC_FLEXSPI_LUT_SEQ(FC_CMD_SDR, 82 FC_FLEXSPI_1PAD, 83 0x34, FC_RADDR_SDR, 84 FC_FLEXSPI_1PAD, 85 0x20), 86 [4 * 9 + 1] = 87 FC_FLEXSPI_LUT_SEQ(FC_WRITE_SDR, 88 FC_FLEXSPI_4PAD, 89 0x00, 90 FC_STOP_EXE, FC_FLEXSPI_1PAD, 91 0x00), 92 93 94 [4 * 11 + 0] = FC_FLEXSPI_LUT_SEQ(FC_CMD_SDR, 95 FC_FLEXSPI_1PAD, 96 0xC7, FC_STOP_EXE, 97 FC_FLEXSPI_1PAD, 98 0x00), 99 }, 100 }, 101 .pageSize = 0x100, 102 .sectorSize = 0x1000, 103 .ipcmdSerialClkFreq = 0, 104 .blockSize = 0x10000, 105 .fcb_fill[0] = 0xFFFFFFFF, 106 }; 107