PDK API Guide for J721E
csitx_socPriv.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Texas Instruments Incorporated 2020
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the
15  * distribution.
16  *
17  * Neither the name of Texas Instruments Incorporated nor the names of
18  * its contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  */
33 
47 #ifndef CSITX_SOC_PRIV_H_
48 #define CSITX_SOC_PRIV_H_
49 
50 /* ========================================================================== */
51 /* Include Files */
52 /* ========================================================================== */
53 #include <ti/drv/csitx/csitx.h>
54 #include <ti/csl/soc.h>
55 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
60 /* ========================================================================== */
61 /* Macros & Typedefs */
62 /* ========================================================================== */
71 #define CSITX_STRM_SUPPORT_NOT_SUPPORTED ((uint32_t) 0x0U)
72 
73 #define CSITX_STRM_SUPPORT_SUPPORTED ((uint32_t) 0x1U)
74 /* @} */
75 
85 #define CSITX_STRM_CH_TYPE_TX ((uint32_t) 0x1U)
86 
88 #define CSITX_STRM_CH_TYPE_COLORBAR ((uint32_t) 0x2U)
89 
91 #define CSITX_STRM_CH_TYPE_LPBK ((uint32_t) 0x4U)
92 /* @} */
93 
102 #define CSITX_ENABLE_SERIAL_TRANS_DISABLE ((uint32_t) 0x0U)
103 
104 #define CSITX_ENABLE_SERIAL_TRANS_ENABLE ((uint32_t) 0x1U)
105 /* @} */
106 /* ========================================================================== */
107 /* Structure Declarations */
108 /* ========================================================================== */
116 typedef struct
117 {
118  uint32_t support;
120  uint32_t numCh;
122  uint32_t type;
125 
126 
134 typedef struct
135 {
136  uint32_t numStrms;
140  uint32_t modAddr;
142  uint32_t shimAddr;
144  uint32_t dPhyCoreAddr;
146 } Csitx_ModInfo;
147 
155 typedef struct
156 {
157  uint32_t numInstances;
175 
183 typedef struct
184 {
185  uint32_t rangeMin;
187  uint32_t rangeMax;
189  uint32_t progVal;
192 
193 /* ========================================================================== */
194 /* Global Variables */
195 /* ========================================================================== */
196 
197 /* None */
198 
199 /* ========================================================================== */
200 /* Function Declarations */
201 /* ========================================================================== */
209 void CsitxDrv_initPlatData(Csitx_PlatformData *platformData);
210 
217 int32_t Csitx_dphyConfig(void *instHandle);
218 
227 int32_t CsirtxDrv_lpbkSel(uint32_t instId, uint32_t lpbkSel);
228 
229 /* ========================================================================== */
230 /* Static Function Definitions */
231 /* ========================================================================== */
232 
233 /* None */
234 
235 #ifdef __cplusplus
236 }
237 #endif
238 
239 /* @} */
240 
241 #endif /* #ifndef CSITX_SOC_PRIV_H_ */
int32_t Csitx_dphyConfig(void *instHandle)
This function configures DPHY.
uint32_t support
Definition: csitx_socPriv.h:118
This structure holds information about CSI Tx streams available in current SoC.
Definition: csitx_socPriv.h:116
uint32_t serialMultiChanEnable
Definition: csitx_socPriv.h:161
uint32_t dPhyCoreAddr
Definition: csitx_socPriv.h:144
uint32_t type
Definition: csitx_socPriv.h:122
uint32_t shimAddr
Definition: csitx_socPriv.h:142
#define CSITX_INSTANCE_ID_MAX
Maximum value of CSITX Module Instance.
Definition: csitx_soc.h:81
uint32_t modAddr
Definition: csitx_socPriv.h:140
uint32_t rangeMin
Definition: csitx_socPriv.h:185
This structure holds information about CSI Tx Module available in current SoC.
Definition: csitx_socPriv.h:134
#define CSITX_NUM_STREAM
CSITX DRV Numbers: Number of stream per CSI TX module.
Definition: csitx_soc.h:246
This structure holds information about CSI Tx Range. Typically used for DPHY programming.
Definition: csitx_socPriv.h:183
uint32_t progVal
Definition: csitx_socPriv.h:189
uint32_t rangeMax
Definition: csitx_socPriv.h:187
int32_t CsirtxDrv_lpbkSel(uint32_t instId, uint32_t lpbkSel)
This function Select the source for loopback stream of CSITX.
This structure holds information about CSI Tx instances available in current SoC.
Definition: csitx_socPriv.h:155
uint32_t numCh
Definition: csitx_socPriv.h:120
uint32_t numInstances
Definition: csitx_socPriv.h:157
uint32_t numStrms
Definition: csitx_socPriv.h:136
CSITX Driver API/interface file.
void CsitxDrv_initPlatData(Csitx_PlatformData *platformData)
This function should be used to initialize platform data for the given SoC.