2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 #ifndef __IA_CSS_INPUT_PORT_H
16 #define __IA_CSS_INPUT_PORT_H
19 * This file contains information about the possible input ports for CSS
22 /** Enumeration of the physical input ports on the CSS hardware.
23 * There are 3 MIPI CSI-2 ports.
25 enum ia_css_csi2_port {
26 IA_CSS_CSI2_PORT0, /* Implicitly map to MIPI_PORT0_ID */
27 IA_CSS_CSI2_PORT1, /* Implicitly map to MIPI_PORT1_ID */
28 IA_CSS_CSI2_PORT2 /* Implicitly map to MIPI_PORT2_ID */
31 /** Backward compatible for CSS API 2.0 only
32 * TO BE REMOVED when all drivers move to CSS API 2.1
34 #define IA_CSS_CSI2_PORT_4LANE IA_CSS_CSI2_PORT0
35 #define IA_CSS_CSI2_PORT_1LANE IA_CSS_CSI2_PORT1
36 #define IA_CSS_CSI2_PORT_2LANE IA_CSS_CSI2_PORT2
38 /** The CSI2 interface supports 2 types of compression or can
39 * be run without compression.
41 enum ia_css_csi2_compression_type {
42 IA_CSS_CSI2_COMPRESSION_TYPE_NONE, /**< No compression */
43 IA_CSS_CSI2_COMPRESSION_TYPE_1, /**< Compression scheme 1 */
44 IA_CSS_CSI2_COMPRESSION_TYPE_2 /**< Compression scheme 2 */
47 struct ia_css_csi2_compression {
48 enum ia_css_csi2_compression_type type;
49 /**< Compression used */
50 unsigned int compressed_bits_per_pixel;
51 /**< Compressed bits per pixel (only when compression is enabled) */
52 unsigned int uncompressed_bits_per_pixel;
53 /**< Uncompressed bits per pixel (only when compression is enabled) */
56 /** Input port structure.
58 struct ia_css_input_port {
59 enum ia_css_csi2_port port; /**< Physical CSI-2 port */
60 unsigned int num_lanes; /**< Number of lanes used (4-lane port only) */
61 unsigned int timeout; /**< Timeout value */
62 unsigned int rxcount; /**< Register value, should include all lanes */
63 struct ia_css_csi2_compression compression; /**< Compression used */
66 #endif /* __IA_CSS_INPUT_PORT_H */