1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Support for Intel Camera Imaging ISP subsystem. 4 * Copyright (c) 2015, Intel Corporation. 5 */ 6 7 /* For MIPI_PORT0_ID to MIPI_PORT2_ID */ 8 #include "system_global.h" 9 10 #ifndef __IA_CSS_INPUT_PORT_H 11 #define __IA_CSS_INPUT_PORT_H 12 13 /* @file 14 * This file contains information about the possible input ports for CSS 15 */ 16 17 /* Backward compatible for CSS API 2.0 only 18 * TO BE REMOVED when all drivers move to CSS API 2.1 19 */ 20 #define IA_CSS_CSI2_PORT_4LANE MIPI_PORT0_ID 21 #define IA_CSS_CSI2_PORT_1LANE MIPI_PORT1_ID 22 #define IA_CSS_CSI2_PORT_2LANE MIPI_PORT2_ID 23 24 /* The CSI2 interface supports 2 types of compression or can 25 * be run without compression. 26 */ 27 enum ia_css_csi2_compression_type { 28 IA_CSS_CSI2_COMPRESSION_TYPE_NONE, /** No compression */ 29 IA_CSS_CSI2_COMPRESSION_TYPE_1, /** Compression scheme 1 */ 30 IA_CSS_CSI2_COMPRESSION_TYPE_2 /** Compression scheme 2 */ 31 }; 32 33 struct ia_css_csi2_compression { 34 enum ia_css_csi2_compression_type type; 35 /** Compression used */ 36 unsigned int compressed_bits_per_pixel; 37 /** Compressed bits per pixel (only when compression is enabled) */ 38 unsigned int uncompressed_bits_per_pixel; 39 /** Uncompressed bits per pixel (only when compression is enabled) */ 40 }; 41 42 /* Input port structure. 43 */ 44 struct ia_css_input_port { 45 enum mipi_port_id port; /** Physical CSI-2 port */ 46 unsigned int num_lanes; /** Number of lanes used (4-lane port only) */ 47 unsigned int timeout; /** Timeout value */ 48 unsigned int rxcount; /** Register value, should include all lanes */ 49 struct ia_css_csi2_compression compression; /** Compression used */ 50 }; 51 52 #endif /* __IA_CSS_INPUT_PORT_H */ 53