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 __CSI_RX_GLOBAL_H_INCLUDED__
16 #define __CSI_RX_GLOBAL_H_INCLUDED__
18 #include <type_support.h>
21 CSI_MIPI_PACKET_TYPE_UNDEFINED = 0,
22 CSI_MIPI_PACKET_TYPE_LONG,
23 CSI_MIPI_PACKET_TYPE_SHORT,
24 CSI_MIPI_PACKET_TYPE_RESERVED,
25 N_CSI_MIPI_PACKET_TYPE
26 } csi_mipi_packet_type_t;
28 typedef struct csi_rx_backend_lut_entry_s csi_rx_backend_lut_entry_t;
29 struct csi_rx_backend_lut_entry_s {
30 uint32_t long_packet_entry;
31 uint32_t short_packet_entry;
34 typedef struct csi_rx_backend_cfg_s csi_rx_backend_cfg_t;
35 struct csi_rx_backend_cfg_s {
36 /* LUT entry for the packet */
37 csi_rx_backend_lut_entry_t lut_entry;
39 /* can be derived from the Data Type */
40 csi_mipi_packet_type_t csi_mipi_packet_type;
44 uint32_t virtual_channel;
47 uint32_t comp_predictor;
48 uint32_t comp_bit_idx;
52 typedef struct csi_rx_frontend_cfg_s csi_rx_frontend_cfg_t;
53 struct csi_rx_frontend_cfg_s {
54 uint32_t active_lanes;
57 extern const uint32_t N_SHORT_PACKET_LUT_ENTRIES[N_CSI_RX_BACKEND_ID];
58 extern const uint32_t N_LONG_PACKET_LUT_ENTRIES[N_CSI_RX_BACKEND_ID];
59 extern const uint32_t N_CSI_RX_FE_CTRL_DLANES[N_CSI_RX_FRONTEND_ID];
60 /* sid_width for CSI_RX_BACKEND<N>_ID */
61 extern const uint32_t N_CSI_RX_BE_SID_WIDTH[N_CSI_RX_BACKEND_ID];
63 #endif /* __CSI_RX_GLOBAL_H_INCLUDED__ */