Jetson Linux API Reference

32.6.1 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gmsl-link.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2020, NVIDIA Corporation. All rights reserved.
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms and conditions of the GNU General Public License,
6  * version 2, as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope it will be useful, but WITHOUT
9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11  * more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
24 #ifndef __GMSL_LINK_H__
25 
35 #define __GMSL_LINK_H__
36 
37 #define GMSL_CSI_1X4_MODE 0x1
38 #define GMSL_CSI_2X4_MODE 0x2
39 #define GMSL_CSI_2X2_MODE 0x3
40 #define GMSL_CSI_4X2_MODE 0x4
41 
42 #define GMSL_CSI_PORT_A 0x0
43 #define GMSL_CSI_PORT_B 0x1
44 #define GMSL_CSI_PORT_C 0x2
45 #define GMSL_CSI_PORT_D 0x3
46 #define GMSL_CSI_PORT_E 0x4
47 #define GMSL_CSI_PORT_F 0x5
48 
49 #define GMSL_SERDES_CSI_LINK_A 0x1
50 #define GMSL_SERDES_CSI_LINK_B 0x2
51 
52 /* Didn't find kernel defintions, for now adding here */
53 #define GMSL_CSI_DT_RAW_12 0x2C
54 #define GMSL_CSI_DT_UED_U1 0x30
55 #define GMSL_CSI_DT_EMBED 0x12
56 
57 #define GMSL_ST_ID_UNUSED 0xFF
58 
63 #define GMSL_DEV_MAX_NUM_DATA_STREAMS 4
64 
68 struct gmsl_stream {
69  __u32 st_id_sel;
70  __u32 st_data_type;
71  __u32 des_pipe;
72 };
73 
78 struct gmsl_link_ctx {
79  __u32 st_vc;
80  __u32 dst_vc;
81  __u32 src_csi_port;
82  __u32 dst_csi_port;
85  __u32 num_streams;
87  __u32 num_csi_lanes;
88  __u32 csi_mode;
89  __u32 ser_reg;
90  __u32 sdev_reg;
91  __u32 sdev_def;
92  bool serdev_found;
98  /*< An array of information about the data streams in the link. */
99  struct device *s_dev;
100 };
101 
104 #endif /* __GMSL_LINK_H__ */
Holds information about a data stream in a GMSL link (gmsl_link_ctx).
Definition: gmsl-link.h:68
__u32 st_data_type
Definition: gmsl-link.h:70
__u32 des_pipe
Definition: gmsl-link.h:71
__u32 st_id_sel
Definition: gmsl-link.h:69
#define GMSL_DEV_MAX_NUM_DATA_STREAMS
Maximum number of data streams (gmsl_stream elements) in a GMSL link (gmsl_link_ctx).
Definition: gmsl-link.h:63