1 /* 2 * linux-5.4/drivers/media/platform/sunxi-vin/vin-mipi/protocol/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 /*NULL = 0X10, */ /* long packet */ 56 MIPI_BLK = 0X11, 57 MIPI_EMBD = 0X12, 58 MIPI_YUV420 = 0X18, 59 MIPI_YUV420_10 = 0X19, 60 MIPI_YUV420_CSP = 0X1C, 61 MIPI_YUV420_CSP_10 = 0X1D, 62 MIPI_YUV422 = 0X1E, 63 MIPI_YUV422_10 = 0X1F, 64 MIPI_RGB565 = 0X22, 65 MIPI_RGB888 = 0X24, 66 MIPI_RAW8 = 0X2A, 67 MIPI_RAW10 = 0X2B, 68 MIPI_RAW12 = 0X2C, 69 MIPI_USR_DAT0 = 0X30, 70 MIPI_USR_DAT1 = 0X31, 71 MIPI_USR_DAT2 = 0X32, 72 MIPI_USR_DAT3 = 0X33, 73 MIPI_USR_DAT4 = 0X34, 74 MIPI_USR_DAT5 = 0X35, 75 MIPI_USR_DAT6 = 0X36, 76 MIPI_USR_DAT7 = 0X37, 77 }; 78 79 enum protocol_int { 80 FIFO_OVER_INT, 81 FRAME_END_SYNC_INT, 82 FRAME_START_SYNC_INT, 83 LINE_END_SYNC_INT, 84 LINE_START_SYNC_INT, 85 PH_UPDATE_INT, 86 PF_INT, 87 EMB_DATA_INT, 88 FRAME_SYNC_ERR_INT, 89 LINE_SYNC_ERR_INT, 90 ECC_ERR_INT, 91 ECC_WRN_INT, 92 CHKSUM_ERR_INT, 93 EOT_ERR_INT, 94 }; 95 96 #endif 97