1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Support for Intel Camera Imaging ISP subsystem.
4  * Copyright (c) 2015, Intel Corporation.
5  *
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.
9  *
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
13  * more details.
14  */
15 
16 #ifndef __INPUT_SYSTEM_LOCAL_H_INCLUDED__
17 #define __INPUT_SYSTEM_LOCAL_H_INCLUDED__
18 
19 #include "csi_rx.h"
20 #include "pixelgen.h"
21 #include "isys_stream2mmio.h"
22 #include "isys_irq.h"
23 
24 typedef enum {
25 	MIPI_FORMAT_SHORT1 = 0x08,
26 	MIPI_FORMAT_SHORT2,
27 	MIPI_FORMAT_SHORT3,
28 	MIPI_FORMAT_SHORT4,
29 	MIPI_FORMAT_SHORT5,
30 	MIPI_FORMAT_SHORT6,
31 	MIPI_FORMAT_SHORT7,
32 	MIPI_FORMAT_SHORT8,
33 	MIPI_FORMAT_EMBEDDED = 0x12,
34 	MIPI_FORMAT_YUV420_8 = 0x18,
35 	MIPI_FORMAT_YUV420_10,
36 	MIPI_FORMAT_YUV420_8_LEGACY,
37 	MIPI_FORMAT_YUV420_8_SHIFT = 0x1C,
38 	MIPI_FORMAT_YUV420_10_SHIFT,
39 	MIPI_FORMAT_YUV422_8 = 0x1E,
40 	MIPI_FORMAT_YUV422_10,
41 	MIPI_FORMAT_RGB444 = 0x20,
42 	MIPI_FORMAT_RGB555,
43 	MIPI_FORMAT_RGB565,
44 	MIPI_FORMAT_RGB666,
45 	MIPI_FORMAT_RGB888,
46 	MIPI_FORMAT_RAW6 = 0x28,
47 	MIPI_FORMAT_RAW7,
48 	MIPI_FORMAT_RAW8,
49 	MIPI_FORMAT_RAW10,
50 	MIPI_FORMAT_RAW12,
51 	MIPI_FORMAT_RAW14,
52 	MIPI_FORMAT_CUSTOM0 = 0x30,
53 	MIPI_FORMAT_CUSTOM1,
54 	MIPI_FORMAT_CUSTOM2,
55 	MIPI_FORMAT_CUSTOM3,
56 	MIPI_FORMAT_CUSTOM4,
57 	MIPI_FORMAT_CUSTOM5,
58 	MIPI_FORMAT_CUSTOM6,
59 	MIPI_FORMAT_CUSTOM7,
60 	//MIPI_FORMAT_RAW16, /*not supported by 2401*/
61 	//MIPI_FORMAT_RAW18,
62 	N_MIPI_FORMAT
63 } mipi_format_t;
64 
65 #define N_MIPI_FORMAT_CUSTOM	8
66 
67 /* The number of stores for compressed format types */
68 #define	N_MIPI_COMPRESSOR_CONTEXT	(N_RX_CHANNEL_ID * N_MIPI_FORMAT_CUSTOM)
69 typedef struct input_system_state_s	input_system_state_t;
70 struct input_system_state_s {
71 	ibuf_ctrl_state_t	ibuf_ctrl_state[N_IBUF_CTRL_ID];
72 	csi_rx_fe_ctrl_state_t	csi_rx_fe_ctrl_state[N_CSI_RX_FRONTEND_ID];
73 	csi_rx_be_ctrl_state_t	csi_rx_be_ctrl_state[N_CSI_RX_BACKEND_ID];
74 	pixelgen_ctrl_state_t	pixelgen_ctrl_state[N_PIXELGEN_ID];
75 	stream2mmio_state_t	stream2mmio_state[N_STREAM2MMIO_ID];
76 	isys_irqc_state_t	isys_irqc_state[N_ISYS_IRQ_ID];
77 };
78 #endif /* __INPUT_SYSTEM_LOCAL_H_INCLUDED__ */
79