1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Support for Intel Camera Imaging ISP subsystem.
4 * Copyright (c) 2015, Intel Corporation.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 /* For MIPI_PORT0_ID to MIPI_PORT2_ID */
17 #include "system_global.h"
19 #ifndef __IA_CSS_INPUT_PORT_H
20 #define __IA_CSS_INPUT_PORT_H
23 * This file contains information about the possible input ports for CSS
26 /* Backward compatible for CSS API 2.0 only
27 * TO BE REMOVED when all drivers move to CSS API 2.1
29 #define IA_CSS_CSI2_PORT_4LANE MIPI_PORT0_ID
30 #define IA_CSS_CSI2_PORT_1LANE MIPI_PORT1_ID
31 #define IA_CSS_CSI2_PORT_2LANE MIPI_PORT2_ID
33 /* The CSI2 interface supports 2 types of compression or can
34 * be run without compression.
36 enum ia_css_csi2_compression_type {
37 IA_CSS_CSI2_COMPRESSION_TYPE_NONE, /** No compression */
38 IA_CSS_CSI2_COMPRESSION_TYPE_1, /** Compression scheme 1 */
39 IA_CSS_CSI2_COMPRESSION_TYPE_2 /** Compression scheme 2 */
42 struct ia_css_csi2_compression {
43 enum ia_css_csi2_compression_type type;
44 /** Compression used */
45 unsigned int compressed_bits_per_pixel;
46 /** Compressed bits per pixel (only when compression is enabled) */
47 unsigned int uncompressed_bits_per_pixel;
48 /** Uncompressed bits per pixel (only when compression is enabled) */
51 /* Input port structure.
53 struct ia_css_input_port {
54 enum mipi_port_id port; /** Physical CSI-2 port */
55 unsigned int num_lanes; /** Number of lanes used (4-lane port only) */
56 unsigned int timeout; /** Timeout value */
57 unsigned int rxcount; /** Register value, should include all lanes */
58 struct ia_css_csi2_compression compression; /** Compression used */
61 #endif /* __IA_CSS_INPUT_PORT_H */