0001
0002
0003
0004
0005
0006 #ifndef __ANX78xx_H
0007 #define __ANX78xx_H
0008
0009 #include "analogix-i2c-dptx.h"
0010 #include "analogix-i2c-txcommon.h"
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #define SP_SOFTWARE_RESET1_REG 0x11
0022 #define SP_VIDEO_RST BIT(4)
0023 #define SP_HDCP_MAN_RST BIT(2)
0024 #define SP_TMDS_RST BIT(1)
0025 #define SP_SW_MAN_RST BIT(0)
0026
0027
0028 #define SP_SYSTEM_STATUS_REG 0x14
0029 #define SP_TMDS_CLOCK_DET BIT(1)
0030 #define SP_TMDS_DE_DET BIT(0)
0031
0032
0033 #define SP_HDMI_STATUS_REG 0x15
0034 #define SP_HDMI_AUD_LAYOUT BIT(3)
0035 #define SP_HDMI_DET BIT(0)
0036 # define SP_DVI_MODE 0
0037 # define SP_HDMI_MODE 1
0038
0039
0040 #define SP_HDMI_MUTE_CTRL_REG 0x16
0041 #define SP_AUD_MUTE BIT(1)
0042 #define SP_VID_MUTE BIT(0)
0043
0044
0045 #define SP_SYSTEM_POWER_DOWN1_REG 0x18
0046 #define SP_PWDN_CTRL BIT(0)
0047
0048
0049
0050
0051
0052
0053 #define SP_AUDVID_CTRL_REG 0x20
0054 #define SP_AVC_OE BIT(7)
0055 #define SP_AAC_OE BIT(6)
0056 #define SP_AVC_EN BIT(1)
0057 #define SP_AAC_EN BIT(0)
0058
0059
0060 #define SP_AUD_EXCEPTION_ENABLE_BASE (0x24 - 1)
0061
0062 #define SP_AEC_EN21 BIT(5)
0063
0064
0065
0066
0067
0068
0069 #define SP_INT_STATUS1_REG 0x31
0070
0071 #define SP_HDMI_DVI BIT(7)
0072 #define SP_CKDT_CHG BIT(6)
0073 #define SP_SCDT_CHG BIT(5)
0074 #define SP_PCLK_CHG BIT(4)
0075 #define SP_PLL_UNLOCK BIT(3)
0076 #define SP_CABLE_PLUG_CHG BIT(2)
0077 #define SP_SET_MUTE BIT(1)
0078 #define SP_SW_INTR BIT(0)
0079
0080 #define SP_HDCP_ERR BIT(5)
0081 #define SP_AUDIO_SAMPLE_CHG BIT(0)
0082
0083 #define SP_AUD_MODE_CHG BIT(0)
0084
0085 #define SP_AUDIO_RCV BIT(0)
0086
0087 #define SP_INT_STATUS6_REG 0x36
0088 #define SP_CTS_RCV BIT(7)
0089 #define SP_NEW_AUD_PKT BIT(4)
0090 #define SP_NEW_AVI_PKT BIT(1)
0091 #define SP_NEW_CP_PKT BIT(0)
0092
0093 #define SP_NO_VSI BIT(7)
0094 #define SP_NEW_VS BIT(4)
0095
0096
0097 #define SP_INT_MASK1_REG 0x41
0098
0099
0100 #define SP_HDMI_US_TIMER_CTRL_REG 0x49
0101 #define SP_MS_TIMER_MARGIN_10_8_MASK 0x07
0102
0103
0104
0105
0106
0107
0108 #define SP_TMDS_CTRL_BASE (0x50 - 1)
0109
0110 #define SP_PD_RT BIT(0)
0111
0112
0113
0114
0115
0116
0117 #define SP_VIDEO_STATUS_REG 0x70
0118 #define SP_COLOR_DEPTH_MASK 0xf0
0119 #define SP_COLOR_DEPTH_SHIFT 4
0120 # define SP_COLOR_DEPTH_MODE_LEGACY 0x00
0121 # define SP_COLOR_DEPTH_MODE_24BIT 0x04
0122 # define SP_COLOR_DEPTH_MODE_30BIT 0x05
0123 # define SP_COLOR_DEPTH_MODE_36BIT 0x06
0124 # define SP_COLOR_DEPTH_MODE_48BIT 0x07
0125
0126
0127 #define SP_VID_DATA_RANGE_CTRL_REG 0x83
0128 #define SP_R2Y_INPUT_LIMIT BIT(1)
0129
0130
0131 #define SP_PCLK_HIGHRES_CNT_BASE (0x8c - 1)
0132
0133
0134
0135
0136
0137
0138 #define SP_AUD_CH_STATUS_REG_NUM 6
0139
0140
0141 #define SP_AUD_SPDIF_CH_STATUS_BASE 0xc7
0142
0143
0144 #define SP_FS_FREQ_MASK 0x0f
0145 # define SP_FS_FREQ_44100HZ 0x00
0146 # define SP_FS_FREQ_48000HZ 0x02
0147 # define SP_FS_FREQ_32000HZ 0x03
0148 # define SP_FS_FREQ_88200HZ 0x08
0149 # define SP_FS_FREQ_96000HZ 0x0a
0150 # define SP_FS_FREQ_176400HZ 0x0c
0151 # define SP_FS_FREQ_192000HZ 0x0e
0152
0153
0154
0155
0156
0157
0158 #define SP_CHIP_CTRL_REG 0xe3
0159 #define SP_MAN_HDMI5V_DET BIT(3)
0160 #define SP_PLLLOCK_CKDT_EN BIT(2)
0161 #define SP_ANALOG_CKDT_EN BIT(1)
0162 #define SP_DIGITAL_CKDT_EN BIT(0)
0163
0164
0165 #define SP_PACKET_RECEIVING_STATUS_REG 0xf3
0166 #define SP_AVI_RCVD BIT(5)
0167 #define SP_VSI_RCVD BIT(1)
0168
0169
0170
0171
0172
0173
0174 #define SP_HDCP_BCAPS_SHADOW_REG 0x2a
0175 #define SP_BCAPS_REPEATER BIT(5)
0176
0177
0178 #define SP_RX_HDCP_STATUS_REG 0x3f
0179 #define SP_AUTH_EN BIT(4)
0180
0181
0182
0183
0184
0185
0186 #define SP_AVI_INFOFRAME_CHECKSUM 0xa3
0187
0188
0189 #define SP_AVI_INFOFRAME_DATA_BASE 0xa4
0190
0191 #define SP_AVI_COLOR_F_MASK 0x60
0192 #define SP_AVI_COLOR_F_SHIFT 5
0193
0194
0195 #define SP_AUD_INFOFRAME_DATA_BASE 0xc4
0196 #define SP_AUD_INFOFRAME_LAYOUT_MASK 0x0f
0197
0198
0199 #define SP_MPEG_VS_INFOFRAME_TYPE_REG 0xe0
0200
0201
0202 #define SP_MPEG_VS_INFOFRAME_LEN_REG 0xe2
0203
0204
0205 #define SP_MPEG_VS_INFOFRAME_VER_REG 0xe1
0206
0207
0208 #define SP_MPEG_VS_INFOFRAME_DATA_BASE 0xe4
0209
0210
0211 #define SP_GENERAL_CTRL_PACKET_REG 0x9f
0212 #define SP_CLEAR_AVMUTE BIT(4)
0213 #define SP_SET_AVMUTE BIT(0)
0214
0215
0216
0217
0218
0219
0220 #define SP_DP_TX_LT_CTRL0_REG 0x30
0221
0222
0223 #define SP_DP_LT_80BIT_PATTERN0_REG 0x80
0224 #define SP_DP_LT_80BIT_PATTERN_REG_NUM 10
0225
0226
0227 #define SP_AUD_INTERFACE_CTRL0_REG 0x5f
0228 #define SP_AUD_INTERFACE_DISABLE 0x80
0229
0230
0231 #define SP_AUD_INTERFACE_CTRL2_REG 0x60
0232 #define SP_M_AUD_ADJUST_ST 0x04
0233
0234
0235 #define SP_AUD_INTERFACE_CTRL3_REG 0x62
0236
0237
0238 #define SP_AUD_INTERFACE_CTRL4_REG 0x67
0239
0240
0241 #define SP_AUD_INTERFACE_CTRL5_REG 0x68
0242
0243
0244 #define SP_AUD_INTERFACE_CTRL6_REG 0x69
0245
0246
0247 #define SP_FW_VER_REG 0xb7
0248
0249 #endif