• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * linux-5.4/drivers/media/platform/sunxi-vin/vin-mipi/protocol.h
3  *
4  * Copyright (c) 2007-2017 Allwinnertech Co., Ltd.
5  *
6  * This software is licensed under the terms of the GNU General Public
7  * License version 2, as published by the Free Software Foundation, and
8  * may be copied, distributed, and modified under those terms.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  */
16 
17 #ifndef __PROTOCOL__H__
18 #define __PROTOCOL__H__
19 
20 enum bit_order {
21 	LSB_FST,
22 	MSB_FST,
23 };
24 
25 enum byte_order {
26 	WCh_WCl_DI,
27 	DI_WCh_WCl,
28 	WCl_WCh, DI,
29 	DI_WCl_WCh,
30 };
31 
32 enum source_type {
33 	PROGRESSIVE,
34 	INTERLACED,
35 };
36 
37 enum line_sync {
38 	TGL_PKT,
39 	TGL_LSLE,
40 };
41 
42 enum pkt_fmt {
43 	MIPI_FS = 0X00,		/*short packet*/
44 	MIPI_FE = 0X01,
45 	MIPI_LS = 0X02,
46 	MIPI_LE = 0X03,
47 	MIPI_SDAT0 = 0X08,
48 	MIPI_SDAT1 = 0X09,
49 	MIPI_SDAT2 = 0X0A,
50 	MIPI_SDAT3 = 0X0B,
51 	MIPI_SDAT4 = 0X0C,
52 	MIPI_SDAT5 = 0X0D,
53 	MIPI_SDAT6 = 0X0E,
54 	MIPI_SDAT7 = 0X0F,
55 	MIPI_BLK = 0X11,
56 	MIPI_EMBD = 0X12,
57 	MIPI_YUV420 = 0X18,
58 	MIPI_YUV420_10 = 0X19,
59 	MIPI_YUV420_CSP = 0X1C,
60 	MIPI_YUV420_CSP_10 = 0X1D,
61 	MIPI_YUV422 = 0X1E,
62 	MIPI_YUV422_10 = 0X1F,
63 	MIPI_RGB565 = 0X22,
64 	MIPI_RGB888 = 0X24,
65 	MIPI_RAW8 = 0X2A,
66 	MIPI_RAW10 = 0X2B,
67 	MIPI_RAW12 = 0X2C,
68 	MIPI_USR_DAT0 = 0X30,
69 	MIPI_USR_DAT1 = 0X31,
70 	MIPI_USR_DAT2 = 0X32,
71 	MIPI_USR_DAT3 = 0X33,
72 	MIPI_USR_DAT4 = 0X34,
73 	MIPI_USR_DAT5 = 0X35,
74 	MIPI_USR_DAT6 = 0X36,
75 	MIPI_USR_DAT7 = 0X37,
76 };
77 
78 enum data_fmt_type {
79 	FS  = 0x0,
80 	FE  = 0x1,
81 	LS  = 0x2,
82 	LE  = 0x3,
83 	GS0 = 0x8,
84 	GS1 = 0x9,
85 	GS2 = 0xa,
86 	GS3 = 0xb,
87 	GS4 = 0xc,
88 	GS5 = 0xd,
89 	GS6 = 0xe,
90 	GS7 = 0xf,
91 	GL  = 0x10,
92 	YUV = 0x11,
93 	RGB = 0x12,
94 	RAW = 0x13,
95 };
96 
97 enum protocol_int {
98 	FIFO_OVER_INT,
99 	FRAME_END_SYNC_INT,
100 	FRAME_START_SYNC_INT,
101 	LINE_END_SYNC_INT,
102 	LINE_START_SYNC_INT,
103 	PH_UPDATE_INT,
104 	PF_INT,
105 	EMB_DATA_INT,
106 	FRAME_SYNC_ERR_INT,
107 	LINE_SYNC_ERR_INT,
108 	ECC_ERR_INT,
109 	ECC_WRN_INT,
110 	CHKSUM_ERR_INT,
111 	EOT_ERR_INT,
112 };
113 
114 #endif
115