NVIDIA DRIVE OS Linux SDK API Reference

6.0.5 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 #include "NvSIPLCapStructs.h"
15 
16 #include <string>
17 #include <memory>
18 #include <vector>
19 #include <cmath>
20 
28 namespace nvsipl
29 {
42 #if !NV_IS_SAFETY
43 static constexpr uint32_t MAX_DEVICEBLOCKS_PER_PLATFORM {6U};
44 #else
45 static constexpr uint32_t MAX_DEVICEBLOCKS_PER_PLATFORM {4U};
46 #endif
47 
49 static constexpr uint32_t MAX_CAMERAMODULES_PER_BLOCK {4U};
50 
53 
56 
58 static constexpr std::uint32_t MAX_CSI_LANE_CONFIGURATION {2U};
59 
61 static constexpr std::uint32_t X2_CSI_LANE_CONFIGURATION {0U};
62 
64 static constexpr std::uint32_t X4_CSI_LANE_CONFIGURATION {1U};
65 
68 {
70  uint32_t idx;
73 };
74 
75 #if !NV_IS_SAFETY
76 
78 static constexpr std::uint8_t CAMREC_NONE {0U};
80 static constexpr std::uint8_t CAMREC_VER1 {1U};
82 static constexpr std::uint8_t CAMREC_VER2_A01B23 {2U};
84 static constexpr std::uint8_t CAMREC_VER2_A01 {3U};
86 static constexpr std::uint8_t CAMREC_VER2_B23 {4U};
87 #endif
88 
90 struct SensorInfo
91 {
95  struct Resolution
96  {
101  uint32_t width {0U};
102 
107  uint32_t height {0U};
108  };
109 
114  {
124  uint32_t cfa {0U};
128  uint32_t embeddedTopLines {UINT32_MAX};
132  uint32_t embeddedBottomLines {UINT32_MAX};
145  float_t fps {0.0F};
150  };
151 
153  uint32_t id = UINT32_MAX;
155  std::string name = "";
156 #if !NV_IS_SAFETY
157 
158  std::string description = "";
159 #endif // !NV_IS_SAFETY
160 
161  uint8_t i2cAddress {static_cast<uint8_t>UINT8_MAX};
166  bool isTriggerModeEnabled {false};
168  std::vector<IntrGpioInfo> errGpios;
173  bool useCDIv2API {false};
174 #if !NV_IS_SAFETY
175 
178  bool isTPGEnabled {false};
180  uint32_t patternMode {0U};
181 #endif // !NV_IS_SAFETY
182 };
183 
186 {
188  std::string name = "";
189 #if !NV_IS_SAFETY
190 
191  std::string description = "";
192 #endif
193 
194  uint8_t i2cAddress {static_cast<uint8_t>UINT8_MAX};
195 
199  bool useCDIv2API {false};
200 };
201 
204  uint8_t sourceGpio;
205  uint8_t destGpio;
206 };
207 
209 struct SerInfo
210 {
212  std::string name = "";
213 #if !NV_IS_SAFETY
214 
215  std::string description = "";
216 #endif // !NV_IS_SAFETY
217 
218  uint8_t i2cAddress {static_cast<uint8_t>UINT8_MAX};
219 #if !NV_IS_SAFETY
220 
221  bool longCable {false};
222 #endif // !NV_IS_SAFETY
223 
224  std::vector<IntrGpioInfo> errGpios;
229  bool useCDIv2API {false};
233  std::vector<SerdesGPIOPinMap> serdesGPIOPinMappings;
234 };
235 
241 {
243  std::string name = "";
244 #if !NV_IS_SAFETY
245 
246  std::string description = "";
247 #endif // !NV_IS_SAFETY
248 
250  uint32_t linkIndex {UINT32_MAX};
254  bool isEEPROMSupported {false};
260 };
261 
263 struct DeserInfo
264 {
266  std::string name = "";
267 #if !NV_IS_SAFETY
268 
269  std::string description = "";
270 #endif // !NV_IS_SAFETY
271 
272  uint8_t i2cAddress {static_cast<uint8_t>UINT8_MAX};
274  std::vector<IntrGpioInfo> errGpios;
275 #if !NV_IS_SAFETY
276 
278 #endif // !NV_IS_SAFETY
279 
283  bool useCDIv2API {false};
284  /* @brief Holds flag to indicate that the deser needs to run a reset all sequence at
285  startup */
286  bool resetAll {false};
287 };
288 
296 {
304  uint32_t i2cDevice {UINT32_MAX};
310  uint32_t numCameraModules {0U};
315  std::uint32_t desI2CPort {UINT32_MAX};
317  std::uint32_t desTxPort {UINT32_MAX};
319  std::uint32_t pwrPort = UINT32_MAX;
321  std::uint32_t dphyRate[MAX_CSI_LANE_CONFIGURATION] = {0U};
323  std::uint32_t cphyRate[MAX_CSI_LANE_CONFIGURATION] = {0U};
331  bool isPassiveModeEnabled {false};
333  bool isGroupInitProg {false};
335  std::vector<uint32_t> gpios;
336 #if !NV_IS_SAFETY
337 
339  bool isPwrCtrlDisabled {false};
341  bool longCables[MAX_CAMERAMODULES_PER_BLOCK] = {false, false, false, false};
342 #endif // !NV_IS_SAFETY
343  /* @brief Reset all sequence is needed when starting deserializer. */
344  bool resetAll;
345 };
346 
349 } // namespace nvsipl
350 
351 #endif //NVSIPLDEVICEBLOCKINFO_HPP
NVSIPL_CAP_CSI_INTERFACE_TYPE_CSI_A
@ NVSIPL_CAP_CSI_INTERFACE_TYPE_CSI_A
Specifies CSI port A.
Definition: NvSIPLCapStructs.h:29
nvsipl::IntrGpioInfo::idx
uint32_t idx
The CDAC Interrupt GPIO index.
Definition: NvSIPLDeviceBlockInfo.hpp:70
nvsipl::DeserInfo::name
std::string name
Holds the name of the deserializer, for example, "MAX96712".
Definition: NvSIPLDeviceBlockInfo.hpp:266
nvsipl::DeviceBlockInfo::dphyRate
std::uint32_t dphyRate[MAX_CSI_LANE_CONFIGURATION]
Holds the deserializer's data rate in DPHY mode(kHz)
Definition: NvSIPLDeviceBlockInfo.hpp:321
nvsipl::MAX_CSI_LANE_CONFIGURATION
static constexpr std::uint32_t MAX_CSI_LANE_CONFIGURATION
Indicates the maximum number of CSI lane configurations.
Definition: NvSIPLDeviceBlockInfo.hpp:58
nvsipl::DeviceBlockInfo::csiPort
NvSiplCapInterfaceType csiPort
Holds the NvSiplCapInterfaceType that specifies the CSI port of the SoC to which the deserializer is ...
Definition: NvSIPLDeviceBlockInfo.hpp:299
nvsipl::SensorInfo::vcInfo
VirtualChannelInfo vcInfo
Holds virtual channel information.
Definition: NvSIPLDeviceBlockInfo.hpp:163
nvsipl::IntrGpioInfo
Describes an Interrupt GPIO configuration.
Definition: NvSIPLDeviceBlockInfo.hpp:67
nvsipl::DeviceBlockInfo::deserInfo
DeserInfo deserInfo
Holds the DeserInfo deserializer information.
Definition: NvSIPLDeviceBlockInfo.hpp:306
nvsipl::DeviceBlockInfo::isPwrCtrlDisabled
bool isPwrCtrlDisabled
Holds a flag which indicates whether power control is disabled on the platform.
Definition: NvSIPLDeviceBlockInfo.hpp:339
nvsipl::DeserInfo::camRecCfg
uint8_t camRecCfg
Holds the recorder configuration for the deserializer.
Definition: NvSIPLDeviceBlockInfo.hpp:277
nvsipl::SensorInfo::VirtualChannelInfo::fps
float_t fps
Holds the average number of frames per second in the range from NVSIPL_CAP_MIN_FRAME_RATE to NVSIPL_C...
Definition: NvSIPLDeviceBlockInfo.hpp:145
nvsipl::SerInfo::i2cAddress
uint8_t i2cAddress
Holds the native I2C address.
Definition: NvSIPLDeviceBlockInfo.hpp:218
nvsipl::SensorInfo::name
std::string name
Holds the name of the image sensor, for example, "AR0231".
Definition: NvSIPLDeviceBlockInfo.hpp:155
nvsipl::DeviceBlockInfo::i2cDevice
uint32_t i2cDevice
Holds the I2C device bus number used to connect the deserializer with the SoC.
Definition: NvSIPLDeviceBlockInfo.hpp:304
nvsipl::DeserInfo::description
std::string description
Holds the description of the deserializer.
Definition: NvSIPLDeviceBlockInfo.hpp:269
nvsipl::MAX_CAMERAMODULES_PER_PLATFORM
static constexpr uint32_t MAX_CAMERAMODULES_PER_PLATFORM
Indicates the maximum number of camera modules per platform.
Definition: NvSIPLDeviceBlockInfo.hpp:52
nvsipl::SensorInfo::Resolution::height
uint32_t height
< Holds the height in pixels in the range from NVSIPL_CAP_MIN_IMAGE_HEIGHT to NVSIPL_CAP_MAX_IMAGE_HE...
Definition: NvSIPLDeviceBlockInfo.hpp:107
nvsipl::SerdesGPIOPinMap::destGpio
uint8_t destGpio
Definition: NvSIPLDeviceBlockInfo.hpp:205
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:283
nvsipl::SensorInfo::VirtualChannelInfo::cfa
uint32_t cfa
Holds the Bayer color filter array order of the sensor.
Definition: NvSIPLDeviceBlockInfo.hpp:124
nvsipl::EEPROMInfo
Defines the EEPROM information.
Definition: NvSIPLDeviceBlockInfo.hpp:185
nvsipl::DeserInfo::resetAll
bool resetAll
Definition: NvSIPLDeviceBlockInfo.hpp:286
nvsipl::CameraModuleInfo::sensorInfo
SensorInfo sensorInfo
Holds the information about the sensor in a camera module.
Definition: NvSIPLDeviceBlockInfo.hpp:259
nvsipl::DeviceBlockInfo::numCameraModules
uint32_t numCameraModules
Holds the number of camera modules connected to the deserializer.
Definition: NvSIPLDeviceBlockInfo.hpp:310
nvsipl::SensorInfo::description
std::string description
Holds the description of the image sensor.
Definition: NvSIPLDeviceBlockInfo.hpp:158
nvsipl::CameraModuleInfo::linkIndex
uint32_t linkIndex
Holds the index of the deserializer link to which this module is connected.
Definition: NvSIPLDeviceBlockInfo.hpp:250
nvsipl::SensorInfo::VirtualChannelInfo::inputFormat
NvSiplCapInputFormatType inputFormat
Holds the input format @anon_struct_member{1}.
Definition: NvSIPLDeviceBlockInfo.hpp:136
nvsipl::SensorInfo::Resolution::width
uint32_t width
< Holds the width in pixels in the range from NVSIPL_CAP_MIN_IMAGE_WIDTH to NVSIPL_CAP_MAX_IMAGE_WIDT...
Definition: NvSIPLDeviceBlockInfo.hpp:101
nvsipl::X2_CSI_LANE_CONFIGURATION
static constexpr std::uint32_t X2_CSI_LANE_CONFIGURATION
Indicates the index for CSI 2 lanes.
Definition: NvSIPLDeviceBlockInfo.hpp:61
nvsipl::SensorInfo::isTriggerModeEnabled
bool isTriggerModeEnabled
Holds a flag which indicates whether trigger mode is enabled.
Definition: NvSIPLDeviceBlockInfo.hpp:166
NvSiplCapInterfaceType
NvSiplCapInterfaceType
Definition: NvSIPLCapStructs.h:27
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:229
NvSiplCapCsiPhyMode
NvSiplCapCsiPhyMode
Definition: NvSIPLCapStructs.h:132
nvsipl::SensorInfo::i2cAddress
uint8_t i2cAddress
Holds the native I2C address of the image sensor.
Definition: NvSIPLDeviceBlockInfo.hpp:161
nvsipl::CameraModuleInfo
Defines information for the camera module.
Definition: NvSIPLDeviceBlockInfo.hpp:240
NvSIPLCapStructs.h
nvsipl::DeviceBlockInfo::gpios
std::vector< uint32_t > gpios
Holds CDAC GPIO indices for the Device Block.
Definition: NvSIPLDeviceBlockInfo.hpp:335
nvsipl::CAMREC_NONE
static constexpr std::uint8_t CAMREC_NONE
Recorder configuration.
Definition: NvSIPLDeviceBlockInfo.hpp:78
nvsipl::SensorInfo::patternMode
uint32_t patternMode
Holds the Test Pattern Generator (TPG) pattern mode.
Definition: NvSIPLDeviceBlockInfo.hpp:180
nvsipl::SensorInfo::VirtualChannelInfo::embeddedTopLines
uint32_t embeddedTopLines
Holds the number of top embedded lines.
Definition: NvSIPLDeviceBlockInfo.hpp:128
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:313
nvsipl::SensorInfo
Defines the image sensor information.
Definition: NvSIPLDeviceBlockInfo.hpp:90
nvsipl::EEPROMInfo::description
std::string description
Holds the description of the EEPROM.
Definition: NvSIPLDeviceBlockInfo.hpp:191
nvsipl::IntrGpioInfo::enableGetStatus
bool enableGetStatus
Whether to enable driver error localization upon interrupt.
Definition: NvSIPLDeviceBlockInfo.hpp:72
nvsipl::X4_CSI_LANE_CONFIGURATION
static constexpr std::uint32_t X4_CSI_LANE_CONFIGURATION
Indicates the index for CSI 4 lanes.
Definition: NvSIPLDeviceBlockInfo.hpp:64
nvsipl::SensorInfo::VirtualChannelInfo::isEmbeddedDataTypeEnabled
bool isEmbeddedDataTypeEnabled
Indicates whether the embedded data is coming in CSI packet with different data.
Definition: NvSIPLDeviceBlockInfo.hpp:149
nvsipl::DeviceBlockInfo::pwrPort
std::uint32_t pwrPort
Holds the power port.
Definition: NvSIPLDeviceBlockInfo.hpp:319
nvsipl::DeviceBlockInfo::desI2CPort
std::uint32_t desI2CPort
Holds the deserializer I2C port number connected with the SoC.
Definition: NvSIPLDeviceBlockInfo.hpp:315
nvsipl::DeserInfo::i2cAddress
uint8_t i2cAddress
Holds the native I2C address of the deserializer.
Definition: NvSIPLDeviceBlockInfo.hpp:272
nvsipl::DeviceBlockInfo::phyMode
NvSiplCapCsiPhyMode phyMode
Holds the NvSiplCapCsiPhyMode Phy mode.
Definition: NvSIPLDeviceBlockInfo.hpp:301
nvsipl::DeviceBlockInfo::isSimulatorModeEnabled
bool isSimulatorModeEnabled
Holds a flag which indicates whether simulator mode has been enabled.
Definition: NvSIPLDeviceBlockInfo.hpp:327
nvsipl::SensorInfo::VirtualChannelInfo::resolution
Resolution resolution
Holds the Resolution of the captured frame.
Definition: NvSIPLDeviceBlockInfo.hpp:140
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:173
nvsipl::SerInfo::longCable
bool longCable
Holds long cable support.
Definition: NvSIPLDeviceBlockInfo.hpp:221
nvsipl::CameraModuleInfo::name
std::string name
Holds the name of the camera module, for example, "SF3324".
Definition: NvSIPLDeviceBlockInfo.hpp:243
NvSiplCapInputFormatType
NvSiplCapInputFormatType
Definition: NvSIPLCapStructs.h:73
nvsipl::DeviceBlockInfo::isGroupInitProg
bool isGroupInitProg
Holds a flag which indicates whether group initialization is enabled.
Definition: NvSIPLDeviceBlockInfo.hpp:333
nvsipl::SerdesGPIOPinMap
Defines GPIO mapping from the serializer to the deserializer.
Definition: NvSIPLDeviceBlockInfo.hpp:203
nvsipl::SensorInfo::isTPGEnabled
bool isTPGEnabled
Holds a flag which indicates whether the sensor requires configuration in Test Pattern Generator (TPG...
Definition: NvSIPLDeviceBlockInfo.hpp:178
nvsipl::CameraModuleInfo::serInfo
SerInfo serInfo
Holds the SerInfo of the serializer.
Definition: NvSIPLDeviceBlockInfo.hpp:252
nvsipl::DeserInfo::errGpios
std::vector< IntrGpioInfo > errGpios
Holds Interrupt GPIO configurations for the deserializer.
Definition: NvSIPLDeviceBlockInfo.hpp:274
nvsipl::DeserInfo
Defines the deserializer information.
Definition: NvSIPLDeviceBlockInfo.hpp:263
nvsipl::DeviceBlockInfo::longCables
bool longCables[MAX_CAMERAMODULES_PER_BLOCK]
Holds long cable support.
Definition: NvSIPLDeviceBlockInfo.hpp:341
nvsipl::SerdesGPIOPinMap::sourceGpio
uint8_t sourceGpio
Definition: NvSIPLDeviceBlockInfo.hpp:204
nvsipl::SensorInfo::Resolution
Defines the image resolution.
Definition: NvSIPLDeviceBlockInfo.hpp:95
nvsipl::SerInfo::description
std::string description
Holds the description of the serializer.
Definition: NvSIPLDeviceBlockInfo.hpp:215
nvsipl::DeviceBlockInfo
Defines the DeviceBlock information.
Definition: NvSIPLDeviceBlockInfo.hpp:295
nvsipl::CameraModuleInfo::eepromInfo
EEPROMInfo eepromInfo
Holds the information about EEPROM device in a camera module.
Definition: NvSIPLDeviceBlockInfo.hpp:257
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:233
nvsipl::EEPROMInfo::name
std::string name
Holds the name of the EEPROM, for example, "N24C64".
Definition: NvSIPLDeviceBlockInfo.hpp:188
nvsipl::CAMREC_VER2_A01
static constexpr std::uint8_t CAMREC_VER2_A01
Enable Recorder support for first 2 cameras with the samtec cable version 2.
Definition: NvSIPLDeviceBlockInfo.hpp:84
NVSIPL_CAP_INPUT_FORMAT_TYPE_RAW12
@ NVSIPL_CAP_INPUT_FORMAT_TYPE_RAW12
Specifies RAW 12.
Definition: NvSIPLCapStructs.h:92
nvsipl::CameraModuleInfo::description
std::string description
Holds the description of the camera module.
Definition: NvSIPLDeviceBlockInfo.hpp:246
nvsipl::MAX_CAMERAMODULES_PER_BLOCK
static constexpr uint32_t MAX_CAMERAMODULES_PER_BLOCK
Indicates the maximum number of camera modules per device block.
Definition: NvSIPLDeviceBlockInfo.hpp:49
nvsipl::DeviceBlockInfo::desTxPort
std::uint32_t desTxPort
Holds the deserializer Tx port number connected with the SoC.
Definition: NvSIPLDeviceBlockInfo.hpp:317
nvsipl::SerInfo::name
std::string name
Holds the name of the serializer, for example, "MAX96705".
Definition: NvSIPLDeviceBlockInfo.hpp:212
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:199
nvsipl
Contains the classes and variables for implementation of SIPL.
Definition: INvSiplControlAuto.hpp:33
nvsipl::SensorInfo::errGpios
std::vector< IntrGpioInfo > errGpios
Holds Interrupt GPIO configurations for the sensor.
Definition: NvSIPLDeviceBlockInfo.hpp:168
nvsipl::MAX_SENSORS_PER_PLATFORM
static constexpr uint32_t MAX_SENSORS_PER_PLATFORM
Indicates the maximum number of sensors per platform.
Definition: NvSIPLDeviceBlockInfo.hpp:55
nvsipl::CAMREC_VER2_A01B23
static constexpr std::uint8_t CAMREC_VER2_A01B23
Enable Recorder support for 4 cameras with the samtec cable version 2.
Definition: NvSIPLDeviceBlockInfo.hpp:82
nvsipl::CameraModuleInfo::isEEPROMSupported
bool isEEPROMSupported
Holds EEPROM support.
Definition: NvSIPLDeviceBlockInfo.hpp:254
nvsipl::SerInfo
Defines the serializer information.
Definition: NvSIPLDeviceBlockInfo.hpp:209
nvsipl::SerInfo::errGpios
std::vector< IntrGpioInfo > errGpios
Holds Interrupt GPIO configurations for the serializer.
Definition: NvSIPLDeviceBlockInfo.hpp:224
nvsipl::DeviceBlockInfo::resetAll
bool resetAll
Definition: NvSIPLDeviceBlockInfo.hpp:344
nvsipl::CAMREC_VER2_B23
static constexpr std::uint8_t CAMREC_VER2_B23
Enable Recorder support for second 2 cameras with the samtec cable version 2.
Definition: NvSIPLDeviceBlockInfo.hpp:86
nvsipl::SensorInfo::VirtualChannelInfo
Defines the information of a virtual channel/single exposure.
Definition: NvSIPLDeviceBlockInfo.hpp:113
nvsipl::CAMREC_VER1
static constexpr std::uint8_t CAMREC_VER1
Enable Recorder support with the samtec cable version 1.
Definition: NvSIPLDeviceBlockInfo.hpp:80
nvsipl::MAX_DEVICEBLOCKS_PER_PLATFORM
static constexpr uint32_t MAX_DEVICEBLOCKS_PER_PLATFORM
Indicates the maximum number of device blocks per platform.
Definition: NvSIPLDeviceBlockInfo.hpp:43
nvsipl::SensorInfo::VirtualChannelInfo::embeddedBottomLines
uint32_t embeddedBottomLines
Holds the number of bottom embedded lines.
Definition: NvSIPLDeviceBlockInfo.hpp:132
NVSIPL_CAP_CSI_DPHY_MODE
@ NVSIPL_CAP_CSI_DPHY_MODE
Specifies that CSI is in DPHY mode.
Definition: NvSIPLCapStructs.h:134
nvsipl::DeviceBlockInfo::cphyRate
std::uint32_t cphyRate[MAX_CSI_LANE_CONFIGURATION]
Holds the deserializer's data rate in CPHY mode(ksps)
Definition: NvSIPLDeviceBlockInfo.hpp:323
nvsipl::DeviceBlockInfo::isPassiveModeEnabled
bool isPassiveModeEnabled
Holds a flag which indicates whether passive mode must be enabled.
Definition: NvSIPLDeviceBlockInfo.hpp:331