summaryrefstree
path: root/kernel/drivers/vision/vpu/include/lib/vpu-fwif-hw-proj210.h
blob: 1943aee5c704ea853bfec70223c85781e46fced9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
/**
 * Samsung Exynos SoC series VPU driver
 *
 * Copyright (c) 2015 Samsung Electronics Co., Ltd
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#ifndef VPU_FWIF_PROJ210_
#define VPU_FWIF_PROJ210_

/**
 * ************ General description - Explicit project information ************
 * This file includes explicit project information required for CORE / HOST
 * interface (e.g. number of instances of each block).
 * The HW information that is relevant for all projects and is required for
 * both writing the HW registers and for CORE / HOST interface is kept in
 * VPU_FWIF_HW_Gen.h
 */

#define VPUH_HW_CHAINS		6

#define VPUH_TOTAL_BLOCKS	79

#define VPUH_16BIT_OUTPUTS	78
#define VPUH_32BIT_OUTPUTS	26
	/**
	 * The single 80 bits output entry (of TN_4) isn't handled
	 * - fix connection (to TN_3)
	 */
#define VPUH_TOTAL_OUTPUTS	(VPUH_16BIT_OUTPUTS + VPUH_32BIT_OUTPUTS)
#define VPUH_16BIT_INPUTS	96
#define VPUH_32BIT_INPUTS	31
	/**
	 * The single 80 bits input entry (of TN_3) isn't handled
	 * - fix connection (from TN_4)
	 */
#define VPUH_TOTAL_INPUTS	(VPUH_16BIT_INPUTS + VPUH_32BIT_INPUTS)

#define VPUH_LARGE_MPRB_SIZE	4096
#define VPUH_SMALL_MPRB_SIZE	1024
	/**
	 * HW Indices are 1 - 24.
	 * Required to identify if MPRB block index is small or large.
	 */
#define VPUH_LARGE_MPRBS		24
	/* HW Indices are 24 - 47 */
#define VPUH_SMALL_MPRBS		23
#define VPUH_TOTAL_MPRBS		(VPUH_LARGE_MPRBS + VPUH_SMALL_MPRBS)
	/* Total number of connections of all HW blocks to MPRBs */
#define VPUH_HW_CONNECTIONS_MPRBS	250

#ifdef FPGA_PLATFORM
#define BL(Real, All)			Real
#if (FPGA_VERSION == 1)				/* Base */
#define V_BL(x1,x2,x3,x4,x5,All)	x1
#define LK_DP_BL(x13,x4,x5,All)		x13
#define LKDP_BL(x13,x45,All)		x13
#define DP_BL(x14,x5,All)		x14
#define CNN_BL(x12,x345,All)		x12
#elif (FPGA_VERSION == 2)			/* CNN */
#define V_BL(x1,x2,x3,x4,x5,All)	x2
#define LK_DP_BL(x13,x4,x5,All)		x13
#define LKDP_BL(x13,x45,All)		x13
#define DP_BL(x14,x5,All)		x14
#define CNN_BL(x12,x345,All)		x12
#elif (FPGA_VERSION == 3)			/* Harris + Fast + Canny */
#define V_BL(x1,x2,x3,x4,x5,All)	x3
#define LK_DP_BL(x13,x4,x5,All)		x13
#define LKDP_BL(x13,x45,All)		x13
#define DP_BL(x14,x5,All)		x14
#define CNN_BL(x12,x345,All)		x345
#elif (FPGA_VERSION == 4)			/* LK */
#define V_BL(x1,x2,x3,x4,x5,All)	x4
#define LK_DP_BL(x13,x4,x5,All)		x4
#define LKDP_BL(x13,x45,All)		x45
#define DP_BL(x14,x5,All)		x14
#define CNN_BL(x12,x345,All)		x345
#elif (FPGA_VERSION == 5)			/* Depth */
#define V_BL(x1,x2,x3,x4,x5,All)	x5
#define LK_DP_BL(x13,x4,x5,All)		x5
#define LKDP_BL(x13,x45,All)		x45
#define DP_BL(x14,x5,All)		x5
#define CNN_BL(x12,x345,All)		x345
#endif

#define VPUH_BL_INST_NUM {				\
	BL(1, 1),		/* VPUH_BL_I_DMA */	\
	BL(2, 2),		/* VPUH_BL_I_MNM_DMA */	\
	DP_BL(2, 1, 2),		/* VPUH_BL_WI_DMA */	\
	DP_BL(1, 0, 1),		/* VPUH_BL_O_DMA */	\
	DP_BL(2, 0, 2),		/* VPUH_BL_O_MNM_DMA */	\
	DP_BL(2, 1, 2),		/* VPUH_BL_WO_DMA */	\
	LK_DP_BL(2,6,1,12),	/* VPUH_BL_FIFO */	\
	BL(3, 3),		/* VPUH_BL_DUPL_16 */	\
	BL(2, 2),		/* VPUH_BL_DUPL_32 */	\
	BL(2, 2),		/* VPUH_BL_SPLIT */	\
	BL(2, 2),		/* VPUH_BL_JOIN */	\
	LK_DP_BL(3,7,1,9),	/* VPUH_BL_SALB */	\
	V_BL(1,1,3,3,0,3),	/* VPUH_BL_CALB */	\
	V_BL(1,1,2,3,0,3),	/* VPUH_BL_SEPFL_5x5 */	\
	V_BL(1,1,3,3,1,3),	/* VPUH_BL_SEPFL_7x7 */	\
	LK_DP_BL(1,2,0,2),	/* VPUH_BL_GENFL */	\
	V_BL(1,0,1,0,1,1),	/* VPUH_BL_NMS */	\
	V_BL(1,0,1,0,1,1),	/* VPUH_BL_NLF */	\
	V_BL(1,1,0,1,0,1),	/* VPUH_BL_CCM */	\
	LKDP_BL(1,0,1),		/* VPUH_BL_MDE */	\
	LKDP_BL(1,0,1),		/* VPUH_BL_INTIMG */	\
	CNN_BL(1,0,2),		/* VPUH_BL_DWSC */	\
	LKDP_BL(1,0,1),		/* VPUH_BL_UPSC */	\
	LKDP_BL(3,0,3),		/* VPUH_BL_CROP */	\
	LKDP_BL(1,0,1),		/* VPUH_BL_M2LI */	\
	CNN_BL(1,0,1),		/* VPUH_BL_LUT */	\
	CNN_BL(1,0,1),		/* VPUH_BL_HIST */	\
	V_BL(1,1,0,2,0,2),	/* VPUH_BL_ROI */	\
	CNN_BL(1,0,1),		/* VPUH_BL_FLAMORB */	\
	V_BL(0,1,0,0,0,1),	/* VPUH_BL_CNN */	\
	DP_BL(0, 1, 1),		/* VPUH_BL_DEPTH */	\
	DP_BL(0, 1, 1),		/* VPUH_BL_IN_PAINT */	\
	DP_BL(0, 1, 1),		/* VPUH_BL_DISP_EQ */	\
	BL(1, 1),		/* VPUH_BL_TN1_SBF */	\
	BL(2, 2),		/* VPUH_BL_TN2_ALF */	\
	BL(1, 1),		/* VPUH_BL_TN3_BRE */	\
	BL(1, 1),		/* VPUH_BL_TN4_MIC */	\
	BL(1, 1),		/* VPUH_BL_TN5_RCF */	\
	}
#else
#define VPUH_BL_INST_NUM {			\
	1,	/* VPUH_BL_I_DMA */		\
	2,	/* VPUH_BL_I_MNM_DMA */		\
	2,	/* VPUH_BL_WI_DMA */		\
	1,	/* VPUH_BL_O_DMA */		\
	2,	/* VPUH_BL_O_MNM_DMA */		\
	2,	/* VPUH_BL_WO_DMA */		\
	12,	/* VPUH_BL_FIFO */		\
	3,	/* VPUH_BL_DUPL_16 */		\
	2,	/* VPUH_BL_DUPL_32 */		\
	2,	/* VPUH_BL_SPLIT */		\
	2,	/* VPUH_BL_JOIN */		\
	9,	/* VPUH_BL_SALB */		\
	3,	/* VPUH_BL_CALB */		\
	3,	/* VPUH_BL_SEPFL_5x5 */		\
	3,	/* VPUH_BL_SEPFL_7x7 */		\
	2,	/* VPUH_BL_GENFL */		\
	1,	/* VPUH_BL_NMS */		\
	1,	/* VPUH_BL_NLF */		\
	1,	/* VPUH_BL_CCM */		\
	1,	/* VPUH_BL_MDE */		\
	1,	/* VPUH_BL_INTIMG */		\
	2,	/* VPUH_BL_DWSC */		\
	2,	/* VPUH_BL_UPSC */		\
	3,	/* VPUH_BL_CROP */		\
	1,	/* VPUH_BL_M2LI */		\
	1,	/* VPUH_BL_LUT */		\
	1,	/* VPUH_BL_HIST */		\
	2,	/* VPUH_BL_ROI */		\
	1,	/* VPUH_BL_FLAMORB */		\
	1,	/* VPUH_BL_CNN */		\
	1,	/* VPUH_BL_DEPTH */		\
	1,	/* VPUH_BL_IN_PAINT */		\
	1,	/* VPUH_BL_DISP_EQ */		\
	1,	/* VPUH_BL_TN1_SBF */		\
	2,	/* VPUH_BL_TN2_ALF */		\
	1,	/* VPUH_BL_TN3_BRE */		\
	1,	/* VPUH_BL_TN4_MIC */		\
	1,	/* VPUH_BL_TN5_RCF */		\
	}
#endif
#endif