linux/drivers/gpu/drm/radeon/evergreen_reg.h

/*
 * Copyright 2010 Advanced Micro Devices, Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 * Authors: Alex Deucher
 */
#ifndef __EVERGREEN_REG_H__
#define __EVERGREEN_REG_H__

/* trinity */
#define TN_SMC_IND_INDEX_0
#define TN_SMC_IND_DATA_0

/* evergreen */
#define EVERGREEN_PIF_PHY0_INDEX
#define EVERGREEN_PIF_PHY0_DATA
#define EVERGREEN_PIF_PHY1_INDEX
#define EVERGREEN_PIF_PHY1_DATA
#define EVERGREEN_MM_INDEX_HI

#define EVERGREEN_VGA_MEMORY_BASE_ADDRESS
#define EVERGREEN_VGA_MEMORY_BASE_ADDRESS_HIGH
#define EVERGREEN_D3VGA_CONTROL
#define EVERGREEN_D4VGA_CONTROL
#define EVERGREEN_D5VGA_CONTROL
#define EVERGREEN_D6VGA_CONTROL

#define EVERGREEN_P1PLL_SS_CNTL
#define EVERGREEN_P2PLL_SS_CNTL
#define EVERGREEN_PxPLL_SS_EN

#define EVERGREEN_AUDIO_PLL1_MUL
#define EVERGREEN_AUDIO_PLL1_DIV
#define EVERGREEN_AUDIO_PLL1_UNK

#define EVERGREEN_CG_IND_ADDR
#define EVERGREEN_CG_IND_DATA

#define EVERGREEN_AUDIO_ENABLE
#define EVERGREEN_AUDIO_VENDOR_ID

/* GRPH blocks at 0x6800, 0x7400, 0x10000, 0x10c00, 0x11800, 0x12400 */
#define EVERGREEN_GRPH_ENABLE
#define EVERGREEN_GRPH_CONTROL
#define EVERGREEN_GRPH_DEPTH(x)
#define EVERGREEN_GRPH_DEPTH_8BPP
#define EVERGREEN_GRPH_DEPTH_16BPP
#define EVERGREEN_GRPH_DEPTH_32BPP
#define EVERGREEN_GRPH_NUM_BANKS(x)
#define EVERGREEN_ADDR_SURF_2_BANK
#define EVERGREEN_ADDR_SURF_4_BANK
#define EVERGREEN_ADDR_SURF_8_BANK
#define EVERGREEN_ADDR_SURF_16_BANK
#define EVERGREEN_GRPH_Z(x)
#define EVERGREEN_GRPH_BANK_WIDTH(x)
#define EVERGREEN_ADDR_SURF_BANK_WIDTH_1
#define EVERGREEN_ADDR_SURF_BANK_WIDTH_2
#define EVERGREEN_ADDR_SURF_BANK_WIDTH_4
#define EVERGREEN_ADDR_SURF_BANK_WIDTH_8
#define EVERGREEN_GRPH_FORMAT(x)
/* 8 BPP */
#define EVERGREEN_GRPH_FORMAT_INDEXED
/* 16 BPP */
#define EVERGREEN_GRPH_FORMAT_ARGB1555
#define EVERGREEN_GRPH_FORMAT_ARGB565
#define EVERGREEN_GRPH_FORMAT_ARGB4444
#define EVERGREEN_GRPH_FORMAT_AI88
#define EVERGREEN_GRPH_FORMAT_MONO16
#define EVERGREEN_GRPH_FORMAT_BGRA5551
/* 32 BPP */
#define EVERGREEN_GRPH_FORMAT_ARGB8888
#define EVERGREEN_GRPH_FORMAT_ARGB2101010
#define EVERGREEN_GRPH_FORMAT_32BPP_DIG
#define EVERGREEN_GRPH_FORMAT_8B_ARGB2101010
#define EVERGREEN_GRPH_FORMAT_BGRA1010102
#define EVERGREEN_GRPH_FORMAT_8B_BGRA1010102
#define EVERGREEN_GRPH_FORMAT_RGB111110
#define EVERGREEN_GRPH_FORMAT_BGR101111
#define EVERGREEN_GRPH_BANK_HEIGHT(x)
#define EVERGREEN_ADDR_SURF_BANK_HEIGHT_1
#define EVERGREEN_ADDR_SURF_BANK_HEIGHT_2
#define EVERGREEN_ADDR_SURF_BANK_HEIGHT_4
#define EVERGREEN_ADDR_SURF_BANK_HEIGHT_8
#define EVERGREEN_GRPH_TILE_SPLIT(x)
#define EVERGREEN_ADDR_SURF_TILE_SPLIT_64B
#define EVERGREEN_ADDR_SURF_TILE_SPLIT_128B
#define EVERGREEN_ADDR_SURF_TILE_SPLIT_256B
#define EVERGREEN_ADDR_SURF_TILE_SPLIT_512B
#define EVERGREEN_ADDR_SURF_TILE_SPLIT_1KB
#define EVERGREEN_ADDR_SURF_TILE_SPLIT_2KB
#define EVERGREEN_ADDR_SURF_TILE_SPLIT_4KB
#define EVERGREEN_GRPH_MACRO_TILE_ASPECT(x)
#define EVERGREEN_ADDR_SURF_MACRO_TILE_ASPECT_1
#define EVERGREEN_ADDR_SURF_MACRO_TILE_ASPECT_2
#define EVERGREEN_ADDR_SURF_MACRO_TILE_ASPECT_4
#define EVERGREEN_ADDR_SURF_MACRO_TILE_ASPECT_8
#define EVERGREEN_GRPH_ARRAY_MODE(x)
#define EVERGREEN_GRPH_ARRAY_LINEAR_GENERAL
#define EVERGREEN_GRPH_ARRAY_LINEAR_ALIGNED
#define EVERGREEN_GRPH_ARRAY_1D_TILED_THIN1
#define EVERGREEN_GRPH_ARRAY_2D_TILED_THIN1
#define EVERGREEN_GRPH_LUT_10BIT_BYPASS_CONTROL
#define EVERGREEN_LUT_10BIT_BYPASS_EN
#define EVERGREEN_GRPH_SWAP_CONTROL
#define EVERGREEN_GRPH_ENDIAN_SWAP(x)
#define EVERGREEN_GRPH_ENDIAN_NONE
#define EVERGREEN_GRPH_ENDIAN_8IN16
#define EVERGREEN_GRPH_ENDIAN_8IN32
#define EVERGREEN_GRPH_ENDIAN_8IN64
#define EVERGREEN_GRPH_RED_CROSSBAR(x)
#define EVERGREEN_GRPH_RED_SEL_R
#define EVERGREEN_GRPH_RED_SEL_G
#define EVERGREEN_GRPH_RED_SEL_B
#define EVERGREEN_GRPH_RED_SEL_A
#define EVERGREEN_GRPH_GREEN_CROSSBAR(x)
#define EVERGREEN_GRPH_GREEN_SEL_G
#define EVERGREEN_GRPH_GREEN_SEL_B
#define EVERGREEN_GRPH_GREEN_SEL_A
#define EVERGREEN_GRPH_GREEN_SEL_R
#define EVERGREEN_GRPH_BLUE_CROSSBAR(x)
#define EVERGREEN_GRPH_BLUE_SEL_B
#define EVERGREEN_GRPH_BLUE_SEL_A
#define EVERGREEN_GRPH_BLUE_SEL_R
#define EVERGREEN_GRPH_BLUE_SEL_G
#define EVERGREEN_GRPH_ALPHA_CROSSBAR(x)
#define EVERGREEN_GRPH_ALPHA_SEL_A
#define EVERGREEN_GRPH_ALPHA_SEL_R
#define EVERGREEN_GRPH_ALPHA_SEL_G
#define EVERGREEN_GRPH_ALPHA_SEL_B
#define EVERGREEN_GRPH_PRIMARY_SURFACE_ADDRESS
#define EVERGREEN_GRPH_SECONDARY_SURFACE_ADDRESS
#define EVERGREEN_GRPH_DFQ_ENABLE
#define EVERGREEN_GRPH_SURFACE_ADDRESS_MASK
#define EVERGREEN_GRPH_PITCH
#define EVERGREEN_GRPH_PRIMARY_SURFACE_ADDRESS_HIGH
#define EVERGREEN_GRPH_SECONDARY_SURFACE_ADDRESS_HIGH
#define EVERGREEN_GRPH_SURFACE_OFFSET_X
#define EVERGREEN_GRPH_SURFACE_OFFSET_Y
#define EVERGREEN_GRPH_X_START
#define EVERGREEN_GRPH_Y_START
#define EVERGREEN_GRPH_X_END
#define EVERGREEN_GRPH_Y_END
#define EVERGREEN_GRPH_UPDATE
#define EVERGREEN_GRPH_SURFACE_UPDATE_PENDING
#define EVERGREEN_GRPH_UPDATE_LOCK
#define EVERGREEN_GRPH_FLIP_CONTROL
#define EVERGREEN_GRPH_SURFACE_UPDATE_H_RETRACE_EN

/* CUR blocks at 0x6998, 0x7598, 0x10198, 0x10d98, 0x11998, 0x12598 */
#define EVERGREEN_CUR_CONTROL
#define EVERGREEN_CURSOR_EN
#define EVERGREEN_CURSOR_MODE(x)
#define EVERGREEN_CURSOR_MONO
#define EVERGREEN_CURSOR_24_1
#define EVERGREEN_CURSOR_24_8_PRE_MULT
#define EVERGREEN_CURSOR_24_8_UNPRE_MULT
#define EVERGREEN_CURSOR_2X_MAGNIFY
#define EVERGREEN_CURSOR_FORCE_MC_ON
#define EVERGREEN_CURSOR_URGENT_CONTROL(x)
#define EVERGREEN_CURSOR_URGENT_ALWAYS
#define EVERGREEN_CURSOR_URGENT_1_8
#define EVERGREEN_CURSOR_URGENT_1_4
#define EVERGREEN_CURSOR_URGENT_3_8
#define EVERGREEN_CURSOR_URGENT_1_2
#define EVERGREEN_CUR_SURFACE_ADDRESS
#define EVERGREEN_CUR_SURFACE_ADDRESS_MASK
#define EVERGREEN_CUR_SIZE
#define EVERGREEN_CUR_SURFACE_ADDRESS_HIGH
#define EVERGREEN_CUR_POSITION
#define EVERGREEN_CUR_HOT_SPOT
#define EVERGREEN_CUR_COLOR1
#define EVERGREEN_CUR_COLOR2
#define EVERGREEN_CUR_UPDATE
#define EVERGREEN_CURSOR_UPDATE_PENDING
#define EVERGREEN_CURSOR_UPDATE_TAKEN
#define EVERGREEN_CURSOR_UPDATE_LOCK
#define EVERGREEN_CURSOR_DISABLE_MULTIPLE_UPDATE

/* LUT blocks at 0x69e0, 0x75e0, 0x101e0, 0x10de0, 0x119e0, 0x125e0 */
#define EVERGREEN_DC_LUT_RW_MODE
#define EVERGREEN_DC_LUT_RW_INDEX
#define EVERGREEN_DC_LUT_SEQ_COLOR
#define EVERGREEN_DC_LUT_PWL_DATA
#define EVERGREEN_DC_LUT_30_COLOR
#define EVERGREEN_DC_LUT_VGA_ACCESS_ENABLE
#define EVERGREEN_DC_LUT_WRITE_EN_MASK
#define EVERGREEN_DC_LUT_AUTOFILL
#define EVERGREEN_DC_LUT_CONTROL
#define EVERGREEN_DC_LUT_BLACK_OFFSET_BLUE
#define EVERGREEN_DC_LUT_BLACK_OFFSET_GREEN
#define EVERGREEN_DC_LUT_BLACK_OFFSET_RED
#define EVERGREEN_DC_LUT_WHITE_OFFSET_BLUE
#define EVERGREEN_DC_LUT_WHITE_OFFSET_GREEN
#define EVERGREEN_DC_LUT_WHITE_OFFSET_RED

#define EVERGREEN_DATA_FORMAT
#define EVERGREEN_INTERLEAVE_EN
#define EVERGREEN_DESKTOP_HEIGHT
#define EVERGREEN_VLINE_START_END
#define EVERGREEN_VLINE_STATUS
#define EVERGREEN_VLINE_STAT

#define EVERGREEN_VIEWPORT_START
#define EVERGREEN_VIEWPORT_SIZE

/* display controller offsets used for crtc/cur/lut/grph/viewport/etc. */
#define EVERGREEN_CRTC0_REGISTER_OFFSET
#define EVERGREEN_CRTC1_REGISTER_OFFSET
#define EVERGREEN_CRTC2_REGISTER_OFFSET
#define EVERGREEN_CRTC3_REGISTER_OFFSET
#define EVERGREEN_CRTC4_REGISTER_OFFSET
#define EVERGREEN_CRTC5_REGISTER_OFFSET

/* CRTC blocks at 0x6df0, 0x79f0, 0x105f0, 0x111f0, 0x11df0, 0x129f0 */
#define EVERGREEN_CRTC_V_BLANK_START_END
#define EVERGREEN_CRTC_CONTROL
#define EVERGREEN_CRTC_MASTER_EN
#define EVERGREEN_CRTC_DISP_READ_REQUEST_DISABLE
#define EVERGREEN_CRTC_BLANK_CONTROL
#define EVERGREEN_CRTC_BLANK_DATA_EN
#define EVERGREEN_CRTC_STATUS
#define EVERGREEN_CRTC_V_BLANK
#define EVERGREEN_CRTC_STATUS_POSITION
#define EVERGREEN_CRTC_STATUS_HV_COUNT
#define EVERGREEN_CRTC_UPDATE_LOCK
#define EVERGREEN_MASTER_UPDATE_LOCK
#define EVERGREEN_MASTER_UPDATE_MODE

#define EVERGREEN_DC_GPIO_HPD_MASK
#define EVERGREEN_DC_GPIO_HPD_A
#define EVERGREEN_DC_GPIO_HPD_EN
#define EVERGREEN_DC_GPIO_HPD_Y

/* HDMI blocks at 0x7030, 0x7c30, 0x10830, 0x11430, 0x12030, 0x12c30 */
#define EVERGREEN_HDMI_BASE
/*DIG block*/
#define NI_DIG0_REGISTER_OFFSET
#define NI_DIG1_REGISTER_OFFSET
#define NI_DIG2_REGISTER_OFFSET
#define NI_DIG3_REGISTER_OFFSET
#define NI_DIG4_REGISTER_OFFSET
#define NI_DIG5_REGISTER_OFFSET


#define NI_DIG_FE_CNTL
#define NI_DIG_FE_CNTL_SOURCE_SELECT(x)
#define NI_DIG_FE_CNTL_SYMCLK_FE_ON


#define NI_DIG_BE_CNTL
#define NI_DIG_BE_CNTL_FE_SOURCE_SELECT(x)
#define NI_DIG_FE_CNTL_MODE(x)

#define NI_DIG_BE_EN_CNTL
#define NI_DIG_BE_EN_CNTL_ENABLE
#define NI_DIG_BE_EN_CNTL_SYMBCLK_ON
#define NI_DIG_BE_DPSST

/* Display Port block */
#define EVERGREEN_DP0_REGISTER_OFFSET
#define EVERGREEN_DP1_REGISTER_OFFSET
#define EVERGREEN_DP2_REGISTER_OFFSET
#define EVERGREEN_DP3_REGISTER_OFFSET
#define EVERGREEN_DP4_REGISTER_OFFSET
#define EVERGREEN_DP5_REGISTER_OFFSET


#define EVERGREEN_DP_VID_STREAM_CNTL
#define EVERGREEN_DP_VID_STREAM_CNTL_ENABLE
#define EVERGREEN_DP_VID_STREAM_STATUS
#define EVERGREEN_DP_STEER_FIFO
#define EVERGREEN_DP_STEER_FIFO_RESET
#define EVERGREEN_DP_SEC_CNTL
#define EVERGREEN_DP_SEC_STREAM_ENABLE
#define EVERGREEN_DP_SEC_ASP_ENABLE
#define EVERGREEN_DP_SEC_ATP_ENABLE
#define EVERGREEN_DP_SEC_AIP_ENABLE
#define EVERGREEN_DP_SEC_GSP_ENABLE
#define EVERGREEN_DP_SEC_AVI_ENABLE
#define EVERGREEN_DP_SEC_MPG_ENABLE
#define EVERGREEN_DP_SEC_TIMESTAMP
#define EVERGREEN_DP_SEC_TIMESTAMP_MODE(x)
#define EVERGREEN_DP_SEC_AUD_N
#define EVERGREEN_DP_SEC_N_BASE_MULTIPLE(x)
#define EVERGREEN_DP_SEC_SS_EN

/*DCIO_UNIPHY block*/
#define NI_DCIO_UNIPHY0_UNIPHY_TX_CONTROL1
#define NI_DCIO_UNIPHY1_UNIPHY_TX_CONTROL1
#define NI_DCIO_UNIPHY2_UNIPHY_TX_CONTROL1
#define NI_DCIO_UNIPHY3_UNIPHY_TX_CONTROL1
#define NI_DCIO_UNIPHY4_UNIPHY_TX_CONTROL1
#define NI_DCIO_UNIPHY5_UNIPHY_TX_CONTROL1

#define NI_DCIO_UNIPHY0_PLL_CONTROL1
#define NI_DCIO_UNIPHY0_PLL_CONTROL1_ENABLE

#endif