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