162306a36Sopenharmony_ci/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Copyright (C) 2022 MediaTek Inc.
462306a36Sopenharmony_ci * Author: Yongqiang Niu <yongqiang.niu@mediatek.com>
562306a36Sopenharmony_ci */
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci#ifndef _DT_BINDINGS_GCE_MT8186_H
862306a36Sopenharmony_ci#define _DT_BINDINGS_GCE_MT8186_H
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci/* assign timeout 0 also means default */
1162306a36Sopenharmony_ci#define CMDQ_NO_TIMEOUT		0xffffffff
1262306a36Sopenharmony_ci#define CMDQ_TIMEOUT_DEFAULT	1000
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci/* GCE thread priority */
1562306a36Sopenharmony_ci#define CMDQ_THR_PRIO_LOWEST	0
1662306a36Sopenharmony_ci#define CMDQ_THR_PRIO_1		1
1762306a36Sopenharmony_ci#define CMDQ_THR_PRIO_2		2
1862306a36Sopenharmony_ci#define CMDQ_THR_PRIO_3		3
1962306a36Sopenharmony_ci#define CMDQ_THR_PRIO_4		4
2062306a36Sopenharmony_ci#define CMDQ_THR_PRIO_5		5
2162306a36Sopenharmony_ci#define CMDQ_THR_PRIO_6		6
2262306a36Sopenharmony_ci#define CMDQ_THR_PRIO_HIGHEST	7
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci/* CPR count in 32bit register */
2562306a36Sopenharmony_ci#define GCE_CPR_COUNT		1312
2662306a36Sopenharmony_ci
2762306a36Sopenharmony_ci/* GCE subsys table */
2862306a36Sopenharmony_ci#define SUBSYS_1300XXXX		0
2962306a36Sopenharmony_ci#define SUBSYS_1400XXXX		1
3062306a36Sopenharmony_ci#define SUBSYS_1401XXXX		2
3162306a36Sopenharmony_ci#define SUBSYS_1402XXXX		3
3262306a36Sopenharmony_ci#define SUBSYS_1502XXXX		4
3362306a36Sopenharmony_ci#define SUBSYS_1582XXXX		5
3462306a36Sopenharmony_ci#define SUBSYS_1B00XXXX		6
3562306a36Sopenharmony_ci#define SUBSYS_1C00XXXX		7
3662306a36Sopenharmony_ci#define SUBSYS_1C10XXXX		8
3762306a36Sopenharmony_ci#define SUBSYS_1000XXXX		9
3862306a36Sopenharmony_ci#define SUBSYS_1001XXXX		10
3962306a36Sopenharmony_ci#define SUBSYS_1020XXXX		11
4062306a36Sopenharmony_ci#define SUBSYS_1021XXXX		12
4162306a36Sopenharmony_ci#define SUBSYS_1022XXXX		13
4262306a36Sopenharmony_ci#define SUBSYS_1023XXXX		14
4362306a36Sopenharmony_ci#define SUBSYS_1060XXXX		15
4462306a36Sopenharmony_ci#define SUBSYS_1602XXXX		16
4562306a36Sopenharmony_ci#define SUBSYS_1608XXXX		17
4662306a36Sopenharmony_ci#define SUBSYS_1700XXXX		18
4762306a36Sopenharmony_ci#define SUBSYS_1701XXXX		19
4862306a36Sopenharmony_ci#define SUBSYS_1702XXXX		20
4962306a36Sopenharmony_ci#define SUBSYS_1703XXXX		21
5062306a36Sopenharmony_ci#define SUBSYS_1706XXXX		22
5162306a36Sopenharmony_ci#define SUBSYS_1A00XXXX		23
5262306a36Sopenharmony_ci#define SUBSYS_1A01XXXX		24
5362306a36Sopenharmony_ci#define SUBSYS_1A02XXXX		25
5462306a36Sopenharmony_ci#define SUBSYS_1A03XXXX		26
5562306a36Sopenharmony_ci#define SUBSYS_1A04XXXX		27
5662306a36Sopenharmony_ci#define SUBSYS_1A05XXXX		28
5762306a36Sopenharmony_ci#define SUBSYS_1A06XXXX		29
5862306a36Sopenharmony_ci#define SUBSYS_NO_SUPPORT	99
5962306a36Sopenharmony_ci
6062306a36Sopenharmony_ci/* GCE General Purpose Register (GPR) support
6162306a36Sopenharmony_ci * Leave note for scenario usage here
6262306a36Sopenharmony_ci */
6362306a36Sopenharmony_ci/* GCE: write mask */
6462306a36Sopenharmony_ci#define GCE_GPR_R00		0x00
6562306a36Sopenharmony_ci#define GCE_GPR_R01		0x01
6662306a36Sopenharmony_ci/* MDP: P1: JPEG dest */
6762306a36Sopenharmony_ci#define GCE_GPR_R02		0x02
6862306a36Sopenharmony_ci#define GCE_GPR_R03		0x03
6962306a36Sopenharmony_ci/* MDP: PQ color */
7062306a36Sopenharmony_ci#define GCE_GPR_R04		0x04
7162306a36Sopenharmony_ci/* MDP: 2D sharpness */
7262306a36Sopenharmony_ci#define GCE_GPR_R05		0x05
7362306a36Sopenharmony_ci/* DISP: poll esd */
7462306a36Sopenharmony_ci#define GCE_GPR_R06		0x06
7562306a36Sopenharmony_ci#define GCE_GPR_R07		0x07
7662306a36Sopenharmony_ci/* MDP: P4: 2D sharpness dst */
7762306a36Sopenharmony_ci#define GCE_GPR_R08		0x08
7862306a36Sopenharmony_ci#define GCE_GPR_R09		0x09
7962306a36Sopenharmony_ci/* VCU: poll with timeout for GPR timer */
8062306a36Sopenharmony_ci#define GCE_GPR_R10		0x0A
8162306a36Sopenharmony_ci#define GCE_GPR_R11		0x0B
8262306a36Sopenharmony_ci/* CMDQ: debug */
8362306a36Sopenharmony_ci#define GCE_GPR_R12		0x0C
8462306a36Sopenharmony_ci#define GCE_GPR_R13		0x0D
8562306a36Sopenharmony_ci/* CMDQ: P7: debug */
8662306a36Sopenharmony_ci#define GCE_GPR_R14		0x0E
8762306a36Sopenharmony_ci#define GCE_GPR_R15		0x0F
8862306a36Sopenharmony_ci
8962306a36Sopenharmony_ci/* GCE hardware events */
9062306a36Sopenharmony_ci/* VDEC */
9162306a36Sopenharmony_ci#define CMDQ_EVENT_LINE_COUNT_THRESHOLD_INTERRUPT	0
9262306a36Sopenharmony_ci#define CMDQ_EVENT_VDEC_INT				1
9362306a36Sopenharmony_ci#define CMDQ_EVENT_VDEC_PAUSE				2
9462306a36Sopenharmony_ci#define CMDQ_EVENT_VDEC_DEC_ERROR			3
9562306a36Sopenharmony_ci#define CMDQ_EVENT_MDEC_TIMEOUT				4
9662306a36Sopenharmony_ci#define CMDQ_EVENT_DRAM_ACCESS_DONE			5
9762306a36Sopenharmony_ci#define CMDQ_EVENT_INI_FETCH_RDY			6
9862306a36Sopenharmony_ci#define CMDQ_EVENT_PROCESS_FLAG				7
9962306a36Sopenharmony_ci#define CMDQ_EVENT_SEARCH_START_CODE_DONE		8
10062306a36Sopenharmony_ci#define CMDQ_EVENT_REF_REORDER_DONE			9
10162306a36Sopenharmony_ci#define CMDQ_EVENT_WP_TBLE_DONE				10
10262306a36Sopenharmony_ci#define CMDQ_EVENT_COUNT_SRAM_CLR_DONE			11
10362306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_CNT_OP_THRESHOLD			15
10462306a36Sopenharmony_ci#define CMDQ_EVENT_VDEC_MINI_MDP_EVENT_0		16
10562306a36Sopenharmony_ci#define CMDQ_EVENT_VDEC_MINI_MDP_EVENT_1		17
10662306a36Sopenharmony_ci#define CMDQ_EVENT_VDEC_MINI_MDP_EVENT_2		18
10762306a36Sopenharmony_ci#define CMDQ_EVENT_VDEC_MINI_MDP_EVENT_3		19
10862306a36Sopenharmony_ci#define CMDQ_EVENT_VDEC_MINI_MDP_EVENT_4		20
10962306a36Sopenharmony_ci#define CMDQ_EVENT_VDEC_MINI_MDP_EVENT_5		21
11062306a36Sopenharmony_ci#define CMDQ_EVENT_VDEC_MINI_MDP_EVENT_6		22
11162306a36Sopenharmony_ci#define CMDQ_EVENT_VDEC_MINI_MDP_EVENT_7		23
11262306a36Sopenharmony_ci#define CMDQ_EVENT_VDEC_MINI_MDP_EVENT_8		24
11362306a36Sopenharmony_ci#define CMDQ_EVENT_VDEC_MINI_MDP_EVENT_9		25
11462306a36Sopenharmony_ci#define CMDQ_EVENT_VDEC_MINI_MDP_EVENT_10		26
11562306a36Sopenharmony_ci#define CMDQ_EVENT_VDEC_MINI_MDP_EVENT_11		27
11662306a36Sopenharmony_ci#define CMDQ_EVENT_VDEC_MINI_MDP_EVENT_12		28
11762306a36Sopenharmony_ci#define CMDQ_EVENT_VDEC_MINI_MDP_EVENT_13		29
11862306a36Sopenharmony_ci#define CMDQ_EVENT_VDEC_MINI_MDP_EVENT_14		30
11962306a36Sopenharmony_ci#define CMDQ_EVENT_VDEC_MINI_MDP_EVENT_15		31
12062306a36Sopenharmony_ci#define CMDQ_EVENT_WPE_GCE_FRAME_DONE			32
12162306a36Sopenharmony_ci
12262306a36Sopenharmony_ci/* CAM */
12362306a36Sopenharmony_ci#define CMDQ_EVENT_ISP_FRAME_DONE_A			65
12462306a36Sopenharmony_ci#define CMDQ_EVENT_ISP_FRAME_DONE_B			66
12562306a36Sopenharmony_ci#define CMDQ_EVENT_CAMSV1_PASS1_DONE			70
12662306a36Sopenharmony_ci#define CMDQ_EVENT_CAMSV2_PASS1_DONE			71
12762306a36Sopenharmony_ci#define CMDQ_EVENT_CAMSV3_PASS1_DONE			72
12862306a36Sopenharmony_ci#define CMDQ_EVENT_MRAW_0_PASS1_DONE			73
12962306a36Sopenharmony_ci#define CMDQ_EVENT_SENINF_CAM0_FIFO_FULL		75
13062306a36Sopenharmony_ci#define CMDQ_EVENT_SENINF_CAM1_FIFO_FULL		76
13162306a36Sopenharmony_ci#define CMDQ_EVENT_SENINF_CAM2_FIFO_FULL		77
13262306a36Sopenharmony_ci#define CMDQ_EVENT_SENINF_CAM3_FIFO_FULL		78
13362306a36Sopenharmony_ci#define CMDQ_EVENT_SENINF_CAM4_FIFO_FULL		79
13462306a36Sopenharmony_ci#define CMDQ_EVENT_SENINF_CAM5_FIFO_FULL		80
13562306a36Sopenharmony_ci#define CMDQ_EVENT_SENINF_CAM6_FIFO_FULL		81
13662306a36Sopenharmony_ci#define CMDQ_EVENT_SENINF_CAM7_FIFO_FULL		82
13762306a36Sopenharmony_ci#define CMDQ_EVENT_SENINF_CAM8_FIFO_FULL		83
13862306a36Sopenharmony_ci#define CMDQ_EVENT_SENINF_CAM9_FIFO_FULL		84
13962306a36Sopenharmony_ci#define CMDQ_EVENT_SENINF_CAM10_FIFO_FULL		85
14062306a36Sopenharmony_ci#define CMDQ_EVENT_SENINF_CAM11_FIFO_FULL		86
14162306a36Sopenharmony_ci#define CMDQ_EVENT_SENINF_CAM12_FIFO_FULL		87
14262306a36Sopenharmony_ci#define CMDQ_EVENT_TG_OVRUN_A_INT			88
14362306a36Sopenharmony_ci#define CMDQ_EVENT_DMA_R1_ERROR_A_INT			89
14462306a36Sopenharmony_ci#define CMDQ_EVENT_TG_OVRUN_B_INT			90
14562306a36Sopenharmony_ci#define CMDQ_EVENT_DMA_R1_ERROR_B_INT			91
14662306a36Sopenharmony_ci#define CMDQ_EVENT_TG_OVRUN_M0_INT			94
14762306a36Sopenharmony_ci#define CMDQ_EVENT_R1_ERROR_M0_INT			95
14862306a36Sopenharmony_ci#define CMDQ_EVENT_TG_GRABERR_M0_INT			96
14962306a36Sopenharmony_ci#define CMDQ_EVENT_TG_GRABERR_A_INT			98
15062306a36Sopenharmony_ci#define CMDQ_EVENT_CQ_VR_SNAP_A_INT			99
15162306a36Sopenharmony_ci#define CMDQ_EVENT_TG_GRABERR_B_INT			100
15262306a36Sopenharmony_ci#define CMDQ_EVENT_CQ_VR_SNAP_B_INT			101
15362306a36Sopenharmony_ci/* VENC */
15462306a36Sopenharmony_ci#define CMDQ_EVENT_VENC_CMDQ_FRAME_DONE			129
15562306a36Sopenharmony_ci#define CMDQ_EVENT_VENC_CMDQ_PAUSE_DONE			130
15662306a36Sopenharmony_ci#define CMDQ_EVENT_JPGENC_CMDQ_DONE			131
15762306a36Sopenharmony_ci#define CMDQ_EVENT_VENC_CMDQ_MB_DONE			132
15862306a36Sopenharmony_ci#define CMDQ_EVENT_VENC_CMDQ_128BYTE_CNT_DONE		133
15962306a36Sopenharmony_ci#define CMDQ_EVENT_VENC_CMDQ_PPS_DONE			136
16062306a36Sopenharmony_ci#define CMDQ_EVENT_VENC_CMDQ_SPS_DONE			137
16162306a36Sopenharmony_ci#define CMDQ_EVENT_VENC_CMDQ_VPS_DONE			138
16262306a36Sopenharmony_ci/* IPE */
16362306a36Sopenharmony_ci#define CMDQ_EVENT_FDVT_DONE				161
16462306a36Sopenharmony_ci#define CMDQ_EVENT_FE_DONE				162
16562306a36Sopenharmony_ci#define CMDQ_EVENT_RSC_DONE				163
16662306a36Sopenharmony_ci#define CMDQ_EVENT_DVS_DONE_ASYNC_SHOT			164
16762306a36Sopenharmony_ci#define CMDQ_EVENT_DVP_DONE_ASYNC_SHOT			165
16862306a36Sopenharmony_ci/* IMG2 */
16962306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT0			193
17062306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT1			194
17162306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT2			195
17262306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT3			196
17362306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT4			197
17462306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT5			198
17562306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT6			199
17662306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT7			200
17762306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT8			201
17862306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT9			202
17962306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT10			203
18062306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT11			204
18162306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT12			205
18262306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT13			206
18362306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT14			207
18462306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT15			208
18562306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT16			209
18662306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT17			210
18762306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT18			211
18862306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT19			212
18962306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT20			213
19062306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT21			214
19162306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT22			215
19262306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG2_EVENT23			216
19362306a36Sopenharmony_ci/* IMG1 */
19462306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT0			225
19562306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT1			226
19662306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT2			227
19762306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT3			228
19862306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT4			229
19962306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT5			230
20062306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT6			231
20162306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT7			232
20262306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT8			233
20362306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT9			234
20462306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT10			235
20562306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT11			236
20662306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT12			237
20762306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT13			238
20862306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT14			239
20962306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT15			240
21062306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT16			241
21162306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT17			242
21262306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT18			243
21362306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT19			244
21462306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT20			245
21562306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT21			246
21662306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT22			247
21762306a36Sopenharmony_ci#define CMDQ_EVENT_GCE_IMG1_EVENT23			248
21862306a36Sopenharmony_ci/* MDP */
21962306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_RDMA0_SOF			256
22062306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_RDMA1_SOF			257
22162306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_AAL0_SOF				258
22262306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_AAL1_SOF				259
22362306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_HDR0_SOF				260
22462306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_RSZ0_SOF				261
22562306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_RSZ1_SOF				262
22662306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_WROT0_SOF			263
22762306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_WROT1_SOF			264
22862306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_TDSHP0_SOF			265
22962306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_TDSHP1_SOF			266
23062306a36Sopenharmony_ci#define CMDQ_EVENT_IMG_DL_RELAY0_SOF			267
23162306a36Sopenharmony_ci#define CMDQ_EVENT_IMG_DL_RELAY1_SOF			268
23262306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_COLOR0_SOF			269
23362306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_WROT3_FRAME_DONE			288
23462306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_WROT2_FRAME_DONE			289
23562306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_WROT1_FRAME_DONE			290
23662306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_WROT0_FRAME_DONE			291
23762306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_TDSHP3_FRAME_DONE		292
23862306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_TDSHP2_FRAME_DONE		293
23962306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_TDSHP1_FRAME_DONE		294
24062306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_TDSHP0_FRAME_DONE		295
24162306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_RSZ3_FRAME_DONE			296
24262306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_RSZ2_FRAME_DONE			297
24362306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_RSZ1_FRAME_DONE			298
24462306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_RSZ0_FRAME_DONE			299
24562306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_RDMA3_FRAME_DONE			300
24662306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_RDMA2_FRAME_DONE			301
24762306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_RDMA1_FRAME_DONE			302
24862306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_RDMA0_FRAME_DONE			303
24962306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_HDR1_FRAME_DONE			304
25062306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_HDR0_FRAME_DONE			305
25162306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_COLOR0_FRAME_DONE		306
25262306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_AAL3_FRAME_DONE			307
25362306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_AAL2_FRAME_DONE			308
25462306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_AAL1_FRAME_DONE			309
25562306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_AAL0_FRAME_DONE			310
25662306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_STREAM_DONE_ENG_EVENT_0		320
25762306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_STREAM_DONE_ENG_EVENT_1		321
25862306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_STREAM_DONE_ENG_EVENT_2		322
25962306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_STREAM_DONE_ENG_EVENT_3		323
26062306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_STREAM_DONE_ENG_EVENT_4		324
26162306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_STREAM_DONE_ENG_EVENT_5		325
26262306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_STREAM_DONE_ENG_EVENT_6		326
26362306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_STREAM_DONE_ENG_EVENT_7		327
26462306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_STREAM_DONE_ENG_EVENT_8		328
26562306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_STREAM_DONE_ENG_EVENT_9		329
26662306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_STREAM_DONE_ENG_EVENT_10		330
26762306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_STREAM_DONE_ENG_EVENT_11		331
26862306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_STREAM_DONE_ENG_EVENT_12		332
26962306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_STREAM_DONE_ENG_EVENT_13		333
27062306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_STREAM_DONE_ENG_EVENT_14		334
27162306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_STREAM_DONE_ENG_EVENT_15		335
27262306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_WROT3_SW_RST_DONE_ENG_EVENT	336
27362306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_WROT2_SW_RST_DONE_ENG_EVENT	337
27462306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_WROT1_SW_RST_DONE_ENG_EVENT	338
27562306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_WROT0_SW_RST_DONE_ENG_EVENT	339
27662306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_RDMA3_SW_RST_DONE_ENG_EVENT	340
27762306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_RDMA2_SW_RST_DONE_ENG_EVENT	341
27862306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_RDMA1_SW_RST_DONE_ENG_EVENT	342
27962306a36Sopenharmony_ci#define CMDQ_EVENT_MDP_RDMA0_SW_RST_DONE_ENG_EVENT	343
28062306a36Sopenharmony_ci/* DISP */
28162306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_OVL0_SOF			384
28262306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_OVL0_2L_SOF			385
28362306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_RDMA0_SOF			386
28462306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_RSZ0_SOF			387
28562306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_COLOR0_SOF			388
28662306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_CCORR0_SOF			389
28762306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_CCORR1_SOF			390
28862306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_AAL0_SOF			391
28962306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_GAMMA0_SOF			392
29062306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_POSTMASK0_SOF			393
29162306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_DITHER0_SOF			394
29262306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_CM0_SOF				395
29362306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_SPR0_SOF			396
29462306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_DSC_WRAP0_SOF			397
29562306a36Sopenharmony_ci#define CMDQ_EVENT_DSI0_SOF				398
29662306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_WDMA0_SOF			399
29762306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_PWM0_SOF			400
29862306a36Sopenharmony_ci#define CMDQ_EVENT_DSI0_FRAME_DONE			410
29962306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_WDMA0_FRAME_DONE		411
30062306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_SPR0_FRAME_DONE			412
30162306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_RSZ0_FRAME_DONE			413
30262306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_RDMA0_FRAME_DONE		414
30362306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_POSTMASK0_FRAME_DONE		415
30462306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_OVL0_FRAME_DONE			416
30562306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_OVL0_2L_FRAME_DONE		417
30662306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_GAMMA0_FRAME_DONE		418
30762306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_DSC_WRAP0_CORE0_FRAME_DONE	420
30862306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_DITHER0_FRAME_DONE		421
30962306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_COLOR0_FRAME_DONE		422
31062306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_CM0_FRAME_DONE			423
31162306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_CCORR1_FRAME_DONE		424
31262306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_CCORR0_FRAME_DONE		425
31362306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_AAL0_FRAME_DONE			426
31462306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_STREAM_DONE_ENG_EVENT_0		434
31562306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_STREAM_DONE_ENG_EVENT_1		435
31662306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_STREAM_DONE_ENG_EVENT_2		436
31762306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_STREAM_DONE_ENG_EVENT_3		437
31862306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_STREAM_DONE_ENG_EVENT_4		438
31962306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_STREAM_DONE_ENG_EVENT_5		439
32062306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_STREAM_DONE_ENG_EVENT_6		440
32162306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_STREAM_DONE_ENG_EVENT_7		441
32262306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_STREAM_DONE_ENG_EVENT_8		442
32362306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_STREAM_DONE_ENG_EVENT_9		443
32462306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_STREAM_DONE_ENG_EVENT_10	444
32562306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_STREAM_DONE_ENG_EVENT_11	445
32662306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_STREAM_DONE_ENG_EVENT_12	446
32762306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_STREAM_DONE_ENG_EVENT_13	447
32862306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_STREAM_DONE_ENG_EVENT_14	448
32962306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_STREAM_DONE_ENG_EVENT_15	449
33062306a36Sopenharmony_ci#define CMDQ_EVENT_DSI0_TE_ENG_EVENT			450
33162306a36Sopenharmony_ci#define CMDQ_EVENT_DSI0_IRQ_ENG_EVENT			451
33262306a36Sopenharmony_ci#define CMDQ_EVENT_DSI0_DONE_ENG_EVENT			452
33362306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_WDMA0_SW_RST_DONE_ENG_EVENT	453
33462306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_SMIASSERT_ENG_EVENT		454
33562306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_POSTMASK0_RST_DONE_ENG_EVENT	455
33662306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_OVL0_RST_DONE_ENG_EVENT		456
33762306a36Sopenharmony_ci#define CMDQ_EVENT_DISP_OVL0_2L_RST_DONE_ENG_EVENT	457
33862306a36Sopenharmony_ci#define CMDQ_EVENT_BUF_UNDERRUN_ENG_EVENT_0		458
33962306a36Sopenharmony_ci#define CMDQ_EVENT_BUF_UNDERRUN_ENG_EVENT_1		459
34062306a36Sopenharmony_ci#define CMDQ_EVENT_BUF_UNDERRUN_ENG_EVENT_2		460
34162306a36Sopenharmony_ci#define CMDQ_EVENT_BUF_UNDERRUN_ENG_EVENT_3		461
34262306a36Sopenharmony_ci#define CMDQ_EVENT_BUF_UNDERRUN_ENG_EVENT_4		462
34362306a36Sopenharmony_ci#define CMDQ_EVENT_BUF_UNDERRUN_ENG_EVENT_5		463
34462306a36Sopenharmony_ci#define CMDQ_EVENT_BUF_UNDERRUN_ENG_EVENT_6		464
34562306a36Sopenharmony_ci#define CMDQ_EVENT_BUF_UNDERRUN_ENG_EVENT_7		465
34662306a36Sopenharmony_ci#define CMDQ_EVENT_OUT_EVENT_0				898
34762306a36Sopenharmony_ci
34862306a36Sopenharmony_ci/* CMDQ sw tokens
34962306a36Sopenharmony_ci * Following definitions are gce sw token which may use by clients
35062306a36Sopenharmony_ci * event operation API.
35162306a36Sopenharmony_ci * Note that token 512 to 639 may set secure
35262306a36Sopenharmony_ci */
35362306a36Sopenharmony_ci
35462306a36Sopenharmony_ci/* end of hw event and begin of sw token */
35562306a36Sopenharmony_ci#define CMDQ_MAX_HW_EVENT				512
35662306a36Sopenharmony_ci
35762306a36Sopenharmony_ci/* Config thread notify trigger thread */
35862306a36Sopenharmony_ci#define CMDQ_SYNC_TOKEN_CONFIG_DIRTY			640
35962306a36Sopenharmony_ci/* Trigger thread notify config thread */
36062306a36Sopenharmony_ci#define CMDQ_SYNC_TOKEN_STREAM_EOF			641
36162306a36Sopenharmony_ci/* Block Trigger thread until the ESD check finishes. */
36262306a36Sopenharmony_ci#define CMDQ_SYNC_TOKEN_ESD_EOF				642
36362306a36Sopenharmony_ci#define CMDQ_SYNC_TOKEN_STREAM_BLOCK			643
36462306a36Sopenharmony_ci/* check CABC setup finish */
36562306a36Sopenharmony_ci#define CMDQ_SYNC_TOKEN_CABC_EOF			644
36662306a36Sopenharmony_ci
36762306a36Sopenharmony_ci/* Notify normal CMDQ there are some secure task done
36862306a36Sopenharmony_ci * MUST NOT CHANGE, this token sync with secure world
36962306a36Sopenharmony_ci */
37062306a36Sopenharmony_ci#define CMDQ_SYNC_SECURE_THR_EOF			647
37162306a36Sopenharmony_ci
37262306a36Sopenharmony_ci/* CMDQ use sw token */
37362306a36Sopenharmony_ci#define CMDQ_SYNC_TOKEN_USER_0				649
37462306a36Sopenharmony_ci#define CMDQ_SYNC_TOKEN_USER_1				650
37562306a36Sopenharmony_ci#define CMDQ_SYNC_TOKEN_POLL_MONITOR			651
37662306a36Sopenharmony_ci#define CMDQ_SYNC_TOKEN_TPR_LOCK			652
37762306a36Sopenharmony_ci
37862306a36Sopenharmony_ci/* ISP sw token */
37962306a36Sopenharmony_ci#define CMDQ_SYNC_TOKEN_MSS				665
38062306a36Sopenharmony_ci#define CMDQ_SYNC_TOKEN_MSF				666
38162306a36Sopenharmony_ci
38262306a36Sopenharmony_ci/* DISP sw token */
38362306a36Sopenharmony_ci#define CMDQ_SYNC_TOKEN_SODI				671
38462306a36Sopenharmony_ci
38562306a36Sopenharmony_ci/* GPR access tokens (for register backup)
38662306a36Sopenharmony_ci * There are 15 32-bit GPR, 3 GPR form a set
38762306a36Sopenharmony_ci * (64-bit for address, 32-bit for value)
38862306a36Sopenharmony_ci * MUST NOT CHANGE, these tokens sync with MDP
38962306a36Sopenharmony_ci */
39062306a36Sopenharmony_ci#define CMDQ_SYNC_TOKEN_GPR_SET_0			700
39162306a36Sopenharmony_ci#define CMDQ_SYNC_TOKEN_GPR_SET_1			701
39262306a36Sopenharmony_ci#define CMDQ_SYNC_TOKEN_GPR_SET_2			702
39362306a36Sopenharmony_ci#define CMDQ_SYNC_TOKEN_GPR_SET_3			703
39462306a36Sopenharmony_ci#define CMDQ_SYNC_TOKEN_GPR_SET_4			704
39562306a36Sopenharmony_ci
39662306a36Sopenharmony_ci/* Resource lock event to control resource in GCE thread */
39762306a36Sopenharmony_ci#define CMDQ_SYNC_RESOURCE_WROT0			710
39862306a36Sopenharmony_ci#define CMDQ_SYNC_RESOURCE_WROT1			711
39962306a36Sopenharmony_ci
40062306a36Sopenharmony_ci/* event for gpr timer, used in sleep and poll with timeout */
40162306a36Sopenharmony_ci#define CMDQ_TOKEN_GPR_TIMER_R0				994
40262306a36Sopenharmony_ci#define CMDQ_TOKEN_GPR_TIMER_R1				995
40362306a36Sopenharmony_ci#define CMDQ_TOKEN_GPR_TIMER_R2				996
40462306a36Sopenharmony_ci#define CMDQ_TOKEN_GPR_TIMER_R3				997
40562306a36Sopenharmony_ci#define CMDQ_TOKEN_GPR_TIMER_R4				998
40662306a36Sopenharmony_ci#define CMDQ_TOKEN_GPR_TIMER_R5				999
40762306a36Sopenharmony_ci#define CMDQ_TOKEN_GPR_TIMER_R6				1000
40862306a36Sopenharmony_ci#define CMDQ_TOKEN_GPR_TIMER_R7				1001
40962306a36Sopenharmony_ci#define CMDQ_TOKEN_GPR_TIMER_R8				1002
41062306a36Sopenharmony_ci#define CMDQ_TOKEN_GPR_TIMER_R9				1003
41162306a36Sopenharmony_ci#define CMDQ_TOKEN_GPR_TIMER_R10			1004
41262306a36Sopenharmony_ci#define CMDQ_TOKEN_GPR_TIMER_R11			1005
41362306a36Sopenharmony_ci#define CMDQ_TOKEN_GPR_TIMER_R12			1006
41462306a36Sopenharmony_ci#define CMDQ_TOKEN_GPR_TIMER_R13			1007
41562306a36Sopenharmony_ci#define CMDQ_TOKEN_GPR_TIMER_R14			1008
41662306a36Sopenharmony_ci#define CMDQ_TOKEN_GPR_TIMER_R15			1009
41762306a36Sopenharmony_ci
41862306a36Sopenharmony_ci#define CMDQ_EVENT_MAX					0x3FF
41962306a36Sopenharmony_ci/* CMDQ sw tokens END */
42062306a36Sopenharmony_ci
42162306a36Sopenharmony_ci#endif
422