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 __INPUT_SYSTEM_GLOBAL_H_INCLUDED__
16 #define __INPUT_SYSTEM_GLOBAL_H_INCLUDED__
18 #define IS_INPUT_SYSTEM_VERSION_2
20 #include <type_support.h>
22 //CSI reveiver has 3 ports.
23 #define N_CSI_PORTS (3)
24 //AM: Use previous define for this.
26 //MIPI allows upto 4 channels.
27 #define N_CHANNELS (4)
28 // 12KB = 256bit x 384 words
29 #define IB_CAPACITY_IN_WORDS (384)
40 INPUT_SYSTEM_SOURCE_SENSOR = 0,
41 INPUT_SYSTEM_SOURCE_FIFO,
42 INPUT_SYSTEM_SOURCE_TPG,
43 INPUT_SYSTEM_SOURCE_PRBS,
44 INPUT_SYSTEM_SOURCE_MEMORY,
46 } input_system_source_t;
48 /* internal routing configuration */
50 INPUT_SYSTEM_DISCARD_ALL = 0,
51 INPUT_SYSTEM_CSI_BACKEND = 1,
52 INPUT_SYSTEM_INPUT_BUFFER = 2,
53 INPUT_SYSTEM_MULTICAST = 3,
54 N_INPUT_SYSTEM_CONNECTION
55 } input_system_connection_t;
58 INPUT_SYSTEM_MIPI_PORT0,
59 INPUT_SYSTEM_MIPI_PORT1,
60 INPUT_SYSTEM_MIPI_PORT2,
61 INPUT_SYSTEM_ACQUISITION_UNIT,
62 N_INPUT_SYSTEM_MULTIPLEX
63 } input_system_multiplex_t;
66 INPUT_SYSTEM_SINK_MEMORY = 0,
67 INPUT_SYSTEM_SINK_ISP,
70 } input_system_sink_t;
73 INPUT_SYSTEM_FIFO_CAPTURE = 0,
74 INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING,
75 INPUT_SYSTEM_SRAM_BUFFERING,
76 INPUT_SYSTEM_XMEM_BUFFERING,
77 INPUT_SYSTEM_XMEM_CAPTURE,
78 INPUT_SYSTEM_XMEM_ACQUIRE,
79 N_INPUT_SYSTEM_BUFFERING_MODE
82 typedef struct input_system_cfg_s input_system_cfg_t;
83 typedef struct sync_generator_cfg_s sync_generator_cfg_t;
84 typedef struct tpg_cfg_s tpg_cfg_t;
85 typedef struct prbs_cfg_s prbs_cfg_t;
87 /* MW: uint16_t should be sufficient */
88 struct input_system_cfg_s {
89 uint32_t no_side_band;
95 struct sync_generator_cfg_s {
98 uint32_t hblank_cycles;
99 uint32_t vblank_cycles;
102 /* MW: tpg & prbs are exclusive */
109 sync_generator_cfg_t sync_gen_cfg;
114 sync_generator_cfg_t sync_gen_cfg;
117 struct gpfifo_cfg_s {
119 sync_generator_cfg_t sync_gen_cfg;
122 typedef struct gpfifo_cfg_s gpfifo_cfg_t;
124 //ALX:Commented out to pass the compilation.
125 //typedef struct input_system_cfg_s input_system_cfg_t;
128 uint32_t mem_reg_size;
129 uint32_t nof_mem_regs;
130 uint32_t mem_reg_addr;
133 typedef struct ib_buffer_s ib_buffer_t;
137 buffering_mode_t buffering_mode;
138 ib_buffer_t csi_buffer;
139 ib_buffer_t acquisition_buffer;
140 uint32_t nof_xmem_buffers;
143 typedef struct csi_cfg_s csi_cfg_t;
146 INPUT_SYSTEM_CFG_FLAG_RESET = 0,
147 INPUT_SYSTEM_CFG_FLAG_SET = 1U << 0,
148 INPUT_SYSTEM_CFG_FLAG_BLOCKED = 1U << 1,
149 INPUT_SYSTEM_CFG_FLAG_REQUIRED = 1U << 2,
150 INPUT_SYSTEM_CFG_FLAG_CONFLICT = 1U << 3 // To mark a conflicting configuration.
151 } input_system_cfg_flag_t;
153 typedef uint32_t input_system_config_flags_t;
155 #endif /* __INPUT_SYSTEM_GLOBAL_H_INCLUDED__ */