• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_selector_defs_h
17 #define _input_selector_defs_h
18 
19 #ifndef HIVE_ISP_ISEL_SEL_BITS
20 #define HIVE_ISP_ISEL_SEL_BITS                                  2
21 #endif
22 
23 #ifndef HIVE_ISP_CH_ID_BITS
24 #define HIVE_ISP_CH_ID_BITS                                     2
25 #endif
26 
27 #ifndef HIVE_ISP_FMT_TYPE_BITS
28 #define HIVE_ISP_FMT_TYPE_BITS                                  5
29 #endif
30 
31 /* gp_register register id's -- Outputs */
32 #define HIVE_ISEL_GP_REGS_SYNCGEN_ENABLE_IDX                    0
33 #define HIVE_ISEL_GP_REGS_SYNCGEN_FREE_RUNNING_IDX              1
34 #define HIVE_ISEL_GP_REGS_SYNCGEN_PAUSE_IDX                     2
35 #define HIVE_ISEL_GP_REGS_SYNCGEN_NR_FRAMES_IDX                 3
36 #define HIVE_ISEL_GP_REGS_SYNCGEN_NR_PIX_IDX                    4
37 #define HIVE_ISEL_GP_REGS_SYNCGEN_NR_LINES_IDX                  5
38 #define HIVE_ISEL_GP_REGS_SYNCGEN_HBLANK_CYCLES_IDX             6
39 #define HIVE_ISEL_GP_REGS_SYNCGEN_VBLANK_CYCLES_IDX             7
40 
41 #define HIVE_ISEL_GP_REGS_SOF_IDX                               8
42 #define HIVE_ISEL_GP_REGS_EOF_IDX                               9
43 #define HIVE_ISEL_GP_REGS_SOL_IDX                              10
44 #define HIVE_ISEL_GP_REGS_EOL_IDX                              11
45 
46 #define HIVE_ISEL_GP_REGS_PRBS_ENABLE                          12
47 #define HIVE_ISEL_GP_REGS_PRBS_ENABLE_PORT_B                   13
48 #define HIVE_ISEL_GP_REGS_PRBS_LFSR_RESET_VALUE                14
49 
50 #define HIVE_ISEL_GP_REGS_TPG_ENABLE                           15
51 #define HIVE_ISEL_GP_REGS_TPG_ENABLE_PORT_B                    16
52 #define HIVE_ISEL_GP_REGS_TPG_HOR_CNT_MASK_IDX                 17
53 #define HIVE_ISEL_GP_REGS_TPG_VER_CNT_MASK_IDX                 18
54 #define HIVE_ISEL_GP_REGS_TPG_XY_CNT_MASK_IDX                  19
55 #define HIVE_ISEL_GP_REGS_TPG_HOR_CNT_DELTA_IDX                20
56 #define HIVE_ISEL_GP_REGS_TPG_VER_CNT_DELTA_IDX                21
57 #define HIVE_ISEL_GP_REGS_TPG_MODE_IDX                         22
58 #define HIVE_ISEL_GP_REGS_TPG_R1_IDX                           23
59 #define HIVE_ISEL_GP_REGS_TPG_G1_IDX                           24
60 #define HIVE_ISEL_GP_REGS_TPG_B1_IDX                           25
61 #define HIVE_ISEL_GP_REGS_TPG_R2_IDX                           26
62 #define HIVE_ISEL_GP_REGS_TPG_G2_IDX                           27
63 #define HIVE_ISEL_GP_REGS_TPG_B2_IDX                           28
64 
65 #define HIVE_ISEL_GP_REGS_CH_ID_IDX                            29
66 #define HIVE_ISEL_GP_REGS_FMT_TYPE_IDX                         30
67 #define HIVE_ISEL_GP_REGS_DATA_SEL_IDX                         31
68 #define HIVE_ISEL_GP_REGS_SBAND_SEL_IDX                        32
69 #define HIVE_ISEL_GP_REGS_SYNC_SEL_IDX                         33
70 #define HIVE_ISEL_GP_REGS_SRST_IDX                             37
71 
72 #define HIVE_ISEL_GP_REGS_SRST_SYNCGEN_BIT                      0
73 #define HIVE_ISEL_GP_REGS_SRST_PRBS_BIT                         1
74 #define HIVE_ISEL_GP_REGS_SRST_TPG_BIT                          2
75 #define HIVE_ISEL_GP_REGS_SRST_FIFO_BIT                         3
76 
77 /* gp_register register id's -- Inputs   */
78 #define HIVE_ISEL_GP_REGS_SYNCGEN_HOR_CNT_IDX                  34
79 #define HIVE_ISEL_GP_REGS_SYNCGEN_VER_CNT_IDX                  35
80 #define HIVE_ISEL_GP_REGS_SYNCGEN_FRAMES_CNT_IDX               36
81 
82 /* irq sources isel irq controller */
83 #define HIVE_ISEL_IRQ_SYNC_GEN_SOF_BIT_ID                       0
84 #define HIVE_ISEL_IRQ_SYNC_GEN_EOF_BIT_ID                       1
85 #define HIVE_ISEL_IRQ_SYNC_GEN_SOL_BIT_ID                       2
86 #define HIVE_ISEL_IRQ_SYNC_GEN_EOL_BIT_ID                       3
87 #define HIVE_ISEL_IRQ_NUM_IRQS                                  4
88 
89 #endif /* _input_selector_defs_h */
90