1 /*\r
2 * Copyright (c) 2020, Texas Instruments Incorporated\r
3 * All rights reserved.\r
4 *\r
5 * Redistribution and use in source and binary forms, with or without\r
6 * modification, are permitted provided that the following conditions\r
7 * are met:\r
8 *\r
9 * * Redistributions of source code must retain the above copyright\r
10 * notice, this list of conditions and the following disclaimer.\r
11 *\r
12 * * Redistributions in binary form must reproduce the above copyright\r
13 * notice, this list of conditions and the following disclaimer in the\r
14 * documentation and/or other materials provided with the distribution.\r
15 *\r
16 * * Neither the name of Texas Instruments Incorporated nor the names of\r
17 * its contributors may be used to endorse or promote products derived\r
18 * from this software without specific prior written permission.\r
19 *\r
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\r
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;\r
27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR\r
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
31 *\r
32 */\r
33 \r
34 /**\r
35 *\r
36 * \file nor_xspi.h\r
37 *\r
38 * \brief This file contains structure, typedefs, functions and\r
39 * prototypes used for OSPI interface for xSPI flash.\r
40 *\r
41 *****************************************************************************/\r
42 #ifndef NOR_XSPI_H_\r
43 #define NOR_XSPI_H_\r
44 \r
45 #include <string.h>\r
46 \r
47 #include <ti/board/src/flash/nor/nor.h>\r
48 #include <ti/drv/spi/SPI.h>\r
49 #include <ti/drv/spi/soc/SPI_soc.h>\r
50 #if defined(j7200_evm) || defined(am64x_evm)\r
51 #include <ti/board/src/flash/nor/device/s28hs512t.h>\r
52 #endif\r
53 #include <ti/board/src/flash/nor/ospi/nor_spi_phy_tune.h>\r
54 \r
55 /**************************************************************************\r
56 ** Macro Definitions\r
57 **************************************************************************/\r
58 \r
59 #define BOARD_XSPI_BAUDRATE_DIV_133M (4U)\r
60 #define BOARD_XSPI_BAUDRATE_DIV_200M (6U)\r
61 \r
62 /* Offset address (last block start address) of the 128 bytes tuning pattern data stored on the flash */\r
63 #define NOR_TUNING_DATA_OFFSET (NOR_SIZE - NOR_BLOCK_SIZE)\r
64 \r
65 #endif /* NOR_XSPI_H_ */\r
66 \r
67 /* Nothing past this point */\r