NVIDIA DRIVE OS Linux SDK API Reference

6.0.3 Release
NvSIPLDeviceBlockInfo.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020-2022, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA CORPORATION and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA CORPORATION is strictly prohibited.
9  */
10 
11 #ifndef NVSIPLDEVICEBLOCKINFO_HPP
12 #define NVSIPLDEVICEBLOCKINFO_HPP
13 
14 #if !NV_IS_SAFETY
15 #include "nvmedia_icp_structs.h"
16 #endif // !NV_IS_SAFETY
17 #include "NvSIPLCapStructs.h"
18 
19 #include <string>
20 #include <memory>
21 #include <vector>
22 #include <math.h>
23 
31 namespace nvsipl
32 {
45 #if !NV_IS_SAFETY
46 static const uint32_t MAX_DEVICEBLOCKS_PER_PLATFORM = 6U;
47 #else
48 static const uint32_t MAX_DEVICEBLOCKS_PER_PLATFORM = 4U;
49 #endif
50 
52 static const uint32_t MAX_CAMERAMODULES_PER_BLOCK = 4U;
53 
56 
59 
61 static const std::uint32_t MAX_CSI_LANE_CONFIGURATION = 2U;
62 
64 static const std::uint32_t X2_CSI_LANE_CONFIGURATION = 0U;
65 
67 static const std::uint32_t X4_CSI_LANE_CONFIGURATION = 1U;
68 
70 struct SensorInfo
71 {
75  struct Resolution
76  {
81  uint32_t width = 0U;
82 
87  uint32_t height = 0U;
88  };
89 
94  {
104  uint32_t cfa = 0U;
108  uint32_t embeddedTopLines = UINT32_MAX;
112  uint32_t embeddedBottomLines = UINT32_MAX;
125  float_t fps = 0.0F;
130  };
131 
133  uint32_t id = UINT32_MAX;
135  std::string name = "";
136 #if !NV_IS_SAFETY
137 
138  std::string description = "";
139 #endif // !NV_IS_SAFETY
140 
141  uint8_t i2cAddress = static_cast<uint8_t>UINT8_MAX;
146  bool isTriggerModeEnabled = false;
148  std::vector<uint32_t> errGpios;
153  bool useCDIv2API = false;
154 #if !NV_IS_SAFETY
155 
158  bool isTPGEnabled = false;
160  uint32_t patternMode = 0;
161 #endif // !NV_IS_SAFETY
162 };
163 
166 {
168  std::string name = "";
169 #if !NV_IS_SAFETY
170 
171  std::string description = "";
172 #endif
173 
174  uint8_t i2cAddress = static_cast<uint8_t>UINT8_MAX;
175 
179  bool useCDIv2API = false;
180 };
181 
184  uint8_t sourceGpio;
185  uint8_t destGpio;
186 };
187 
189 struct SerInfo
190 {
192  std::string name = "";
193 #if !NV_IS_SAFETY
194 
195  std::string description = "";
196 #endif // !NV_IS_SAFETY
197 
198  uint8_t i2cAddress = static_cast<uint8_t>UINT8_MAX;
199 #if !NV_IS_SAFETY
200 
201  bool longCable = false;
202 #endif // !NV_IS_SAFETY
203 
204  std::vector<uint32_t> errGpios;
209  bool useCDIv2API = false;
213  std::vector<SerdesGPIOPinMap> serdesGPIOPinMappings;
214 };
215 
221 {
223  std::string name = "";
224 #if !NV_IS_SAFETY
225 
226  std::string description = "";
227 #endif // !NV_IS_SAFETY
228 
230  uint32_t linkIndex = UINT32_MAX;
234  bool isEEPROMSupported = false;
240 };
241 
243 struct DeserInfo
244 {
246  std::string name = "";
247 #if !NV_IS_SAFETY
248 
249  std::string description = "";
250 #endif // !NV_IS_SAFETY
251 
252  uint8_t i2cAddress = static_cast<uint8_t>UINT8_MAX;
254  std::vector<uint32_t> errGpios;
259  bool useCDIv2API = false;
260  /* @brief Holds flag to indicate that the deser needs to run a reset all sequence at
261  startup */
262  bool resetAll = false;
263 };
264 
272 {
280  uint32_t i2cDevice = UINT32_MAX;
286  uint32_t numCameraModules = 0U;
291  std::uint32_t desI2CPort = UINT32_MAX;
293  std::uint32_t desTxPort = UINT32_MAX;
295  std::uint32_t pwrPort = UINT32_MAX;
297  std::uint32_t dphyRate[MAX_CSI_LANE_CONFIGURATION] = {0U};
299  std::uint32_t cphyRate[MAX_CSI_LANE_CONFIGURATION] = {0U};
307  bool isPassiveModeEnabled = false;
309  bool isGroupInitProg = false;
311  std::vector<uint32_t> gpios;
312 #if !NV_IS_SAFETY
313 
315  bool isPwrCtrlDisabled = false;
317  bool longCables[MAX_CAMERAMODULES_PER_BLOCK] = {false, false, false, false};
318 #endif // !NV_IS_SAFETY
319  /* @brief Reset all sequence is needed when starting deserializer. */
320  bool resetAll;
321 };
322 
325 } // namespace nvsipl
326 
327 #endif //NVSIPLDEVICEBLOCKINFO_HPP
nvsipl::MAX_DEVICEBLOCKS_PER_PLATFORM
static const uint32_t MAX_DEVICEBLOCKS_PER_PLATFORM
Indicates the maximum number of device blocks per platform.
Definition: NvSIPLDeviceBlockInfo.hpp:46
nvsipl::DeserInfo::name
std::string name
Holds the name of the deserializer, for example, "MAX96712".
Definition: NvSIPLDeviceBlockInfo.hpp:246
nvsipl::DeviceBlockInfo::dphyRate
std::uint32_t dphyRate[MAX_CSI_LANE_CONFIGURATION]
Holds the deserializer's data rate in DPHY mode(kHz)
Definition: NvSIPLDeviceBlockInfo.hpp:297
nvsipl::DeviceBlockInfo::csiPort
NvSiplCapInterfaceType csiPort
Holds the NvMediaICPInterfaceType that specifies the CSI port of the SoC to which the deserializer is...
Definition: NvSIPLDeviceBlockInfo.hpp:275
NvSiplCapInputFormatType
NvMediaICPInputFormatType NvSiplCapInputFormatType
Definition: NvSIPLCapStructs.h:287
nvsipl::MAX_CAMERAMODULES_PER_BLOCK
static const uint32_t MAX_CAMERAMODULES_PER_BLOCK
Indicates the maximum number of camera modules per device block.
Definition: NvSIPLDeviceBlockInfo.hpp:52
nvsipl::SensorInfo::vcInfo
VirtualChannelInfo vcInfo
Holds virtual channel information.
Definition: NvSIPLDeviceBlockInfo.hpp:143
nvsipl::MAX_CSI_LANE_CONFIGURATION
static const std::uint32_t MAX_CSI_LANE_CONFIGURATION
Indicates the maximum number of CSI lane configurations.
Definition: NvSIPLDeviceBlockInfo.hpp:61
nvsipl::DeviceBlockInfo::deserInfo
DeserInfo deserInfo
Holds the DeserInfo deserializer information.
Definition: NvSIPLDeviceBlockInfo.hpp:282
nvsipl::DeviceBlockInfo::isPwrCtrlDisabled
bool isPwrCtrlDisabled
Holds a flag which indicates whether power control is disabled on the platform.
Definition: NvSIPLDeviceBlockInfo.hpp:315
nvsipl::SensorInfo::VirtualChannelInfo::fps
float_t fps
Holds the average number of frames per second in the range from NVMEDIA_ICP_MIN_FRAME_RATE to NVMEDIA...
Definition: NvSIPLDeviceBlockInfo.hpp:125
nvsipl::SerInfo::i2cAddress
uint8_t i2cAddress
Holds the native I2C address.
Definition: NvSIPLDeviceBlockInfo.hpp:198
nvsipl::SensorInfo::name
std::string name
Holds the name of the image sensor, for example, "AR0231".
Definition: NvSIPLDeviceBlockInfo.hpp:135
nvsipl::DeviceBlockInfo::i2cDevice
uint32_t i2cDevice
Holds the I2C device bus number used to connect the deserializer with the SoC.
Definition: NvSIPLDeviceBlockInfo.hpp:280
nvsipl::DeserInfo::description
std::string description
Holds the description of the deserializer.
Definition: NvSIPLDeviceBlockInfo.hpp:249
nvsipl::SensorInfo::Resolution::height
uint32_t height
< Holds the height in pixels in the range from NVMEDIA_ICP_MIN_IMAGE_HEIGHT to NVMEDIA_ICP_MAX_IMAGE_...
Definition: NvSIPLDeviceBlockInfo.hpp:87
nvsipl::SerdesGPIOPinMap::destGpio
uint8_t destGpio
Definition: NvSIPLDeviceBlockInfo.hpp:185
nvsipl::DeserInfo::useCDIv2API
bool useCDIv2API
Holds a flag which indicates whether CDI (Camera Device Interface) is using the new version 2 API for...
Definition: NvSIPLDeviceBlockInfo.hpp:259
nvsipl::SensorInfo::VirtualChannelInfo::cfa
uint32_t cfa
Holds the Bayer color filter array order of the sensor.
Definition: NvSIPLDeviceBlockInfo.hpp:104
nvsipl::EEPROMInfo
Defines the EEPROM information.
Definition: NvSIPLDeviceBlockInfo.hpp:165
NVSIPL_CAP_INPUT_FORMAT_TYPE_RAW12
#define NVSIPL_CAP_INPUT_FORMAT_TYPE_RAW12
Definition: NvSIPLCapStructs.h:295
nvsipl::DeserInfo::resetAll
bool resetAll
Definition: NvSIPLDeviceBlockInfo.hpp:262
nvsipl::CameraModuleInfo::sensorInfo
SensorInfo sensorInfo
Holds the information about the sensor in a camera module.
Definition: NvSIPLDeviceBlockInfo.hpp:239
nvsipl::DeviceBlockInfo::numCameraModules
uint32_t numCameraModules
Holds the number of camera modules connected to the deserializer.
Definition: NvSIPLDeviceBlockInfo.hpp:286
nvsipl::SensorInfo::description
std::string description
Holds the description of the image sensor.
Definition: NvSIPLDeviceBlockInfo.hpp:138
nvsipl::CameraModuleInfo::linkIndex
uint32_t linkIndex
Holds the index of the deserializer link to which this module is connected.
Definition: NvSIPLDeviceBlockInfo.hpp:230
nvsipl::SensorInfo::VirtualChannelInfo::inputFormat
NvSiplCapInputFormatType inputFormat
Holds the input format @anon_struct_member{1}.
Definition: NvSIPLDeviceBlockInfo.hpp:116
nvsipl::SensorInfo::Resolution::width
uint32_t width
< Holds the width in pixels in the range from NVMEDIA_ICP_MIN_IMAGE_WIDTH to NVMEDIA_ICP_MAX_IMAGE_WI...
Definition: NvSIPLDeviceBlockInfo.hpp:81
nvsipl::SensorInfo::isTriggerModeEnabled
bool isTriggerModeEnabled
Holds a flag which indicates whether trigger mode is enabled.
Definition: NvSIPLDeviceBlockInfo.hpp:146
nvsipl::SerInfo::useCDIv2API
bool useCDIv2API
Holds a flag which indicates whether CDI (Camera Device Interface) is using the new version 2 API for...
Definition: NvSIPLDeviceBlockInfo.hpp:209
nvsipl::SensorInfo::errGpios
std::vector< uint32_t > errGpios
Holds CDAC Error GPIO indices for the sensor.
Definition: NvSIPLDeviceBlockInfo.hpp:148
nvsipl::SensorInfo::i2cAddress
uint8_t i2cAddress
Holds the native I2C address of the image sensor.
Definition: NvSIPLDeviceBlockInfo.hpp:141
nvsipl::CameraModuleInfo
Defines information for the camera module.
Definition: NvSIPLDeviceBlockInfo.hpp:220
NvSIPLCapStructs.h
nvsipl::DeviceBlockInfo::gpios
std::vector< uint32_t > gpios
Holds CDAC GPIO indices for the Device Block.
Definition: NvSIPLDeviceBlockInfo.hpp:311
nvsipl::SensorInfo::patternMode
uint32_t patternMode
Holds the Test Pattern Generator (TPG) pattern mode.
Definition: NvSIPLDeviceBlockInfo.hpp:160
nvsipl::SensorInfo::VirtualChannelInfo::embeddedTopLines
uint32_t embeddedTopLines
Holds the number of top embedded lines.
Definition: NvSIPLDeviceBlockInfo.hpp:108
nvsipl::DeviceBlockInfo::cameraModuleInfoList
CameraModuleInfo cameraModuleInfoList[MAX_CAMERAMODULES_PER_BLOCK]
Holds an array of information about each camera module in the device block.
Definition: NvSIPLDeviceBlockInfo.hpp:289
nvsipl::SensorInfo
Defines the image sensor information.
Definition: NvSIPLDeviceBlockInfo.hpp:70
nvsipl::EEPROMInfo::description
std::string description
Holds the description of the EEPROM.
Definition: NvSIPLDeviceBlockInfo.hpp:171
NvSiplCapCsiPhyMode
NvMediaICPCsiPhyMode NvSiplCapCsiPhyMode
Definition: NvSIPLCapStructs.h:316
nvsipl::SensorInfo::VirtualChannelInfo::isEmbeddedDataTypeEnabled
bool isEmbeddedDataTypeEnabled
Indicates whether the embedded data is coming in CSI packet with different data.
Definition: NvSIPLDeviceBlockInfo.hpp:129
nvsipl::DeviceBlockInfo::pwrPort
std::uint32_t pwrPort
Holds the power port.
Definition: NvSIPLDeviceBlockInfo.hpp:295
nvsipl::DeviceBlockInfo::desI2CPort
std::uint32_t desI2CPort
Holds the deserializer I2C port number connected with the SoC.
Definition: NvSIPLDeviceBlockInfo.hpp:291
nvsipl::DeserInfo::i2cAddress
uint8_t i2cAddress
Holds the native I2C address of the deserializer.
Definition: NvSIPLDeviceBlockInfo.hpp:252
nvsipl::DeviceBlockInfo::phyMode
NvSiplCapCsiPhyMode phyMode
Holds the NvMediaICPCsiPhyMode Phy mode.
Definition: NvSIPLDeviceBlockInfo.hpp:277
nvsipl::DeviceBlockInfo::isSimulatorModeEnabled
bool isSimulatorModeEnabled
Holds a flag which indicates whether simulator mode has been enabled.
Definition: NvSIPLDeviceBlockInfo.hpp:303
nvsipl::X4_CSI_LANE_CONFIGURATION
static const std::uint32_t X4_CSI_LANE_CONFIGURATION
Indicates the index for CSI 4 lanes.
Definition: NvSIPLDeviceBlockInfo.hpp:67
NVSIPL_CAP_CSI_DPHY_MODE
#define NVSIPL_CAP_CSI_DPHY_MODE
Definition: NvSIPLCapStructs.h:317
nvsipl::SensorInfo::VirtualChannelInfo::resolution
Resolution resolution
Holds the Resolution of the captured frame.
Definition: NvSIPLDeviceBlockInfo.hpp:120
nvsipl::SensorInfo::useCDIv2API
bool useCDIv2API
Holds a flag which indicates whether CDI (Camera Device Interface) is using the new version 2 API for...
Definition: NvSIPLDeviceBlockInfo.hpp:153
nvsipl::SerInfo::longCable
bool longCable
Holds long cable support.
Definition: NvSIPLDeviceBlockInfo.hpp:201
nvsipl::CameraModuleInfo::name
std::string name
Holds the name of the camera module, for example, "SF3324".
Definition: NvSIPLDeviceBlockInfo.hpp:223
nvsipl::DeviceBlockInfo::isGroupInitProg
bool isGroupInitProg
Holds a flag which indicates whether group initialization is enabled.
Definition: NvSIPLDeviceBlockInfo.hpp:309
nvsipl::SerdesGPIOPinMap
Defines GPIO mapping from the serializer to the deserializer.
Definition: NvSIPLDeviceBlockInfo.hpp:183
nvsipl::MAX_CAMERAMODULES_PER_PLATFORM
static const uint32_t MAX_CAMERAMODULES_PER_PLATFORM
Indicates the maximum number of camera modules per platform.
Definition: NvSIPLDeviceBlockInfo.hpp:55
nvsipl::SensorInfo::isTPGEnabled
bool isTPGEnabled
Holds a flag which indicates whether the sensor requires configuration in Test Pattern Generator (TPG...
Definition: NvSIPLDeviceBlockInfo.hpp:158
nvsipl::CameraModuleInfo::serInfo
SerInfo serInfo
Holds the SerInfo of the serializer.
Definition: NvSIPLDeviceBlockInfo.hpp:232
nvsipl::DeserInfo
Defines the deserializer information.
Definition: NvSIPLDeviceBlockInfo.hpp:243
nvsipl::DeviceBlockInfo::longCables
bool longCables[MAX_CAMERAMODULES_PER_BLOCK]
Holds long cable support.
Definition: NvSIPLDeviceBlockInfo.hpp:317
nvsipl::SerdesGPIOPinMap::sourceGpio
uint8_t sourceGpio
Definition: NvSIPLDeviceBlockInfo.hpp:184
nvsipl::SensorInfo::Resolution
Defines the image resolution.
Definition: NvSIPLDeviceBlockInfo.hpp:75
nvsipl::SerInfo::description
std::string description
Holds the description of the serializer.
Definition: NvSIPLDeviceBlockInfo.hpp:195
nvsipl::DeviceBlockInfo
Defines the DeviceBlock information.
Definition: NvSIPLDeviceBlockInfo.hpp:271
nvsipl::CameraModuleInfo::eepromInfo
EEPROMInfo eepromInfo
Holds the information about EEPROM device in a camera module.
Definition: NvSIPLDeviceBlockInfo.hpp:237
nvsipl::SerInfo::serdesGPIOPinMappings
std::vector< SerdesGPIOPinMap > serdesGPIOPinMappings
Holds the information about GPIO mapping from the serializer to the deserializer Holds two numbers as...
Definition: NvSIPLDeviceBlockInfo.hpp:213
nvsipl::EEPROMInfo::name
std::string name
Holds the name of the EEPROM, for example, "N24C64".
Definition: NvSIPLDeviceBlockInfo.hpp:168
nvsipl::CameraModuleInfo::description
std::string description
Holds the description of the camera module.
Definition: NvSIPLDeviceBlockInfo.hpp:226
nvsipl::DeviceBlockInfo::desTxPort
std::uint32_t desTxPort
Holds the deserializer Tx port number connected with the SoC.
Definition: NvSIPLDeviceBlockInfo.hpp:293
nvsipl::SerInfo::name
std::string name
Holds the name of the serializer, for example, "MAX96705".
Definition: NvSIPLDeviceBlockInfo.hpp:192
nvsipl::EEPROMInfo::useCDIv2API
bool useCDIv2API
Holds a flag which indicates whether CDI (Camera Device Interface) is using the new version 2 API for...
Definition: NvSIPLDeviceBlockInfo.hpp:179
nvsipl
Contains the classes and variables for implementation of SIPL.
Definition: INvSiplControlAuto.hpp:33
nvsipl::DeserInfo::errGpios
std::vector< uint32_t > errGpios
Holds CDAC Error GPIO indices for the deserializer.
Definition: NvSIPLDeviceBlockInfo.hpp:254
nvsipl::MAX_SENSORS_PER_PLATFORM
static const uint32_t MAX_SENSORS_PER_PLATFORM
Indicates the maximum number of sensors per platform.
Definition: NvSIPLDeviceBlockInfo.hpp:58
nvsipl::CameraModuleInfo::isEEPROMSupported
bool isEEPROMSupported
Holds EEPROM support.
Definition: NvSIPLDeviceBlockInfo.hpp:234
nvsipl::SerInfo
Defines the serializer information.
Definition: NvSIPLDeviceBlockInfo.hpp:189
nvsipl::DeviceBlockInfo::resetAll
bool resetAll
Definition: NvSIPLDeviceBlockInfo.hpp:320
nvsipl::X2_CSI_LANE_CONFIGURATION
static const std::uint32_t X2_CSI_LANE_CONFIGURATION
Indicates the index for CSI 2 lanes.
Definition: NvSIPLDeviceBlockInfo.hpp:64
nvsipl::SensorInfo::VirtualChannelInfo
Defines the information of a virtual channel/single exposure.
Definition: NvSIPLDeviceBlockInfo.hpp:93
NvSiplCapInterfaceType
NvMediaICPInterfaceType NvSiplCapInterfaceType
Definition: NvSIPLCapStructs.h:261
nvsipl::SensorInfo::VirtualChannelInfo::embeddedBottomLines
uint32_t embeddedBottomLines
Holds the number of bottom embedded lines.
Definition: NvSIPLDeviceBlockInfo.hpp:112
nvsipl::SerInfo::errGpios
std::vector< uint32_t > errGpios
Holds CDAC Error GPIO indices for the serializer.
Definition: NvSIPLDeviceBlockInfo.hpp:204
nvsipl::DeviceBlockInfo::cphyRate
std::uint32_t cphyRate[MAX_CSI_LANE_CONFIGURATION]
Holds the deserializer's data rate in CPHY mode(ksps)
Definition: NvSIPLDeviceBlockInfo.hpp:299
NVSIPL_CAP_CSI_INTERFACE_TYPE_CSI_A
#define NVSIPL_CAP_CSI_INTERFACE_TYPE_CSI_A
Definition: NvSIPLCapStructs.h:263
nvsipl::DeviceBlockInfo::isPassiveModeEnabled
bool isPassiveModeEnabled
Holds a flag which indicates whether passive mode must be enabled.
Definition: NvSIPLDeviceBlockInfo.hpp:307