]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/board/diag/eeprom/src/eeprom_test_v2.h
9895e20b2ed38452d2bf27c3ad1b7086317e7fcd
[processor-sdk/pdk.git] / packages / ti / board / diag / eeprom / src / eeprom_test_v2.h
1 /******************************************************************************
2  * Copyright (c) 2018-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  *
36  * \file   eeprom_test_v2.h
37  *
38  * \brief  This is the header file for Board ID eeprom diagnostic test.
39  *
40  */
42 #ifndef _EEPROM_TEST_V2_H_
43 #define _EEPROM_TEST_V2_H_
45 #include <ti/drv/i2c/I2C.h>
46 #include <ti/drv/i2c/soc/I2C_soc.h>
48 #include <ti/drv/uart/UART.h>
49 #include <ti/drv/uart/UART_stdio.h>
51 #include <ti/csl/soc.h>
52 #include <soc.h>
54 #include "board.h"
55 #include "board_cfg.h"
56 #if (defined(j721e_evm) || defined(j7200_evm))
57 #include "board_utils.h"
58 #endif
60 #include <stdio.h>
61 #include <stdint.h>
62 #include <stdlib.h>
64 #include "diag_common_cfg.h"
65 #if defined(SOC_AM65XX)
66 #include <ti/board/src/evmKeystone3/include/board_i2c_io_exp.h>
67 #endif
69 #ifdef __cplusplus
70 extern "C" {
71 #endif
73 #if defined(am65xx_evm) || defined(am65xx_idk)
74 #define I2C_INSTANCE                            (0U)
75 #define MAX_NUM_OF_BOARDS                       (4U)
77 #define CP_EEPROM_SLAVE_ADDR                    (0x50U)
78 #define APP_EEPROM_SLAVE_ADDR                   (0x52U)
79 #define LCD_EEPROM_SLAVE_ADDR                   (0x55U)
80 #define SERDES_EEPROM_SLAVE_ADDR                (0x54U)
82 #define NUM_OF_CP_MAC_ADDR                      (2U)
83 #define NUM_OF_IDK_MAC_ADDR                     (4U)
84 #define NUM_OF_SERDES_MAC_ADDR                  (1U)
86 #define STARTING_BOARD_NUM                      (1U)
88 #elif defined(j7200_evm)
89 #define MAX_NUM_OF_BOARDS                       (4U)
90 #define STARTING_BOARD_NUM                      (2U)
92 #elif defined(tpr12_evm)
93 #define MAX_NUM_OF_BOARDS                                               (BOARD_ID_MAX_BOARDS)
94 #elif defined(SOC_AM64X)
95 #define I2C_INSTANCE                            (0U)
96 #define MAX_NUM_OF_BOARDS                       (2U)
98 #define CP_EEPROM_SLAVE_ADDR                    (0x50U)
99 #define IOLINK_EEPROM_SLAVE_ADDR              (0x52U)
100 #define STARTING_BOARD_NUM                      (1U)
101 #else  /* j721e_evm */
102 #define MAX_NUM_OF_BOARDS                       (9U)
103 #define STARTING_BOARD_NUM                      (2U)
105 #define SOM_EEPROM_SLAVE_ADDR                   (0x50U)
106 #define CP_EEPROM_SLAVE_ADDR                    (0x51U)
107 #define EXP_CONN_EEPROM_SLAVE_ADDR              (0x52U)
108 #define CSI2_EXP_EEPROM_SLAVE_ADDR              (0x52U)
109 #define ENET_EXP_EEPROM_SLAVE_ADDR              (0x54U)
110 #define DISPLAY_ADP_EEPROM_SLAVE_ADDR           (0x00U) //J7ES_TBD: Need to update salve addr
111 #endif
113 #define BOARD_NAME_LENGTH                       (7U)
115 typedef struct boardProgInfo
117     char              boardName[50];
118     uint8_t           slaveAddr;
119     bool              isBoardPresent;
120 }boardProgInfo_t;
122 #ifdef __cplusplus
124 #endif /* __cplusplus */
126 #endif /* _EEPROM_TEST_V2_H_ */