1bcc1c2a1SAlex Deucher /* 2bcc1c2a1SAlex Deucher * Copyright 2010 Advanced Micro Devices, Inc. 3bcc1c2a1SAlex Deucher * 4bcc1c2a1SAlex Deucher * Permission is hereby granted, free of charge, to any person obtaining a 5bcc1c2a1SAlex Deucher * copy of this software and associated documentation files (the "Software"), 6bcc1c2a1SAlex Deucher * to deal in the Software without restriction, including without limitation 7bcc1c2a1SAlex Deucher * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8bcc1c2a1SAlex Deucher * and/or sell copies of the Software, and to permit persons to whom the 9bcc1c2a1SAlex Deucher * Software is furnished to do so, subject to the following conditions: 10bcc1c2a1SAlex Deucher * 11bcc1c2a1SAlex Deucher * The above copyright notice and this permission notice shall be included in 12bcc1c2a1SAlex Deucher * all copies or substantial portions of the Software. 13bcc1c2a1SAlex Deucher * 14bcc1c2a1SAlex Deucher * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15bcc1c2a1SAlex Deucher * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16bcc1c2a1SAlex Deucher * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17bcc1c2a1SAlex Deucher * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18bcc1c2a1SAlex Deucher * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19bcc1c2a1SAlex Deucher * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20bcc1c2a1SAlex Deucher * OTHER DEALINGS IN THE SOFTWARE. 21bcc1c2a1SAlex Deucher * 22bcc1c2a1SAlex Deucher * Authors: Alex Deucher 23bcc1c2a1SAlex Deucher */ 24bcc1c2a1SAlex Deucher #ifndef __EVERGREEN_REG_H__ 25bcc1c2a1SAlex Deucher #define __EVERGREEN_REG_H__ 26bcc1c2a1SAlex Deucher 271d5d0c34SAlex Deucher /* trinity */ 281d5d0c34SAlex Deucher #define TN_SMC_IND_INDEX_0 0x200 291d5d0c34SAlex Deucher #define TN_SMC_IND_DATA_0 0x204 301d5d0c34SAlex Deucher 31bcc1c2a1SAlex Deucher /* evergreen */ 32792edd69SAlex Deucher #define EVERGREEN_PIF_PHY0_INDEX 0x8 33792edd69SAlex Deucher #define EVERGREEN_PIF_PHY0_DATA 0xc 34792edd69SAlex Deucher #define EVERGREEN_PIF_PHY1_INDEX 0x10 35792edd69SAlex Deucher #define EVERGREEN_PIF_PHY1_DATA 0x14 362014b569SChristian König #define EVERGREEN_MM_INDEX_HI 0x18 37792edd69SAlex Deucher 38bcc1c2a1SAlex Deucher #define EVERGREEN_VGA_MEMORY_BASE_ADDRESS 0x310 39bcc1c2a1SAlex Deucher #define EVERGREEN_VGA_MEMORY_BASE_ADDRESS_HIGH 0x324 40bcc1c2a1SAlex Deucher #define EVERGREEN_D3VGA_CONTROL 0x3e0 41bcc1c2a1SAlex Deucher #define EVERGREEN_D4VGA_CONTROL 0x3e4 42bcc1c2a1SAlex Deucher #define EVERGREEN_D5VGA_CONTROL 0x3e8 43bcc1c2a1SAlex Deucher #define EVERGREEN_D6VGA_CONTROL 0x3ec 44bcc1c2a1SAlex Deucher 45bcc1c2a1SAlex Deucher #define EVERGREEN_P1PLL_SS_CNTL 0x414 46bcc1c2a1SAlex Deucher #define EVERGREEN_P2PLL_SS_CNTL 0x454 47bcc1c2a1SAlex Deucher # define EVERGREEN_PxPLL_SS_EN (1 << 12) 4869d2ae57SRafał Miłecki 4969d2ae57SRafał Miłecki #define EVERGREEN_AUDIO_PLL1_MUL 0x5b0 5069d2ae57SRafał Miłecki #define EVERGREEN_AUDIO_PLL1_DIV 0x5b4 5169d2ae57SRafał Miłecki #define EVERGREEN_AUDIO_PLL1_UNK 0x5bc 5269d2ae57SRafał Miłecki 5346f9564aSAlex Deucher #define EVERGREEN_CG_IND_ADDR 0x8f8 5446f9564aSAlex Deucher #define EVERGREEN_CG_IND_DATA 0x8fc 5546f9564aSAlex Deucher 5669d2ae57SRafał Miłecki #define EVERGREEN_AUDIO_ENABLE 0x5e78 5769d2ae57SRafał Miłecki #define EVERGREEN_AUDIO_VENDOR_ID 0x5ec0 5869d2ae57SRafał Miłecki 59bcc1c2a1SAlex Deucher /* GRPH blocks at 0x6800, 0x7400, 0x10000, 0x10c00, 0x11800, 0x12400 */ 60bcc1c2a1SAlex Deucher #define EVERGREEN_GRPH_ENABLE 0x6800 61bcc1c2a1SAlex Deucher #define EVERGREEN_GRPH_CONTROL 0x6804 62bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_DEPTH(x) (((x) & 0x3) << 0) 63bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_DEPTH_8BPP 0 64bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_DEPTH_16BPP 1 65bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_DEPTH_32BPP 2 66392e3722SAlex Deucher # define EVERGREEN_GRPH_NUM_BANKS(x) (((x) & 0x3) << 2) 67392e3722SAlex Deucher # define EVERGREEN_ADDR_SURF_2_BANK 0 68392e3722SAlex Deucher # define EVERGREEN_ADDR_SURF_4_BANK 1 69392e3722SAlex Deucher # define EVERGREEN_ADDR_SURF_8_BANK 2 70392e3722SAlex Deucher # define EVERGREEN_ADDR_SURF_16_BANK 3 71392e3722SAlex Deucher # define EVERGREEN_GRPH_Z(x) (((x) & 0x3) << 4) 72392e3722SAlex Deucher # define EVERGREEN_GRPH_BANK_WIDTH(x) (((x) & 0x3) << 6) 73392e3722SAlex Deucher # define EVERGREEN_ADDR_SURF_BANK_WIDTH_1 0 74392e3722SAlex Deucher # define EVERGREEN_ADDR_SURF_BANK_WIDTH_2 1 75392e3722SAlex Deucher # define EVERGREEN_ADDR_SURF_BANK_WIDTH_4 2 76392e3722SAlex Deucher # define EVERGREEN_ADDR_SURF_BANK_WIDTH_8 3 77bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_FORMAT(x) (((x) & 0x7) << 8) 78bcc1c2a1SAlex Deucher /* 8 BPP */ 79bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_FORMAT_INDEXED 0 80bcc1c2a1SAlex Deucher /* 16 BPP */ 81bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_FORMAT_ARGB1555 0 82bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_FORMAT_ARGB565 1 83bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_FORMAT_ARGB4444 2 84bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_FORMAT_AI88 3 85bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_FORMAT_MONO16 4 86bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_FORMAT_BGRA5551 5 87bcc1c2a1SAlex Deucher /* 32 BPP */ 88bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_FORMAT_ARGB8888 0 89bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_FORMAT_ARGB2101010 1 90bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_FORMAT_32BPP_DIG 2 91bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_FORMAT_8B_ARGB2101010 3 92bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_FORMAT_BGRA1010102 4 93bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_FORMAT_8B_BGRA1010102 5 94bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_FORMAT_RGB111110 6 95bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_FORMAT_BGR101111 7 96392e3722SAlex Deucher # define EVERGREEN_GRPH_BANK_HEIGHT(x) (((x) & 0x3) << 11) 97392e3722SAlex Deucher # define EVERGREEN_ADDR_SURF_BANK_HEIGHT_1 0 98392e3722SAlex Deucher # define EVERGREEN_ADDR_SURF_BANK_HEIGHT_2 1 99392e3722SAlex Deucher # define EVERGREEN_ADDR_SURF_BANK_HEIGHT_4 2 100392e3722SAlex Deucher # define EVERGREEN_ADDR_SURF_BANK_HEIGHT_8 3 101392e3722SAlex Deucher # define EVERGREEN_GRPH_TILE_SPLIT(x) (((x) & 0x7) << 13) 102392e3722SAlex Deucher # define EVERGREEN_ADDR_SURF_TILE_SPLIT_64B 0 103392e3722SAlex Deucher # define EVERGREEN_ADDR_SURF_TILE_SPLIT_128B 1 104392e3722SAlex Deucher # define EVERGREEN_ADDR_SURF_TILE_SPLIT_256B 2 105392e3722SAlex Deucher # define EVERGREEN_ADDR_SURF_TILE_SPLIT_512B 3 106392e3722SAlex Deucher # define EVERGREEN_ADDR_SURF_TILE_SPLIT_1KB 4 107392e3722SAlex Deucher # define EVERGREEN_ADDR_SURF_TILE_SPLIT_2KB 5 108392e3722SAlex Deucher # define EVERGREEN_ADDR_SURF_TILE_SPLIT_4KB 6 109392e3722SAlex Deucher # define EVERGREEN_GRPH_MACRO_TILE_ASPECT(x) (((x) & 0x3) << 18) 110392e3722SAlex Deucher # define EVERGREEN_ADDR_SURF_MACRO_TILE_ASPECT_1 0 111392e3722SAlex Deucher # define EVERGREEN_ADDR_SURF_MACRO_TILE_ASPECT_2 1 112392e3722SAlex Deucher # define EVERGREEN_ADDR_SURF_MACRO_TILE_ASPECT_4 2 113392e3722SAlex Deucher # define EVERGREEN_ADDR_SURF_MACRO_TILE_ASPECT_8 3 11497d66328SAlex Deucher # define EVERGREEN_GRPH_ARRAY_MODE(x) (((x) & 0x7) << 20) 11597d66328SAlex Deucher # define EVERGREEN_GRPH_ARRAY_LINEAR_GENERAL 0 11697d66328SAlex Deucher # define EVERGREEN_GRPH_ARRAY_LINEAR_ALIGNED 1 11797d66328SAlex Deucher # define EVERGREEN_GRPH_ARRAY_1D_TILED_THIN1 2 11897d66328SAlex Deucher # define EVERGREEN_GRPH_ARRAY_2D_TILED_THIN1 4 1194366f3b5SMario Kleiner #define EVERGREEN_GRPH_LUT_10BIT_BYPASS_CONTROL 0x6808 1204366f3b5SMario Kleiner # define EVERGREEN_LUT_10BIT_BYPASS_EN (1 << 8) 121bcc1c2a1SAlex Deucher #define EVERGREEN_GRPH_SWAP_CONTROL 0x680c 122bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_ENDIAN_SWAP(x) (((x) & 0x3) << 0) 123bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_ENDIAN_NONE 0 124bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_ENDIAN_8IN16 1 125bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_ENDIAN_8IN32 2 126bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_ENDIAN_8IN64 3 127bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_RED_CROSSBAR(x) (((x) & 0x3) << 4) 128bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_RED_SEL_R 0 129bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_RED_SEL_G 1 130bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_RED_SEL_B 2 131bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_RED_SEL_A 3 132bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_GREEN_CROSSBAR(x) (((x) & 0x3) << 6) 133bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_GREEN_SEL_G 0 134bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_GREEN_SEL_B 1 135bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_GREEN_SEL_A 2 136bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_GREEN_SEL_R 3 137bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_BLUE_CROSSBAR(x) (((x) & 0x3) << 8) 138bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_BLUE_SEL_B 0 139bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_BLUE_SEL_A 1 140bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_BLUE_SEL_R 2 141bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_BLUE_SEL_G 3 142bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_ALPHA_CROSSBAR(x) (((x) & 0x3) << 10) 143bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_ALPHA_SEL_A 0 144bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_ALPHA_SEL_R 1 145bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_ALPHA_SEL_G 2 146bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_ALPHA_SEL_B 3 147bcc1c2a1SAlex Deucher #define EVERGREEN_GRPH_PRIMARY_SURFACE_ADDRESS 0x6810 148bcc1c2a1SAlex Deucher #define EVERGREEN_GRPH_SECONDARY_SURFACE_ADDRESS 0x6814 149bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_DFQ_ENABLE (1 << 0) 150bcc1c2a1SAlex Deucher # define EVERGREEN_GRPH_SURFACE_ADDRESS_MASK 0xffffff00 151bcc1c2a1SAlex Deucher #define EVERGREEN_GRPH_PITCH 0x6818 152bcc1c2a1SAlex Deucher #define EVERGREEN_GRPH_PRIMARY_SURFACE_ADDRESS_HIGH 0x681c 153bcc1c2a1SAlex Deucher #define EVERGREEN_GRPH_SECONDARY_SURFACE_ADDRESS_HIGH 0x6820 154bcc1c2a1SAlex Deucher #define EVERGREEN_GRPH_SURFACE_OFFSET_X 0x6824 155bcc1c2a1SAlex Deucher #define EVERGREEN_GRPH_SURFACE_OFFSET_Y 0x6828 156bcc1c2a1SAlex Deucher #define EVERGREEN_GRPH_X_START 0x682c 157bcc1c2a1SAlex Deucher #define EVERGREEN_GRPH_Y_START 0x6830 158bcc1c2a1SAlex Deucher #define EVERGREEN_GRPH_X_END 0x6834 159bcc1c2a1SAlex Deucher #define EVERGREEN_GRPH_Y_END 0x6838 1606f34be50SAlex Deucher #define EVERGREEN_GRPH_UPDATE 0x6844 1616f34be50SAlex Deucher # define EVERGREEN_GRPH_SURFACE_UPDATE_PENDING (1 << 2) 1626f34be50SAlex Deucher # define EVERGREEN_GRPH_UPDATE_LOCK (1 << 16) 1636f34be50SAlex Deucher #define EVERGREEN_GRPH_FLIP_CONTROL 0x6848 1646f34be50SAlex Deucher # define EVERGREEN_GRPH_SURFACE_UPDATE_H_RETRACE_EN (1 << 0) 165bcc1c2a1SAlex Deucher 166bcc1c2a1SAlex Deucher /* CUR blocks at 0x6998, 0x7598, 0x10198, 0x10d98, 0x11998, 0x12598 */ 167bcc1c2a1SAlex Deucher #define EVERGREEN_CUR_CONTROL 0x6998 168bcc1c2a1SAlex Deucher # define EVERGREEN_CURSOR_EN (1 << 0) 169bcc1c2a1SAlex Deucher # define EVERGREEN_CURSOR_MODE(x) (((x) & 0x3) << 8) 170bcc1c2a1SAlex Deucher # define EVERGREEN_CURSOR_MONO 0 171bcc1c2a1SAlex Deucher # define EVERGREEN_CURSOR_24_1 1 172bcc1c2a1SAlex Deucher # define EVERGREEN_CURSOR_24_8_PRE_MULT 2 173bcc1c2a1SAlex Deucher # define EVERGREEN_CURSOR_24_8_UNPRE_MULT 3 174bcc1c2a1SAlex Deucher # define EVERGREEN_CURSOR_2X_MAGNIFY (1 << 16) 175bcc1c2a1SAlex Deucher # define EVERGREEN_CURSOR_FORCE_MC_ON (1 << 20) 176bcc1c2a1SAlex Deucher # define EVERGREEN_CURSOR_URGENT_CONTROL(x) (((x) & 0x7) << 24) 177bcc1c2a1SAlex Deucher # define EVERGREEN_CURSOR_URGENT_ALWAYS 0 178bcc1c2a1SAlex Deucher # define EVERGREEN_CURSOR_URGENT_1_8 1 179bcc1c2a1SAlex Deucher # define EVERGREEN_CURSOR_URGENT_1_4 2 180bcc1c2a1SAlex Deucher # define EVERGREEN_CURSOR_URGENT_3_8 3 181bcc1c2a1SAlex Deucher # define EVERGREEN_CURSOR_URGENT_1_2 4 182bcc1c2a1SAlex Deucher #define EVERGREEN_CUR_SURFACE_ADDRESS 0x699c 183bcc1c2a1SAlex Deucher # define EVERGREEN_CUR_SURFACE_ADDRESS_MASK 0xfffff000 184bcc1c2a1SAlex Deucher #define EVERGREEN_CUR_SIZE 0x69a0 185bcc1c2a1SAlex Deucher #define EVERGREEN_CUR_SURFACE_ADDRESS_HIGH 0x69a4 186bcc1c2a1SAlex Deucher #define EVERGREEN_CUR_POSITION 0x69a8 187bcc1c2a1SAlex Deucher #define EVERGREEN_CUR_HOT_SPOT 0x69ac 188bcc1c2a1SAlex Deucher #define EVERGREEN_CUR_COLOR1 0x69b0 189bcc1c2a1SAlex Deucher #define EVERGREEN_CUR_COLOR2 0x69b4 190bcc1c2a1SAlex Deucher #define EVERGREEN_CUR_UPDATE 0x69b8 191bcc1c2a1SAlex Deucher # define EVERGREEN_CURSOR_UPDATE_PENDING (1 << 0) 192bcc1c2a1SAlex Deucher # define EVERGREEN_CURSOR_UPDATE_TAKEN (1 << 1) 193bcc1c2a1SAlex Deucher # define EVERGREEN_CURSOR_UPDATE_LOCK (1 << 16) 194bcc1c2a1SAlex Deucher # define EVERGREEN_CURSOR_DISABLE_MULTIPLE_UPDATE (1 << 24) 195bcc1c2a1SAlex Deucher 196bcc1c2a1SAlex Deucher /* LUT blocks at 0x69e0, 0x75e0, 0x101e0, 0x10de0, 0x119e0, 0x125e0 */ 197bcc1c2a1SAlex Deucher #define EVERGREEN_DC_LUT_RW_MODE 0x69e0 198bcc1c2a1SAlex Deucher #define EVERGREEN_DC_LUT_RW_INDEX 0x69e4 199bcc1c2a1SAlex Deucher #define EVERGREEN_DC_LUT_SEQ_COLOR 0x69e8 200bcc1c2a1SAlex Deucher #define EVERGREEN_DC_LUT_PWL_DATA 0x69ec 201bcc1c2a1SAlex Deucher #define EVERGREEN_DC_LUT_30_COLOR 0x69f0 202bcc1c2a1SAlex Deucher #define EVERGREEN_DC_LUT_VGA_ACCESS_ENABLE 0x69f4 203bcc1c2a1SAlex Deucher #define EVERGREEN_DC_LUT_WRITE_EN_MASK 0x69f8 204bcc1c2a1SAlex Deucher #define EVERGREEN_DC_LUT_AUTOFILL 0x69fc 205bcc1c2a1SAlex Deucher #define EVERGREEN_DC_LUT_CONTROL 0x6a00 206bcc1c2a1SAlex Deucher #define EVERGREEN_DC_LUT_BLACK_OFFSET_BLUE 0x6a04 207bcc1c2a1SAlex Deucher #define EVERGREEN_DC_LUT_BLACK_OFFSET_GREEN 0x6a08 208bcc1c2a1SAlex Deucher #define EVERGREEN_DC_LUT_BLACK_OFFSET_RED 0x6a0c 209bcc1c2a1SAlex Deucher #define EVERGREEN_DC_LUT_WHITE_OFFSET_BLUE 0x6a10 210bcc1c2a1SAlex Deucher #define EVERGREEN_DC_LUT_WHITE_OFFSET_GREEN 0x6a14 211bcc1c2a1SAlex Deucher #define EVERGREEN_DC_LUT_WHITE_OFFSET_RED 0x6a18 212bcc1c2a1SAlex Deucher 213bcc1c2a1SAlex Deucher #define EVERGREEN_DATA_FORMAT 0x6b00 214bcc1c2a1SAlex Deucher # define EVERGREEN_INTERLEAVE_EN (1 << 0) 215bcc1c2a1SAlex Deucher #define EVERGREEN_DESKTOP_HEIGHT 0x6b04 216cb5fcbd5SAlex Deucher #define EVERGREEN_VLINE_START_END 0x6b08 217cb5fcbd5SAlex Deucher #define EVERGREEN_VLINE_STATUS 0x6bb8 218cb5fcbd5SAlex Deucher # define EVERGREEN_VLINE_STAT (1 << 12) 219bcc1c2a1SAlex Deucher 220bcc1c2a1SAlex Deucher #define EVERGREEN_VIEWPORT_START 0x6d70 221bcc1c2a1SAlex Deucher #define EVERGREEN_VIEWPORT_SIZE 0x6d74 222bcc1c2a1SAlex Deucher 223bcc1c2a1SAlex Deucher /* display controller offsets used for crtc/cur/lut/grph/viewport/etc. */ 224bcc1c2a1SAlex Deucher #define EVERGREEN_CRTC0_REGISTER_OFFSET (0x6df0 - 0x6df0) 225bcc1c2a1SAlex Deucher #define EVERGREEN_CRTC1_REGISTER_OFFSET (0x79f0 - 0x6df0) 226bcc1c2a1SAlex Deucher #define EVERGREEN_CRTC2_REGISTER_OFFSET (0x105f0 - 0x6df0) 227bcc1c2a1SAlex Deucher #define EVERGREEN_CRTC3_REGISTER_OFFSET (0x111f0 - 0x6df0) 228bcc1c2a1SAlex Deucher #define EVERGREEN_CRTC4_REGISTER_OFFSET (0x11df0 - 0x6df0) 229bcc1c2a1SAlex Deucher #define EVERGREEN_CRTC5_REGISTER_OFFSET (0x129f0 - 0x6df0) 230bcc1c2a1SAlex Deucher 231bcc1c2a1SAlex Deucher /* CRTC blocks at 0x6df0, 0x79f0, 0x105f0, 0x111f0, 0x11df0, 0x129f0 */ 232539d2418SAlex Deucher #define EVERGREEN_CRTC_V_BLANK_START_END 0x6e34 233bcc1c2a1SAlex Deucher #define EVERGREEN_CRTC_CONTROL 0x6e70 234bcc1c2a1SAlex Deucher # define EVERGREEN_CRTC_MASTER_EN (1 << 0) 23549e02b73SAlex Deucher # define EVERGREEN_CRTC_DISP_READ_REQUEST_DISABLE (1 << 24) 23662444b74SAlex Deucher #define EVERGREEN_CRTC_BLANK_CONTROL 0x6e74 23762444b74SAlex Deucher # define EVERGREEN_CRTC_BLANK_DATA_EN (1 << 8) 238bae6b562SAlex Deucher #define EVERGREEN_CRTC_STATUS 0x6e8c 2393ae19b75SAlex Deucher # define EVERGREEN_CRTC_V_BLANK (1 << 0) 240539d2418SAlex Deucher #define EVERGREEN_CRTC_STATUS_POSITION 0x6e90 241a65a4369SAlex Deucher #define EVERGREEN_CRTC_STATUS_HV_COUNT 0x6ea0 242bcc1c2a1SAlex Deucher #define EVERGREEN_CRTC_UPDATE_LOCK 0x6ed4 243968c0166SAlex Deucher #define EVERGREEN_MASTER_UPDATE_LOCK 0x6ef4 244968c0166SAlex Deucher #define EVERGREEN_MASTER_UPDATE_MODE 0x6ef8 245bcc1c2a1SAlex Deucher 246bcc1c2a1SAlex Deucher #define EVERGREEN_DC_GPIO_HPD_MASK 0x64b0 247bcc1c2a1SAlex Deucher #define EVERGREEN_DC_GPIO_HPD_A 0x64b4 248bcc1c2a1SAlex Deucher #define EVERGREEN_DC_GPIO_HPD_EN 0x64b8 249bcc1c2a1SAlex Deucher #define EVERGREEN_DC_GPIO_HPD_Y 0x64bc 250bcc1c2a1SAlex Deucher 251f83d926aSRafał Miłecki /* HDMI blocks at 0x7030, 0x7c30, 0x10830, 0x11430, 0x12030, 0x12c30 */ 252f83d926aSRafał Miłecki #define EVERGREEN_HDMI_BASE 0x7030 253*5d5b7803SVitaly Prosyak /*DIG block*/ 254*5d5b7803SVitaly Prosyak #define NI_DIG0_REGISTER_OFFSET (0x7000 - 0x7000) 255*5d5b7803SVitaly Prosyak #define NI_DIG1_REGISTER_OFFSET (0x7C00 - 0x7000) 256*5d5b7803SVitaly Prosyak #define NI_DIG2_REGISTER_OFFSET (0x10800 - 0x7000) 257*5d5b7803SVitaly Prosyak #define NI_DIG3_REGISTER_OFFSET (0x11400 - 0x7000) 258*5d5b7803SVitaly Prosyak #define NI_DIG4_REGISTER_OFFSET (0x12000 - 0x7000) 259*5d5b7803SVitaly Prosyak #define NI_DIG5_REGISTER_OFFSET (0x12C00 - 0x7000) 260*5d5b7803SVitaly Prosyak 261*5d5b7803SVitaly Prosyak 262*5d5b7803SVitaly Prosyak #define NI_DIG_FE_CNTL 0x7000 263*5d5b7803SVitaly Prosyak # define NI_DIG_FE_CNTL_SOURCE_SELECT(x) ((x) & 0x3) 264*5d5b7803SVitaly Prosyak # define NI_DIG_FE_CNTL_SYMCLK_FE_ON (1<<24) 265*5d5b7803SVitaly Prosyak 266*5d5b7803SVitaly Prosyak 267*5d5b7803SVitaly Prosyak #define NI_DIG_BE_CNTL 0x7140 268*5d5b7803SVitaly Prosyak # define NI_DIG_BE_CNTL_FE_SOURCE_SELECT(x) (((x) >> 8 ) & 0x3F) 269*5d5b7803SVitaly Prosyak # define NI_DIG_FE_CNTL_MODE(x) (((x) >> 16) & 0x7 ) 270*5d5b7803SVitaly Prosyak 271*5d5b7803SVitaly Prosyak #define NI_DIG_BE_EN_CNTL 0x7144 272*5d5b7803SVitaly Prosyak # define NI_DIG_BE_EN_CNTL_ENABLE (1 << 0) 273*5d5b7803SVitaly Prosyak # define NI_DIG_BE_EN_CNTL_SYMBCLK_ON (1 << 8) 274*5d5b7803SVitaly Prosyak # define NI_DIG_BE_DPSST 0 275f83d926aSRafał Miłecki 276e55bca26SSlava Grigorev /* Display Port block */ 277*5d5b7803SVitaly Prosyak #define EVERGREEN_DP0_REGISTER_OFFSET (0x730C - 0x730C) 278*5d5b7803SVitaly Prosyak #define EVERGREEN_DP1_REGISTER_OFFSET (0x7F0C - 0x730C) 279*5d5b7803SVitaly Prosyak #define EVERGREEN_DP2_REGISTER_OFFSET (0x10B0C - 0x730C) 280*5d5b7803SVitaly Prosyak #define EVERGREEN_DP3_REGISTER_OFFSET (0x1170C - 0x730C) 281*5d5b7803SVitaly Prosyak #define EVERGREEN_DP4_REGISTER_OFFSET (0x1230C - 0x730C) 282*5d5b7803SVitaly Prosyak #define EVERGREEN_DP5_REGISTER_OFFSET (0x12F0C - 0x730C) 283*5d5b7803SVitaly Prosyak 284*5d5b7803SVitaly Prosyak 285*5d5b7803SVitaly Prosyak #define EVERGREEN_DP_VID_STREAM_CNTL 0x730C 286*5d5b7803SVitaly Prosyak # define EVERGREEN_DP_VID_STREAM_CNTL_ENABLE (1 << 0) 287*5d5b7803SVitaly Prosyak # define EVERGREEN_DP_VID_STREAM_STATUS (1 <<16) 288*5d5b7803SVitaly Prosyak #define EVERGREEN_DP_STEER_FIFO 0x7310 289*5d5b7803SVitaly Prosyak # define EVERGREEN_DP_STEER_FIFO_RESET (1 << 0) 290e55bca26SSlava Grigorev #define EVERGREEN_DP_SEC_CNTL 0x7280 291e55bca26SSlava Grigorev # define EVERGREEN_DP_SEC_STREAM_ENABLE (1 << 0) 292e55bca26SSlava Grigorev # define EVERGREEN_DP_SEC_ASP_ENABLE (1 << 4) 293e55bca26SSlava Grigorev # define EVERGREEN_DP_SEC_ATP_ENABLE (1 << 8) 294e55bca26SSlava Grigorev # define EVERGREEN_DP_SEC_AIP_ENABLE (1 << 12) 295e55bca26SSlava Grigorev # define EVERGREEN_DP_SEC_GSP_ENABLE (1 << 20) 296e55bca26SSlava Grigorev # define EVERGREEN_DP_SEC_AVI_ENABLE (1 << 24) 297e55bca26SSlava Grigorev # define EVERGREEN_DP_SEC_MPG_ENABLE (1 << 28) 298e55bca26SSlava Grigorev #define EVERGREEN_DP_SEC_TIMESTAMP 0x72a4 299e55bca26SSlava Grigorev # define EVERGREEN_DP_SEC_TIMESTAMP_MODE(x) (((x) & 0x3) << 0) 300e55bca26SSlava Grigorev #define EVERGREEN_DP_SEC_AUD_N 0x7294 301e55bca26SSlava Grigorev # define EVERGREEN_DP_SEC_N_BASE_MULTIPLE(x) (((x) & 0xf) << 24) 302e55bca26SSlava Grigorev # define EVERGREEN_DP_SEC_SS_EN (1 << 28) 303e55bca26SSlava Grigorev 304*5d5b7803SVitaly Prosyak /*DCIO_UNIPHY block*/ 305*5d5b7803SVitaly Prosyak #define NI_DCIO_UNIPHY0_UNIPHY_TX_CONTROL1 (0x6600 -0x6600) 306*5d5b7803SVitaly Prosyak #define NI_DCIO_UNIPHY1_UNIPHY_TX_CONTROL1 (0x6640 -0x6600) 307*5d5b7803SVitaly Prosyak #define NI_DCIO_UNIPHY2_UNIPHY_TX_CONTROL1 (0x6680 - 0x6600) 308*5d5b7803SVitaly Prosyak #define NI_DCIO_UNIPHY3_UNIPHY_TX_CONTROL1 (0x66C0 - 0x6600) 309*5d5b7803SVitaly Prosyak #define NI_DCIO_UNIPHY4_UNIPHY_TX_CONTROL1 (0x6700 - 0x6600) 310*5d5b7803SVitaly Prosyak #define NI_DCIO_UNIPHY5_UNIPHY_TX_CONTROL1 (0x6740 - 0x6600) 311*5d5b7803SVitaly Prosyak 312*5d5b7803SVitaly Prosyak #define NI_DCIO_UNIPHY0_PLL_CONTROL1 0x6618 313*5d5b7803SVitaly Prosyak # define NI_DCIO_UNIPHY0_PLL_CONTROL1_ENABLE (1 << 0) 314*5d5b7803SVitaly Prosyak 315bcc1c2a1SAlex Deucher #endif 316