162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci *  Driver for the Conexant CX25821 PCIe bridge
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci *  Copyright (C) 2009 Conexant Systems Inc.
662306a36Sopenharmony_ci *  Authors  <shu.lin@conexant.com>, <hiep.huynh@conexant.com>
762306a36Sopenharmony_ci */
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci#ifndef __MEDUSA_REGISTERS__
1062306a36Sopenharmony_ci#define __MEDUSA_REGISTERS__
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ci/* Serial Slave Registers */
1362306a36Sopenharmony_ci#define	HOST_REGISTER1				0x0000
1462306a36Sopenharmony_ci#define	HOST_REGISTER2				0x0001
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci/* Chip Configuration Registers */
1762306a36Sopenharmony_ci#define	CHIP_CTRL				0x0100
1862306a36Sopenharmony_ci#define	AFE_AB_CTRL				0x0104
1962306a36Sopenharmony_ci#define	AFE_CD_CTRL				0x0108
2062306a36Sopenharmony_ci#define	AFE_EF_CTRL				0x010C
2162306a36Sopenharmony_ci#define	AFE_GH_CTRL				0x0110
2262306a36Sopenharmony_ci#define	DENC_AB_CTRL				0x0114
2362306a36Sopenharmony_ci#define	BYP_AB_CTRL				0x0118
2462306a36Sopenharmony_ci#define	MON_A_CTRL				0x011C
2562306a36Sopenharmony_ci#define	DISP_SEQ_A				0x0120
2662306a36Sopenharmony_ci#define	DISP_SEQ_B				0x0124
2762306a36Sopenharmony_ci#define	DISP_AB_CNT				0x0128
2862306a36Sopenharmony_ci#define	DISP_CD_CNT				0x012C
2962306a36Sopenharmony_ci#define	DISP_EF_CNT				0x0130
3062306a36Sopenharmony_ci#define	DISP_GH_CNT				0x0134
3162306a36Sopenharmony_ci#define	DISP_IJ_CNT				0x0138
3262306a36Sopenharmony_ci#define	PIN_OE_CTRL				0x013C
3362306a36Sopenharmony_ci#define	PIN_SPD_CTRL				0x0140
3462306a36Sopenharmony_ci#define	PIN_SPD_CTRL2				0x0144
3562306a36Sopenharmony_ci#define	IRQ_STAT_CTRL				0x0148
3662306a36Sopenharmony_ci#define	POWER_CTRL_AB				0x014C
3762306a36Sopenharmony_ci#define	POWER_CTRL_CD				0x0150
3862306a36Sopenharmony_ci#define	POWER_CTRL_EF				0x0154
3962306a36Sopenharmony_ci#define	POWER_CTRL_GH				0x0158
4062306a36Sopenharmony_ci#define	TUNE_CTRL				0x015C
4162306a36Sopenharmony_ci#define	BIAS_CTRL				0x0160
4262306a36Sopenharmony_ci#define	AFE_AB_DIAG_CTRL			0x0164
4362306a36Sopenharmony_ci#define	AFE_CD_DIAG_CTRL			0x0168
4462306a36Sopenharmony_ci#define	AFE_EF_DIAG_CTRL			0x016C
4562306a36Sopenharmony_ci#define	AFE_GH_DIAG_CTRL			0x0170
4662306a36Sopenharmony_ci#define	PLL_AB_DIAG_CTRL			0x0174
4762306a36Sopenharmony_ci#define	PLL_CD_DIAG_CTRL			0x0178
4862306a36Sopenharmony_ci#define	PLL_EF_DIAG_CTRL			0x017C
4962306a36Sopenharmony_ci#define	PLL_GH_DIAG_CTRL			0x0180
5062306a36Sopenharmony_ci#define	TEST_CTRL				0x0184
5162306a36Sopenharmony_ci#define	BIST_STAT				0x0188
5262306a36Sopenharmony_ci#define	BIST_STAT2				0x018C
5362306a36Sopenharmony_ci#define	BIST_VID_PLL_AB_STAT			0x0190
5462306a36Sopenharmony_ci#define	BIST_VID_PLL_CD_STAT			0x0194
5562306a36Sopenharmony_ci#define	BIST_VID_PLL_EF_STAT			0x0198
5662306a36Sopenharmony_ci#define	BIST_VID_PLL_GH_STAT			0x019C
5762306a36Sopenharmony_ci#define	DLL_DIAG_CTRL				0x01A0
5862306a36Sopenharmony_ci#define	DEV_CH_ID_CTRL				0x01A4
5962306a36Sopenharmony_ci#define	ABIST_CTRL_STATUS			0x01A8
6062306a36Sopenharmony_ci#define	ABIST_FREQ				0x01AC
6162306a36Sopenharmony_ci#define	ABIST_GOERT_SHIFT			0x01B0
6262306a36Sopenharmony_ci#define	ABIST_COEF12				0x01B4
6362306a36Sopenharmony_ci#define	ABIST_COEF34				0x01B8
6462306a36Sopenharmony_ci#define	ABIST_COEF56				0x01BC
6562306a36Sopenharmony_ci#define	ABIST_COEF7_SNR				0x01C0
6662306a36Sopenharmony_ci#define	ABIST_ADC_CAL				0x01C4
6762306a36Sopenharmony_ci#define	ABIST_BIN1_VGA0				0x01C8
6862306a36Sopenharmony_ci#define	ABIST_BIN2_VGA1				0x01CC
6962306a36Sopenharmony_ci#define	ABIST_BIN3_VGA2				0x01D0
7062306a36Sopenharmony_ci#define	ABIST_BIN4_VGA3				0x01D4
7162306a36Sopenharmony_ci#define	ABIST_BIN5_VGA4				0x01D8
7262306a36Sopenharmony_ci#define	ABIST_BIN6_VGA5				0x01DC
7362306a36Sopenharmony_ci#define	ABIST_BIN7_VGA6				0x01E0
7462306a36Sopenharmony_ci#define	ABIST_CLAMP_A				0x01E4
7562306a36Sopenharmony_ci#define	ABIST_CLAMP_B				0x01E8
7662306a36Sopenharmony_ci#define	ABIST_CLAMP_C				0x01EC
7762306a36Sopenharmony_ci#define	ABIST_CLAMP_D				0x01F0
7862306a36Sopenharmony_ci#define	ABIST_CLAMP_E				0x01F4
7962306a36Sopenharmony_ci#define	ABIST_CLAMP_F				0x01F8
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_ci/* Digital Video Encoder A Registers */
8262306a36Sopenharmony_ci#define	DENC_A_REG_1				0x0200
8362306a36Sopenharmony_ci#define	DENC_A_REG_2				0x0204
8462306a36Sopenharmony_ci#define	DENC_A_REG_3				0x0208
8562306a36Sopenharmony_ci#define	DENC_A_REG_4				0x020C
8662306a36Sopenharmony_ci#define	DENC_A_REG_5				0x0210
8762306a36Sopenharmony_ci#define	DENC_A_REG_6				0x0214
8862306a36Sopenharmony_ci#define	DENC_A_REG_7				0x0218
8962306a36Sopenharmony_ci#define	DENC_A_REG_8				0x021C
9062306a36Sopenharmony_ci
9162306a36Sopenharmony_ci/* Digital Video Encoder B Registers */
9262306a36Sopenharmony_ci#define	DENC_B_REG_1				0x0300
9362306a36Sopenharmony_ci#define	DENC_B_REG_2				0x0304
9462306a36Sopenharmony_ci#define	DENC_B_REG_3				0x0308
9562306a36Sopenharmony_ci#define	DENC_B_REG_4				0x030C
9662306a36Sopenharmony_ci#define	DENC_B_REG_5				0x0310
9762306a36Sopenharmony_ci#define	DENC_B_REG_6				0x0314
9862306a36Sopenharmony_ci#define	DENC_B_REG_7				0x0318
9962306a36Sopenharmony_ci#define	DENC_B_REG_8				0x031C
10062306a36Sopenharmony_ci
10162306a36Sopenharmony_ci/* Video Decoder A Registers */
10262306a36Sopenharmony_ci#define	MODE_CTRL				0x1000
10362306a36Sopenharmony_ci#define	OUT_CTRL1				0x1004
10462306a36Sopenharmony_ci#define	OUT_CTRL_NS				0x1008
10562306a36Sopenharmony_ci#define	GEN_STAT				0x100C
10662306a36Sopenharmony_ci#define	INT_STAT_MASK				0x1010
10762306a36Sopenharmony_ci#define	LUMA_CTRL				0x1014
10862306a36Sopenharmony_ci#define	CHROMA_CTRL				0x1018
10962306a36Sopenharmony_ci#define	CRUSH_CTRL				0x101C
11062306a36Sopenharmony_ci#define	HORIZ_TIM_CTRL				0x1020
11162306a36Sopenharmony_ci#define	VERT_TIM_CTRL				0x1024
11262306a36Sopenharmony_ci#define	MISC_TIM_CTRL				0x1028
11362306a36Sopenharmony_ci#define	FIELD_COUNT				0x102C
11462306a36Sopenharmony_ci#define	HSCALE_CTRL				0x1030
11562306a36Sopenharmony_ci#define	VSCALE_CTRL				0x1034
11662306a36Sopenharmony_ci#define	MAN_VGA_CTRL				0x1038
11762306a36Sopenharmony_ci#define	MAN_AGC_CTRL				0x103C
11862306a36Sopenharmony_ci#define	DFE_CTRL1				0x1040
11962306a36Sopenharmony_ci#define	DFE_CTRL2				0x1044
12062306a36Sopenharmony_ci#define	DFE_CTRL3				0x1048
12162306a36Sopenharmony_ci#define	PLL_CTRL				0x104C
12262306a36Sopenharmony_ci#define	PLL_CTRL_FAST				0x1050
12362306a36Sopenharmony_ci#define	HTL_CTRL				0x1054
12462306a36Sopenharmony_ci#define	SRC_CFG					0x1058
12562306a36Sopenharmony_ci#define	SC_STEP_SIZE				0x105C
12662306a36Sopenharmony_ci#define	SC_CONVERGE_CTRL			0x1060
12762306a36Sopenharmony_ci#define	SC_LOOP_CTRL				0x1064
12862306a36Sopenharmony_ci#define	COMB_2D_HFS_CFG				0x1068
12962306a36Sopenharmony_ci#define	COMB_2D_HFD_CFG				0x106C
13062306a36Sopenharmony_ci#define	COMB_2D_LF_CFG				0x1070
13162306a36Sopenharmony_ci#define	COMB_2D_BLEND				0x1074
13262306a36Sopenharmony_ci#define	COMB_MISC_CTRL				0x1078
13362306a36Sopenharmony_ci#define	COMB_FLAT_THRESH_CTRL			0x107C
13462306a36Sopenharmony_ci#define	COMB_TEST				0x1080
13562306a36Sopenharmony_ci#define	BP_MISC_CTRL				0x1084
13662306a36Sopenharmony_ci#define	VCR_DET_CTRL				0x1088
13762306a36Sopenharmony_ci#define	NOISE_DET_CTRL				0x108C
13862306a36Sopenharmony_ci#define	COMB_FLAT_NOISE_CTRL			0x1090
13962306a36Sopenharmony_ci#define	VERSION					0x11F8
14062306a36Sopenharmony_ci#define	SOFT_RST_CTRL				0x11FC
14162306a36Sopenharmony_ci
14262306a36Sopenharmony_ci/* Video Decoder B Registers */
14362306a36Sopenharmony_ci#define	VDEC_B_MODE_CTRL			0x1200
14462306a36Sopenharmony_ci#define	VDEC_B_OUT_CTRL1			0x1204
14562306a36Sopenharmony_ci#define	VDEC_B_OUT_CTRL_NS			0x1208
14662306a36Sopenharmony_ci#define	VDEC_B_GEN_STAT				0x120C
14762306a36Sopenharmony_ci#define	VDEC_B_INT_STAT_MASK			0x1210
14862306a36Sopenharmony_ci#define	VDEC_B_LUMA_CTRL			0x1214
14962306a36Sopenharmony_ci#define	VDEC_B_CHROMA_CTRL			0x1218
15062306a36Sopenharmony_ci#define	VDEC_B_CRUSH_CTRL			0x121C
15162306a36Sopenharmony_ci#define	VDEC_B_HORIZ_TIM_CTRL			0x1220
15262306a36Sopenharmony_ci#define	VDEC_B_VERT_TIM_CTRL			0x1224
15362306a36Sopenharmony_ci#define	VDEC_B_MISC_TIM_CTRL			0x1228
15462306a36Sopenharmony_ci#define	VDEC_B_FIELD_COUNT			0x122C
15562306a36Sopenharmony_ci#define	VDEC_B_HSCALE_CTRL			0x1230
15662306a36Sopenharmony_ci#define	VDEC_B_VSCALE_CTRL			0x1234
15762306a36Sopenharmony_ci#define	VDEC_B_MAN_VGA_CTRL			0x1238
15862306a36Sopenharmony_ci#define	VDEC_B_MAN_AGC_CTRL			0x123C
15962306a36Sopenharmony_ci#define	VDEC_B_DFE_CTRL1			0x1240
16062306a36Sopenharmony_ci#define	VDEC_B_DFE_CTRL2			0x1244
16162306a36Sopenharmony_ci#define	VDEC_B_DFE_CTRL3			0x1248
16262306a36Sopenharmony_ci#define	VDEC_B_PLL_CTRL				0x124C
16362306a36Sopenharmony_ci#define	VDEC_B_PLL_CTRL_FAST			0x1250
16462306a36Sopenharmony_ci#define	VDEC_B_HTL_CTRL				0x1254
16562306a36Sopenharmony_ci#define	VDEC_B_SRC_CFG				0x1258
16662306a36Sopenharmony_ci#define	VDEC_B_SC_STEP_SIZE			0x125C
16762306a36Sopenharmony_ci#define	VDEC_B_SC_CONVERGE_CTRL			0x1260
16862306a36Sopenharmony_ci#define	VDEC_B_SC_LOOP_CTRL			0x1264
16962306a36Sopenharmony_ci#define	VDEC_B_COMB_2D_HFS_CFG			0x1268
17062306a36Sopenharmony_ci#define	VDEC_B_COMB_2D_HFD_CFG			0x126C
17162306a36Sopenharmony_ci#define	VDEC_B_COMB_2D_LF_CFG			0x1270
17262306a36Sopenharmony_ci#define	VDEC_B_COMB_2D_BLEND			0x1274
17362306a36Sopenharmony_ci#define	VDEC_B_COMB_MISC_CTRL			0x1278
17462306a36Sopenharmony_ci#define	VDEC_B_COMB_FLAT_THRESH_CTRL		0x127C
17562306a36Sopenharmony_ci#define	VDEC_B_COMB_TEST			0x1280
17662306a36Sopenharmony_ci#define	VDEC_B_BP_MISC_CTRL			0x1284
17762306a36Sopenharmony_ci#define	VDEC_B_VCR_DET_CTRL			0x1288
17862306a36Sopenharmony_ci#define	VDEC_B_NOISE_DET_CTRL			0x128C
17962306a36Sopenharmony_ci#define	VDEC_B_COMB_FLAT_NOISE_CTRL		0x1290
18062306a36Sopenharmony_ci#define	VDEC_B_VERSION				0x13F8
18162306a36Sopenharmony_ci#define	VDEC_B_SOFT_RST_CTRL			0x13FC
18262306a36Sopenharmony_ci
18362306a36Sopenharmony_ci/* Video Decoder C Registers */
18462306a36Sopenharmony_ci#define	VDEC_C_MODE_CTRL			0x1400
18562306a36Sopenharmony_ci#define	VDEC_C_OUT_CTRL1			0x1404
18662306a36Sopenharmony_ci#define	VDEC_C_OUT_CTRL_NS			0x1408
18762306a36Sopenharmony_ci#define	VDEC_C_GEN_STAT				0x140C
18862306a36Sopenharmony_ci#define	VDEC_C_INT_STAT_MASK			0x1410
18962306a36Sopenharmony_ci#define VDEC_C_LUMA_CTRL			0x1414
19062306a36Sopenharmony_ci#define VDEC_C_CHROMA_CTRL			0x1418
19162306a36Sopenharmony_ci#define	VDEC_C_CRUSH_CTRL			0x141C
19262306a36Sopenharmony_ci#define	VDEC_C_HORIZ_TIM_CTRL			0x1420
19362306a36Sopenharmony_ci#define	VDEC_C_VERT_TIM_CTRL			0x1424
19462306a36Sopenharmony_ci#define	VDEC_C_MISC_TIM_CTRL			0x1428
19562306a36Sopenharmony_ci#define	VDEC_C_FIELD_COUNT			0x142C
19662306a36Sopenharmony_ci#define	VDEC_C_HSCALE_CTRL			0x1430
19762306a36Sopenharmony_ci#define	VDEC_C_VSCALE_CTRL			0x1434
19862306a36Sopenharmony_ci#define	VDEC_C_MAN_VGA_CTRL			0x1438
19962306a36Sopenharmony_ci#define	VDEC_C_MAN_AGC_CTRL			0x143C
20062306a36Sopenharmony_ci#define	VDEC_C_DFE_CTRL1			0x1440
20162306a36Sopenharmony_ci#define	VDEC_C_DFE_CTRL2			0x1444
20262306a36Sopenharmony_ci#define	VDEC_C_DFE_CTRL3			0x1448
20362306a36Sopenharmony_ci#define	VDEC_C_PLL_CTRL				0x144C
20462306a36Sopenharmony_ci#define	VDEC_C_PLL_CTRL_FAST			0x1450
20562306a36Sopenharmony_ci#define	VDEC_C_HTL_CTRL				0x1454
20662306a36Sopenharmony_ci#define	VDEC_C_SRC_CFG				0x1458
20762306a36Sopenharmony_ci#define	VDEC_C_SC_STEP_SIZE			0x145C
20862306a36Sopenharmony_ci#define	VDEC_C_SC_CONVERGE_CTRL			0x1460
20962306a36Sopenharmony_ci#define	VDEC_C_SC_LOOP_CTRL			0x1464
21062306a36Sopenharmony_ci#define	VDEC_C_COMB_2D_HFS_CFG			0x1468
21162306a36Sopenharmony_ci#define	VDEC_C_COMB_2D_HFD_CFG			0x146C
21262306a36Sopenharmony_ci#define	VDEC_C_COMB_2D_LF_CFG			0x1470
21362306a36Sopenharmony_ci#define	VDEC_C_COMB_2D_BLEND			0x1474
21462306a36Sopenharmony_ci#define	VDEC_C_COMB_MISC_CTRL			0x1478
21562306a36Sopenharmony_ci#define	VDEC_C_COMB_FLAT_THRESH_CTRL		0x147C
21662306a36Sopenharmony_ci#define	VDEC_C_COMB_TEST			0x1480
21762306a36Sopenharmony_ci#define	VDEC_C_BP_MISC_CTRL			0x1484
21862306a36Sopenharmony_ci#define	VDEC_C_VCR_DET_CTRL			0x1488
21962306a36Sopenharmony_ci#define	VDEC_C_NOISE_DET_CTRL			0x148C
22062306a36Sopenharmony_ci#define	VDEC_C_COMB_FLAT_NOISE_CTRL		0x1490
22162306a36Sopenharmony_ci#define	VDEC_C_VERSION				0x15F8
22262306a36Sopenharmony_ci#define	VDEC_C_SOFT_RST_CTRL			0x15FC
22362306a36Sopenharmony_ci
22462306a36Sopenharmony_ci/* Video Decoder D Registers */
22562306a36Sopenharmony_ci#define VDEC_D_MODE_CTRL			0x1600
22662306a36Sopenharmony_ci#define VDEC_D_OUT_CTRL1			0x1604
22762306a36Sopenharmony_ci#define VDEC_D_OUT_CTRL_NS			0x1608
22862306a36Sopenharmony_ci#define VDEC_D_GEN_STAT				0x160C
22962306a36Sopenharmony_ci#define VDEC_D_INT_STAT_MASK			0x1610
23062306a36Sopenharmony_ci#define VDEC_D_LUMA_CTRL			0x1614
23162306a36Sopenharmony_ci#define VDEC_D_CHROMA_CTRL			0x1618
23262306a36Sopenharmony_ci#define VDEC_D_CRUSH_CTRL			0x161C
23362306a36Sopenharmony_ci#define VDEC_D_HORIZ_TIM_CTRL			0x1620
23462306a36Sopenharmony_ci#define VDEC_D_VERT_TIM_CTRL			0x1624
23562306a36Sopenharmony_ci#define VDEC_D_MISC_TIM_CTRL			0x1628
23662306a36Sopenharmony_ci#define VDEC_D_FIELD_COUNT			0x162C
23762306a36Sopenharmony_ci#define VDEC_D_HSCALE_CTRL			0x1630
23862306a36Sopenharmony_ci#define VDEC_D_VSCALE_CTRL			0x1634
23962306a36Sopenharmony_ci#define VDEC_D_MAN_VGA_CTRL			0x1638
24062306a36Sopenharmony_ci#define VDEC_D_MAN_AGC_CTRL			0x163C
24162306a36Sopenharmony_ci#define VDEC_D_DFE_CTRL1			0x1640
24262306a36Sopenharmony_ci#define VDEC_D_DFE_CTRL2			0x1644
24362306a36Sopenharmony_ci#define VDEC_D_DFE_CTRL3			0x1648
24462306a36Sopenharmony_ci#define VDEC_D_PLL_CTRL				0x164C
24562306a36Sopenharmony_ci#define VDEC_D_PLL_CTRL_FAST			0x1650
24662306a36Sopenharmony_ci#define VDEC_D_HTL_CTRL				0x1654
24762306a36Sopenharmony_ci#define VDEC_D_SRC_CFG				0x1658
24862306a36Sopenharmony_ci#define VDEC_D_SC_STEP_SIZE			0x165C
24962306a36Sopenharmony_ci#define VDEC_D_SC_CONVERGE_CTRL			0x1660
25062306a36Sopenharmony_ci#define VDEC_D_SC_LOOP_CTRL			0x1664
25162306a36Sopenharmony_ci#define VDEC_D_COMB_2D_HFS_CFG			0x1668
25262306a36Sopenharmony_ci#define VDEC_D_COMB_2D_HFD_CFG			0x166C
25362306a36Sopenharmony_ci#define VDEC_D_COMB_2D_LF_CFG			0x1670
25462306a36Sopenharmony_ci#define VDEC_D_COMB_2D_BLEND			0x1674
25562306a36Sopenharmony_ci#define VDEC_D_COMB_MISC_CTRL			0x1678
25662306a36Sopenharmony_ci#define VDEC_D_COMB_FLAT_THRESH_CTRL		0x167C
25762306a36Sopenharmony_ci#define VDEC_D_COMB_TEST			0x1680
25862306a36Sopenharmony_ci#define VDEC_D_BP_MISC_CTRL			0x1684
25962306a36Sopenharmony_ci#define VDEC_D_VCR_DET_CTRL			0x1688
26062306a36Sopenharmony_ci#define VDEC_D_NOISE_DET_CTRL			0x168C
26162306a36Sopenharmony_ci#define VDEC_D_COMB_FLAT_NOISE_CTRL		0x1690
26262306a36Sopenharmony_ci#define VDEC_D_VERSION				0x17F8
26362306a36Sopenharmony_ci#define VDEC_D_SOFT_RST_CTRL			0x17FC
26462306a36Sopenharmony_ci
26562306a36Sopenharmony_ci/* Video Decoder E Registers */
26662306a36Sopenharmony_ci#define	VDEC_E_MODE_CTRL			0x1800
26762306a36Sopenharmony_ci#define	VDEC_E_OUT_CTRL1			0x1804
26862306a36Sopenharmony_ci#define	VDEC_E_OUT_CTRL_NS			0x1808
26962306a36Sopenharmony_ci#define	VDEC_E_GEN_STAT				0x180C
27062306a36Sopenharmony_ci#define	VDEC_E_INT_STAT_MASK			0x1810
27162306a36Sopenharmony_ci#define	VDEC_E_LUMA_CTRL			0x1814
27262306a36Sopenharmony_ci#define	VDEC_E_CHROMA_CTRL			0x1818
27362306a36Sopenharmony_ci#define	VDEC_E_CRUSH_CTRL			0x181C
27462306a36Sopenharmony_ci#define	VDEC_E_HORIZ_TIM_CTRL			0x1820
27562306a36Sopenharmony_ci#define	VDEC_E_VERT_TIM_CTRL			0x1824
27662306a36Sopenharmony_ci#define	VDEC_E_MISC_TIM_CTRL			0x1828
27762306a36Sopenharmony_ci#define	VDEC_E_FIELD_COUNT			0x182C
27862306a36Sopenharmony_ci#define	VDEC_E_HSCALE_CTRL			0x1830
27962306a36Sopenharmony_ci#define	VDEC_E_VSCALE_CTRL			0x1834
28062306a36Sopenharmony_ci#define	VDEC_E_MAN_VGA_CTRL			0x1838
28162306a36Sopenharmony_ci#define	VDEC_E_MAN_AGC_CTRL			0x183C
28262306a36Sopenharmony_ci#define	VDEC_E_DFE_CTRL1			0x1840
28362306a36Sopenharmony_ci#define	VDEC_E_DFE_CTRL2			0x1844
28462306a36Sopenharmony_ci#define	VDEC_E_DFE_CTRL3			0x1848
28562306a36Sopenharmony_ci#define	VDEC_E_PLL_CTRL				0x184C
28662306a36Sopenharmony_ci#define	VDEC_E_PLL_CTRL_FAST			0x1850
28762306a36Sopenharmony_ci#define	VDEC_E_HTL_CTRL				0x1854
28862306a36Sopenharmony_ci#define	VDEC_E_SRC_CFG				0x1858
28962306a36Sopenharmony_ci#define	VDEC_E_SC_STEP_SIZE			0x185C
29062306a36Sopenharmony_ci#define	VDEC_E_SC_CONVERGE_CTRL			0x1860
29162306a36Sopenharmony_ci#define	VDEC_E_SC_LOOP_CTRL			0x1864
29262306a36Sopenharmony_ci#define	VDEC_E_COMB_2D_HFS_CFG			0x1868
29362306a36Sopenharmony_ci#define	VDEC_E_COMB_2D_HFD_CFG			0x186C
29462306a36Sopenharmony_ci#define	VDEC_E_COMB_2D_LF_CFG			0x1870
29562306a36Sopenharmony_ci#define	VDEC_E_COMB_2D_BLEND			0x1874
29662306a36Sopenharmony_ci#define	VDEC_E_COMB_MISC_CTRL			0x1878
29762306a36Sopenharmony_ci#define	VDEC_E_COMB_FLAT_THRESH_CTRL		0x187C
29862306a36Sopenharmony_ci#define	VDEC_E_COMB_TEST			0x1880
29962306a36Sopenharmony_ci#define	VDEC_E_BP_MISC_CTRL			0x1884
30062306a36Sopenharmony_ci#define	VDEC_E_VCR_DET_CTRL			0x1888
30162306a36Sopenharmony_ci#define	VDEC_E_NOISE_DET_CTRL			0x188C
30262306a36Sopenharmony_ci#define	VDEC_E_COMB_FLAT_NOISE_CTRL		0x1890
30362306a36Sopenharmony_ci#define	VDEC_E_VERSION				0x19F8
30462306a36Sopenharmony_ci#define	VDEC_E_SOFT_RST_CTRL			0x19FC
30562306a36Sopenharmony_ci
30662306a36Sopenharmony_ci/* Video Decoder F Registers */
30762306a36Sopenharmony_ci#define	VDEC_F_MODE_CTRL			0x1A00
30862306a36Sopenharmony_ci#define	VDEC_F_OUT_CTRL1			0x1A04
30962306a36Sopenharmony_ci#define	VDEC_F_OUT_CTRL_NS			0x1A08
31062306a36Sopenharmony_ci#define	VDEC_F_GEN_STAT				0x1A0C
31162306a36Sopenharmony_ci#define	VDEC_F_INT_STAT_MASK			0x1A10
31262306a36Sopenharmony_ci#define	VDEC_F_LUMA_CTRL			0x1A14
31362306a36Sopenharmony_ci#define	VDEC_F_CHROMA_CTRL			0x1A18
31462306a36Sopenharmony_ci#define	VDEC_F_CRUSH_CTRL			0x1A1C
31562306a36Sopenharmony_ci#define	VDEC_F_HORIZ_TIM_CTRL			0x1A20
31662306a36Sopenharmony_ci#define	VDEC_F_VERT_TIM_CTRL			0x1A24
31762306a36Sopenharmony_ci#define	VDEC_F_MISC_TIM_CTRL			0x1A28
31862306a36Sopenharmony_ci#define	VDEC_F_FIELD_COUNT			0x1A2C
31962306a36Sopenharmony_ci#define	VDEC_F_HSCALE_CTRL			0x1A30
32062306a36Sopenharmony_ci#define	VDEC_F_VSCALE_CTRL			0x1A34
32162306a36Sopenharmony_ci#define	VDEC_F_MAN_VGA_CTRL			0x1A38
32262306a36Sopenharmony_ci#define	VDEC_F_MAN_AGC_CTRL			0x1A3C
32362306a36Sopenharmony_ci#define	VDEC_F_DFE_CTRL1			0x1A40
32462306a36Sopenharmony_ci#define	VDEC_F_DFE_CTRL2			0x1A44
32562306a36Sopenharmony_ci#define	VDEC_F_DFE_CTRL3			0x1A48
32662306a36Sopenharmony_ci#define	VDEC_F_PLL_CTRL				0x1A4C
32762306a36Sopenharmony_ci#define	VDEC_F_PLL_CTRL_FAST			0x1A50
32862306a36Sopenharmony_ci#define	VDEC_F_HTL_CTRL				0x1A54
32962306a36Sopenharmony_ci#define	VDEC_F_SRC_CFG				0x1A58
33062306a36Sopenharmony_ci#define	VDEC_F_SC_STEP_SIZE			0x1A5C
33162306a36Sopenharmony_ci#define	VDEC_F_SC_CONVERGE_CTRL			0x1A60
33262306a36Sopenharmony_ci#define	VDEC_F_SC_LOOP_CTRL			0x1A64
33362306a36Sopenharmony_ci#define	VDEC_F_COMB_2D_HFS_CFG			0x1A68
33462306a36Sopenharmony_ci#define	VDEC_F_COMB_2D_HFD_CFG			0x1A6C
33562306a36Sopenharmony_ci#define	VDEC_F_COMB_2D_LF_CFG			0x1A70
33662306a36Sopenharmony_ci#define	VDEC_F_COMB_2D_BLEND			0x1A74
33762306a36Sopenharmony_ci#define	VDEC_F_COMB_MISC_CTRL			0x1A78
33862306a36Sopenharmony_ci#define	VDEC_F_COMB_FLAT_THRESH_CTRL		0x1A7C
33962306a36Sopenharmony_ci#define	VDEC_F_COMB_TEST			0x1A80
34062306a36Sopenharmony_ci#define	VDEC_F_BP_MISC_CTRL			0x1A84
34162306a36Sopenharmony_ci#define	VDEC_F_VCR_DET_CTRL			0x1A88
34262306a36Sopenharmony_ci#define	VDEC_F_NOISE_DET_CTRL			0x1A8C
34362306a36Sopenharmony_ci#define	VDEC_F_COMB_FLAT_NOISE_CTRL		0x1A90
34462306a36Sopenharmony_ci#define	VDEC_F_VERSION				0x1BF8
34562306a36Sopenharmony_ci#define	VDEC_F_SOFT_RST_CTRL			0x1BFC
34662306a36Sopenharmony_ci
34762306a36Sopenharmony_ci/* Video Decoder G Registers */
34862306a36Sopenharmony_ci#define	VDEC_G_MODE_CTRL			0x1C00
34962306a36Sopenharmony_ci#define	VDEC_G_OUT_CTRL1			0x1C04
35062306a36Sopenharmony_ci#define	VDEC_G_OUT_CTRL_NS			0x1C08
35162306a36Sopenharmony_ci#define	VDEC_G_GEN_STAT				0x1C0C
35262306a36Sopenharmony_ci#define	VDEC_G_INT_STAT_MASK			0x1C10
35362306a36Sopenharmony_ci#define	VDEC_G_LUMA_CTRL			0x1C14
35462306a36Sopenharmony_ci#define	VDEC_G_CHROMA_CTRL			0x1C18
35562306a36Sopenharmony_ci#define	VDEC_G_CRUSH_CTRL			0x1C1C
35662306a36Sopenharmony_ci#define	VDEC_G_HORIZ_TIM_CTRL			0x1C20
35762306a36Sopenharmony_ci#define	VDEC_G_VERT_TIM_CTRL			0x1C24
35862306a36Sopenharmony_ci#define	VDEC_G_MISC_TIM_CTRL			0x1C28
35962306a36Sopenharmony_ci#define	VDEC_G_FIELD_COUNT			0x1C2C
36062306a36Sopenharmony_ci#define	VDEC_G_HSCALE_CTRL			0x1C30
36162306a36Sopenharmony_ci#define	VDEC_G_VSCALE_CTRL			0x1C34
36262306a36Sopenharmony_ci#define	VDEC_G_MAN_VGA_CTRL			0x1C38
36362306a36Sopenharmony_ci#define	VDEC_G_MAN_AGC_CTRL			0x1C3C
36462306a36Sopenharmony_ci#define	VDEC_G_DFE_CTRL1			0x1C40
36562306a36Sopenharmony_ci#define	VDEC_G_DFE_CTRL2			0x1C44
36662306a36Sopenharmony_ci#define	VDEC_G_DFE_CTRL3			0x1C48
36762306a36Sopenharmony_ci#define	VDEC_G_PLL_CTRL				0x1C4C
36862306a36Sopenharmony_ci#define	VDEC_G_PLL_CTRL_FAST			0x1C50
36962306a36Sopenharmony_ci#define	VDEC_G_HTL_CTRL				0x1C54
37062306a36Sopenharmony_ci#define	VDEC_G_SRC_CFG				0x1C58
37162306a36Sopenharmony_ci#define	VDEC_G_SC_STEP_SIZE			0x1C5C
37262306a36Sopenharmony_ci#define	VDEC_G_SC_CONVERGE_CTRL			0x1C60
37362306a36Sopenharmony_ci#define	VDEC_G_SC_LOOP_CTRL			0x1C64
37462306a36Sopenharmony_ci#define	VDEC_G_COMB_2D_HFS_CFG			0x1C68
37562306a36Sopenharmony_ci#define	VDEC_G_COMB_2D_HFD_CFG			0x1C6C
37662306a36Sopenharmony_ci#define	VDEC_G_COMB_2D_LF_CFG			0x1C70
37762306a36Sopenharmony_ci#define	VDEC_G_COMB_2D_BLEND			0x1C74
37862306a36Sopenharmony_ci#define	VDEC_G_COMB_MISC_CTRL			0x1C78
37962306a36Sopenharmony_ci#define	VDEC_G_COMB_FLAT_THRESH_CTRL		0x1C7C
38062306a36Sopenharmony_ci#define	VDEC_G_COMB_TEST			0x1C80
38162306a36Sopenharmony_ci#define	VDEC_G_BP_MISC_CTRL			0x1C84
38262306a36Sopenharmony_ci#define	VDEC_G_VCR_DET_CTRL			0x1C88
38362306a36Sopenharmony_ci#define	VDEC_G_NOISE_DET_CTRL			0x1C8C
38462306a36Sopenharmony_ci#define	VDEC_G_COMB_FLAT_NOISE_CTRL		0x1C90
38562306a36Sopenharmony_ci#define	VDEC_G_VERSION				0x1DF8
38662306a36Sopenharmony_ci#define	VDEC_G_SOFT_RST_CTRL			0x1DFC
38762306a36Sopenharmony_ci
38862306a36Sopenharmony_ci/* Video Decoder H Registers  */
38962306a36Sopenharmony_ci#define	VDEC_H_MODE_CTRL			0x1E00
39062306a36Sopenharmony_ci#define	VDEC_H_OUT_CTRL1			0x1E04
39162306a36Sopenharmony_ci#define	VDEC_H_OUT_CTRL_NS			0x1E08
39262306a36Sopenharmony_ci#define	VDEC_H_GEN_STAT				0x1E0C
39362306a36Sopenharmony_ci#define	VDEC_H_INT_STAT_MASK			0x1E1E
39462306a36Sopenharmony_ci#define	VDEC_H_LUMA_CTRL			0x1E14
39562306a36Sopenharmony_ci#define	VDEC_H_CHROMA_CTRL			0x1E18
39662306a36Sopenharmony_ci#define	VDEC_H_CRUSH_CTRL			0x1E1C
39762306a36Sopenharmony_ci#define	VDEC_H_HORIZ_TIM_CTRL			0x1E20
39862306a36Sopenharmony_ci#define	VDEC_H_VERT_TIM_CTRL			0x1E24
39962306a36Sopenharmony_ci#define	VDEC_H_MISC_TIM_CTRL			0x1E28
40062306a36Sopenharmony_ci#define	VDEC_H_FIELD_COUNT			0x1E2C
40162306a36Sopenharmony_ci#define	VDEC_H_HSCALE_CTRL			0x1E30
40262306a36Sopenharmony_ci#define	VDEC_H_VSCALE_CTRL			0x1E34
40362306a36Sopenharmony_ci#define	VDEC_H_MAN_VGA_CTRL			0x1E38
40462306a36Sopenharmony_ci#define	VDEC_H_MAN_AGC_CTRL			0x1E3C
40562306a36Sopenharmony_ci#define	VDEC_H_DFE_CTRL1			0x1E40
40662306a36Sopenharmony_ci#define	VDEC_H_DFE_CTRL2			0x1E44
40762306a36Sopenharmony_ci#define	VDEC_H_DFE_CTRL3			0x1E48
40862306a36Sopenharmony_ci#define	VDEC_H_PLL_CTRL				0x1E4C
40962306a36Sopenharmony_ci#define	VDEC_H_PLL_CTRL_FAST			0x1E50
41062306a36Sopenharmony_ci#define	VDEC_H_HTL_CTRL				0x1E54
41162306a36Sopenharmony_ci#define	VDEC_H_SRC_CFG				0x1E58
41262306a36Sopenharmony_ci#define	VDEC_H_SC_STEP_SIZE			0x1E5C
41362306a36Sopenharmony_ci#define	VDEC_H_SC_CONVERGE_CTRL			0x1E60
41462306a36Sopenharmony_ci#define	VDEC_H_SC_LOOP_CTRL			0x1E64
41562306a36Sopenharmony_ci#define	VDEC_H_COMB_2D_HFS_CFG			0x1E68
41662306a36Sopenharmony_ci#define	VDEC_H_COMB_2D_HFD_CFG			0x1E6C
41762306a36Sopenharmony_ci#define	VDEC_H_COMB_2D_LF_CFG			0x1E70
41862306a36Sopenharmony_ci#define	VDEC_H_COMB_2D_BLEND			0x1E74
41962306a36Sopenharmony_ci#define	VDEC_H_COMB_MISC_CTRL			0x1E78
42062306a36Sopenharmony_ci#define	VDEC_H_COMB_FLAT_THRESH_CTRL		0x1E7C
42162306a36Sopenharmony_ci#define	VDEC_H_COMB_TEST			0x1E80
42262306a36Sopenharmony_ci#define	VDEC_H_BP_MISC_CTRL			0x1E84
42362306a36Sopenharmony_ci#define	VDEC_H_VCR_DET_CTRL			0x1E88
42462306a36Sopenharmony_ci#define	VDEC_H_NOISE_DET_CTRL			0x1E8C
42562306a36Sopenharmony_ci#define	VDEC_H_COMB_FLAT_NOISE_CTRL		0x1E90
42662306a36Sopenharmony_ci#define	VDEC_H_VERSION				0x1FF8
42762306a36Sopenharmony_ci#define	VDEC_H_SOFT_RST_CTRL			0x1FFC
42862306a36Sopenharmony_ci
42962306a36Sopenharmony_ci/*****************************************************************************/
43062306a36Sopenharmony_ci/* LUMA_CTRL register fields */
43162306a36Sopenharmony_ci#define VDEC_A_BRITE_CTRL			0x1014
43262306a36Sopenharmony_ci#define VDEC_A_CNTRST_CTRL			0x1015
43362306a36Sopenharmony_ci#define VDEC_A_PEAK_SEL				0x1016
43462306a36Sopenharmony_ci
43562306a36Sopenharmony_ci/*****************************************************************************/
43662306a36Sopenharmony_ci/* CHROMA_CTRL register fields */
43762306a36Sopenharmony_ci#define VDEC_A_USAT_CTRL			0x1018
43862306a36Sopenharmony_ci#define VDEC_A_VSAT_CTRL			0x1019
43962306a36Sopenharmony_ci#define VDEC_A_HUE_CTRL				0x101A
44062306a36Sopenharmony_ci
44162306a36Sopenharmony_ci#endif
442