1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * (C) COPYRIGHT 2018 ARM Limited. All rights reserved.
4  * Author: James.Qian.Wang <james.qian.wang@arm.com>
5  *
6  */
7 #ifndef _D71_REG_H_
8 #define _D71_REG_H_
9 
10 /* Common block registers offset */
11 #define BLK_BLOCK_INFO		0x000
12 #define BLK_PIPELINE_INFO	0x004
13 #define BLK_MAX_LINE_SIZE	0x008
14 #define BLK_VALID_INPUT_ID0	0x020
15 #define BLK_OUTPUT_ID0		0x060
16 #define BLK_INPUT_ID0		0x080
17 #define BLK_IRQ_RAW_STATUS	0x0A0
18 #define BLK_IRQ_CLEAR		0x0A4
19 #define BLK_IRQ_MASK		0x0A8
20 #define BLK_IRQ_STATUS		0x0AC
21 #define BLK_STATUS		0x0B0
22 #define BLK_INFO		0x0C0
23 #define BLK_CONTROL		0x0D0
24 #define BLK_SIZE		0x0D4
25 #define BLK_IN_SIZE		0x0E0
26 
27 #define BLK_P0_PTR_LOW		0x100
28 #define BLK_P0_PTR_HIGH		0x104
29 #define BLK_P0_STRIDE		0x108
30 #define BLK_P1_PTR_LOW		0x110
31 #define BLK_P1_PTR_HIGH		0x114
32 #define BLK_P1_STRIDE		0x118
33 #define BLK_P2_PTR_LOW		0x120
34 #define BLK_P2_PTR_HIGH		0x124
35 
36 #define BLOCK_INFO_N_SUBBLKS(x)	((x) & 0x000F)
37 #define BLOCK_INFO_BLK_ID(x)	(((x) & 0x00F0) >> 4)
38 #define BLOCK_INFO_BLK_TYPE(x)	(((x) & 0xFF00) >> 8)
39 #define BLOCK_INFO_INPUT_ID(x)	((x) & 0xFFF0)
40 #define BLOCK_INFO_TYPE_ID(x)	(((x) & 0x0FF0) >> 4)
41 
42 #define PIPELINE_INFO_N_OUTPUTS(x)	((x) & 0x000F)
43 #define PIPELINE_INFO_N_VALID_INPUTS(x)	(((x) & 0x0F00) >> 8)
44 
45 /* Common block control register bits */
46 #define BLK_CTRL_EN		BIT(0)
47 /* Common size macro */
48 #define HV_SIZE(h, v)		(((h) & 0x1FFF) + (((v) & 0x1FFF) << 16))
49 #define HV_OFFSET(h, v)		(((h) & 0xFFF) + (((v) & 0xFFF) << 16))
50 #define HV_CROP(h, v)		(((h) & 0xFFF) + (((v) & 0xFFF) << 16))
51 
52 /* AD_CONTROL register */
53 #define AD_CONTROL		0x160
54 
55 /* AD_CONTROL register bits */
56 #define AD_AEN			BIT(0)
57 #define AD_YT			BIT(1)
58 #define AD_BS			BIT(2)
59 #define AD_WB			BIT(3)
60 #define AD_TH			BIT(4)
61 
62 /* Global Control Unit */
63 #define GLB_ARCH_ID		0x000
64 #define GLB_CORE_ID		0x004
65 #define GLB_CORE_INFO		0x008
66 #define GLB_IRQ_STATUS		0x010
67 
68 #define GCU_CONFIG_VALID0	0x0D4
69 #define GCU_CONFIG_VALID1	0x0D8
70 
71 /* GCU_CONTROL_BITS */
72 #define GCU_CONTROL_MODE(x)	((x) & 0x7)
73 #define GCU_CONTROL_SRST	BIT(16)
74 
75 /* GCU opmode */
76 #define INACTIVE_MODE		0
77 #define TBU_CONNECT_MODE	1
78 #define TBU_DISCONNECT_MODE	2
79 #define DO0_ACTIVE_MODE		3
80 #define DO1_ACTIVE_MODE		4
81 #define DO01_ACTIVE_MODE	5
82 
83 /* GLB_IRQ_STATUS bits */
84 #define GLB_IRQ_STATUS_GCU	BIT(0)
85 #define GLB_IRQ_STATUS_LPU0	BIT(8)
86 #define GLB_IRQ_STATUS_LPU1	BIT(9)
87 #define GLB_IRQ_STATUS_ATU0	BIT(10)
88 #define GLB_IRQ_STATUS_ATU1	BIT(11)
89 #define GLB_IRQ_STATUS_ATU2	BIT(12)
90 #define GLB_IRQ_STATUS_ATU3	BIT(13)
91 #define GLB_IRQ_STATUS_CU0	BIT(16)
92 #define GLB_IRQ_STATUS_CU1	BIT(17)
93 #define GLB_IRQ_STATUS_DOU0	BIT(24)
94 #define GLB_IRQ_STATUS_DOU1	BIT(25)
95 
96 #define GLB_IRQ_STATUS_PIPE0	(GLB_IRQ_STATUS_LPU0 |\
97 				 GLB_IRQ_STATUS_ATU0 |\
98 				 GLB_IRQ_STATUS_ATU1 |\
99 				 GLB_IRQ_STATUS_CU0 |\
100 				 GLB_IRQ_STATUS_DOU0)
101 
102 #define GLB_IRQ_STATUS_PIPE1	(GLB_IRQ_STATUS_LPU1 |\
103 				 GLB_IRQ_STATUS_ATU2 |\
104 				 GLB_IRQ_STATUS_ATU3 |\
105 				 GLB_IRQ_STATUS_CU1 |\
106 				 GLB_IRQ_STATUS_DOU1)
107 
108 #define GLB_IRQ_STATUS_ATU	(GLB_IRQ_STATUS_ATU0 |\
109 				 GLB_IRQ_STATUS_ATU1 |\
110 				 GLB_IRQ_STATUS_ATU2 |\
111 				 GLB_IRQ_STATUS_ATU3)
112 
113 /* GCU_IRQ_BITS */
114 #define GCU_IRQ_CVAL0		BIT(0)
115 #define GCU_IRQ_CVAL1		BIT(1)
116 #define GCU_IRQ_MODE		BIT(4)
117 #define GCU_IRQ_ERR		BIT(11)
118 
119 /* GCU_STATUS_BITS */
120 #define GCU_STATUS_MODE(x)	((x) & 0x7)
121 #define GCU_STATUS_MERR		BIT(4)
122 #define GCU_STATUS_TCS0		BIT(8)
123 #define GCU_STATUS_TCS1		BIT(9)
124 #define GCU_STATUS_ACTIVE	BIT(31)
125 
126 /* GCU_CONFIG_VALIDx BITS */
127 #define GCU_CONFIG_CVAL		BIT(0)
128 
129 /* PERIPHERAL registers */
130 #define PERIPH_MAX_LINE_SIZE	BIT(0)
131 #define PERIPH_NUM_RICH_LAYERS	BIT(4)
132 #define PERIPH_SPLIT_EN		BIT(8)
133 #define PERIPH_TBU_EN		BIT(12)
134 #define PERIPH_AFBC_DMA_EN	BIT(16)
135 #define PERIPH_CONFIGURATION_ID	0x1D4
136 
137 /* LPU register */
138 #define LPU_TBU_STATUS		0x0B4
139 #define LPU_RAXI_CONTROL	0x0D0
140 #define LPU_WAXI_CONTROL	0x0D4
141 #define LPU_TBU_CONTROL		0x0D8
142 
143 /* LPU_xAXI_CONTROL_BITS */
144 #define TO_RAXI_AOUTSTDCAPB(x)	(x)
145 #define TO_RAXI_BOUTSTDCAPB(x)	((x) << 8)
146 #define TO_RAXI_BEN(x)		((x) << 15)
147 #define TO_xAXI_BURSTLEN(x)	((x) << 16)
148 #define TO_xAXI_AxQOS(x)	((x) << 24)
149 #define TO_xAXI_ORD(x)		((x) << 31)
150 #define TO_WAXI_OUTSTDCAPB(x)	(x)
151 
152 #define RAXI_AOUTSTDCAPB_MASK	0x7F
153 #define RAXI_BOUTSTDCAPB_MASK	0x7F00
154 #define RAXI_BEN_MASK		BIT(15)
155 #define xAXI_BURSTLEN_MASK	0x3F0000
156 #define xAXI_AxQOS_MASK		0xF000000
157 #define xAXI_ORD_MASK		BIT(31)
158 #define WAXI_OUTSTDCAPB_MASK	0x3F
159 
160 /* LPU_TBU_CONTROL BITS */
161 #define TO_TBU_DOUTSTDCAPB(x)	(x)
162 #define TBU_DOUTSTDCAPB_MASK	0x3F
163 
164 /* LPU_IRQ_BITS */
165 #define LPU_IRQ_IBSY		BIT(10)
166 #define LPU_IRQ_ERR		BIT(11)
167 #define LPU_IRQ_EOW		BIT(12)
168 #define LPU_IRQ_PL0		BIT(13)
169 
170 /* LPU_STATUS_BITS */
171 #define LPU_STATUS_AXIED(x)	((x) & 0xF)
172 #define LPU_STATUS_AXIE		BIT(4)
173 #define LPU_STATUS_AXIRP	BIT(5)
174 #define LPU_STATUS_AXIWP	BIT(6)
175 #define LPU_STATUS_ACE0		BIT(16)
176 #define LPU_STATUS_ACE1		BIT(17)
177 #define LPU_STATUS_ACE2		BIT(18)
178 #define LPU_STATUS_ACE3		BIT(19)
179 #define LPU_STATUS_ACTIVE	BIT(31)
180 
181 #define AXIEID_MASK		0xF
182 #define AXIE_MASK		LPU_STATUS_AXIE
183 #define AXIRP_MASK		LPU_STATUS_AXIRP
184 #define AXIWP_MASK		LPU_STATUS_AXIWP
185 
186 #define FROM_AXIEID(reg)	((reg) & AXIEID_MASK)
187 #define TO_AXIE(x)		((x) << 4)
188 #define FROM_AXIRP(reg)		(((reg) & AXIRP_MASK) >> 5)
189 #define FROM_AXIWP(reg)		(((reg) & AXIWP_MASK) >> 6)
190 
191 /* LPU_TBU_STATUS_BITS */
192 #define LPU_TBU_STATUS_TCF	BIT(1)
193 #define LPU_TBU_STATUS_TTNG	BIT(2)
194 #define LPU_TBU_STATUS_TITR	BIT(8)
195 #define LPU_TBU_STATUS_TEMR	BIT(16)
196 #define LPU_TBU_STATUS_TTF	BIT(31)
197 
198 /* LPU_TBU_CONTROL BITS */
199 #define LPU_TBU_CTRL_TLBPEN	BIT(16)
200 
201 /* CROSSBAR CONTROL BITS */
202 #define CBU_INPUT_CTRL_EN	BIT(0)
203 #define CBU_NUM_INPUT_IDS	5
204 #define CBU_NUM_OUTPUT_IDS	5
205 
206 /* CU register */
207 #define CU_BG_COLOR		0x0DC
208 #define CU_INPUT0_SIZE		0x0E0
209 #define CU_INPUT0_OFFSET	0x0E4
210 #define CU_INPUT0_CONTROL	0x0E8
211 #define CU_INPUT1_SIZE		0x0F0
212 #define CU_INPUT1_OFFSET	0x0F4
213 #define CU_INPUT1_CONTROL	0x0F8
214 #define CU_INPUT2_SIZE		0x100
215 #define CU_INPUT2_OFFSET	0x104
216 #define CU_INPUT2_CONTROL	0x108
217 #define CU_INPUT3_SIZE		0x110
218 #define CU_INPUT3_OFFSET	0x114
219 #define CU_INPUT3_CONTROL	0x118
220 #define CU_INPUT4_SIZE		0x120
221 #define CU_INPUT4_OFFSET	0x124
222 #define CU_INPUT4_CONTROL	0x128
223 
224 #define CU_PER_INPUT_REGS	4
225 
226 #define CU_NUM_INPUT_IDS	5
227 #define CU_NUM_OUTPUT_IDS	1
228 
229 /* CU control register bits */
230 #define CU_CTRL_COPROC		BIT(0)
231 
232 /* CU_IRQ_BITS */
233 #define CU_IRQ_OVR		BIT(9)
234 #define CU_IRQ_ERR		BIT(11)
235 
236 /* CU_STATUS_BITS */
237 #define CU_STATUS_CPE		BIT(0)
238 #define CU_STATUS_ZME		BIT(1)
239 #define CU_STATUS_CFGE		BIT(2)
240 #define CU_STATUS_ACTIVE	BIT(31)
241 
242 /* CU input control register bits */
243 #define CU_INPUT_CTRL_EN	BIT(0)
244 #define CU_INPUT_CTRL_PAD	BIT(1)
245 #define CU_INPUT_CTRL_PMUL	BIT(2)
246 #define CU_INPUT_CTRL_ALPHA(x)	(((x) & 0xFF) << 8)
247 
248 /* DOU register */
249 
250 /* DOU_IRQ_BITS */
251 #define DOU_IRQ_UND		BIT(8)
252 #define DOU_IRQ_ERR		BIT(11)
253 #define DOU_IRQ_PL0		BIT(13)
254 #define DOU_IRQ_PL1		BIT(14)
255 
256 /* DOU_STATUS_BITS */
257 #define DOU_STATUS_DRIFTTO	BIT(0)
258 #define DOU_STATUS_FRAMETO	BIT(1)
259 #define DOU_STATUS_TETO		BIT(2)
260 #define DOU_STATUS_CSCE		BIT(8)
261 #define DOU_STATUS_ACTIVE	BIT(31)
262 
263 /* Layer registers */
264 #define LAYER_INFO		0x0C0
265 #define LAYER_R_CONTROL		0x0D4
266 #define LAYER_FMT		0x0D8
267 #define LAYER_LT_COEFFTAB	0x0DC
268 #define LAYER_PALPHA		0x0E4
269 
270 #define LAYER_YUV_RGB_COEFF0	0x130
271 
272 #define LAYER_AD_H_CROP		0x164
273 #define LAYER_AD_V_CROP		0x168
274 
275 #define LAYER_RGB_RGB_COEFF0	0x170
276 
277 /* L_CONTROL_BITS */
278 #define L_EN			BIT(0)
279 #define L_IT			BIT(4)
280 #define L_R2R			BIT(5)
281 #define L_FT			BIT(6)
282 #define L_ROT(x)		(((x) & 3) << 8)
283 #define L_HFLIP			BIT(10)
284 #define L_VFLIP			BIT(11)
285 #define L_TBU_EN		BIT(16)
286 #define L_A_RCACHE(x)		(((x) & 0xF) << 28)
287 #define L_ROT_R0		0
288 #define L_ROT_R90		1
289 #define L_ROT_R180		2
290 #define L_ROT_R270		3
291 
292 /* LAYER_R_CONTROL BITS */
293 #define LR_CHI422_BILINEAR	0
294 #define LR_CHI422_REPLICATION	1
295 #define LR_CHI420_JPEG		(0 << 2)
296 #define LR_CHI420_MPEG		(1 << 2)
297 
298 #define L_ITSEL(x)		((x) & 0xFFF)
299 #define L_FTSEL(x)		(((x) & 0xFFF) << 16)
300 
301 #define LAYER_PER_PLANE_REGS	4
302 
303 /* Layer_WR registers */
304 #define LAYER_WR_PROG_LINE	0x0D4
305 #define LAYER_WR_FORMAT		0x0D8
306 
307 /* Layer_WR control bits */
308 #define LW_OFM			BIT(4)
309 #define LW_LALPHA(x)		(((x) & 0xFF) << 8)
310 #define LW_A_WCACHE(x)		(((x) & 0xF) << 28)
311 #define LW_TBU_EN		BIT(16)
312 
313 #define AxCACHE_MASK		0xF0000000
314 
315 /* Layer AXI R/W cache setting */
316 #define AxCACHE_B		BIT(0)	/* Bufferable */
317 #define AxCACHE_M		BIT(1)	/* Modifiable */
318 #define AxCACHE_RA		BIT(2)	/* Read-Allocate */
319 #define AxCACHE_WA		BIT(3)	/* Write-Allocate */
320 
321 /* Layer info bits */
322 #define L_INFO_RF		BIT(0)
323 #define L_INFO_CM		BIT(1)
324 #define L_INFO_ABUF_SIZE(x)	(((x) >> 4) & 0x7)
325 #define L_INFO_YUV_MAX_LINESZ(x)	(((x) >> 16) & 0xFFFF)
326 
327 /* Scaler registers */
328 #define SC_COEFFTAB		0x0DC
329 #define SC_OUT_SIZE		0x0E4
330 #define SC_H_CROP		0x0E8
331 #define SC_V_CROP		0x0EC
332 #define SC_H_INIT_PH		0x0F0
333 #define SC_H_DELTA_PH		0x0F4
334 #define SC_V_INIT_PH		0x0F8
335 #define SC_V_DELTA_PH		0x0FC
336 #define SC_ENH_LIMITS		0x130
337 #define SC_ENH_COEFF0		0x134
338 
339 #define SC_MAX_ENH_COEFF	9
340 
341 /* SC_CTRL_BITS */
342 #define SC_CTRL_SCL		BIT(0)
343 #define SC_CTRL_LS		BIT(1)
344 #define SC_CTRL_AP		BIT(4)
345 #define SC_CTRL_IENH		BIT(8)
346 #define SC_CTRL_RGBSM		BIT(16)
347 #define SC_CTRL_ASM		BIT(17)
348 
349 #define SC_VTSEL(vtal)		((vtal) << 16)
350 
351 #define SC_NUM_INPUTS_IDS	1
352 #define SC_NUM_OUTPUTS_IDS	1
353 
354 #define MG_NUM_INPUTS_IDS	2
355 #define MG_NUM_OUTPUTS_IDS	1
356 
357 /* Merger registers */
358 #define MG_INPUT_ID0		BLK_INPUT_ID0
359 #define MG_INPUT_ID1		(MG_INPUT_ID0 + 4)
360 #define MG_SIZE			BLK_SIZE
361 
362 /* Splitter registers */
363 #define SP_OVERLAP_SIZE		0xD8
364 
365 /* Backend registers */
366 #define BS_INFO			0x0C0
367 #define BS_PROG_LINE		0x0D4
368 #define BS_PREFETCH_LINE	0x0D8
369 #define BS_BG_COLOR		0x0DC
370 #define BS_ACTIVESIZE		0x0E0
371 #define BS_HINTERVALS		0x0E4
372 #define BS_VINTERVALS		0x0E8
373 #define BS_SYNC			0x0EC
374 #define BS_DRIFT_TO		0x100
375 #define BS_FRAME_TO		0x104
376 #define BS_TE_TO		0x108
377 #define BS_T0_INTERVAL		0x110
378 #define BS_T1_INTERVAL		0x114
379 #define BS_T2_INTERVAL		0x118
380 #define BS_CRC0_LOW		0x120
381 #define BS_CRC0_HIGH		0x124
382 #define BS_CRC1_LOW		0x128
383 #define BS_CRC1_HIGH		0x12C
384 #define BS_USER			0x130
385 
386 /* BS control register bits */
387 #define BS_CTRL_EN		BIT(0)
388 #define BS_CTRL_VM		BIT(1)
389 #define BS_CTRL_BM		BIT(2)
390 #define BS_CTRL_HMASK		BIT(4)
391 #define BS_CTRL_VD		BIT(5)
392 #define BS_CTRL_TE		BIT(8)
393 #define BS_CTRL_TS		BIT(9)
394 #define BS_CTRL_TM		BIT(12)
395 #define BS_CTRL_DL		BIT(16)
396 #define BS_CTRL_SBS		BIT(17)
397 #define BS_CTRL_CRC		BIT(18)
398 #define BS_CTRL_PM		BIT(20)
399 
400 /* BS active size/intervals */
401 #define BS_H_INTVALS(hfp, hbp)	(((hfp) & 0xFFF) + (((hbp) & 0x3FF) << 16))
402 #define BS_V_INTVALS(vfp, vbp)  (((vfp) & 0x3FFF) + (((vbp) & 0xFF) << 16))
403 
404 /* BS_SYNC bits */
405 #define BS_SYNC_HSW(x)		((x) & 0x3FF)
406 #define BS_SYNC_HSP		BIT(12)
407 #define BS_SYNC_VSW(x)		(((x) & 0xFF) << 16)
408 #define BS_SYNC_VSP		BIT(28)
409 
410 #define BS_NUM_INPUT_IDS	0
411 #define BS_NUM_OUTPUT_IDS	0
412 
413 /* Image process registers */
414 #define IPS_DEPTH		0x0D8
415 #define IPS_RGB_RGB_COEFF0	0x130
416 #define IPS_RGB_YUV_COEFF0	0x170
417 
418 #define IPS_DEPTH_MARK		0xF
419 
420 /* IPS control register bits */
421 #define IPS_CTRL_RGB		BIT(0)
422 #define IPS_CTRL_FT		BIT(4)
423 #define IPS_CTRL_YUV		BIT(8)
424 #define IPS_CTRL_CHD422		BIT(9)
425 #define IPS_CTRL_CHD420		BIT(10)
426 #define IPS_CTRL_LPF		BIT(11)
427 #define IPS_CTRL_DITH		BIT(12)
428 #define IPS_CTRL_CLAMP		BIT(16)
429 #define IPS_CTRL_SBS		BIT(17)
430 
431 /* IPS info register bits */
432 #define IPS_INFO_CHD420		BIT(10)
433 
434 #define IPS_NUM_INPUT_IDS	2
435 #define IPS_NUM_OUTPUT_IDS	1
436 
437 /* FT_COEFF block registers */
438 #define FT_COEFF0		0x80
439 #define GLB_IT_COEFF		0x80
440 
441 /* GLB_SC_COEFF registers */
442 #define GLB_SC_COEFF_ADDR	0x0080
443 #define GLB_SC_COEFF_DATA	0x0084
444 #define GLB_LT_COEFF_DATA	0x0080
445 
446 #define GLB_SC_COEFF_MAX_NUM	1024
447 #define GLB_LT_COEFF_NUM	65
448 /* GLB_SC_ADDR */
449 #define SC_COEFF_R_ADDR		BIT(18)
450 #define SC_COEFF_G_ADDR		BIT(17)
451 #define SC_COEFF_B_ADDR		BIT(16)
452 
453 #define SC_COEFF_DATA(x, y)	(((y) & 0xFFFF) | (((x) & 0xFFFF) << 16))
454 
455 enum d71_blk_type {
456 	D71_BLK_TYPE_GCU		= 0x00,
457 	D71_BLK_TYPE_LPU		= 0x01,
458 	D71_BLK_TYPE_CU			= 0x02,
459 	D71_BLK_TYPE_DOU		= 0x03,
460 	D71_BLK_TYPE_AEU		= 0x04,
461 	D71_BLK_TYPE_GLB_LT_COEFF	= 0x05,
462 	D71_BLK_TYPE_GLB_SCL_COEFF	= 0x06, /* SH/SV scaler coeff */
463 	D71_BLK_TYPE_GLB_SC_COEFF	= 0x07,
464 	D71_BLK_TYPE_PERIPH		= 0x08,
465 	D71_BLK_TYPE_LPU_TRUSTED	= 0x09,
466 	D71_BLK_TYPE_AEU_TRUSTED	= 0x0A,
467 	D71_BLK_TYPE_LPU_LAYER		= 0x10,
468 	D71_BLK_TYPE_LPU_WB_LAYER	= 0x11,
469 	D71_BLK_TYPE_CU_SPLITTER	= 0x20,
470 	D71_BLK_TYPE_CU_SCALER		= 0x21,
471 	D71_BLK_TYPE_CU_MERGER		= 0x22,
472 	D71_BLK_TYPE_DOU_IPS		= 0x30,
473 	D71_BLK_TYPE_DOU_BS		= 0x31,
474 	D71_BLK_TYPE_DOU_FT_COEFF	= 0x32,
475 	D71_BLK_TYPE_AEU_DS		= 0x40,
476 	D71_BLK_TYPE_AEU_AES		= 0x41,
477 	D71_BLK_TYPE_RESERVED		= 0xFF
478 };
479 
480 /* Constant of components */
481 #define D71_MAX_PIPELINE		2
482 #define D71_PIPELINE_MAX_SCALERS	2
483 #define D71_PIPELINE_MAX_LAYERS		4
484 
485 #define D71_MAX_GLB_IT_COEFF		3
486 #define D71_MAX_GLB_SCL_COEFF		4
487 
488 #define D71_MAX_LAYERS_PER_LPU		4
489 #define D71_BLOCK_MAX_INPUT		9
490 #define D71_BLOCK_MAX_OUTPUT		5
491 #define D71_MAX_SC_PER_CU		2
492 
493 #define D71_BLOCK_OFFSET_PERIPH		0xFE00
494 #define D71_BLOCK_SIZE			0x0200
495 
496 #define D71_DEFAULT_PREPRETCH_LINE	5
497 #define D71_BUS_WIDTH_16_BYTES		16
498 
499 #define D71_SC_MAX_UPSCALING		64
500 #define D71_SC_MAX_DOWNSCALING		6
501 #define D71_SC_SPLIT_OVERLAP		8
502 #define D71_SC_ENH_SPLIT_OVERLAP	1
503 
504 #define D71_MG_MIN_MERGED_SIZE		4
505 #define D71_MG_MAX_MERGED_HSIZE		4032
506 #define D71_MG_MAX_MERGED_VSIZE		4096
507 
508 #define D71_PALPHA_DEF_MAP		0xFFAA5500
509 #define D71_LAYER_CONTROL_DEFAULT	0x30000000
510 #define D71_WB_LAYER_CONTROL_DEFAULT	0x3000FF00
511 #define D71_BS_CONTROL_DEFAULT		0x00000002
512 
513 struct block_header {
514 	u32 block_info;
515 	u32 pipeline_info;
516 	u32 input_ids[D71_BLOCK_MAX_INPUT];
517 	u32 output_ids[D71_BLOCK_MAX_OUTPUT];
518 };
519 
520 static inline u32 get_block_type(struct block_header *blk)
521 {
522 	return BLOCK_INFO_BLK_TYPE(blk->block_info);
523 }
524 
525 #endif /* !_D71_REG_H_ */
526