NVIDIA DRIVE OS Linux SDK API Reference

5.2.3 Release
For Test and Development only
NvSIPLDeviceBlockInfo.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020, 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 #include "devblk_cdi.h"
15 #include "nvmedia_icp_structs.h"
16 
17 #include <string>
18 #include <memory>
19 #include <vector>
20 #include <set>
21 
29 namespace nvsipl
30 {
43 static const uint32_t MAX_DEVICEBLOCKS_PER_PLATFORM = 4U;
44 
46 static const uint32_t MAX_CAMERAMODULES_PER_BLOCK = 4U;
47 
50 
53 
55 static const std::uint32_t MAX_CSI_LANE_CONFIGURATION = 2U;
56 
58 static const std::uint32_t X2_CSI_LANE_CONFIGURATION = 0U;
59 
61 static const std::uint32_t X4_CSI_LANE_CONFIGURATION = 1U;
62 
64 struct SensorInfo
65 {
67  struct Resolution
68  {
69  uint32_t width = 0U;
72  uint32_t height = 0U;
75  };
76 
79  {
86  uint32_t cfa = 0U;
88  uint32_t embeddedTopLines = UINT32_MAX;
90  uint32_t embeddedBottomLines = UINT32_MAX;
92  NvMediaICPInputFormatType inputFormat = NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_RAW12;
97  float fps = 0;
100  };
101 
103  uint32_t id = UINT32_MAX;
105  std::string name = "";
106 #if !NV_IS_SAFETY
107 
108  std::string description = "";
109 #endif
110 
111  uint8_t i2cAddress = UINT8_MAX;
116  bool isTriggerModeEnabled = false;
118  std::set<uint32_t> errGpios;
123  bool useCDIv2API = false;
124 #if !NV_IS_SAFETY
125 
128  bool isTPGEnabled = false;
130  uint32_t patternMode = 0;
131 #endif
132 };
133 
136 {
138  std::string name = "";
139 #if !NV_IS_SAFETY
140 
141  std::string description = "";
142 #endif
143 
144  uint8_t i2cAddress = UINT8_MAX;
149  bool useCDIv2API = false;
150 };
151 
154  uint8_t sourceGpio;
155  uint8_t destGpio;
156 };
157 
159 struct SerInfo
160 {
162  std::string name = "";
163 #if !NV_IS_SAFETY
164 
165  std::string description = "";
166 #endif
167 
168  uint8_t i2cAddress = UINT8_MAX;
169 #if !NV_IS_SAFETY
170 
171  bool longCable = false;
172 #endif
173 
174  std::set<uint32_t> errGpios;
179  bool useCDIv2API = false;
183  std::vector<SerdesGPIOPinMap> serdesGPIOPinMappings;
184 };
185 
191 {
193  std::string name = "";
194 #if !NV_IS_SAFETY
195 
196  std::string description = "";
197 #endif
198 
200  uint32_t linkIndex = UINT32_MAX;
204  bool isEEPROMSupported = false;
210 };
211 
213 struct DeserInfo
214 {
216  std::string name = "";
217 #if !NV_IS_SAFETY
218 
219  std::string description = "";
220 #endif
221 
222  uint8_t i2cAddress = UINT8_MAX;
224  std::set<uint32_t> errGpios;
229  bool useCDIv2API = false;
230 };
231 
239 {
242  NvMediaICPInterfaceType csiPort = NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_A;
244  NvMediaICPCsiPhyMode phyMode = NVMEDIA_ICP_CSI_DPHY_MODE;
247  uint32_t i2cDevice = UINT32_MAX;
253  uint32_t numCameraModules = 0;
258  std::uint32_t desI2CPort = UINT32_MAX;
260  std::uint32_t desTxPort = UINT32_MAX;
262  std::uint32_t pwrPort = UINT32_MAX;
264  std::uint32_t dphyRate[MAX_CSI_LANE_CONFIGURATION] = {0U};
266  std::uint32_t cphyRate[MAX_CSI_LANE_CONFIGURATION] = {0U};
267 #if !NV_IS_SAFETY
268 
275  bool isSlaveModeEnabled = false;
276 #endif
277 
278  bool isGroupInitProg = false;
279 #if !NV_IS_SAFETY
280 
282  bool isPwrCtrlDisabled = false;
284  bool longCables[MAX_CAMERAMODULES_PER_BLOCK] = {false, false, false, false};
285 #endif
286 };
287 
290 } // namespace nvsipl
291 
292 #endif //NVSIPLDEVICEBLOCKINFO_HPP
293 
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:43
nvsipl::DeserInfo::name
std::string name
Holds the name of the deserializer, for example, "MAX96712".
Definition: NvSIPLDeviceBlockInfo.hpp:216
nvsipl::DeviceBlockInfo::dphyRate
std::uint32_t dphyRate[MAX_CSI_LANE_CONFIGURATION]
Holds the deserializer's date rate in DPHY mode(kHz)
Definition: NvSIPLDeviceBlockInfo.hpp:264
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:46
nvsipl::SensorInfo::vcInfo
VirtualChannelInfo vcInfo
Holds virtual channel information.
Definition: NvSIPLDeviceBlockInfo.hpp:113
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:55
nvsipl::DeviceBlockInfo::deserInfo
DeserInfo deserInfo
Holds the DeserInfo deserializer information.
Definition: NvSIPLDeviceBlockInfo.hpp:249
nvsipl::DeviceBlockInfo::phyMode
NvMediaICPCsiPhyMode phyMode
Holds the NvMediaICPCsiPhyMode Phy mode.
Definition: NvSIPLDeviceBlockInfo.hpp:244
nvsipl::DeviceBlockInfo::isPwrCtrlDisabled
bool isPwrCtrlDisabled
Holds a flag which indicates whether power control is disabled on the platform.
Definition: NvSIPLDeviceBlockInfo.hpp:282
nvsipl::SerInfo::i2cAddress
uint8_t i2cAddress
Holds the native I2C address.
Definition: NvSIPLDeviceBlockInfo.hpp:168
nvsipl::SensorInfo::name
std::string name
Holds the name of the image sensor, for example, "AR0231".
Definition: NvSIPLDeviceBlockInfo.hpp:105
nvsipl::DeviceBlockInfo::i2cDevice
uint32_t i2cDevice
Holds the I2C device bus number used to connect the deserializer with the SoC.
Definition: NvSIPLDeviceBlockInfo.hpp:247
nvsipl::DeserInfo::description
std::string description
Holds the description of the deserializer.
Definition: NvSIPLDeviceBlockInfo.hpp:219
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_HE...
Definition: NvSIPLDeviceBlockInfo.hpp:72
nvsipl::DeviceBlockInfo::csiPort
NvMediaICPInterfaceType csiPort
Holds the NvMediaICPInterfaceType that specifies the CSI port of the SoC to which the deserializer is...
Definition: NvSIPLDeviceBlockInfo.hpp:242
nvsipl::SerdesGPIOPinMap::destGpio
uint8_t destGpio
Definition: NvSIPLDeviceBlockInfo.hpp:155
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:229
nvsipl::SensorInfo::VirtualChannelInfo::cfa
uint32_t cfa
Holds the Bayer color filter array order of the sensor.
Definition: NvSIPLDeviceBlockInfo.hpp:86
nvsipl::EEPROMInfo
Defines the EEPROM information.
Definition: NvSIPLDeviceBlockInfo.hpp:135
nvsipl::CameraModuleInfo::sensorInfo
SensorInfo sensorInfo
Holds the information about the sensor in a camera module.
Definition: NvSIPLDeviceBlockInfo.hpp:209
nvsipl::DeviceBlockInfo::numCameraModules
uint32_t numCameraModules
Holds the number of camera modules connected to the deserializer.
Definition: NvSIPLDeviceBlockInfo.hpp:253
nvsipl::SensorInfo::description
std::string description
Holds the description of the image sensor.
Definition: NvSIPLDeviceBlockInfo.hpp:108
nvsipl::CameraModuleInfo::linkIndex
uint32_t linkIndex
Holds the index of the deserializer link to which this module is connected.
Definition: NvSIPLDeviceBlockInfo.hpp:200
nvsipl::SensorInfo::errGpios
std::set< uint32_t > errGpios
Holds CDAC GPIO indices for the sensor.
Definition: NvSIPLDeviceBlockInfo.hpp:118
nvsipl::SensorInfo::VirtualChannelInfo::inputFormat
NvMediaICPInputFormatType inputFormat
Holds the input format.
Definition: NvSIPLDeviceBlockInfo.hpp:92
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_WIDT...
Definition: NvSIPLDeviceBlockInfo.hpp:69
nvsipl::SensorInfo::isTriggerModeEnabled
bool isTriggerModeEnabled
Holds a flag which indicates whether trigger mode is enabled.
Definition: NvSIPLDeviceBlockInfo.hpp:116
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:179
nvsipl::SensorInfo::i2cAddress
uint8_t i2cAddress
Holds the native I2C address of the image sensor.
Definition: NvSIPLDeviceBlockInfo.hpp:111
nvsipl::CameraModuleInfo
Defines information for the camera module.
Definition: NvSIPLDeviceBlockInfo.hpp:190
nvsipl::SensorInfo::patternMode
uint32_t patternMode
Holds the Test Pattern Generator (TPG) pattern mode.
Definition: NvSIPLDeviceBlockInfo.hpp:130
nvsipl::DeviceBlockInfo::isSlaveModeEnabled
bool isSlaveModeEnabled
Holds a flag which indicates whether slave mode must be enabled.
Definition: NvSIPLDeviceBlockInfo.hpp:275
nvsipl::SensorInfo::VirtualChannelInfo::embeddedTopLines
uint32_t embeddedTopLines
Holds the number of top embedded lines.
Definition: NvSIPLDeviceBlockInfo.hpp:88
nvsipl::EEPROMInfo::i2cAddress
uint8_t i2cAddress
Holds the native I2C address.
Definition: NvSIPLDeviceBlockInfo.hpp:144
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:256
nvsipl::SensorInfo
Defines the image sensor information.
Definition: NvSIPLDeviceBlockInfo.hpp:64
nvsipl::EEPROMInfo::description
std::string description
Holds the description of the EEPROM.
Definition: NvSIPLDeviceBlockInfo.hpp:141
nvsipl::SensorInfo::VirtualChannelInfo::isEmbeddedDataTypeEnabled
bool isEmbeddedDataTypeEnabled
Indicates whether the embedded data is coming in CSI packet with different data.
Definition: NvSIPLDeviceBlockInfo.hpp:99
nvsipl::DeviceBlockInfo::pwrPort
std::uint32_t pwrPort
Holds the power port.
Definition: NvSIPLDeviceBlockInfo.hpp:262
nvsipl::DeviceBlockInfo::desI2CPort
std::uint32_t desI2CPort
Holds the deserializer I2C port number connected with the SoC.
Definition: NvSIPLDeviceBlockInfo.hpp:258
nvsipl::DeserInfo::i2cAddress
uint8_t i2cAddress
Holds the native I2C address of the deserializer.
Definition: NvSIPLDeviceBlockInfo.hpp:222
nvsipl::DeviceBlockInfo::isSimulatorModeEnabled
bool isSimulatorModeEnabled
Holds a flag which indicates whether simulator mode has been enabled.
Definition: NvSIPLDeviceBlockInfo.hpp:271
nvsipl::X4_CSI_LANE_CONFIGURATION
static const std::uint32_t X4_CSI_LANE_CONFIGURATION
Indicates the index for CSI 4 lanes.
Definition: NvSIPLDeviceBlockInfo.hpp:61
nvsipl::SensorInfo::VirtualChannelInfo::resolution
Resolution resolution
Holds the Resolution of the captured frame.
Definition: NvSIPLDeviceBlockInfo.hpp:94
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:123
nvsipl::SerInfo::longCable
bool longCable
Holds long cable support.
Definition: NvSIPLDeviceBlockInfo.hpp:171
nvsipl::CameraModuleInfo::name
std::string name
Holds the name of the camera module, for example, "SF3324".
Definition: NvSIPLDeviceBlockInfo.hpp:193
nvsipl::DeviceBlockInfo::isGroupInitProg
bool isGroupInitProg
Holds a flag which indicates whether group initialization is enabled.
Definition: NvSIPLDeviceBlockInfo.hpp:278
nvsipl::SerdesGPIOPinMap
Defines GPIO mapping from the serializer to the deserializer.
Definition: NvSIPLDeviceBlockInfo.hpp:153
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:49
nvsipl::SerInfo::errGpios
std::set< uint32_t > errGpios
Holds CDAC GPIO indices for the serializer.
Definition: NvSIPLDeviceBlockInfo.hpp:174
nvsipl::SensorInfo::isTPGEnabled
bool isTPGEnabled
Holds a flag which indicates whether the sensor requires configuration in Test Pattern Generator (TPG...
Definition: NvSIPLDeviceBlockInfo.hpp:128
nvsipl::CameraModuleInfo::serInfo
SerInfo serInfo
Holds the SerInfo of the serializer.
Definition: NvSIPLDeviceBlockInfo.hpp:202
nvsipl::DeserInfo::errGpios
std::set< uint32_t > errGpios
Holds CDAC GPIO indices for the deserializer.
Definition: NvSIPLDeviceBlockInfo.hpp:224
nvsipl::DeserInfo
Defines the deserializer information.
Definition: NvSIPLDeviceBlockInfo.hpp:213
nvsipl::DeviceBlockInfo::longCables
bool longCables[MAX_CAMERAMODULES_PER_BLOCK]
Holds long cable support.
Definition: NvSIPLDeviceBlockInfo.hpp:284
nvsipl::SerdesGPIOPinMap::sourceGpio
uint8_t sourceGpio
Definition: NvSIPLDeviceBlockInfo.hpp:154
nvsipl::SensorInfo::Resolution
Defines the image resolution.
Definition: NvSIPLDeviceBlockInfo.hpp:67
nvsipl::SerInfo::description
std::string description
Holds the description of the serializer.
Definition: NvSIPLDeviceBlockInfo.hpp:165
nvsipl::DeviceBlockInfo
Defines the DeviceBlock information.
Definition: NvSIPLDeviceBlockInfo.hpp:238
nvsipl::CameraModuleInfo::eepromInfo
EEPROMInfo eepromInfo
Holds the information about EEPROM device in a camera module.
Definition: NvSIPLDeviceBlockInfo.hpp:207
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:183
nvsipl::EEPROMInfo::name
std::string name
Holds the name of the EEPROM, for example, "N24C64".
Definition: NvSIPLDeviceBlockInfo.hpp:138
nvsipl::CameraModuleInfo::description
std::string description
Holds the description of the camera module.
Definition: NvSIPLDeviceBlockInfo.hpp:196
nvsipl::DeviceBlockInfo::desTxPort
std::uint32_t desTxPort
Holds the deserializer Tx port number connected with the SoC.
Definition: NvSIPLDeviceBlockInfo.hpp:260
nvsipl::SerInfo::name
std::string name
Holds the name of the serializer, for example, "MAX96705".
Definition: NvSIPLDeviceBlockInfo.hpp:162
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:149
nvsipl
Contains the classes and variables for implementation of SIPL.
Definition: INvSiplControlAuto.hpp:33
nvsipl::MAX_SENSORS_PER_PLATFORM
static const uint32_t MAX_SENSORS_PER_PLATFORM
Indicates the maximum number of sensors per platform.
Definition: NvSIPLDeviceBlockInfo.hpp:52
nvsipl::CameraModuleInfo::isEEPROMSupported
bool isEEPROMSupported
Holds EEPROM support.
Definition: NvSIPLDeviceBlockInfo.hpp:204
nvsipl::SerInfo
Defines the serializer information.
Definition: NvSIPLDeviceBlockInfo.hpp:159
nvsipl::X2_CSI_LANE_CONFIGURATION
static const std::uint32_t X2_CSI_LANE_CONFIGURATION
Indicates the index for CSI 2 lanes.
Definition: NvSIPLDeviceBlockInfo.hpp:58
nvsipl::SensorInfo::VirtualChannelInfo
Defines the information of a virtual channel/single exposure.
Definition: NvSIPLDeviceBlockInfo.hpp:78
nvsipl::SensorInfo::VirtualChannelInfo::embeddedBottomLines
uint32_t embeddedBottomLines
Holds the number of bottom embedded lines.
Definition: NvSIPLDeviceBlockInfo.hpp:90
nvsipl::DeviceBlockInfo::cphyRate
std::uint32_t cphyRate[MAX_CSI_LANE_CONFIGURATION]
Holds the deserializer's date rate in CPHY mode(ksps)
Definition: NvSIPLDeviceBlockInfo.hpp:266
nvsipl::SensorInfo::VirtualChannelInfo::fps
float fps
Holds the average number of frames per second in the range from NVMEDIA_ICP_MIN_FRAME_RATE to NVMEDIA...
Definition: NvSIPLDeviceBlockInfo.hpp:97