xref: /linux/drivers/gpu/drm/mediatek/mtk_dp_reg.h (revision f70ac097a2cf5d4b67b2c1bbb73196c573ffcb7b)
1*f70ac097SMarkus Schneider-Pargmann /* SPDX-License-Identifier: GPL-2.0 */
2*f70ac097SMarkus Schneider-Pargmann /*
3*f70ac097SMarkus Schneider-Pargmann  * Copyright (c) 2019-2022 MediaTek Inc.
4*f70ac097SMarkus Schneider-Pargmann  * Copyright (c) 2022 BayLibre
5*f70ac097SMarkus Schneider-Pargmann  */
6*f70ac097SMarkus Schneider-Pargmann #ifndef _MTK_DP_REG_H_
7*f70ac097SMarkus Schneider-Pargmann #define _MTK_DP_REG_H_
8*f70ac097SMarkus Schneider-Pargmann 
9*f70ac097SMarkus Schneider-Pargmann #define SEC_OFFSET	0x4000
10*f70ac097SMarkus Schneider-Pargmann 
11*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_HPD_DISCONNECT		BIT(1)
12*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_HPD_CONNECT		BIT(2)
13*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_HPD_INTERRUPT		BIT(3)
14*f70ac097SMarkus Schneider-Pargmann 
15*f70ac097SMarkus Schneider-Pargmann /* offset: 0x0 */
16*f70ac097SMarkus Schneider-Pargmann #define DP_PHY_GLB_BIAS_GEN_00		0x0
17*f70ac097SMarkus Schneider-Pargmann #define RG_XTP_GLB_BIAS_INTR_CTRL		GENMASK(20, 16)
18*f70ac097SMarkus Schneider-Pargmann #define DP_PHY_GLB_DPAUX_TX		0x8
19*f70ac097SMarkus Schneider-Pargmann #define RG_CKM_PT0_CKTX_IMPSEL			GENMASK(23, 20)
20*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_0034			0x34
21*f70ac097SMarkus Schneider-Pargmann #define DA_XTP_GLB_CKDET_EN_FORCE_VAL		BIT(15)
22*f70ac097SMarkus Schneider-Pargmann #define DA_XTP_GLB_CKDET_EN_FORCE_EN		BIT(14)
23*f70ac097SMarkus Schneider-Pargmann #define DA_CKM_INTCKTX_EN_FORCE_VAL		BIT(13)
24*f70ac097SMarkus Schneider-Pargmann #define DA_CKM_INTCKTX_EN_FORCE_EN		BIT(12)
25*f70ac097SMarkus Schneider-Pargmann #define DA_CKM_CKTX0_EN_FORCE_VAL		BIT(11)
26*f70ac097SMarkus Schneider-Pargmann #define DA_CKM_CKTX0_EN_FORCE_EN		BIT(10)
27*f70ac097SMarkus Schneider-Pargmann #define DA_CKM_XTAL_CK_FORCE_VAL		BIT(9)
28*f70ac097SMarkus Schneider-Pargmann #define DA_CKM_XTAL_CK_FORCE_EN			BIT(8)
29*f70ac097SMarkus Schneider-Pargmann #define DA_CKM_BIAS_LPF_EN_FORCE_VAL		BIT(7)
30*f70ac097SMarkus Schneider-Pargmann #define DA_CKM_BIAS_LPF_EN_FORCE_EN		BIT(6)
31*f70ac097SMarkus Schneider-Pargmann #define DA_CKM_BIAS_EN_FORCE_VAL		BIT(5)
32*f70ac097SMarkus Schneider-Pargmann #define DA_CKM_BIAS_EN_FORCE_EN			BIT(4)
33*f70ac097SMarkus Schneider-Pargmann #define DA_XTP_GLB_AVD10_ON_FORCE_VAL		BIT(3)
34*f70ac097SMarkus Schneider-Pargmann #define DA_XTP_GLB_AVD10_ON_FORCE		BIT(2)
35*f70ac097SMarkus Schneider-Pargmann #define DA_XTP_GLB_LDO_EN_FORCE_VAL		BIT(1)
36*f70ac097SMarkus Schneider-Pargmann #define DA_XTP_GLB_LDO_EN_FORCE_EN		BIT(0)
37*f70ac097SMarkus Schneider-Pargmann #define DP_PHY_LANE_TX_0		0x104
38*f70ac097SMarkus Schneider-Pargmann #define RG_XTP_LN0_TX_IMPSEL_PMOS		GENMASK(15, 12)
39*f70ac097SMarkus Schneider-Pargmann #define RG_XTP_LN0_TX_IMPSEL_NMOS		GENMASK(19, 16)
40*f70ac097SMarkus Schneider-Pargmann #define DP_PHY_LANE_TX_1		0x204
41*f70ac097SMarkus Schneider-Pargmann #define RG_XTP_LN1_TX_IMPSEL_PMOS		GENMASK(15, 12)
42*f70ac097SMarkus Schneider-Pargmann #define RG_XTP_LN1_TX_IMPSEL_NMOS		GENMASK(19, 16)
43*f70ac097SMarkus Schneider-Pargmann #define DP_PHY_LANE_TX_2		0x304
44*f70ac097SMarkus Schneider-Pargmann #define RG_XTP_LN2_TX_IMPSEL_PMOS		GENMASK(15, 12)
45*f70ac097SMarkus Schneider-Pargmann #define RG_XTP_LN2_TX_IMPSEL_NMOS		GENMASK(19, 16)
46*f70ac097SMarkus Schneider-Pargmann #define DP_PHY_LANE_TX_3		0x404
47*f70ac097SMarkus Schneider-Pargmann #define RG_XTP_LN3_TX_IMPSEL_PMOS		GENMASK(15, 12)
48*f70ac097SMarkus Schneider-Pargmann #define RG_XTP_LN3_TX_IMPSEL_NMOS		GENMASK(19, 16)
49*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_1040			0x1040
50*f70ac097SMarkus Schneider-Pargmann #define RG_DPAUX_RX_VALID_DEGLITCH_EN		BIT(2)
51*f70ac097SMarkus Schneider-Pargmann #define RG_XTP_GLB_CKDET_EN			BIT(1)
52*f70ac097SMarkus Schneider-Pargmann #define RG_DPAUX_RX_EN				BIT(0)
53*f70ac097SMarkus Schneider-Pargmann 
54*f70ac097SMarkus Schneider-Pargmann /* offset: TOP_OFFSET (0x2000) */
55*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_TOP_PWR_STATE		0x2000
56*f70ac097SMarkus Schneider-Pargmann #define DP_PWR_STATE_MASK			GENMASK(1, 0)
57*f70ac097SMarkus Schneider-Pargmann #define DP_PWR_STATE_BANDGAP			BIT(0)
58*f70ac097SMarkus Schneider-Pargmann #define DP_PWR_STATE_BANDGAP_TPLL		BIT(1)
59*f70ac097SMarkus Schneider-Pargmann #define DP_PWR_STATE_BANDGAP_TPLL_LANE		GENMASK(1, 0)
60*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_TOP_SWING_EMP		0x2004
61*f70ac097SMarkus Schneider-Pargmann #define DP_TX0_VOLT_SWING_MASK			GENMASK(1, 0)
62*f70ac097SMarkus Schneider-Pargmann #define DP_TX0_VOLT_SWING_SHIFT			0
63*f70ac097SMarkus Schneider-Pargmann #define DP_TX0_PRE_EMPH_MASK			GENMASK(3, 2)
64*f70ac097SMarkus Schneider-Pargmann #define DP_TX0_PRE_EMPH_SHIFT			2
65*f70ac097SMarkus Schneider-Pargmann #define DP_TX1_VOLT_SWING_MASK			GENMASK(9, 8)
66*f70ac097SMarkus Schneider-Pargmann #define DP_TX1_VOLT_SWING_SHIFT			8
67*f70ac097SMarkus Schneider-Pargmann #define DP_TX1_PRE_EMPH_MASK			GENMASK(11, 10)
68*f70ac097SMarkus Schneider-Pargmann #define DP_TX2_VOLT_SWING_MASK			GENMASK(17, 16)
69*f70ac097SMarkus Schneider-Pargmann #define DP_TX2_PRE_EMPH_MASK			GENMASK(19, 18)
70*f70ac097SMarkus Schneider-Pargmann #define DP_TX3_VOLT_SWING_MASK			GENMASK(25, 24)
71*f70ac097SMarkus Schneider-Pargmann #define DP_TX3_PRE_EMPH_MASK			GENMASK(27, 26)
72*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_TOP_RESET_AND_PROBE	0x2020
73*f70ac097SMarkus Schneider-Pargmann #define SW_RST_B_PHYD				BIT(4)
74*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_TOP_IRQ_MASK		0x202c
75*f70ac097SMarkus Schneider-Pargmann #define IRQ_MASK_AUX_TOP_IRQ			BIT(2)
76*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_TOP_MEM_PD		0x2038
77*f70ac097SMarkus Schneider-Pargmann #define MEM_ISO_EN				BIT(0)
78*f70ac097SMarkus Schneider-Pargmann #define FUSE_SEL				BIT(2)
79*f70ac097SMarkus Schneider-Pargmann 
80*f70ac097SMarkus Schneider-Pargmann /* offset: ENC0_OFFSET (0x3000) */
81*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_3000			0x3000
82*f70ac097SMarkus Schneider-Pargmann #define LANE_NUM_DP_ENC0_P0_MASK			GENMASK(1, 0)
83*f70ac097SMarkus Schneider-Pargmann #define VIDEO_MUTE_SW_DP_ENC0_P0			BIT(2)
84*f70ac097SMarkus Schneider-Pargmann #define VIDEO_MUTE_SEL_DP_ENC0_P0			BIT(3)
85*f70ac097SMarkus Schneider-Pargmann #define ENHANCED_FRAME_EN_DP_ENC0_P0			BIT(4)
86*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_3004			0x3004
87*f70ac097SMarkus Schneider-Pargmann #define VIDEO_M_CODE_SEL_DP_ENC0_P0_MASK		BIT(8)
88*f70ac097SMarkus Schneider-Pargmann #define DP_TX_ENCODER_4P_RESET_SW_DP_ENC0_P0		BIT(9)
89*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_3010			0x3010
90*f70ac097SMarkus Schneider-Pargmann #define HTOTAL_SW_DP_ENC0_P0_MASK			GENMASK(15, 0)
91*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_3014			0x3014
92*f70ac097SMarkus Schneider-Pargmann #define VTOTAL_SW_DP_ENC0_P0_MASK			GENMASK(15, 0)
93*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_3018			0x3018
94*f70ac097SMarkus Schneider-Pargmann #define HSTART_SW_DP_ENC0_P0_MASK			GENMASK(15, 0)
95*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_301C			0x301c
96*f70ac097SMarkus Schneider-Pargmann #define VSTART_SW_DP_ENC0_P0_MASK			GENMASK(15, 0)
97*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_3020			0x3020
98*f70ac097SMarkus Schneider-Pargmann #define HWIDTH_SW_DP_ENC0_P0_MASK			GENMASK(15, 0)
99*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_3024			0x3024
100*f70ac097SMarkus Schneider-Pargmann #define VHEIGHT_SW_DP_ENC0_P0_MASK			GENMASK(15, 0)
101*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_3028			0x3028
102*f70ac097SMarkus Schneider-Pargmann #define HSW_SW_DP_ENC0_P0_MASK				GENMASK(14, 0)
103*f70ac097SMarkus Schneider-Pargmann #define HSP_SW_DP_ENC0_P0_MASK				BIT(15)
104*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_302C			0x302c
105*f70ac097SMarkus Schneider-Pargmann #define VSW_SW_DP_ENC0_P0_MASK				GENMASK(14, 0)
106*f70ac097SMarkus Schneider-Pargmann #define VSP_SW_DP_ENC0_P0_MASK				BIT(15)
107*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_3030			0x3030
108*f70ac097SMarkus Schneider-Pargmann #define HTOTAL_SEL_DP_ENC0_P0				BIT(0)
109*f70ac097SMarkus Schneider-Pargmann #define VTOTAL_SEL_DP_ENC0_P0				BIT(1)
110*f70ac097SMarkus Schneider-Pargmann #define HSTART_SEL_DP_ENC0_P0				BIT(2)
111*f70ac097SMarkus Schneider-Pargmann #define VSTART_SEL_DP_ENC0_P0				BIT(3)
112*f70ac097SMarkus Schneider-Pargmann #define HWIDTH_SEL_DP_ENC0_P0				BIT(4)
113*f70ac097SMarkus Schneider-Pargmann #define VHEIGHT_SEL_DP_ENC0_P0				BIT(5)
114*f70ac097SMarkus Schneider-Pargmann #define HSP_SEL_DP_ENC0_P0				BIT(6)
115*f70ac097SMarkus Schneider-Pargmann #define HSW_SEL_DP_ENC0_P0				BIT(7)
116*f70ac097SMarkus Schneider-Pargmann #define VSP_SEL_DP_ENC0_P0				BIT(8)
117*f70ac097SMarkus Schneider-Pargmann #define VSW_SEL_DP_ENC0_P0				BIT(9)
118*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_3034			0x3034
119*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_3038			0x3038
120*f70ac097SMarkus Schneider-Pargmann #define VIDEO_SOURCE_SEL_DP_ENC0_P0_MASK		BIT(11)
121*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_303C			0x303c
122*f70ac097SMarkus Schneider-Pargmann #define SRAM_START_READ_THRD_DP_ENC0_P0_MASK		GENMASK(5, 0)
123*f70ac097SMarkus Schneider-Pargmann #define VIDEO_COLOR_DEPTH_DP_ENC0_P0_MASK		GENMASK(10, 8)
124*f70ac097SMarkus Schneider-Pargmann #define VIDEO_COLOR_DEPTH_DP_ENC0_P0_16BIT		(0 << 8)
125*f70ac097SMarkus Schneider-Pargmann #define VIDEO_COLOR_DEPTH_DP_ENC0_P0_12BIT		(1 << 8)
126*f70ac097SMarkus Schneider-Pargmann #define VIDEO_COLOR_DEPTH_DP_ENC0_P0_10BIT		(2 << 8)
127*f70ac097SMarkus Schneider-Pargmann #define VIDEO_COLOR_DEPTH_DP_ENC0_P0_8BIT		(3 << 8)
128*f70ac097SMarkus Schneider-Pargmann #define VIDEO_COLOR_DEPTH_DP_ENC0_P0_6BIT		(4 << 8)
129*f70ac097SMarkus Schneider-Pargmann #define PIXEL_ENCODE_FORMAT_DP_ENC0_P0_MASK		GENMASK(14, 12)
130*f70ac097SMarkus Schneider-Pargmann #define PIXEL_ENCODE_FORMAT_DP_ENC0_P0_RGB		(0 << 12)
131*f70ac097SMarkus Schneider-Pargmann #define PIXEL_ENCODE_FORMAT_DP_ENC0_P0_YCBCR422		(1 << 12)
132*f70ac097SMarkus Schneider-Pargmann #define PIXEL_ENCODE_FORMAT_DP_ENC0_P0_YCBCR420		(2 << 12)
133*f70ac097SMarkus Schneider-Pargmann #define VIDEO_MN_GEN_EN_DP_ENC0_P0			BIT(15)
134*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_3040			0x3040
135*f70ac097SMarkus Schneider-Pargmann #define SDP_DOWN_CNT_DP_ENC0_P0_VAL			0x20
136*f70ac097SMarkus Schneider-Pargmann #define SDP_DOWN_CNT_INIT_DP_ENC0_P0_MASK		GENMASK(11, 0)
137*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_304C			0x304c
138*f70ac097SMarkus Schneider-Pargmann #define VBID_VIDEO_MUTE_DP_ENC0_P0_MASK			BIT(2)
139*f70ac097SMarkus Schneider-Pargmann #define SDP_VSYNC_RISING_MASK_DP_ENC0_P0_MASK		BIT(8)
140*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_3064			0x3064
141*f70ac097SMarkus Schneider-Pargmann #define HDE_NUM_LAST_DP_ENC0_P0_MASK			GENMASK(15, 0)
142*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_3154			0x3154
143*f70ac097SMarkus Schneider-Pargmann #define PGEN_HTOTAL_DP_ENC0_P0_MASK			GENMASK(13, 0)
144*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_3158			0x3158
145*f70ac097SMarkus Schneider-Pargmann #define PGEN_HSYNC_RISING_DP_ENC0_P0_MASK		GENMASK(13, 0)
146*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_315C			0x315c
147*f70ac097SMarkus Schneider-Pargmann #define PGEN_HSYNC_PULSE_WIDTH_DP_ENC0_P0_MASK		GENMASK(13, 0)
148*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_3160			0x3160
149*f70ac097SMarkus Schneider-Pargmann #define PGEN_HFDE_START_DP_ENC0_P0_MASK			GENMASK(13, 0)
150*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_3164			0x3164
151*f70ac097SMarkus Schneider-Pargmann #define PGEN_HFDE_ACTIVE_WIDTH_DP_ENC0_P0_MASK		GENMASK(13, 0)
152*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_3168			0x3168
153*f70ac097SMarkus Schneider-Pargmann #define PGEN_VTOTAL_DP_ENC0_P0_MASK			GENMASK(12, 0)
154*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_316C			0x316c
155*f70ac097SMarkus Schneider-Pargmann #define PGEN_VSYNC_RISING_DP_ENC0_P0_MASK		GENMASK(12, 0)
156*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_3170			0x3170
157*f70ac097SMarkus Schneider-Pargmann #define PGEN_VSYNC_PULSE_WIDTH_DP_ENC0_P0_MASK		GENMASK(12, 0)
158*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_3174			0x3174
159*f70ac097SMarkus Schneider-Pargmann #define PGEN_VFDE_START_DP_ENC0_P0_MASK			GENMASK(12, 0)
160*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_3178			0x3178
161*f70ac097SMarkus Schneider-Pargmann #define PGEN_VFDE_ACTIVE_WIDTH_DP_ENC0_P0_MASK		GENMASK(12, 0)
162*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_31B0			0x31b0
163*f70ac097SMarkus Schneider-Pargmann #define PGEN_PATTERN_SEL_VAL				4
164*f70ac097SMarkus Schneider-Pargmann #define PGEN_PATTERN_SEL_MASK				GENMASK(6, 4)
165*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC0_P0_31EC			0x31ec
166*f70ac097SMarkus Schneider-Pargmann #define AUDIO_CH_SRC_SEL_DP_ENC0_P0			BIT(4)
167*f70ac097SMarkus Schneider-Pargmann #define ISRC1_HB3_DP_ENC0_P0_MASK			GENMASK(15, 8)
168*f70ac097SMarkus Schneider-Pargmann 
169*f70ac097SMarkus Schneider-Pargmann /* offset: ENC1_OFFSET (0x3200) */
170*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC1_P0_3300			0x3300
171*f70ac097SMarkus Schneider-Pargmann #define VIDEO_AFIFO_RDY_SEL_DP_ENC1_P0_VAL		2
172*f70ac097SMarkus Schneider-Pargmann #define VIDEO_AFIFO_RDY_SEL_DP_ENC1_P0_MASK		GENMASK(9, 8)
173*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC1_P0_3364			0x3364
174*f70ac097SMarkus Schneider-Pargmann #define SDP_DOWN_CNT_IN_HBLANK_DP_ENC1_P0_VAL		0x20
175*f70ac097SMarkus Schneider-Pargmann #define SDP_DOWN_CNT_INIT_IN_HBLANK_DP_ENC1_P0_MASK	GENMASK(11, 0)
176*f70ac097SMarkus Schneider-Pargmann #define FIFO_READ_START_POINT_DP_ENC1_P0_VAL		4
177*f70ac097SMarkus Schneider-Pargmann #define FIFO_READ_START_POINT_DP_ENC1_P0_MASK		GENMASK(15, 12)
178*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_ENC1_P0_3368			0x3368
179*f70ac097SMarkus Schneider-Pargmann #define VIDEO_SRAM_FIFO_CNT_RESET_SEL_DP_ENC1_P0	BIT(0)
180*f70ac097SMarkus Schneider-Pargmann #define VIDEO_STABLE_CNT_THRD_DP_ENC1_P0		BIT(4)
181*f70ac097SMarkus Schneider-Pargmann #define SDP_DP13_EN_DP_ENC1_P0				BIT(8)
182*f70ac097SMarkus Schneider-Pargmann #define BS2BS_MODE_DP_ENC1_P0				BIT(12)
183*f70ac097SMarkus Schneider-Pargmann #define BS2BS_MODE_DP_ENC1_P0_MASK			GENMASK(13, 12)
184*f70ac097SMarkus Schneider-Pargmann #define BS2BS_MODE_DP_ENC1_P0_VAL			1
185*f70ac097SMarkus Schneider-Pargmann #define DP_ENC1_P0_3368_VAL				(VIDEO_SRAM_FIFO_CNT_RESET_SEL_DP_ENC1_P0 | \
186*f70ac097SMarkus Schneider-Pargmann 							 VIDEO_STABLE_CNT_THRD_DP_ENC1_P0 | \
187*f70ac097SMarkus Schneider-Pargmann 							 SDP_DP13_EN_DP_ENC1_P0 | \
188*f70ac097SMarkus Schneider-Pargmann 							 BS2BS_MODE_DP_ENC1_P0)
189*f70ac097SMarkus Schneider-Pargmann 
190*f70ac097SMarkus Schneider-Pargmann /* offset: TRANS_OFFSET (0x3400) */
191*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_TRANS_P0_3400				0x3400
192*f70ac097SMarkus Schneider-Pargmann #define PATTERN1_EN_DP_TRANS_P0_MASK				BIT(12)
193*f70ac097SMarkus Schneider-Pargmann #define PATTERN2_EN_DP_TRANS_P0_MASK				BIT(13)
194*f70ac097SMarkus Schneider-Pargmann #define PATTERN3_EN_DP_TRANS_P0_MASK				BIT(14)
195*f70ac097SMarkus Schneider-Pargmann #define PATTERN4_EN_DP_TRANS_P0_MASK				BIT(15)
196*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_TRANS_P0_3404				0x3404
197*f70ac097SMarkus Schneider-Pargmann #define DP_SCR_EN_DP_TRANS_P0_MASK				BIT(0)
198*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_TRANS_P0_340C				0x340c
199*f70ac097SMarkus Schneider-Pargmann #define DP_TX_TRANSMITTER_4P_RESET_SW_DP_TRANS_P0		BIT(13)
200*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_TRANS_P0_3410				0x3410
201*f70ac097SMarkus Schneider-Pargmann #define HPD_DEB_THD_DP_TRANS_P0_MASK				GENMASK(3, 0)
202*f70ac097SMarkus Schneider-Pargmann #define HPD_INT_THD_DP_TRANS_P0_MASK				GENMASK(7, 4)
203*f70ac097SMarkus Schneider-Pargmann #define HPD_INT_THD_DP_TRANS_P0_LOWER_500US			(2 << 4)
204*f70ac097SMarkus Schneider-Pargmann #define HPD_INT_THD_DP_TRANS_P0_UPPER_1100US			(2 << 6)
205*f70ac097SMarkus Schneider-Pargmann #define HPD_DISC_THD_DP_TRANS_P0_MASK				GENMASK(11, 8)
206*f70ac097SMarkus Schneider-Pargmann #define HPD_CONN_THD_DP_TRANS_P0_MASK				GENMASK(15, 12)
207*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_TRANS_P0_3414				0x3414
208*f70ac097SMarkus Schneider-Pargmann #define HPD_DB_DP_TRANS_P0_MASK					BIT(2)
209*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_TRANS_P0_3418				0x3418
210*f70ac097SMarkus Schneider-Pargmann #define IRQ_CLR_DP_TRANS_P0_MASK				GENMASK(3, 0)
211*f70ac097SMarkus Schneider-Pargmann #define IRQ_MASK_DP_TRANS_P0_MASK				GENMASK(7, 4)
212*f70ac097SMarkus Schneider-Pargmann #define IRQ_MASK_DP_TRANS_P0_DISC_IRQ				(BIT(1) << 4)
213*f70ac097SMarkus Schneider-Pargmann #define IRQ_MASK_DP_TRANS_P0_CONN_IRQ				(BIT(2) << 4)
214*f70ac097SMarkus Schneider-Pargmann #define IRQ_MASK_DP_TRANS_P0_INT_IRQ				(BIT(3) << 4)
215*f70ac097SMarkus Schneider-Pargmann #define IRQ_STATUS_DP_TRANS_P0_MASK				GENMASK(15, 12)
216*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_TRANS_P0_342C				0x342c
217*f70ac097SMarkus Schneider-Pargmann #define XTAL_FREQ_DP_TRANS_P0_DEFAULT				(BIT(0) | BIT(3) | BIT(5) | BIT(6))
218*f70ac097SMarkus Schneider-Pargmann #define XTAL_FREQ_DP_TRANS_P0_MASK				GENMASK(7, 0)
219*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_TRANS_P0_3430				0x3430
220*f70ac097SMarkus Schneider-Pargmann #define HPD_INT_THD_ECO_DP_TRANS_P0_MASK			GENMASK(1, 0)
221*f70ac097SMarkus Schneider-Pargmann #define HPD_INT_THD_ECO_DP_TRANS_P0_HIGH_BOUND_EXT		BIT(1)
222*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_TRANS_P0_34A4				0x34a4
223*f70ac097SMarkus Schneider-Pargmann #define LANE_NUM_DP_TRANS_P0_MASK				GENMASK(3, 2)
224*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_TRANS_P0_3540				0x3540
225*f70ac097SMarkus Schneider-Pargmann #define FEC_EN_DP_TRANS_P0_MASK					BIT(0)
226*f70ac097SMarkus Schneider-Pargmann #define FEC_CLOCK_EN_MODE_DP_TRANS_P0				BIT(3)
227*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_TRANS_P0_3580				0x3580
228*f70ac097SMarkus Schneider-Pargmann #define POST_MISC_DATA_LANE0_OV_DP_TRANS_P0_MASK		BIT(8)
229*f70ac097SMarkus Schneider-Pargmann #define POST_MISC_DATA_LANE1_OV_DP_TRANS_P0_MASK		BIT(9)
230*f70ac097SMarkus Schneider-Pargmann #define POST_MISC_DATA_LANE2_OV_DP_TRANS_P0_MASK		BIT(10)
231*f70ac097SMarkus Schneider-Pargmann #define POST_MISC_DATA_LANE3_OV_DP_TRANS_P0_MASK		BIT(11)
232*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_TRANS_P0_35C8				0x35c8
233*f70ac097SMarkus Schneider-Pargmann #define SW_IRQ_CLR_DP_TRANS_P0_MASK				GENMASK(15, 0)
234*f70ac097SMarkus Schneider-Pargmann #define SW_IRQ_STATUS_DP_TRANS_P0_MASK				GENMASK(15, 0)
235*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_TRANS_P0_35D0				0x35d0
236*f70ac097SMarkus Schneider-Pargmann #define SW_IRQ_FINAL_STATUS_DP_TRANS_P0_MASK			GENMASK(15, 0)
237*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_TRANS_P0_35F0				0x35f0
238*f70ac097SMarkus Schneider-Pargmann #define DP_TRANS_DUMMY_RW_0					BIT(3)
239*f70ac097SMarkus Schneider-Pargmann #define DP_TRANS_DUMMY_RW_0_MASK				GENMASK(3, 2)
240*f70ac097SMarkus Schneider-Pargmann 
241*f70ac097SMarkus Schneider-Pargmann /* offset: AUX_OFFSET (0x3600) */
242*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_AUX_P0_360C			0x360c
243*f70ac097SMarkus Schneider-Pargmann #define AUX_TIMEOUT_THR_AUX_TX_P0_MASK			GENMASK(12, 0)
244*f70ac097SMarkus Schneider-Pargmann #define AUX_TIMEOUT_THR_AUX_TX_P0_VAL			0x1595
245*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_AUX_P0_3614			0x3614
246*f70ac097SMarkus Schneider-Pargmann #define AUX_RX_UI_CNT_THR_AUX_TX_P0_MASK		GENMASK(6, 0)
247*f70ac097SMarkus Schneider-Pargmann #define AUX_RX_UI_CNT_THR_AUX_FOR_26M			13
248*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_AUX_P0_3618			0x3618
249*f70ac097SMarkus Schneider-Pargmann #define AUX_RX_FIFO_FULL_AUX_TX_P0_MASK			BIT(9)
250*f70ac097SMarkus Schneider-Pargmann #define AUX_RX_FIFO_WRITE_POINTER_AUX_TX_P0_MASK	GENMASK(3, 0)
251*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_AUX_P0_3620			0x3620
252*f70ac097SMarkus Schneider-Pargmann #define AUX_RD_MODE_AUX_TX_P0_MASK			BIT(9)
253*f70ac097SMarkus Schneider-Pargmann #define AUX_RX_FIFO_READ_PULSE_TX_P0			BIT(8)
254*f70ac097SMarkus Schneider-Pargmann #define AUX_RX_FIFO_READ_DATA_AUX_TX_P0_MASK		GENMASK(7, 0)
255*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_AUX_P0_3624			0x3624
256*f70ac097SMarkus Schneider-Pargmann #define AUX_RX_REPLY_COMMAND_AUX_TX_P0_MASK		GENMASK(3, 0)
257*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_AUX_P0_3628			0x3628
258*f70ac097SMarkus Schneider-Pargmann #define AUX_RX_PHY_STATE_AUX_TX_P0_MASK			GENMASK(9, 0)
259*f70ac097SMarkus Schneider-Pargmann #define AUX_RX_PHY_STATE_AUX_TX_P0_RX_IDLE		BIT(0)
260*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_AUX_P0_362C			0x362c
261*f70ac097SMarkus Schneider-Pargmann #define AUX_NO_LENGTH_AUX_TX_P0				BIT(0)
262*f70ac097SMarkus Schneider-Pargmann #define AUX_TX_AUXTX_OV_EN_AUX_TX_P0_MASK		BIT(1)
263*f70ac097SMarkus Schneider-Pargmann #define AUX_RESERVED_RW_0_AUX_TX_P0_MASK		GENMASK(15, 2)
264*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_AUX_P0_3630			0x3630
265*f70ac097SMarkus Schneider-Pargmann #define AUX_TX_REQUEST_READY_AUX_TX_P0			BIT(3)
266*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_AUX_P0_3634			0x3634
267*f70ac097SMarkus Schneider-Pargmann #define AUX_TX_OVER_SAMPLE_RATE_AUX_TX_P0_MASK		GENMASK(15, 8)
268*f70ac097SMarkus Schneider-Pargmann #define AUX_TX_OVER_SAMPLE_RATE_FOR_26M			25
269*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_AUX_P0_3640			0x3640
270*f70ac097SMarkus Schneider-Pargmann #define AUX_RX_AUX_RECV_COMPLETE_IRQ_AUX_TX_P0		BIT(6)
271*f70ac097SMarkus Schneider-Pargmann #define AUX_RX_EDID_RECV_COMPLETE_IRQ_AUX_TX_P0		BIT(5)
272*f70ac097SMarkus Schneider-Pargmann #define AUX_RX_MCCS_RECV_COMPLETE_IRQ_AUX_TX_P0		BIT(4)
273*f70ac097SMarkus Schneider-Pargmann #define AUX_RX_CMD_RECV_IRQ_AUX_TX_P0			BIT(3)
274*f70ac097SMarkus Schneider-Pargmann #define AUX_RX_ADDR_RECV_IRQ_AUX_TX_P0			BIT(2)
275*f70ac097SMarkus Schneider-Pargmann #define AUX_RX_DATA_RECV_IRQ_AUX_TX_P0			BIT(1)
276*f70ac097SMarkus Schneider-Pargmann #define AUX_400US_TIMEOUT_IRQ_AUX_TX_P0			BIT(0)
277*f70ac097SMarkus Schneider-Pargmann #define DP_AUX_P0_3640_VAL				(AUX_400US_TIMEOUT_IRQ_AUX_TX_P0 | \
278*f70ac097SMarkus Schneider-Pargmann 							 AUX_RX_DATA_RECV_IRQ_AUX_TX_P0 | \
279*f70ac097SMarkus Schneider-Pargmann 							 AUX_RX_ADDR_RECV_IRQ_AUX_TX_P0 | \
280*f70ac097SMarkus Schneider-Pargmann 							 AUX_RX_CMD_RECV_IRQ_AUX_TX_P0 | \
281*f70ac097SMarkus Schneider-Pargmann 							 AUX_RX_MCCS_RECV_COMPLETE_IRQ_AUX_TX_P0 | \
282*f70ac097SMarkus Schneider-Pargmann 							 AUX_RX_EDID_RECV_COMPLETE_IRQ_AUX_TX_P0 | \
283*f70ac097SMarkus Schneider-Pargmann 							 AUX_RX_AUX_RECV_COMPLETE_IRQ_AUX_TX_P0)
284*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_AUX_P0_3644			0x3644
285*f70ac097SMarkus Schneider-Pargmann #define MCU_REQUEST_COMMAND_AUX_TX_P0_MASK		GENMASK(3, 0)
286*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_AUX_P0_3648			0x3648
287*f70ac097SMarkus Schneider-Pargmann #define MCU_REQUEST_ADDRESS_LSB_AUX_TX_P0_MASK		GENMASK(15, 0)
288*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_AUX_P0_364C			0x364c
289*f70ac097SMarkus Schneider-Pargmann #define MCU_REQUEST_ADDRESS_MSB_AUX_TX_P0_MASK		GENMASK(3, 0)
290*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_AUX_P0_3650			0x3650
291*f70ac097SMarkus Schneider-Pargmann #define MCU_REQ_DATA_NUM_AUX_TX_P0_MASK			GENMASK(15, 12)
292*f70ac097SMarkus Schneider-Pargmann #define PHY_FIFO_RST_AUX_TX_P0_MASK			BIT(9)
293*f70ac097SMarkus Schneider-Pargmann #define MCU_ACK_TRAN_COMPLETE_AUX_TX_P0			BIT(8)
294*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_AUX_P0_3658			0x3658
295*f70ac097SMarkus Schneider-Pargmann #define AUX_TX_OV_EN_AUX_TX_P0_MASK			BIT(0)
296*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_AUX_P0_3690			0x3690
297*f70ac097SMarkus Schneider-Pargmann #define RX_REPLY_COMPLETE_MODE_AUX_TX_P0		BIT(8)
298*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_AUX_P0_3704			0x3704
299*f70ac097SMarkus Schneider-Pargmann #define AUX_TX_FIFO_WDATA_NEW_MODE_T_AUX_TX_P0_MASK	BIT(1)
300*f70ac097SMarkus Schneider-Pargmann #define AUX_TX_FIFO_NEW_MODE_EN_AUX_TX_P0		BIT(2)
301*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_AUX_P0_3708			0x3708
302*f70ac097SMarkus Schneider-Pargmann #define MTK_DP_AUX_P0_37C8			0x37c8
303*f70ac097SMarkus Schneider-Pargmann #define MTK_ATOP_EN_AUX_TX_P0				BIT(0)
304*f70ac097SMarkus Schneider-Pargmann 
305*f70ac097SMarkus Schneider-Pargmann #endif /*_MTK_DP_REG_H_*/
306