linux/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Register definition file for Analogix DP core driver
 *
 * Copyright (C) 2012 Samsung Electronics Co., Ltd.
 * Author: Jingoo Han <[email protected]>
 */

#ifndef _ANALOGIX_DP_REG_H
#define _ANALOGIX_DP_REG_H

#define ANALOGIX_DP_TX_SW_RESET
#define ANALOGIX_DP_FUNC_EN_1
#define ANALOGIX_DP_FUNC_EN_2
#define ANALOGIX_DP_VIDEO_CTL_1
#define ANALOGIX_DP_VIDEO_CTL_2
#define ANALOGIX_DP_VIDEO_CTL_3

#define ANALOGIX_DP_VIDEO_CTL_8
#define ANALOGIX_DP_VIDEO_CTL_10

#define ANALOGIX_DP_SPDIF_AUDIO_CTL_0

#define ANALOGIX_DP_PLL_REG_1
#define ANALOGIX_DP_PLL_REG_2
#define ANALOGIX_DP_PLL_REG_3
#define ANALOGIX_DP_PLL_REG_4
#define ANALOGIX_DP_PLL_REG_5

#define ANALOGIX_DP_PD

#define ANALOGIX_DP_IF_TYPE
#define ANALOGIX_DP_IF_PKT_DB1
#define ANALOGIX_DP_IF_PKT_DB2
#define ANALOGIX_DP_SPD_HB0
#define ANALOGIX_DP_SPD_HB1
#define ANALOGIX_DP_SPD_HB2
#define ANALOGIX_DP_SPD_HB3
#define ANALOGIX_DP_SPD_PB0
#define ANALOGIX_DP_SPD_PB1
#define ANALOGIX_DP_SPD_PB2
#define ANALOGIX_DP_SPD_PB3
#define ANALOGIX_DP_PSR_FRAME_UPDATE_CTRL
#define ANALOGIX_DP_VSC_SHADOW_DB0
#define ANALOGIX_DP_VSC_SHADOW_DB1

#define ANALOGIX_DP_LANE_MAP

#define ANALOGIX_DP_ANALOG_CTL_1
#define ANALOGIX_DP_ANALOG_CTL_2
#define ANALOGIX_DP_ANALOG_CTL_3
#define ANALOGIX_DP_PLL_FILTER_CTL_1
#define ANALOGIX_DP_TX_AMP_TUNING_CTL

#define ANALOGIX_DP_AUX_HW_RETRY_CTL

#define ANALOGIX_DP_COMMON_INT_STA_1
#define ANALOGIX_DP_COMMON_INT_STA_2
#define ANALOGIX_DP_COMMON_INT_STA_3
#define ANALOGIX_DP_COMMON_INT_STA_4
#define ANALOGIX_DP_INT_STA
#define ANALOGIX_DP_COMMON_INT_MASK_1
#define ANALOGIX_DP_COMMON_INT_MASK_2
#define ANALOGIX_DP_COMMON_INT_MASK_3
#define ANALOGIX_DP_COMMON_INT_MASK_4
#define ANALOGIX_DP_INT_STA_MASK
#define ANALOGIX_DP_INT_CTL

#define ANALOGIX_DP_SYS_CTL_1
#define ANALOGIX_DP_SYS_CTL_2
#define ANALOGIX_DP_SYS_CTL_3
#define ANALOGIX_DP_SYS_CTL_4

#define ANALOGIX_DP_PKT_SEND_CTL
#define ANALOGIX_DP_HDCP_CTL

#define ANALOGIX_DP_LINK_BW_SET
#define ANALOGIX_DP_LANE_COUNT_SET
#define ANALOGIX_DP_TRAINING_PTN_SET
#define ANALOGIX_DP_LN0_LINK_TRAINING_CTL
#define ANALOGIX_DP_LN1_LINK_TRAINING_CTL
#define ANALOGIX_DP_LN2_LINK_TRAINING_CTL
#define ANALOGIX_DP_LN3_LINK_TRAINING_CTL

#define ANALOGIX_DP_DEBUG_CTL
#define ANALOGIX_DP_HPD_DEGLITCH_L
#define ANALOGIX_DP_HPD_DEGLITCH_H
#define ANALOGIX_DP_LINK_DEBUG_CTL

#define ANALOGIX_DP_M_VID_0
#define ANALOGIX_DP_M_VID_1
#define ANALOGIX_DP_M_VID_2
#define ANALOGIX_DP_N_VID_0
#define ANALOGIX_DP_N_VID_1
#define ANALOGIX_DP_N_VID_2

#define ANALOGIX_DP_PLL_CTL
#define ANALOGIX_DP_PHY_PD
#define ANALOGIX_DP_PHY_TEST

#define ANALOGIX_DP_VIDEO_FIFO_THRD
#define ANALOGIX_DP_AUDIO_MARGIN

#define ANALOGIX_DP_M_VID_GEN_FILTER_TH
#define ANALOGIX_DP_M_AUD_GEN_FILTER_TH
#define ANALOGIX_DP_AUX_CH_STA
#define ANALOGIX_DP_AUX_CH_DEFER_CTL
#define ANALOGIX_DP_AUX_RX_COMM
#define ANALOGIX_DP_BUFFER_DATA_CTL
#define ANALOGIX_DP_AUX_CH_CTL_1
#define ANALOGIX_DP_AUX_ADDR_7_0
#define ANALOGIX_DP_AUX_ADDR_15_8
#define ANALOGIX_DP_AUX_ADDR_19_16
#define ANALOGIX_DP_AUX_CH_CTL_2

#define ANALOGIX_DP_BUF_DATA_0

#define ANALOGIX_DP_SOC_GENERAL_CTL

#define ANALOGIX_DP_CRC_CON

/* ANALOGIX_DP_TX_SW_RESET */
#define RESET_DP_TX

/* ANALOGIX_DP_FUNC_EN_1 */
#define MASTER_VID_FUNC_EN_N
#define RK_VID_CAP_FUNC_EN_N
#define SLAVE_VID_FUNC_EN_N
#define RK_VID_FIFO_FUNC_EN_N
#define AUD_FIFO_FUNC_EN_N
#define AUD_FUNC_EN_N
#define HDCP_FUNC_EN_N
#define CRC_FUNC_EN_N
#define SW_FUNC_EN_N

/* ANALOGIX_DP_FUNC_EN_2 */
#define SSC_FUNC_EN_N
#define AUX_FUNC_EN_N
#define SERDES_FIFO_FUNC_EN_N
#define LS_CLK_DOMAIN_FUNC_EN_N

/* ANALOGIX_DP_VIDEO_CTL_1 */
#define VIDEO_EN
#define HDCP_VIDEO_MUTE

/* ANALOGIX_DP_VIDEO_CTL_1 */
#define IN_D_RANGE_MASK
#define IN_D_RANGE_SHIFT
#define IN_D_RANGE_CEA
#define IN_D_RANGE_VESA
#define IN_BPC_MASK
#define IN_BPC_SHIFT
#define IN_BPC_12_BITS
#define IN_BPC_10_BITS
#define IN_BPC_8_BITS
#define IN_BPC_6_BITS
#define IN_COLOR_F_MASK
#define IN_COLOR_F_SHIFT
#define IN_COLOR_F_YCBCR444
#define IN_COLOR_F_YCBCR422
#define IN_COLOR_F_RGB

/* ANALOGIX_DP_VIDEO_CTL_3 */
#define IN_YC_COEFFI_MASK
#define IN_YC_COEFFI_SHIFT
#define IN_YC_COEFFI_ITU709
#define IN_YC_COEFFI_ITU601
#define VID_CHK_UPDATE_TYPE_MASK
#define VID_CHK_UPDATE_TYPE_SHIFT
#define VID_CHK_UPDATE_TYPE_1
#define VID_CHK_UPDATE_TYPE_0
#define REUSE_SPD_EN

/* ANALOGIX_DP_VIDEO_CTL_8 */
#define VID_HRES_TH(x)
#define VID_VRES_TH(x)

/* ANALOGIX_DP_VIDEO_CTL_10 */
#define FORMAT_SEL
#define INTERACE_SCAN_CFG
#define VSYNC_POLARITY_CFG
#define HSYNC_POLARITY_CFG

/* ANALOGIX_DP_PLL_REG_1 */
#define REF_CLK_24M
#define REF_CLK_27M
#define REF_CLK_MASK

/* ANALOGIX_DP_PSR_FRAME_UPDATE_CTRL */
#define PSR_FRAME_UP_TYPE_BURST
#define PSR_FRAME_UP_TYPE_SINGLE
#define PSR_CRC_SEL_HARDWARE
#define PSR_CRC_SEL_MANUALLY

/* ANALOGIX_DP_LANE_MAP */
#define LANE3_MAP_LOGIC_LANE_0
#define LANE3_MAP_LOGIC_LANE_1
#define LANE3_MAP_LOGIC_LANE_2
#define LANE3_MAP_LOGIC_LANE_3
#define LANE2_MAP_LOGIC_LANE_0
#define LANE2_MAP_LOGIC_LANE_1
#define LANE2_MAP_LOGIC_LANE_2
#define LANE2_MAP_LOGIC_LANE_3
#define LANE1_MAP_LOGIC_LANE_0
#define LANE1_MAP_LOGIC_LANE_1
#define LANE1_MAP_LOGIC_LANE_2
#define LANE1_MAP_LOGIC_LANE_3
#define LANE0_MAP_LOGIC_LANE_0
#define LANE0_MAP_LOGIC_LANE_1
#define LANE0_MAP_LOGIC_LANE_2
#define LANE0_MAP_LOGIC_LANE_3

/* ANALOGIX_DP_ANALOG_CTL_1 */
#define TX_TERMINAL_CTRL_50_OHM

/* ANALOGIX_DP_ANALOG_CTL_2 */
#define SEL_24M
#define TX_DVDD_BIT_1_0625V

/* ANALOGIX_DP_ANALOG_CTL_3 */
#define DRIVE_DVDD_BIT_1_0625V
#define VCO_BIT_600_MICRO

/* ANALOGIX_DP_PLL_FILTER_CTL_1 */
#define PD_RING_OSC
#define AUX_TERMINAL_CTRL_50_OHM
#define TX_CUR1_2X
#define TX_CUR_16_MA

/* ANALOGIX_DP_TX_AMP_TUNING_CTL */
#define CH3_AMP_400_MV
#define CH2_AMP_400_MV
#define CH1_AMP_400_MV
#define CH0_AMP_400_MV

/* ANALOGIX_DP_AUX_HW_RETRY_CTL */
#define AUX_BIT_PERIOD_EXPECTED_DELAY(x)
#define AUX_HW_RETRY_INTERVAL_MASK
#define AUX_HW_RETRY_INTERVAL_600_MICROSECONDS
#define AUX_HW_RETRY_INTERVAL_800_MICROSECONDS
#define AUX_HW_RETRY_INTERVAL_1000_MICROSECONDS
#define AUX_HW_RETRY_INTERVAL_1800_MICROSECONDS
#define AUX_HW_RETRY_COUNT_SEL(x)

/* ANALOGIX_DP_COMMON_INT_STA_1 */
#define VSYNC_DET
#define PLL_LOCK_CHG
#define SPDIF_ERR
#define SPDIF_UNSTBL
#define VID_FORMAT_CHG
#define AUD_CLK_CHG
#define VID_CLK_CHG
#define SW_INT

/* ANALOGIX_DP_COMMON_INT_STA_2 */
#define ENC_EN_CHG
#define HW_BKSV_RDY
#define HW_SHA_DONE
#define HW_AUTH_STATE_CHG
#define HW_AUTH_DONE

/* ANALOGIX_DP_COMMON_INT_STA_3 */
#define AFIFO_UNDER
#define AFIFO_OVER
#define R0_CHK_FLAG

/* ANALOGIX_DP_COMMON_INT_STA_4 */
#define PSR_ACTIVE
#define PSR_INACTIVE
#define SPDIF_BI_PHASE_ERR
#define HOTPLUG_CHG
#define HPD_LOST
#define PLUG

/* ANALOGIX_DP_INT_STA */
#define INT_HPD
#define HW_TRAINING_FINISH
#define RPLY_RECEIV
#define AUX_ERR

/* ANALOGIX_DP_INT_CTL */
#define SOFT_INT_CTRL
#define INT_POL1
#define INT_POL0

/* ANALOGIX_DP_SYS_CTL_1 */
#define DET_STA
#define FORCE_DET
#define DET_CTRL

/* ANALOGIX_DP_SYS_CTL_2 */
#define CHA_CRI(x)
#define CHA_STA
#define FORCE_CHA
#define CHA_CTRL

/* ANALOGIX_DP_SYS_CTL_3 */
#define HPD_STATUS
#define F_HPD
#define HPD_CTRL
#define HDCP_RDY
#define STRM_VALID
#define F_VALID
#define VALID_CTRL

/* ANALOGIX_DP_SYS_CTL_4 */
#define FIX_M_AUD
#define ENHANCED
#define FIX_M_VID
#define M_VID_UPDATE_CTRL

/* ANALOGIX_DP_TRAINING_PTN_SET */
#define SCRAMBLER_TYPE
#define HW_LINK_TRAINING_PATTERN
#define SCRAMBLING_DISABLE
#define SCRAMBLING_ENABLE
#define LINK_QUAL_PATTERN_SET_MASK
#define LINK_QUAL_PATTERN_SET_PRBS7
#define LINK_QUAL_PATTERN_SET_D10_2
#define LINK_QUAL_PATTERN_SET_DISABLE
#define SW_TRAINING_PATTERN_SET_MASK
#define SW_TRAINING_PATTERN_SET_PTN2
#define SW_TRAINING_PATTERN_SET_PTN1
#define SW_TRAINING_PATTERN_SET_NORMAL

/* ANALOGIX_DP_LN0_LINK_TRAINING_CTL */
#define PRE_EMPHASIS_SET_MASK
#define PRE_EMPHASIS_SET_SHIFT

/* ANALOGIX_DP_DEBUG_CTL */
#define PLL_LOCK
#define F_PLL_LOCK
#define PLL_LOCK_CTRL
#define PN_INV

/* ANALOGIX_DP_PLL_CTL */
#define DP_PLL_PD
#define DP_PLL_RESET
#define DP_PLL_LOOP_BIT_DEFAULT
#define DP_PLL_REF_BIT_1_1250V
#define DP_PLL_REF_BIT_1_2500V

/* ANALOGIX_DP_PHY_PD */
#define DP_INC_BG
#define DP_EXP_BG
#define DP_PHY_PD
#define RK_AUX_PD
#define AUX_PD
#define RK_PLL_PD
#define CH3_PD
#define CH2_PD
#define CH1_PD
#define CH0_PD
#define DP_ALL_PD

/* ANALOGIX_DP_PHY_TEST */
#define MACRO_RST
#define CH1_TEST
#define CH0_TEST

/* ANALOGIX_DP_AUX_CH_STA */
#define AUX_BUSY
#define AUX_STATUS_MASK
#define AUX_STATUS_OK
#define AUX_STATUS_NACK_ERROR
#define AUX_STATUS_TIMEOUT_ERROR
#define AUX_STATUS_UNKNOWN_ERROR
#define AUX_STATUS_MUCH_DEFER_ERROR
#define AUX_STATUS_TX_SHORT_ERROR
#define AUX_STATUS_RX_SHORT_ERROR
#define AUX_STATUS_NACK_WITHOUT_M_ERROR
#define AUX_STATUS_I2C_NACK_ERROR

/* ANALOGIX_DP_AUX_CH_DEFER_CTL */
#define DEFER_CTRL_EN
#define DEFER_COUNT(x)

/* ANALOGIX_DP_AUX_RX_COMM */
#define AUX_RX_COMM_I2C_DEFER
#define AUX_RX_COMM_AUX_DEFER

/* ANALOGIX_DP_BUFFER_DATA_CTL */
#define BUF_CLR
#define BUF_DATA_COUNT(x)

/* ANALOGIX_DP_AUX_CH_CTL_1 */
#define AUX_LENGTH(x)
#define AUX_TX_COMM_MASK
#define AUX_TX_COMM_DP_TRANSACTION
#define AUX_TX_COMM_I2C_TRANSACTION
#define AUX_TX_COMM_MOT
#define AUX_TX_COMM_WRITE
#define AUX_TX_COMM_READ

/* ANALOGIX_DP_AUX_ADDR_7_0 */
#define AUX_ADDR_7_0(x)

/* ANALOGIX_DP_AUX_ADDR_15_8 */
#define AUX_ADDR_15_8(x)

/* ANALOGIX_DP_AUX_ADDR_19_16 */
#define AUX_ADDR_19_16(x)

/* ANALOGIX_DP_AUX_CH_CTL_2 */
#define ADDR_ONLY
#define AUX_EN

/* ANALOGIX_DP_SOC_GENERAL_CTL */
#define AUDIO_MODE_SPDIF_MODE
#define AUDIO_MODE_MASTER_MODE
#define MASTER_VIDEO_INTERLACE_EN
#define VIDEO_MASTER_CLK_SEL
#define VIDEO_MASTER_MODE_EN
#define VIDEO_MODE_MASK
#define VIDEO_MODE_SLAVE_MODE
#define VIDEO_MODE_MASTER_MODE

/* ANALOGIX_DP_PKT_SEND_CTL */
#define IF_UP
#define IF_EN

/* ANALOGIX_DP_CRC_CON */
#define PSR_VID_CRC_FLUSH
#define PSR_VID_CRC_ENABLE

#endif /* _ANALOGIX_DP_REG_H */