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 #include <type_support.h>
18 //CSI reveiver has 3 ports.
19 #define N_CSI_PORTS (3)
20 //AM: Use previous define for this.
22 //MIPI allows upto 4 channels.
23 #define N_CHANNELS (4)
24 // 12KB = 256bit x 384 words
25 #define IB_CAPACITY_IN_WORDS (384)
36 INPUT_SYSTEM_SOURCE_SENSOR = 0,
37 INPUT_SYSTEM_SOURCE_FIFO,
38 INPUT_SYSTEM_SOURCE_TPG,
39 INPUT_SYSTEM_SOURCE_PRBS,
40 INPUT_SYSTEM_SOURCE_MEMORY,
42 } input_system_source_t;
44 /* internal routing configuration */
46 INPUT_SYSTEM_DISCARD_ALL = 0,
47 INPUT_SYSTEM_CSI_BACKEND = 1,
48 INPUT_SYSTEM_INPUT_BUFFER = 2,
49 INPUT_SYSTEM_MULTICAST = 3,
50 N_INPUT_SYSTEM_CONNECTION
51 } input_system_connection_t;
54 INPUT_SYSTEM_MIPI_PORT0,
55 INPUT_SYSTEM_MIPI_PORT1,
56 INPUT_SYSTEM_MIPI_PORT2,
57 INPUT_SYSTEM_ACQUISITION_UNIT,
58 N_INPUT_SYSTEM_MULTIPLEX
59 } input_system_multiplex_t;
62 INPUT_SYSTEM_SINK_MEMORY = 0,
63 INPUT_SYSTEM_SINK_ISP,
66 } input_system_sink_t;
69 INPUT_SYSTEM_FIFO_CAPTURE = 0,
70 INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING,
71 INPUT_SYSTEM_SRAM_BUFFERING,
72 INPUT_SYSTEM_XMEM_BUFFERING,
73 INPUT_SYSTEM_XMEM_CAPTURE,
74 INPUT_SYSTEM_XMEM_ACQUIRE,
75 N_INPUT_SYSTEM_BUFFERING_MODE
78 typedef struct isp2400_input_system_cfg_s input_system_cfg_t;
79 typedef struct sync_generator_cfg_s sync_generator_cfg_t;
80 typedef struct tpg_cfg_s tpg_cfg_t;
81 typedef struct prbs_cfg_s prbs_cfg_t;
83 /* MW: uint16_t should be sufficient */
84 struct isp2400_input_system_cfg_s {
91 struct sync_generator_cfg_s {
98 /* MW: tpg & prbs are exclusive */
105 sync_generator_cfg_t sync_gen_cfg;
110 sync_generator_cfg_t sync_gen_cfg;
113 struct gpfifo_cfg_s {
115 sync_generator_cfg_t sync_gen_cfg;
118 typedef struct gpfifo_cfg_s gpfifo_cfg_t;
120 //ALX:Commented out to pass the compilation.
121 //typedef struct isp2400_input_system_cfg_s input_system_cfg_t;
129 typedef struct ib_buffer_s isp2400_ib_buffer_t;
133 buffering_mode_t buffering_mode;
134 isp2400_ib_buffer_t csi_buffer;
135 isp2400_ib_buffer_t acquisition_buffer;
136 u32 nof_xmem_buffers;
139 typedef struct csi_cfg_s csi_cfg_t;
142 INPUT_SYSTEM_CFG_FLAG_RESET = 0,
143 INPUT_SYSTEM_CFG_FLAG_SET = 1U << 0,
144 INPUT_SYSTEM_CFG_FLAG_BLOCKED = 1U << 1,
145 INPUT_SYSTEM_CFG_FLAG_REQUIRED = 1U << 2,
146 INPUT_SYSTEM_CFG_FLAG_CONFLICT = 1U << 3 // To mark a conflicting configuration.
147 } isp2400_input_system_cfg_flag_t;
149 typedef u32 input_system_config_flags_t;