no-OS
Loading...
Searching...
No Matches
gmsl_cam_des.h
Go to the documentation of this file.
1/*******************************************************************************
2 * @file gmsl_cam_des.h
3 * @brief Header file of gmsl camera deserializer common interface
4 * @author Automotive Software and Systems team, Bangalore, India
5********************************************************************************
6 * Copyright 2025(c) Analog Devices, Inc.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are met:
10 *
11 * 1. Redistributions of source code must retain the above copyright notice,
12 * this list of conditions and the following disclaimer.
13 *
14 * 2. Redistributions in binary form must reproduce the above copyright notice,
15 * this list of conditions and the following disclaimer in the documentation
16 * and/or other materials provided with the distribution.
17 *
18 * 3. Neither the name of Analog Devices, Inc. nor the names of its
19 * contributors may be used to endorse or promote products derived from this
20 * software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. "AS IS" AND ANY EXPRESS OR
23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
24 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
25 * EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
28 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
31 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32******************************************************************************/
33
34#ifndef GMSL_CAM_DES_H
35#define GMSL_CAM_DES_H
36
37#include <stdint.h>
38#include <stdbool.h>
39#include "no_os_i2c.h"
40#include "gmsl_common.h"
41
42#define GMSL_CAM_DES_CSI2_MAX_DATA_LANES (4)
43#define GMSL_CAM_DES_CSI2_MAX_DES_REMAPS_NUM (16)
44#define GMSL_CAM_DES_DT_VC(dt, vc) (((vc) & 0x3) << 6 | ((dt) & 0x3f))
45#define MAX_NUM_LINKS (4)
54
63
74
84
94
100 unsigned int
102 unsigned char
104 unsigned char
106 unsigned char
109};
110
116 unsigned char
118 unsigned char
120 unsigned char
122 unsigned char
124 unsigned char
126};
127
160
166 unsigned int
168 unsigned long long
170 unsigned int
172 struct gmsl_csi_mipi_cfg
180 bool enabled;
182};
183
189 char *dev_name;
190 uint8_t index;
192 struct gmsl_cam_des_phy *phys;
193 struct gmsl_cam_des_pipe *pipes;
194 struct gmsl_cam_des_link *links;
197
201};
202
203#endif // GMSL_CAM_DES_H
#define GMSL_CAM_DES_CSI2_MAX_DATA_LANES
Definition gmsl_cam_des.h:42
#define MAX_NUM_LINKS
Definition gmsl_cam_des.h:45
gmsl_pipe_des_vc_remap_mode
Enumerates the virtual channel remap modes for the GMSL Camera Deserializer.
Definition gmsl_cam_des.h:89
@ GMSL_PIPE_DES_VC_REMAP_SRC_DST_MODE
Definition gmsl_cam_des.h:90
@ GMSL_PIPE_DES_VC_REMAP_PIPE_ID_MODE
Definition gmsl_cam_des.h:91
@ GMSL_PIPE_DES_VC_REMAP_LINK_ID_MODE
Definition gmsl_cam_des.h:92
gmsl_csi_des_port
Enumeration for GMSL Camera Deserializer CSI ports.
Definition gmsl_cam_des.h:59
@ GMSL_CSI_DES_PORTB
Definition gmsl_cam_des.h:61
@ GMSL_CSI_DES_PORTA
Definition gmsl_cam_des.h:60
gmsl_cc_port
Enumerates Control Channel Ports A/B of Deserializer.
Definition gmsl_cam_des.h:50
@ GMSL_CC_PORTB
Definition gmsl_cam_des.h:52
@ GMSL_CC_PORTA
Definition gmsl_cam_des.h:51
gmsl_link_des_rx_phy_rate
Enumerates the RX PHY rates for the GMSL Camera Deserializer.
Definition gmsl_cam_des.h:79
@ GMSL_LINK_DES_RX_PHY_RATE_6G
Definition gmsl_cam_des.h:81
@ GMSL_LINK_DES_RX_PHY_RATE_12G
Definition gmsl_cam_des.h:82
@ GMSL_LINK_DES_RX_PHY_RATE_3G
Definition gmsl_cam_des.h:80
#define GMSL_CAM_DES_CSI2_MAX_DES_REMAPS_NUM
Definition gmsl_cam_des.h:43
gmsl_dev_des_mipi_lane_cnt
Enumerates the MIPI lane counts for the GMSL Camera Deserializer.
Definition gmsl_cam_des.h:68
@ GMSL_DEV_DES_MIPI_LANE_CNT_2
Definition gmsl_cam_des.h:70
@ GMSL_DEV_DES_MIPI_LANE_CNT_1
Definition gmsl_cam_des.h:69
@ GMSL_DEV_DES_MIPI_LANE_CNT_4
Definition gmsl_cam_des.h:72
@ GMSL_DEV_DES_MIPI_LANE_CNT_3
Definition gmsl_cam_des.h:71
gmsl_pipe
Enumerates the video pipes for the GMSL device.
Definition gmsl_common.h:103
Header file of I2C Interface.
: GMSL Camera Deserializer MIPI CSI2 configuration structure
Definition gmsl_cam_des.h:99
bool lane_polarities[GMSL_CAM_DES_CSI2_MAX_DATA_LANES]
Definition gmsl_cam_des.h:108
unsigned char clock_lane
Definition gmsl_cam_des.h:105
unsigned char num_data_lanes
Definition gmsl_cam_des.h:107
unsigned char data_lanes[GMSL_CAM_DES_CSI2_MAX_DATA_LANES]
Definition gmsl_cam_des.h:103
unsigned int flags
Definition gmsl_cam_des.h:101
GMSL Deserializer driver initailization structure.
Definition gmsl_cam_des.h:188
void * dev_state_mem
Definition gmsl_cam_des.h:200
void * dev_instance_mem
Definition gmsl_cam_des.h:199
char * dev_name
Definition gmsl_cam_des.h:189
enum gmsl_link_des_rx_phy_rate link_rx_rate[MAX_NUM_LINKS]
Definition gmsl_cam_des.h:195
struct gmsl_cam_des_link * links
Definition gmsl_cam_des.h:194
struct gmsl_cam_des_pipe * pipes
Definition gmsl_cam_des.h:193
struct gmsl_cam_des_phy * phys
Definition gmsl_cam_des.h:192
uint8_t index
Definition gmsl_cam_des.h:190
bool tunnel_mode
Definition gmsl_cam_des.h:191
A structure that contains data type and virtual channel ID mappings for the Deserializer.
Definition gmsl_cam_des.h:115
unsigned char from_vc
Definition gmsl_cam_des.h:119
unsigned char to_vc
Definition gmsl_cam_des.h:123
unsigned char to_dt
Definition gmsl_cam_des.h:121
unsigned char phy
Definition gmsl_cam_des.h:125
unsigned char from_dt
Definition gmsl_cam_des.h:117
A structure that contains video pipe configurations for Deserializer.
Definition gmsl_cam_des.h:132
enum gmsl_pipe_des_vc_remap_mode vc_remap_mode
Definition gmsl_cam_des.h:148
bool dbl8
Definition gmsl_cam_des.h:153
unsigned int stream_id
Definition gmsl_cam_des.h:138
bool dbl10
Definition gmsl_cam_des.h:154
unsigned int con_dest
Definition gmsl_cam_des.h:145
bool dbl8mode
Definition gmsl_cam_des.h:156
uint8_t link_id
Definition gmsl_cam_des.h:139
bool enabled
Definition gmsl_cam_des.h:158
enum gmsl_pipe input_pipe
Definition gmsl_cam_des.h:146
enum gmsl_pipe index
Definition gmsl_cam_des.h:133
unsigned int num_remaps
Definition gmsl_cam_des.h:143
bool dbl10mode
Definition gmsl_cam_des.h:157
bool dbl12
Definition gmsl_cam_des.h:155
unsigned int ser_cphy_lane_cnt
Definition gmsl_cam_des.h:151
struct gmsl_pipe_des_dt_vc_remap remaps[GMSL_CAM_DES_CSI2_MAX_DES_REMAPS_NUM]
Definition gmsl_cam_des.h:140
unsigned int phy_id
Definition gmsl_cam_des.h:136
bool ser_cphy_mode
Definition gmsl_cam_des.h:152