628ce8f9260b45eef4cf589e07cb9e6ede452e72
1 /******************************************************************************
2 * Copyright (c) 2020 Texas Instruments Incorporated - http://www.ti.com
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the
14 * distribution.
15 *
16 * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 *****************************************************************************/
34 /**
35 * \brief Board library configurations
36 *
37 * This file configures the instance numbers, address and gpio reset
38 * details of different interfaces of TPR12 EVM.
39 *
40 */
41 #ifndef BOARD_CFG_H_
42 #define BOARD_CFG_H_
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
48 /* Board ID information */
49 #define BOARD_INFO_CPU_NAME "tpr12"
50 #define BOARD_INFO_BOARD_NAME "tpr12_evm"
52 /* UART LLD instance number for MSS UART port */
53 #define BOARD_MSS_UART_INSTANCE (0U)
55 /* UART LLD instance number for DSS UART port */
56 #define BOARD_DSS_UART_INSTANCE (0U)
58 /* I2C instance as master for master/slave test example */
59 #define BOARD_I2C_MASTER_INSTANCE (0U)
60 /* I2C instance as salve for master/slave test example */
61 #define BOARD_I2C_SLAVE_INSTANCE (0U)
63 /* UART LLD instance number for primary UART port */
64 #if defined (__TI_ARM_V7R4__)
65 #define BOARD_UART_INSTANCE (BOARD_MSS_UART_INSTANCE)
66 #else
67 #define BOARD_UART_INSTANCE (BOARD_DSS_UART_INSTANCE)
68 #endif
70 /* SPI instance connected to PMIC - MSS SPIB */
71 #define BOARD_SPI_PMIC_INSTANCE (1U)
73 /* QSPI instance connected to OSPI NOR flash */
74 #define BOARD_QSPI_NOR_INSTANCE (0U)
76 /* Number of LEDS connected to GPIO */
77 #define BOARD_GPIO_LED_NUM (1U)
79 /* GPIO instance connected to LED */
80 #define BOARD_GPIO_LED_PORT_NUM (0U)
82 /* GPIO pin connected to LED */
83 #define BOARD_GPIO_LED_PIN_NUM (2U)
85 /* GPIO instance connected to push button */
86 #define BOARD_GPIO_SWITCH_PIN_NUM (28U)
88 /* MSS EMAC Port number */
89 #define BOARD_EMAC_PORT_MAX (0x1U)
90 #define BOARD_ETH_PORT (0x0U)
92 /* MCU EMAC PHY MDIO address */
93 #define BOARD_MCU_EMAC_PHY_ADDR (0U)
95 /* MSS EMAC MAX REG DUMP */
96 #define BOARD_EMAC_REG_DUMP_MAX (16U)
98 /* MSS EMAC PHY register address definitions for reading strap values */
99 #define BOARD_EMAC_STRAP_STS1_ADDR (0x6EU)
100 #define BOARD_EMAC_STRAP_STS2_ADDR (0x6FU)
102 /* MSS_ETH_INTn */
103 #define BOARD_GPIO_EMAC_INT_PIN_NUM (2U) /* MSS GPIO_2 */
105 /* MSS_ETH_INTn */
106 #define BOARD_GPIO_EMAC_RST_PIN_NUM (28U) /* MSS GPIO_28 */
108 /* Temperature sensor i2c instance */
109 #define BOARD_TEMP_SENSOR_I2C_INSTANCE (0U)
111 /* Temperature sensor slave device address */
112 #define BOARD_TEMP_SENSOR_I2C_SLAVE_DEVICE_ADDR (0x49U)
114 #define BOARD_I2C_CURRENT_MONITOR_INSTANCE (0U)
116 /* I2C instance connected to EEPROM */
117 #define BOARD_I2C_EEPROM_INSTANCE (0U)
119 /* I2C address for EEPROM */
120 #define BOARD_I2C_EEPROM_ADDR (0x50U)
122 /* Number of TPR12 boards supported */
123 #define BOARD_ID_MAX_BOARDS (0x1U)
125 /* Different SoC domains */
126 #define BOARD_SOC_DOMAIN_MSS (0U)
127 #define BOARD_SOC_DOMAIN_RCSS (1U)
128 #define BOARD_SOC_DOMAIN_DSS (2U)
130 /* Maximum possible buffer length */
131 #define BOARD_EEPROM_MAX_BUFF_LENGTH (197U)
133 /* EEPROM board ID information */
134 #define BOARD_EEPROM_HEADER_FIELD_SIZE (7U)
135 #define BOARD_EEPROM_TYPE_SIZE (1U)
136 #define BOARD_EEPROM_STRUCT_LENGTH_SIZE (2U)
137 #define BOARD_EEPROM_MAGIC_NUMBER (0xEE3355AA)
139 #define BOARD_BOARD_FIELD_TYPE (0x10)
140 #define BOARD_DDR_FIELD_TYPE (0x11)
141 #define BOARD_MACINFO_FIELD_TYPE (0x13)
142 #define BOARD_ENDLIST (0xFE)
144 #define BOARD_EEPROM_HEADER_LENGTH (4U)
145 #define BOARD_EEPROM_BOARD_NAME_LENGTH (8U)
146 #define BOARD_EEPROM_VERSION_LENGTH (4U)
147 #define BOARD_EEPROM_SERIAL_NO_LENGTH (12U)
148 #define BOARD_EEPROM_CONFIG_LENGTH (32U)
150 #define BOARD_EEPROM_BOARD_NAME_ADDR (BOARD_EEPROM_HEADER_ADDR + BOARD_EEPROM_HEADER_LENGTH)
151 #define BOARD_EEPROM_VERSION_ADDR (BOARD_EEPROM_BOARD_NAME_ADDR + BOARD_EEPROM_BOARD_NAME_LENGTH)
152 #define BOARD_EEPROM_SERIAL_NO_ADDR (BOARD_EEPROM_VERSION_ADDR + BOARD_EEPROM_VERSION_LENGTH)
153 #define BOARD_EEPROM_CONFIG_ADDR (BOARD_EEPROM_SERIAL_NO_ADDR + BOARD_EEPROM_SERIAL_NO_LENGTH)
155 #define BOARD_EEPROM_HEADER_ADDR (0U)
157 /* Enable NOR flash driver */
158 #define BOARD_NOR_FLASH_IN
160 #ifdef __cplusplus
161 }
162 #endif /* __cplusplus */
164 #endif /* BOARD_CFG_H_ */