NVIDIA DRIVE OS Linux SDK API Reference

5.2.6 Release
For Test and Development only
NvSIPLDeviceBlockInfo.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020-2021, 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 
28 namespace nvsipl
29 {
42 static const uint32_t MAX_DEVICEBLOCKS_PER_PLATFORM = 4U;
43 
45 static const uint32_t MAX_CAMERAMODULES_PER_BLOCK = 4U;
46 
49 
52 
54 static const std::uint32_t MAX_CSI_LANE_CONFIGURATION = 2U;
55 
57 static const std::uint32_t X2_CSI_LANE_CONFIGURATION = 0U;
58 
60 static const std::uint32_t X4_CSI_LANE_CONFIGURATION = 1U;
61 
63 struct SensorInfo
64 {
66  struct Resolution
67  {
68  uint32_t width = 0U;
71  uint32_t height = 0U;
74  };
75 
78  {
85  uint32_t cfa = 0U;
87  uint32_t embeddedTopLines = UINT32_MAX;
89  uint32_t embeddedBottomLines = UINT32_MAX;
91  NvMediaICPInputFormatType inputFormat = NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_RAW12;
96  float_t fps = 0.0F;
99  };
100 
102  uint32_t id = UINT32_MAX;
104  std::string name = "";
105 #if !NV_IS_SAFETY
106 
107  std::string description = "";
108 #endif
109 
110  uint8_t i2cAddress = static_cast<uint8_t>UINT8_MAX;
115  bool isTriggerModeEnabled = false;
117  std::vector<uint32_t> errGpios;
122  bool useCDIv2API = false;
123 #if !NV_IS_SAFETY
124 
127  bool isTPGEnabled = false;
129  uint32_t patternMode = 0;
130 #endif
131 };
132 
135 {
137  std::string name = "";
138 #if !NV_IS_SAFETY
139 
140  std::string description = "";
141 #endif
142 
143  uint8_t i2cAddress = static_cast<uint8_t>UINT8_MAX;
148  bool useCDIv2API = false;
149 };
150 
153  uint8_t sourceGpio;
154  uint8_t destGpio;
155 };
156 
158 struct SerInfo
159 {
161  std::string name = "";
162 #if !NV_IS_SAFETY
163 
164  std::string description = "";
165 #endif
166 
167  uint8_t i2cAddress = static_cast<uint8_t>UINT8_MAX;
168 #if !NV_IS_SAFETY
169 
170  bool longCable = false;
171 #endif
172 
173  std::vector<uint32_t> errGpios;
178  bool useCDIv2API = false;
182  std::vector<SerdesGPIOPinMap> serdesGPIOPinMappings;
183 };
184 
190 {
192  std::string name = "";
193 #if !NV_IS_SAFETY
194 
195  std::string description = "";
196 #endif
197 
199  uint32_t linkIndex = UINT32_MAX;
203  bool isEEPROMSupported = false;
209 };
210 
212 struct DeserInfo
213 {
215  std::string name = "";
216 #if !NV_IS_SAFETY
217 
218  std::string description = "";
219 #endif
220 
221  uint8_t i2cAddress = static_cast<uint8_t>UINT8_MAX;
223  std::vector<uint32_t> errGpios;
228  bool useCDIv2API = false;
229 };
230 
238 {
241  NvMediaICPInterfaceType csiPort = NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_A;
243  NvMediaICPCsiPhyMode phyMode = NVMEDIA_ICP_CSI_DPHY_MODE;
246  uint32_t i2cDevice = UINT32_MAX;
252  uint32_t numCameraModules = 0U;
257  std::uint32_t desI2CPort = UINT32_MAX;
259  std::uint32_t desTxPort = UINT32_MAX;
261  std::uint32_t pwrPort = UINT32_MAX;
263  std::uint32_t dphyRate[MAX_CSI_LANE_CONFIGURATION] = {0U};
265  std::uint32_t cphyRate[MAX_CSI_LANE_CONFIGURATION] = {0U};
266 #if !NV_IS_SAFETY
267 
274  bool isSlaveModeEnabled = false;
275 #endif
276 
277  bool isGroupInitProg = false;
279  std::vector<uint32_t> gpios;
280 #if !NV_IS_SAFETY
281 
283  bool isPwrCtrlDisabled = false;
285  bool longCables[MAX_CAMERAMODULES_PER_BLOCK] = {false, false, false, false};
286 #endif
287 };
288 
291 } // namespace nvsipl
292 
293 #endif //NVSIPLDEVICEBLOCKINFO_HPP
294 
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:42
nvsipl::DeserInfo::name
std::string name
Holds the name of the deserializer, for example, "MAX96712".
Definition: NvSIPLDeviceBlockInfo.hpp:215
nvsipl::DeviceBlockInfo::dphyRate
std::uint32_t dphyRate[MAX_CSI_LANE_CONFIGURATION]
Holds the deserializer's date rate in DPHY mode(kHz)
Definition: NvSIPLDeviceBlockInfo.hpp:263
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:45
nvsipl::SensorInfo::vcInfo
VirtualChannelInfo vcInfo
Holds virtual channel information.
Definition: NvSIPLDeviceBlockInfo.hpp:112
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:54
nvsipl::DeviceBlockInfo::deserInfo
DeserInfo deserInfo
Holds the DeserInfo deserializer information.
Definition: NvSIPLDeviceBlockInfo.hpp:248
nvsipl::DeviceBlockInfo::phyMode
NvMediaICPCsiPhyMode phyMode
Holds the NvMediaICPCsiPhyMode Phy mode.
Definition: NvSIPLDeviceBlockInfo.hpp:243
nvsipl::DeviceBlockInfo::isPwrCtrlDisabled
bool isPwrCtrlDisabled
Holds a flag which indicates whether power control is disabled on the platform.
Definition: NvSIPLDeviceBlockInfo.hpp:283
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:96
nvsipl::SerInfo::i2cAddress
uint8_t i2cAddress
Holds the native I2C address.
Definition: NvSIPLDeviceBlockInfo.hpp:167
nvsipl::SensorInfo::name
std::string name
Holds the name of the image sensor, for example, "AR0231".
Definition: NvSIPLDeviceBlockInfo.hpp:104
nvsipl::DeviceBlockInfo::i2cDevice
uint32_t i2cDevice
Holds the I2C device bus number used to connect the deserializer with the SoC.
Definition: NvSIPLDeviceBlockInfo.hpp:246
nvsipl::DeserInfo::description
std::string description
Holds the description of the deserializer.
Definition: NvSIPLDeviceBlockInfo.hpp:218
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:71
nvsipl::DeviceBlockInfo::csiPort
NvMediaICPInterfaceType csiPort
Holds the NvMediaICPInterfaceType that specifies the CSI port of the SoC to which the deserializer is...
Definition: NvSIPLDeviceBlockInfo.hpp:241
nvsipl::SerdesGPIOPinMap::destGpio
uint8_t destGpio
Definition: NvSIPLDeviceBlockInfo.hpp:154
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:228
nvsipl::SensorInfo::VirtualChannelInfo::cfa
uint32_t cfa
Holds the Bayer color filter array order of the sensor.
Definition: NvSIPLDeviceBlockInfo.hpp:85
nvsipl::EEPROMInfo
Defines the EEPROM information.
Definition: NvSIPLDeviceBlockInfo.hpp:134
nvsipl::CameraModuleInfo::sensorInfo
SensorInfo sensorInfo
Holds the information about the sensor in a camera module.
Definition: NvSIPLDeviceBlockInfo.hpp:208
nvsipl::DeviceBlockInfo::numCameraModules
uint32_t numCameraModules
Holds the number of camera modules connected to the deserializer.
Definition: NvSIPLDeviceBlockInfo.hpp:252
nvsipl::SensorInfo::description
std::string description
Holds the description of the image sensor.
Definition: NvSIPLDeviceBlockInfo.hpp:107
nvsipl::CameraModuleInfo::linkIndex
uint32_t linkIndex
Holds the index of the deserializer link to which this module is connected.
Definition: NvSIPLDeviceBlockInfo.hpp:199
nvsipl::SensorInfo::VirtualChannelInfo::inputFormat
NvMediaICPInputFormatType inputFormat
Holds the input format.
Definition: NvSIPLDeviceBlockInfo.hpp:91
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:68
nvsipl::SensorInfo::isTriggerModeEnabled
bool isTriggerModeEnabled
Holds a flag which indicates whether trigger mode is enabled.
Definition: NvSIPLDeviceBlockInfo.hpp:115
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:178
nvsipl::SensorInfo::errGpios
std::vector< uint32_t > errGpios
Holds CDAC Error GPIO indices for the sensor.
Definition: NvSIPLDeviceBlockInfo.hpp:117
nvsipl::SensorInfo::i2cAddress
uint8_t i2cAddress
Holds the native I2C address of the image sensor.
Definition: NvSIPLDeviceBlockInfo.hpp:110
nvsipl::CameraModuleInfo
Defines information for the camera module.
Definition: NvSIPLDeviceBlockInfo.hpp:189
nvsipl::DeviceBlockInfo::gpios
std::vector< uint32_t > gpios
Holds CDAC GPIO indices for the Device Block.
Definition: NvSIPLDeviceBlockInfo.hpp:279
nvsipl::SensorInfo::patternMode
uint32_t patternMode
Holds the Test Pattern Generator (TPG) pattern mode.
Definition: NvSIPLDeviceBlockInfo.hpp:129
nvsipl::DeviceBlockInfo::isSlaveModeEnabled
bool isSlaveModeEnabled
Holds a flag which indicates whether slave mode must be enabled.
Definition: NvSIPLDeviceBlockInfo.hpp:274
nvsipl::SensorInfo::VirtualChannelInfo::embeddedTopLines
uint32_t embeddedTopLines
Holds the number of top embedded lines.
Definition: NvSIPLDeviceBlockInfo.hpp:87
nvsipl::EEPROMInfo::i2cAddress
uint8_t i2cAddress
Holds the native I2C address.
Definition: NvSIPLDeviceBlockInfo.hpp:143
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:255
nvsipl::SensorInfo
Defines the image sensor information.
Definition: NvSIPLDeviceBlockInfo.hpp:63
nvsipl::EEPROMInfo::description
std::string description
Holds the description of the EEPROM.
Definition: NvSIPLDeviceBlockInfo.hpp:140
nvsipl::SensorInfo::VirtualChannelInfo::isEmbeddedDataTypeEnabled
bool isEmbeddedDataTypeEnabled
Indicates whether the embedded data is coming in CSI packet with different data.
Definition: NvSIPLDeviceBlockInfo.hpp:98
nvsipl::DeviceBlockInfo::pwrPort
std::uint32_t pwrPort
Holds the power port.
Definition: NvSIPLDeviceBlockInfo.hpp:261
nvsipl::DeviceBlockInfo::desI2CPort
std::uint32_t desI2CPort
Holds the deserializer I2C port number connected with the SoC.
Definition: NvSIPLDeviceBlockInfo.hpp:257
nvsipl::DeserInfo::i2cAddress
uint8_t i2cAddress
Holds the native I2C address of the deserializer.
Definition: NvSIPLDeviceBlockInfo.hpp:221
nvsipl::DeviceBlockInfo::isSimulatorModeEnabled
bool isSimulatorModeEnabled
Holds a flag which indicates whether simulator mode has been enabled.
Definition: NvSIPLDeviceBlockInfo.hpp:270
nvsipl::X4_CSI_LANE_CONFIGURATION
static const std::uint32_t X4_CSI_LANE_CONFIGURATION
Indicates the index for CSI 4 lanes.
Definition: NvSIPLDeviceBlockInfo.hpp:60
nvsipl::SensorInfo::VirtualChannelInfo::resolution
Resolution resolution
Holds the Resolution of the captured frame.
Definition: NvSIPLDeviceBlockInfo.hpp:93
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:122
nvsipl::SerInfo::longCable
bool longCable
Holds long cable support.
Definition: NvSIPLDeviceBlockInfo.hpp:170
nvsipl::CameraModuleInfo::name
std::string name
Holds the name of the camera module, for example, "SF3324".
Definition: NvSIPLDeviceBlockInfo.hpp:192
nvsipl::DeviceBlockInfo::isGroupInitProg
bool isGroupInitProg
Holds a flag which indicates whether group initialization is enabled.
Definition: NvSIPLDeviceBlockInfo.hpp:277
nvsipl::SerdesGPIOPinMap
Defines GPIO mapping from the serializer to the deserializer.
Definition: NvSIPLDeviceBlockInfo.hpp:152
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:48
nvsipl::SensorInfo::isTPGEnabled
bool isTPGEnabled
Holds a flag which indicates whether the sensor requires configuration in Test Pattern Generator (TPG...
Definition: NvSIPLDeviceBlockInfo.hpp:127
nvsipl::CameraModuleInfo::serInfo
SerInfo serInfo
Holds the SerInfo of the serializer.
Definition: NvSIPLDeviceBlockInfo.hpp:201
nvsipl::DeserInfo
Defines the deserializer information.
Definition: NvSIPLDeviceBlockInfo.hpp:212
nvsipl::DeviceBlockInfo::longCables
bool longCables[MAX_CAMERAMODULES_PER_BLOCK]
Holds long cable support.
Definition: NvSIPLDeviceBlockInfo.hpp:285
nvsipl::SerdesGPIOPinMap::sourceGpio
uint8_t sourceGpio
Definition: NvSIPLDeviceBlockInfo.hpp:153
nvsipl::SensorInfo::Resolution
Defines the image resolution.
Definition: NvSIPLDeviceBlockInfo.hpp:66
nvsipl::SerInfo::description
std::string description
Holds the description of the serializer.
Definition: NvSIPLDeviceBlockInfo.hpp:164
nvsipl::DeviceBlockInfo
Defines the DeviceBlock information.
Definition: NvSIPLDeviceBlockInfo.hpp:237
nvsipl::CameraModuleInfo::eepromInfo
EEPROMInfo eepromInfo
Holds the information about EEPROM device in a camera module.
Definition: NvSIPLDeviceBlockInfo.hpp:206
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:182
nvsipl::EEPROMInfo::name
std::string name
Holds the name of the EEPROM, for example, "N24C64".
Definition: NvSIPLDeviceBlockInfo.hpp:137
nvsipl::CameraModuleInfo::description
std::string description
Holds the description of the camera module.
Definition: NvSIPLDeviceBlockInfo.hpp:195
nvsipl::DeviceBlockInfo::desTxPort
std::uint32_t desTxPort
Holds the deserializer Tx port number connected with the SoC.
Definition: NvSIPLDeviceBlockInfo.hpp:259
nvsipl::SerInfo::name
std::string name
Holds the name of the serializer, for example, "MAX96705".
Definition: NvSIPLDeviceBlockInfo.hpp:161
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:148
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:223
nvsipl::MAX_SENSORS_PER_PLATFORM
static const uint32_t MAX_SENSORS_PER_PLATFORM
Indicates the maximum number of sensors per platform.
Definition: NvSIPLDeviceBlockInfo.hpp:51
nvsipl::CameraModuleInfo::isEEPROMSupported
bool isEEPROMSupported
Holds EEPROM support.
Definition: NvSIPLDeviceBlockInfo.hpp:203
nvsipl::SerInfo
Defines the serializer information.
Definition: NvSIPLDeviceBlockInfo.hpp:158
nvsipl::X2_CSI_LANE_CONFIGURATION
static const std::uint32_t X2_CSI_LANE_CONFIGURATION
Indicates the index for CSI 2 lanes.
Definition: NvSIPLDeviceBlockInfo.hpp:57
nvsipl::SensorInfo::VirtualChannelInfo
Defines the information of a virtual channel/single exposure.
Definition: NvSIPLDeviceBlockInfo.hpp:77
nvsipl::SensorInfo::VirtualChannelInfo::embeddedBottomLines
uint32_t embeddedBottomLines
Holds the number of bottom embedded lines.
Definition: NvSIPLDeviceBlockInfo.hpp:89
nvsipl::SerInfo::errGpios
std::vector< uint32_t > errGpios
Holds CDAC Error GPIO indices for the serializer.
Definition: NvSIPLDeviceBlockInfo.hpp:173
nvsipl::DeviceBlockInfo::cphyRate
std::uint32_t cphyRate[MAX_CSI_LANE_CONFIGURATION]
Holds the deserializer's date rate in CPHY mode(ksps)
Definition: NvSIPLDeviceBlockInfo.hpp:265