aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r600d.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/r600d.h')
-rw-r--r--drivers/gpu/drm/radeon/r600d.h232
1 files changed, 228 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/r600d.h b/drivers/gpu/drm/radeon/r600d.h
index 79df558f8c40..f1b3084d8f51 100644
--- a/drivers/gpu/drm/radeon/r600d.h
+++ b/drivers/gpu/drm/radeon/r600d.h
@@ -302,10 +302,25 @@
302#define GRBM_SOFT_RESET 0x8020 302#define GRBM_SOFT_RESET 0x8020
303#define SOFT_RESET_CP (1<<0) 303#define SOFT_RESET_CP (1<<0)
304 304
305#define CG_THERMAL_CTRL 0x7F0
306#define DIG_THERM_DPM(x) ((x) << 12)
307#define DIG_THERM_DPM_MASK 0x000FF000
308#define DIG_THERM_DPM_SHIFT 12
305#define CG_THERMAL_STATUS 0x7F4 309#define CG_THERMAL_STATUS 0x7F4
306#define ASIC_T(x) ((x) << 0) 310#define ASIC_T(x) ((x) << 0)
307#define ASIC_T_MASK 0x1FF 311#define ASIC_T_MASK 0x1FF
308#define ASIC_T_SHIFT 0 312#define ASIC_T_SHIFT 0
313#define CG_THERMAL_INT 0x7F8
314#define DIG_THERM_INTH(x) ((x) << 8)
315#define DIG_THERM_INTH_MASK 0x0000FF00
316#define DIG_THERM_INTH_SHIFT 8
317#define DIG_THERM_INTL(x) ((x) << 16)
318#define DIG_THERM_INTL_MASK 0x00FF0000
319#define DIG_THERM_INTL_SHIFT 16
320#define THERM_INT_MASK_HIGH (1 << 24)
321#define THERM_INT_MASK_LOW (1 << 25)
322
323#define RV770_CG_THERMAL_INT 0x734
309 324
310#define HDP_HOST_PATH_CNTL 0x2C00 325#define HDP_HOST_PATH_CNTL 0x2C00
311#define HDP_NONSURFACE_BASE 0x2C04 326#define HDP_NONSURFACE_BASE 0x2C04
@@ -684,10 +699,6 @@
684#define RLC_UCODE_ADDR 0x3f2c 699#define RLC_UCODE_ADDR 0x3f2c
685#define RLC_UCODE_DATA 0x3f30 700#define RLC_UCODE_DATA 0x3f30
686 701
687/* new for TN */
688#define TN_RLC_SAVE_AND_RESTORE_BASE 0x3f10
689#define TN_RLC_CLEAR_STATE_RESTORE_BASE 0x3f20
690
691#define SRBM_SOFT_RESET 0xe60 702#define SRBM_SOFT_RESET 0xe60
692# define SOFT_RESET_DMA (1 << 12) 703# define SOFT_RESET_DMA (1 << 12)
693# define SOFT_RESET_RLC (1 << 13) 704# define SOFT_RESET_RLC (1 << 13)
@@ -1148,6 +1159,219 @@
1148# define AFMT_AZ_FORMAT_WTRIG_ACK (1 << 29) 1159# define AFMT_AZ_FORMAT_WTRIG_ACK (1 << 29)
1149# define AFMT_AZ_AUDIO_ENABLE_CHG_ACK (1 << 30) 1160# define AFMT_AZ_AUDIO_ENABLE_CHG_ACK (1 << 30)
1150 1161
1162/* Power management */
1163#define CG_SPLL_FUNC_CNTL 0x600
1164# define SPLL_RESET (1 << 0)
1165# define SPLL_SLEEP (1 << 1)
1166# define SPLL_REF_DIV(x) ((x) << 2)
1167# define SPLL_REF_DIV_MASK (7 << 2)
1168# define SPLL_FB_DIV(x) ((x) << 5)
1169# define SPLL_FB_DIV_MASK (0xff << 5)
1170# define SPLL_PULSEEN (1 << 13)
1171# define SPLL_PULSENUM(x) ((x) << 14)
1172# define SPLL_PULSENUM_MASK (3 << 14)
1173# define SPLL_SW_HILEN(x) ((x) << 16)
1174# define SPLL_SW_HILEN_MASK (0xf << 16)
1175# define SPLL_SW_LOLEN(x) ((x) << 20)
1176# define SPLL_SW_LOLEN_MASK (0xf << 20)
1177# define SPLL_DIVEN (1 << 24)
1178# define SPLL_BYPASS_EN (1 << 25)
1179# define SPLL_CHG_STATUS (1 << 29)
1180# define SPLL_CTLREQ (1 << 30)
1181# define SPLL_CTLACK (1 << 31)
1182
1183#define GENERAL_PWRMGT 0x618
1184# define GLOBAL_PWRMGT_EN (1 << 0)
1185# define STATIC_PM_EN (1 << 1)
1186# define MOBILE_SU (1 << 2)
1187# define THERMAL_PROTECTION_DIS (1 << 3)
1188# define THERMAL_PROTECTION_TYPE (1 << 4)
1189# define ENABLE_GEN2PCIE (1 << 5)
1190# define SW_GPIO_INDEX(x) ((x) << 6)
1191# define SW_GPIO_INDEX_MASK (3 << 6)
1192# define LOW_VOLT_D2_ACPI (1 << 8)
1193# define LOW_VOLT_D3_ACPI (1 << 9)
1194# define VOLT_PWRMGT_EN (1 << 10)
1195#define CG_TPC 0x61c
1196# define TPCC(x) ((x) << 0)
1197# define TPCC_MASK (0x7fffff << 0)
1198# define TPU(x) ((x) << 23)
1199# define TPU_MASK (0x1f << 23)
1200#define SCLK_PWRMGT_CNTL 0x620
1201# define SCLK_PWRMGT_OFF (1 << 0)
1202# define SCLK_TURNOFF (1 << 1)
1203# define SPLL_TURNOFF (1 << 2)
1204# define SU_SCLK_USE_BCLK (1 << 3)
1205# define DYNAMIC_GFX_ISLAND_PWR_DOWN (1 << 4)
1206# define DYNAMIC_GFX_ISLAND_PWR_LP (1 << 5)
1207# define CLK_TURN_ON_STAGGER (1 << 6)
1208# define CLK_TURN_OFF_STAGGER (1 << 7)
1209# define FIR_FORCE_TREND_SEL (1 << 8)
1210# define FIR_TREND_MODE (1 << 9)
1211# define DYN_GFX_CLK_OFF_EN (1 << 10)
1212# define VDDC3D_TURNOFF_D1 (1 << 11)
1213# define VDDC3D_TURNOFF_D2 (1 << 12)
1214# define VDDC3D_TURNOFF_D3 (1 << 13)
1215# define SPLL_TURNOFF_D2 (1 << 14)
1216# define SCLK_LOW_D1 (1 << 15)
1217# define DYN_GFX_CLK_OFF_MC_EN (1 << 16)
1218#define MCLK_PWRMGT_CNTL 0x624
1219# define MPLL_PWRMGT_OFF (1 << 0)
1220# define YCLK_TURNOFF (1 << 1)
1221# define MPLL_TURNOFF (1 << 2)
1222# define SU_MCLK_USE_BCLK (1 << 3)
1223# define DLL_READY (1 << 4)
1224# define MC_BUSY (1 << 5)
1225# define MC_INT_CNTL (1 << 7)
1226# define MRDCKA_SLEEP (1 << 8)
1227# define MRDCKB_SLEEP (1 << 9)
1228# define MRDCKC_SLEEP (1 << 10)
1229# define MRDCKD_SLEEP (1 << 11)
1230# define MRDCKE_SLEEP (1 << 12)
1231# define MRDCKF_SLEEP (1 << 13)
1232# define MRDCKG_SLEEP (1 << 14)
1233# define MRDCKH_SLEEP (1 << 15)
1234# define MRDCKA_RESET (1 << 16)
1235# define MRDCKB_RESET (1 << 17)
1236# define MRDCKC_RESET (1 << 18)
1237# define MRDCKD_RESET (1 << 19)
1238# define MRDCKE_RESET (1 << 20)
1239# define MRDCKF_RESET (1 << 21)
1240# define MRDCKG_RESET (1 << 22)
1241# define MRDCKH_RESET (1 << 23)
1242# define DLL_READY_READ (1 << 24)
1243# define USE_DISPLAY_GAP (1 << 25)
1244# define USE_DISPLAY_URGENT_NORMAL (1 << 26)
1245# define USE_DISPLAY_GAP_CTXSW (1 << 27)
1246# define MPLL_TURNOFF_D2 (1 << 28)
1247# define USE_DISPLAY_URGENT_CTXSW (1 << 29)
1248
1249#define MPLL_TIME 0x634
1250# define MPLL_LOCK_TIME(x) ((x) << 0)
1251# define MPLL_LOCK_TIME_MASK (0xffff << 0)
1252# define MPLL_RESET_TIME(x) ((x) << 16)
1253# define MPLL_RESET_TIME_MASK (0xffff << 16)
1254
1255#define SCLK_FREQ_SETTING_STEP_0_PART1 0x648
1256# define STEP_0_SPLL_POST_DIV(x) ((x) << 0)
1257# define STEP_0_SPLL_POST_DIV_MASK (0xff << 0)
1258# define STEP_0_SPLL_FB_DIV(x) ((x) << 8)
1259# define STEP_0_SPLL_FB_DIV_MASK (0xff << 8)
1260# define STEP_0_SPLL_REF_DIV(x) ((x) << 16)
1261# define STEP_0_SPLL_REF_DIV_MASK (7 << 16)
1262# define STEP_0_SPLL_STEP_TIME(x) ((x) << 19)
1263# define STEP_0_SPLL_STEP_TIME_MASK (0x1fff << 19)
1264#define SCLK_FREQ_SETTING_STEP_0_PART2 0x64c
1265# define STEP_0_PULSE_HIGH_CNT(x) ((x) << 0)
1266# define STEP_0_PULSE_HIGH_CNT_MASK (0x1ff << 0)
1267# define STEP_0_POST_DIV_EN (1 << 9)
1268# define STEP_0_SPLL_STEP_ENABLE (1 << 30)
1269# define STEP_0_SPLL_ENTRY_VALID (1 << 31)
1270
1271#define VID_RT 0x6f8
1272# define VID_CRT(x) ((x) << 0)
1273# define VID_CRT_MASK (0x1fff << 0)
1274# define VID_CRTU(x) ((x) << 13)
1275# define VID_CRTU_MASK (7 << 13)
1276# define SSTU(x) ((x) << 16)
1277# define SSTU_MASK (7 << 16)
1278#define CTXSW_PROFILE_INDEX 0x6fc
1279# define CTXSW_FREQ_VIDS_CFG_INDEX(x) ((x) << 0)
1280# define CTXSW_FREQ_VIDS_CFG_INDEX_MASK (3 << 0)
1281# define CTXSW_FREQ_VIDS_CFG_INDEX_SHIFT 0
1282# define CTXSW_FREQ_MCLK_CFG_INDEX(x) ((x) << 2)
1283# define CTXSW_FREQ_MCLK_CFG_INDEX_MASK (3 << 2)
1284# define CTXSW_FREQ_MCLK_CFG_INDEX_SHIFT 2
1285# define CTXSW_FREQ_SCLK_CFG_INDEX(x) ((x) << 4)
1286# define CTXSW_FREQ_SCLK_CFG_INDEX_MASK (0x1f << 4)
1287# define CTXSW_FREQ_SCLK_CFG_INDEX_SHIFT 4
1288# define CTXSW_FREQ_STATE_SPLL_RESET_EN (1 << 9)
1289# define CTXSW_FREQ_STATE_ENABLE (1 << 10)
1290# define CTXSW_FREQ_DISPLAY_WATERMARK (1 << 11)
1291# define CTXSW_FREQ_GEN2PCIE_VOLT (1 << 12)
1292
1293#define TARGET_AND_CURRENT_PROFILE_INDEX 0x70c
1294# define TARGET_PROFILE_INDEX_MASK (3 << 0)
1295# define TARGET_PROFILE_INDEX_SHIFT 0
1296# define CURRENT_PROFILE_INDEX_MASK (3 << 2)
1297# define CURRENT_PROFILE_INDEX_SHIFT 2
1298# define DYN_PWR_ENTER_INDEX(x) ((x) << 4)
1299# define DYN_PWR_ENTER_INDEX_MASK (3 << 4)
1300# define DYN_PWR_ENTER_INDEX_SHIFT 4
1301# define CURR_MCLK_INDEX_MASK (3 << 6)
1302# define CURR_MCLK_INDEX_SHIFT 6
1303# define CURR_SCLK_INDEX_MASK (0x1f << 8)
1304# define CURR_SCLK_INDEX_SHIFT 8
1305# define CURR_VID_INDEX_MASK (3 << 13)
1306# define CURR_VID_INDEX_SHIFT 13
1307
1308#define LOWER_GPIO_ENABLE 0x710
1309#define UPPER_GPIO_ENABLE 0x714
1310#define CTXSW_VID_LOWER_GPIO_CNTL 0x718
1311
1312#define VID_UPPER_GPIO_CNTL 0x740
1313#define CG_CTX_CGTT3D_R 0x744
1314# define PHC(x) ((x) << 0)
1315# define PHC_MASK (0x1ff << 0)
1316# define SDC(x) ((x) << 9)
1317# define SDC_MASK (0x3fff << 9)
1318#define CG_VDDC3D_OOR 0x748
1319# define SU(x) ((x) << 23)
1320# define SU_MASK (0xf << 23)
1321#define CG_FTV 0x74c
1322#define CG_FFCT_0 0x750
1323# define UTC_0(x) ((x) << 0)
1324# define UTC_0_MASK (0x3ff << 0)
1325# define DTC_0(x) ((x) << 10)
1326# define DTC_0_MASK (0x3ff << 10)
1327
1328#define CG_BSP 0x78c
1329# define BSP(x) ((x) << 0)
1330# define BSP_MASK (0xffff << 0)
1331# define BSU(x) ((x) << 16)
1332# define BSU_MASK (0xf << 16)
1333#define CG_RT 0x790
1334# define FLS(x) ((x) << 0)
1335# define FLS_MASK (0xffff << 0)
1336# define FMS(x) ((x) << 16)
1337# define FMS_MASK (0xffff << 16)
1338#define CG_LT 0x794
1339# define FHS(x) ((x) << 0)
1340# define FHS_MASK (0xffff << 0)
1341#define CG_GIT 0x798
1342# define CG_GICST(x) ((x) << 0)
1343# define CG_GICST_MASK (0xffff << 0)
1344# define CG_GIPOT(x) ((x) << 16)
1345# define CG_GIPOT_MASK (0xffff << 16)
1346
1347#define CG_SSP 0x7a8
1348# define CG_SST(x) ((x) << 0)
1349# define CG_SST_MASK (0xffff << 0)
1350# define CG_SSTU(x) ((x) << 16)
1351# define CG_SSTU_MASK (0xf << 16)
1352
1353#define CG_RLC_REQ_AND_RSP 0x7c4
1354# define RLC_CG_REQ_TYPE_MASK 0xf
1355# define RLC_CG_REQ_TYPE_SHIFT 0
1356# define CG_RLC_RSP_TYPE_MASK 0xf0
1357# define CG_RLC_RSP_TYPE_SHIFT 4
1358
1359#define CG_FC_T 0x7cc
1360# define FC_T(x) ((x) << 0)
1361# define FC_T_MASK (0xffff << 0)
1362# define FC_TU(x) ((x) << 16)
1363# define FC_TU_MASK (0x1f << 16)
1364
1365#define GPIOPAD_MASK 0x1798
1366#define GPIOPAD_A 0x179c
1367#define GPIOPAD_EN 0x17a0
1368
1369#define GRBM_PWR_CNTL 0x800c
1370# define REQ_TYPE_MASK 0xf
1371# define REQ_TYPE_SHIFT 0
1372# define RSP_TYPE_MASK 0xf0
1373# define RSP_TYPE_SHIFT 4
1374
1151/* 1375/*
1152 * UVD 1376 * UVD
1153 */ 1377 */