0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef _ZYNQMP_DISP_REGS_H_
0013 #define _ZYNQMP_DISP_REGS_H_
0014
0015 #include <linux/bits.h>
0016
0017
0018 #define ZYNQMP_DISP_V_BLEND_BG_CLR_0 0x0
0019 #define ZYNQMP_DISP_V_BLEND_BG_CLR_1 0x4
0020 #define ZYNQMP_DISP_V_BLEND_BG_CLR_2 0x8
0021 #define ZYNQMP_DISP_V_BLEND_BG_MAX 0xfff
0022 #define ZYNQMP_DISP_V_BLEND_SET_GLOBAL_ALPHA 0xc
0023 #define ZYNQMP_DISP_V_BLEND_SET_GLOBAL_ALPHA_VALUE(n) ((n) << 1)
0024 #define ZYNQMP_DISP_V_BLEND_SET_GLOBAL_ALPHA_EN BIT(0)
0025 #define ZYNQMP_DISP_V_BLEND_OUTPUT_VID_FMT 0x14
0026 #define ZYNQMP_DISP_V_BLEND_OUTPUT_VID_FMT_RGB 0x0
0027 #define ZYNQMP_DISP_V_BLEND_OUTPUT_VID_FMT_YCBCR444 0x1
0028 #define ZYNQMP_DISP_V_BLEND_OUTPUT_VID_FMT_YCBCR422 0x2
0029 #define ZYNQMP_DISP_V_BLEND_OUTPUT_VID_FMT_YONLY 0x3
0030 #define ZYNQMP_DISP_V_BLEND_OUTPUT_VID_FMT_XVYCC 0x4
0031 #define ZYNQMP_DISP_V_BLEND_OUTPUT_VID_FMT_EN_DOWNSAMPLE BIT(4)
0032 #define ZYNQMP_DISP_V_BLEND_LAYER_CONTROL(n) (0x18 + ((n) * 4))
0033 #define ZYNQMP_DISP_V_BLEND_LAYER_CONTROL_EN_US BIT(0)
0034 #define ZYNQMP_DISP_V_BLEND_LAYER_CONTROL_RGB BIT(1)
0035 #define ZYNQMP_DISP_V_BLEND_LAYER_CONTROL_BYPASS BIT(8)
0036 #define ZYNQMP_DISP_V_BLEND_NUM_COEFF 9
0037 #define ZYNQMP_DISP_V_BLEND_NUM_OFFSET 3
0038 #define ZYNQMP_DISP_V_BLEND_RGB2YCBCR_COEFF(n) (0x20 + ((n) * 4))
0039 #define ZYNQMP_DISP_V_BLEND_IN1CSC_COEFF(n) (0x44 + ((n) * 4))
0040 #define ZYNQMP_DISP_V_BLEND_IN1CSC_OFFSET(n) (0x68 + ((n) * 4))
0041 #define ZYNQMP_DISP_V_BLEND_OUTCSC_OFFSET(n) (0x74 + ((n) * 4))
0042 #define ZYNQMP_DISP_V_BLEND_IN2CSC_COEFF(n) (0x80 + ((n) * 4))
0043 #define ZYNQMP_DISP_V_BLEND_IN2CSC_OFFSET(n) (0xa4 + ((n) * 4))
0044 #define ZYNQMP_DISP_V_BLEND_CHROMA_KEY_ENABLE 0x1d0
0045 #define ZYNQMP_DISP_V_BLEND_CHROMA_KEY_COMP1 0x1d4
0046 #define ZYNQMP_DISP_V_BLEND_CHROMA_KEY_COMP2 0x1d8
0047 #define ZYNQMP_DISP_V_BLEND_CHROMA_KEY_COMP3 0x1dc
0048
0049
0050 #define ZYNQMP_DISP_AV_BUF_FMT 0x0
0051 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_SHIFT 0
0052 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_MASK (0x1f << 0)
0053 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_UYVY (0 << 0)
0054 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_VYUY (1 << 0)
0055 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_YVYU (2 << 0)
0056 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_YUYV (3 << 0)
0057 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_YV16 (4 << 0)
0058 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_YV24 (5 << 0)
0059 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_YV16CI (6 << 0)
0060 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_MONO (7 << 0)
0061 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_YV16CI2 (8 << 0)
0062 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_YUV444 (9 << 0)
0063 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_RGB888 (10 << 0)
0064 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_RGBA8880 (11 << 0)
0065 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_RGB888_10 (12 << 0)
0066 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_YUV444_10 (13 << 0)
0067 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_YV16CI2_10 (14 << 0)
0068 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_YV16CI_10 (15 << 0)
0069 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_YV16_10 (16 << 0)
0070 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_YV24_10 (17 << 0)
0071 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_YONLY_10 (18 << 0)
0072 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_YV16_420 (19 << 0)
0073 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_YV16CI_420 (20 << 0)
0074 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_YV16CI2_420 (21 << 0)
0075 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_YV16_420_10 (22 << 0)
0076 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_YV16CI_420_10 (23 << 0)
0077 #define ZYNQMP_DISP_AV_BUF_FMT_NL_VID_YV16CI2_420_10 (24 << 0)
0078 #define ZYNQMP_DISP_AV_BUF_FMT_NL_GFX_SHIFT 8
0079 #define ZYNQMP_DISP_AV_BUF_FMT_NL_GFX_MASK (0xf << 8)
0080 #define ZYNQMP_DISP_AV_BUF_FMT_NL_GFX_RGBA8888 (0 << 8)
0081 #define ZYNQMP_DISP_AV_BUF_FMT_NL_GFX_ABGR8888 (1 << 8)
0082 #define ZYNQMP_DISP_AV_BUF_FMT_NL_GFX_RGB888 (2 << 8)
0083 #define ZYNQMP_DISP_AV_BUF_FMT_NL_GFX_BGR888 (3 << 8)
0084 #define ZYNQMP_DISP_AV_BUF_FMT_NL_GFX_RGBA5551 (4 << 8)
0085 #define ZYNQMP_DISP_AV_BUF_FMT_NL_GFX_RGBA4444 (5 << 8)
0086 #define ZYNQMP_DISP_AV_BUF_FMT_NL_GFX_RGB565 (6 << 8)
0087 #define ZYNQMP_DISP_AV_BUF_FMT_NL_GFX_8BPP (7 << 8)
0088 #define ZYNQMP_DISP_AV_BUF_FMT_NL_GFX_4BPP (8 << 8)
0089 #define ZYNQMP_DISP_AV_BUF_FMT_NL_GFX_2BPP (9 << 8)
0090 #define ZYNQMP_DISP_AV_BUF_FMT_NL_GFX_1BPP (10 << 8)
0091 #define ZYNQMP_DISP_AV_BUF_NON_LIVE_LATENCY 0x8
0092 #define ZYNQMP_DISP_AV_BUF_CHBUF(n) (0x10 + ((n) * 4))
0093 #define ZYNQMP_DISP_AV_BUF_CHBUF_EN BIT(0)
0094 #define ZYNQMP_DISP_AV_BUF_CHBUF_FLUSH BIT(1)
0095 #define ZYNQMP_DISP_AV_BUF_CHBUF_BURST_LEN_SHIFT 2
0096 #define ZYNQMP_DISP_AV_BUF_CHBUF_BURST_LEN_MASK (0xf << 2)
0097 #define ZYNQMP_DISP_AV_BUF_CHBUF_BURST_LEN_MAX 0xf
0098 #define ZYNQMP_DISP_AV_BUF_CHBUF_BURST_LEN_AUD_MAX 0x3
0099 #define ZYNQMP_DISP_AV_BUF_STATUS 0x28
0100 #define ZYNQMP_DISP_AV_BUF_STC_CTRL 0x2c
0101 #define ZYNQMP_DISP_AV_BUF_STC_CTRL_EN BIT(0)
0102 #define ZYNQMP_DISP_AV_BUF_STC_CTRL_EVENT_SHIFT 1
0103 #define ZYNQMP_DISP_AV_BUF_STC_CTRL_EVENT_EX_VSYNC 0
0104 #define ZYNQMP_DISP_AV_BUF_STC_CTRL_EVENT_EX_VID 1
0105 #define ZYNQMP_DISP_AV_BUF_STC_CTRL_EVENT_EX_AUD 2
0106 #define ZYNQMP_DISP_AV_BUF_STC_CTRL_EVENT_INT_VSYNC 3
0107 #define ZYNQMP_DISP_AV_BUF_STC_INIT_VALUE0 0x30
0108 #define ZYNQMP_DISP_AV_BUF_STC_INIT_VALUE1 0x34
0109 #define ZYNQMP_DISP_AV_BUF_STC_ADJ 0x38
0110 #define ZYNQMP_DISP_AV_BUF_STC_VID_VSYNC_TS0 0x3c
0111 #define ZYNQMP_DISP_AV_BUF_STC_VID_VSYNC_TS1 0x40
0112 #define ZYNQMP_DISP_AV_BUF_STC_EXT_VSYNC_TS0 0x44
0113 #define ZYNQMP_DISP_AV_BUF_STC_EXT_VSYNC_TS1 0x48
0114 #define ZYNQMP_DISP_AV_BUF_STC_CUSTOM_EVENT_TS0 0x4c
0115 #define ZYNQMP_DISP_AV_BUF_STC_CUSTOM_EVENT_TS1 0x50
0116 #define ZYNQMP_DISP_AV_BUF_STC_CUSTOM_EVENT2_TS0 0x54
0117 #define ZYNQMP_DISP_AV_BUF_STC_CUSTOM_EVENT2_TS1 0x58
0118 #define ZYNQMP_DISP_AV_BUF_STC_SNAPSHOT0 0x60
0119 #define ZYNQMP_DISP_AV_BUF_STC_SNAPSHOT1 0x64
0120 #define ZYNQMP_DISP_AV_BUF_OUTPUT 0x70
0121 #define ZYNQMP_DISP_AV_BUF_OUTPUT_VID1_SHIFT 0
0122 #define ZYNQMP_DISP_AV_BUF_OUTPUT_VID1_MASK (0x3 << 0)
0123 #define ZYNQMP_DISP_AV_BUF_OUTPUT_VID1_LIVE (0 << 0)
0124 #define ZYNQMP_DISP_AV_BUF_OUTPUT_VID1_MEM (1 << 0)
0125 #define ZYNQMP_DISP_AV_BUF_OUTPUT_VID1_PATTERN (2 << 0)
0126 #define ZYNQMP_DISP_AV_BUF_OUTPUT_VID1_NONE (3 << 0)
0127 #define ZYNQMP_DISP_AV_BUF_OUTPUT_VID2_SHIFT 2
0128 #define ZYNQMP_DISP_AV_BUF_OUTPUT_VID2_MASK (0x3 << 2)
0129 #define ZYNQMP_DISP_AV_BUF_OUTPUT_VID2_DISABLE (0 << 2)
0130 #define ZYNQMP_DISP_AV_BUF_OUTPUT_VID2_MEM (1 << 2)
0131 #define ZYNQMP_DISP_AV_BUF_OUTPUT_VID2_LIVE (2 << 2)
0132 #define ZYNQMP_DISP_AV_BUF_OUTPUT_VID2_NONE (3 << 2)
0133 #define ZYNQMP_DISP_AV_BUF_OUTPUT_AUD1_SHIFT 4
0134 #define ZYNQMP_DISP_AV_BUF_OUTPUT_AUD1_MASK (0x3 << 4)
0135 #define ZYNQMP_DISP_AV_BUF_OUTPUT_AUD1_PL (0 << 4)
0136 #define ZYNQMP_DISP_AV_BUF_OUTPUT_AUD1_MEM (1 << 4)
0137 #define ZYNQMP_DISP_AV_BUF_OUTPUT_AUD1_PATTERN (2 << 4)
0138 #define ZYNQMP_DISP_AV_BUF_OUTPUT_AUD1_DISABLE (3 << 4)
0139 #define ZYNQMP_DISP_AV_BUF_OUTPUT_AUD2_EN BIT(6)
0140 #define ZYNQMP_DISP_AV_BUF_HCOUNT_VCOUNT_INT0 0x74
0141 #define ZYNQMP_DISP_AV_BUF_HCOUNT_VCOUNT_INT1 0x78
0142 #define ZYNQMP_DISP_AV_BUF_PATTERN_GEN_SELECT 0x100
0143 #define ZYNQMP_DISP_AV_BUF_CLK_SRC 0x120
0144 #define ZYNQMP_DISP_AV_BUF_CLK_SRC_VID_FROM_PS BIT(0)
0145 #define ZYNQMP_DISP_AV_BUF_CLK_SRC_AUD_FROM_PS BIT(1)
0146 #define ZYNQMP_DISP_AV_BUF_CLK_SRC_VID_INTERNAL_TIMING BIT(2)
0147 #define ZYNQMP_DISP_AV_BUF_SRST_REG 0x124
0148 #define ZYNQMP_DISP_AV_BUF_SRST_REG_VID_RST BIT(1)
0149 #define ZYNQMP_DISP_AV_BUF_AUDIO_CH_CONFIG 0x12c
0150 #define ZYNQMP_DISP_AV_BUF_GFX_COMP_SF(n) (0x200 + ((n) * 4))
0151 #define ZYNQMP_DISP_AV_BUF_VID_COMP_SF(n) (0x20c + ((n) * 4))
0152 #define ZYNQMP_DISP_AV_BUF_LIVD_VID_COMP_SF(n) (0x218 + ((n) * 4))
0153 #define ZYNQMP_DISP_AV_BUF_LIVE_VID_CONFIG 0x224
0154 #define ZYNQMP_DISP_AV_BUF_LIVD_GFX_COMP_SF(n) (0x228 + ((n) * 4))
0155 #define ZYNQMP_DISP_AV_BUF_LIVE_GFX_CONFIG 0x234
0156 #define ZYNQMP_DISP_AV_BUF_4BIT_SF 0x11111
0157 #define ZYNQMP_DISP_AV_BUF_5BIT_SF 0x10842
0158 #define ZYNQMP_DISP_AV_BUF_6BIT_SF 0x10410
0159 #define ZYNQMP_DISP_AV_BUF_8BIT_SF 0x10101
0160 #define ZYNQMP_DISP_AV_BUF_10BIT_SF 0x10040
0161 #define ZYNQMP_DISP_AV_BUF_NULL_SF 0
0162 #define ZYNQMP_DISP_AV_BUF_NUM_SF 3
0163 #define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_BPC_6 0x0
0164 #define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_BPC_8 0x1
0165 #define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_BPC_10 0x2
0166 #define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_BPC_12 0x3
0167 #define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_BPC_MASK GENMASK(2, 0)
0168 #define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_FMT_RGB 0x0
0169 #define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_FMT_YUV444 0x1
0170 #define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_FMT_YUV422 0x2
0171 #define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_FMT_YONLY 0x3
0172 #define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_FMT_MASK GENMASK(5, 4)
0173 #define ZYNQMP_DISP_AV_BUF_LIVE_CONFIG_CB_FIRST BIT(8)
0174 #define ZYNQMP_DISP_AV_BUF_PALETTE_MEMORY 0x400
0175
0176
0177 #define ZYNQMP_DISP_AUD_MIXER_VOLUME 0x0
0178 #define ZYNQMP_DISP_AUD_MIXER_VOLUME_NO_SCALE 0x20002000
0179 #define ZYNQMP_DISP_AUD_MIXER_META_DATA 0x4
0180 #define ZYNQMP_DISP_AUD_CH_STATUS0 0x8
0181 #define ZYNQMP_DISP_AUD_CH_STATUS1 0xc
0182 #define ZYNQMP_DISP_AUD_CH_STATUS2 0x10
0183 #define ZYNQMP_DISP_AUD_CH_STATUS3 0x14
0184 #define ZYNQMP_DISP_AUD_CH_STATUS4 0x18
0185 #define ZYNQMP_DISP_AUD_CH_STATUS5 0x1c
0186 #define ZYNQMP_DISP_AUD_CH_A_DATA0 0x20
0187 #define ZYNQMP_DISP_AUD_CH_A_DATA1 0x24
0188 #define ZYNQMP_DISP_AUD_CH_A_DATA2 0x28
0189 #define ZYNQMP_DISP_AUD_CH_A_DATA3 0x2c
0190 #define ZYNQMP_DISP_AUD_CH_A_DATA4 0x30
0191 #define ZYNQMP_DISP_AUD_CH_A_DATA5 0x34
0192 #define ZYNQMP_DISP_AUD_CH_B_DATA0 0x38
0193 #define ZYNQMP_DISP_AUD_CH_B_DATA1 0x3c
0194 #define ZYNQMP_DISP_AUD_CH_B_DATA2 0x40
0195 #define ZYNQMP_DISP_AUD_CH_B_DATA3 0x44
0196 #define ZYNQMP_DISP_AUD_CH_B_DATA4 0x48
0197 #define ZYNQMP_DISP_AUD_CH_B_DATA5 0x4c
0198 #define ZYNQMP_DISP_AUD_SOFT_RESET 0xc00
0199 #define ZYNQMP_DISP_AUD_SOFT_RESET_AUD_SRST BIT(0)
0200
0201 #endif