18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/*  $Id: aty128.h,v 1.1 1999/10/12 11:00:40 geert Exp $
38c2ecf20Sopenharmony_ci *  linux/drivers/video/aty128.h
48c2ecf20Sopenharmony_ci *  Register definitions for ATI Rage128 boards
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci *  Anthony Tong <atong@uiuc.edu>, 1999
78c2ecf20Sopenharmony_ci *  Brad Douglas <brad@neruo.com>, 2000
88c2ecf20Sopenharmony_ci */
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci#ifndef REG_RAGE128_H
118c2ecf20Sopenharmony_ci#define REG_RAGE128_H
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci#define CLOCK_CNTL_INDEX			0x0008
148c2ecf20Sopenharmony_ci#define CLOCK_CNTL_DATA				0x000c
158c2ecf20Sopenharmony_ci#define BIOS_0_SCRATCH				0x0010
168c2ecf20Sopenharmony_ci#define BUS_CNTL				0x0030
178c2ecf20Sopenharmony_ci#define BUS_CNTL1				0x0034
188c2ecf20Sopenharmony_ci#define GEN_INT_CNTL				0x0040
198c2ecf20Sopenharmony_ci#define CRTC_GEN_CNTL				0x0050
208c2ecf20Sopenharmony_ci#define CRTC_EXT_CNTL				0x0054
218c2ecf20Sopenharmony_ci#define DAC_CNTL				0x0058
228c2ecf20Sopenharmony_ci#define I2C_CNTL_1				0x0094
238c2ecf20Sopenharmony_ci#define PALETTE_INDEX				0x00b0
248c2ecf20Sopenharmony_ci#define PALETTE_DATA				0x00b4
258c2ecf20Sopenharmony_ci#define CNFG_CNTL				0x00e0
268c2ecf20Sopenharmony_ci#define GEN_RESET_CNTL				0x00f0
278c2ecf20Sopenharmony_ci#define CNFG_MEMSIZE				0x00f8
288c2ecf20Sopenharmony_ci#define MEM_CNTL				0x0140
298c2ecf20Sopenharmony_ci#define MEM_POWER_MISC				0x015c
308c2ecf20Sopenharmony_ci#define AGP_BASE				0x0170
318c2ecf20Sopenharmony_ci#define AGP_CNTL				0x0174
328c2ecf20Sopenharmony_ci#define AGP_APER_OFFSET				0x0178
338c2ecf20Sopenharmony_ci#define PCI_GART_PAGE				0x017c
348c2ecf20Sopenharmony_ci#define PC_NGUI_MODE				0x0180
358c2ecf20Sopenharmony_ci#define PC_NGUI_CTLSTAT				0x0184
368c2ecf20Sopenharmony_ci#define MPP_TB_CONFIG				0x01C0
378c2ecf20Sopenharmony_ci#define MPP_GP_CONFIG				0x01C8
388c2ecf20Sopenharmony_ci#define VIPH_CONTROL				0x01D0
398c2ecf20Sopenharmony_ci#define CRTC_H_TOTAL_DISP			0x0200
408c2ecf20Sopenharmony_ci#define CRTC_H_SYNC_STRT_WID			0x0204
418c2ecf20Sopenharmony_ci#define CRTC_V_TOTAL_DISP			0x0208
428c2ecf20Sopenharmony_ci#define CRTC_V_SYNC_STRT_WID			0x020c
438c2ecf20Sopenharmony_ci#define CRTC_VLINE_CRNT_VLINE			0x0210
448c2ecf20Sopenharmony_ci#define CRTC_CRNT_FRAME				0x0214
458c2ecf20Sopenharmony_ci#define CRTC_GUI_TRIG_VLINE			0x0218
468c2ecf20Sopenharmony_ci#define CRTC_OFFSET				0x0224
478c2ecf20Sopenharmony_ci#define CRTC_OFFSET_CNTL			0x0228
488c2ecf20Sopenharmony_ci#define CRTC_PITCH				0x022c
498c2ecf20Sopenharmony_ci#define OVR_CLR					0x0230
508c2ecf20Sopenharmony_ci#define OVR_WID_LEFT_RIGHT			0x0234
518c2ecf20Sopenharmony_ci#define OVR_WID_TOP_BOTTOM			0x0238
528c2ecf20Sopenharmony_ci#define LVDS_GEN_CNTL				0x02d0
538c2ecf20Sopenharmony_ci#define DDA_CONFIG				0x02e0
548c2ecf20Sopenharmony_ci#define DDA_ON_OFF				0x02e4
558c2ecf20Sopenharmony_ci#define VGA_DDA_CONFIG				0x02e8
568c2ecf20Sopenharmony_ci#define VGA_DDA_ON_OFF				0x02ec
578c2ecf20Sopenharmony_ci#define CRTC2_H_TOTAL_DISP			0x0300
588c2ecf20Sopenharmony_ci#define CRTC2_H_SYNC_STRT_WID			0x0304
598c2ecf20Sopenharmony_ci#define CRTC2_V_TOTAL_DISP			0x0308
608c2ecf20Sopenharmony_ci#define CRTC2_V_SYNC_STRT_WID			0x030c
618c2ecf20Sopenharmony_ci#define CRTC2_VLINE_CRNT_VLINE			0x0310
628c2ecf20Sopenharmony_ci#define CRTC2_CRNT_FRAME			0x0314
638c2ecf20Sopenharmony_ci#define CRTC2_GUI_TRIG_VLINE			0x0318
648c2ecf20Sopenharmony_ci#define CRTC2_OFFSET				0x0324
658c2ecf20Sopenharmony_ci#define CRTC2_OFFSET_CNTL			0x0328
668c2ecf20Sopenharmony_ci#define CRTC2_PITCH				0x032c
678c2ecf20Sopenharmony_ci#define DDA2_CONFIG				0x03e0
688c2ecf20Sopenharmony_ci#define DDA2_ON_OFF				0x03e4
698c2ecf20Sopenharmony_ci#define CRTC2_GEN_CNTL				0x03f8
708c2ecf20Sopenharmony_ci#define CRTC2_STATUS				0x03fc
718c2ecf20Sopenharmony_ci#define OV0_SCALE_CNTL				0x0420
728c2ecf20Sopenharmony_ci#define SUBPIC_CNTL				0x0540
738c2ecf20Sopenharmony_ci#define PM4_BUFFER_OFFSET			0x0700
748c2ecf20Sopenharmony_ci#define PM4_BUFFER_CNTL				0x0704
758c2ecf20Sopenharmony_ci#define PM4_BUFFER_WM_CNTL			0x0708
768c2ecf20Sopenharmony_ci#define PM4_BUFFER_DL_RPTR_ADDR			0x070c
778c2ecf20Sopenharmony_ci#define PM4_BUFFER_DL_RPTR			0x0710
788c2ecf20Sopenharmony_ci#define PM4_BUFFER_DL_WPTR			0x0714
798c2ecf20Sopenharmony_ci#define PM4_VC_FPU_SETUP			0x071c
808c2ecf20Sopenharmony_ci#define PM4_FPU_CNTL				0x0720
818c2ecf20Sopenharmony_ci#define PM4_VC_FORMAT				0x0724
828c2ecf20Sopenharmony_ci#define PM4_VC_CNTL				0x0728
838c2ecf20Sopenharmony_ci#define PM4_VC_I01				0x072c
848c2ecf20Sopenharmony_ci#define PM4_VC_VLOFF				0x0730
858c2ecf20Sopenharmony_ci#define PM4_VC_VLSIZE				0x0734
868c2ecf20Sopenharmony_ci#define PM4_IW_INDOFF				0x0738
878c2ecf20Sopenharmony_ci#define PM4_IW_INDSIZE				0x073c
888c2ecf20Sopenharmony_ci#define PM4_FPU_FPX0				0x0740
898c2ecf20Sopenharmony_ci#define PM4_FPU_FPY0				0x0744
908c2ecf20Sopenharmony_ci#define PM4_FPU_FPX1				0x0748
918c2ecf20Sopenharmony_ci#define PM4_FPU_FPY1				0x074c
928c2ecf20Sopenharmony_ci#define PM4_FPU_FPX2				0x0750
938c2ecf20Sopenharmony_ci#define PM4_FPU_FPY2				0x0754
948c2ecf20Sopenharmony_ci#define PM4_FPU_FPY3				0x0758
958c2ecf20Sopenharmony_ci#define PM4_FPU_FPY4				0x075c
968c2ecf20Sopenharmony_ci#define PM4_FPU_FPY5				0x0760
978c2ecf20Sopenharmony_ci#define PM4_FPU_FPY6				0x0764
988c2ecf20Sopenharmony_ci#define PM4_FPU_FPR				0x0768
998c2ecf20Sopenharmony_ci#define PM4_FPU_FPG				0x076c
1008c2ecf20Sopenharmony_ci#define PM4_FPU_FPB				0x0770
1018c2ecf20Sopenharmony_ci#define PM4_FPU_FPA				0x0774
1028c2ecf20Sopenharmony_ci#define PM4_FPU_INTXY0				0x0780
1038c2ecf20Sopenharmony_ci#define PM4_FPU_INTXY1				0x0784
1048c2ecf20Sopenharmony_ci#define PM4_FPU_INTXY2				0x0788
1058c2ecf20Sopenharmony_ci#define PM4_FPU_INTARGB				0x078c
1068c2ecf20Sopenharmony_ci#define PM4_FPU_FPTWICEAREA			0x0790
1078c2ecf20Sopenharmony_ci#define PM4_FPU_DMAJOR01			0x0794
1088c2ecf20Sopenharmony_ci#define PM4_FPU_DMAJOR12			0x0798
1098c2ecf20Sopenharmony_ci#define PM4_FPU_DMAJOR02			0x079c
1108c2ecf20Sopenharmony_ci#define PM4_FPU_STAT				0x07a0
1118c2ecf20Sopenharmony_ci#define PM4_STAT				0x07b8
1128c2ecf20Sopenharmony_ci#define PM4_TEST_CNTL				0x07d0
1138c2ecf20Sopenharmony_ci#define PM4_MICROCODE_ADDR			0x07d4
1148c2ecf20Sopenharmony_ci#define PM4_MICROCODE_RADDR			0x07d8
1158c2ecf20Sopenharmony_ci#define PM4_MICROCODE_DATAH			0x07dc
1168c2ecf20Sopenharmony_ci#define PM4_MICROCODE_DATAL			0x07e0
1178c2ecf20Sopenharmony_ci#define PM4_CMDFIFO_ADDR			0x07e4
1188c2ecf20Sopenharmony_ci#define PM4_CMDFIFO_DATAH			0x07e8
1198c2ecf20Sopenharmony_ci#define PM4_CMDFIFO_DATAL			0x07ec
1208c2ecf20Sopenharmony_ci#define PM4_BUFFER_ADDR				0x07f0
1218c2ecf20Sopenharmony_ci#define PM4_BUFFER_DATAH			0x07f4
1228c2ecf20Sopenharmony_ci#define PM4_BUFFER_DATAL			0x07f8
1238c2ecf20Sopenharmony_ci#define PM4_MICRO_CNTL				0x07fc
1248c2ecf20Sopenharmony_ci#define CAP0_TRIG_CNTL				0x0950
1258c2ecf20Sopenharmony_ci#define CAP1_TRIG_CNTL				0x09c0
1268c2ecf20Sopenharmony_ci
1278c2ecf20Sopenharmony_ci/******************************************************************************
1288c2ecf20Sopenharmony_ci *                  GUI Block Memory Mapped Registers                         *
1298c2ecf20Sopenharmony_ci *                     These registers are FIFOed.                            *
1308c2ecf20Sopenharmony_ci *****************************************************************************/
1318c2ecf20Sopenharmony_ci#define PM4_FIFO_DATA_EVEN			0x1000
1328c2ecf20Sopenharmony_ci#define PM4_FIFO_DATA_ODD			0x1004
1338c2ecf20Sopenharmony_ci
1348c2ecf20Sopenharmony_ci#define DST_OFFSET				0x1404
1358c2ecf20Sopenharmony_ci#define DST_PITCH				0x1408
1368c2ecf20Sopenharmony_ci#define DST_WIDTH				0x140c
1378c2ecf20Sopenharmony_ci#define DST_HEIGHT				0x1410
1388c2ecf20Sopenharmony_ci#define SRC_X					0x1414
1398c2ecf20Sopenharmony_ci#define SRC_Y					0x1418
1408c2ecf20Sopenharmony_ci#define DST_X					0x141c
1418c2ecf20Sopenharmony_ci#define DST_Y					0x1420
1428c2ecf20Sopenharmony_ci#define SRC_PITCH_OFFSET			0x1428
1438c2ecf20Sopenharmony_ci#define DST_PITCH_OFFSET			0x142c
1448c2ecf20Sopenharmony_ci#define SRC_Y_X					0x1434
1458c2ecf20Sopenharmony_ci#define DST_Y_X					0x1438
1468c2ecf20Sopenharmony_ci#define DST_HEIGHT_WIDTH			0x143c
1478c2ecf20Sopenharmony_ci#define DP_GUI_MASTER_CNTL			0x146c
1488c2ecf20Sopenharmony_ci#define BRUSH_SCALE				0x1470
1498c2ecf20Sopenharmony_ci#define BRUSH_Y_X				0x1474
1508c2ecf20Sopenharmony_ci#define DP_BRUSH_BKGD_CLR			0x1478
1518c2ecf20Sopenharmony_ci#define DP_BRUSH_FRGD_CLR			0x147c
1528c2ecf20Sopenharmony_ci#define DST_WIDTH_X				0x1588
1538c2ecf20Sopenharmony_ci#define DST_HEIGHT_WIDTH_8			0x158c
1548c2ecf20Sopenharmony_ci#define SRC_X_Y					0x1590
1558c2ecf20Sopenharmony_ci#define DST_X_Y					0x1594
1568c2ecf20Sopenharmony_ci#define DST_WIDTH_HEIGHT			0x1598
1578c2ecf20Sopenharmony_ci#define DST_WIDTH_X_INCY			0x159c
1588c2ecf20Sopenharmony_ci#define DST_HEIGHT_Y				0x15a0
1598c2ecf20Sopenharmony_ci#define DST_X_SUB				0x15a4
1608c2ecf20Sopenharmony_ci#define DST_Y_SUB				0x15a8
1618c2ecf20Sopenharmony_ci#define SRC_OFFSET				0x15ac
1628c2ecf20Sopenharmony_ci#define SRC_PITCH				0x15b0
1638c2ecf20Sopenharmony_ci#define DST_HEIGHT_WIDTH_BW			0x15b4
1648c2ecf20Sopenharmony_ci#define CLR_CMP_CNTL				0x15c0
1658c2ecf20Sopenharmony_ci#define CLR_CMP_CLR_SRC				0x15c4
1668c2ecf20Sopenharmony_ci#define CLR_CMP_CLR_DST				0x15c8
1678c2ecf20Sopenharmony_ci#define CLR_CMP_MASK				0x15cc
1688c2ecf20Sopenharmony_ci#define DP_SRC_FRGD_CLR				0x15d8
1698c2ecf20Sopenharmony_ci#define DP_SRC_BKGD_CLR				0x15dc
1708c2ecf20Sopenharmony_ci#define DST_BRES_ERR				0x1628
1718c2ecf20Sopenharmony_ci#define DST_BRES_INC				0x162c
1728c2ecf20Sopenharmony_ci#define DST_BRES_DEC				0x1630
1738c2ecf20Sopenharmony_ci#define DST_BRES_LNTH				0x1634
1748c2ecf20Sopenharmony_ci#define DST_BRES_LNTH_SUB			0x1638
1758c2ecf20Sopenharmony_ci#define SC_LEFT					0x1640
1768c2ecf20Sopenharmony_ci#define SC_RIGHT				0x1644
1778c2ecf20Sopenharmony_ci#define SC_TOP					0x1648
1788c2ecf20Sopenharmony_ci#define SC_BOTTOM				0x164c
1798c2ecf20Sopenharmony_ci#define SRC_SC_RIGHT				0x1654
1808c2ecf20Sopenharmony_ci#define SRC_SC_BOTTOM				0x165c
1818c2ecf20Sopenharmony_ci#define GUI_DEBUG0				0x16a0
1828c2ecf20Sopenharmony_ci#define GUI_DEBUG1				0x16a4
1838c2ecf20Sopenharmony_ci#define GUI_TIMEOUT				0x16b0
1848c2ecf20Sopenharmony_ci#define GUI_TIMEOUT0				0x16b4
1858c2ecf20Sopenharmony_ci#define GUI_TIMEOUT1				0x16b8
1868c2ecf20Sopenharmony_ci#define GUI_PROBE				0x16bc
1878c2ecf20Sopenharmony_ci#define DP_CNTL					0x16c0
1888c2ecf20Sopenharmony_ci#define DP_DATATYPE				0x16c4
1898c2ecf20Sopenharmony_ci#define DP_MIX					0x16c8
1908c2ecf20Sopenharmony_ci#define DP_WRITE_MASK				0x16cc
1918c2ecf20Sopenharmony_ci#define DP_CNTL_XDIR_YDIR_YMAJOR		0x16d0
1928c2ecf20Sopenharmony_ci#define DEFAULT_OFFSET				0x16e0
1938c2ecf20Sopenharmony_ci#define DEFAULT_PITCH				0x16e4
1948c2ecf20Sopenharmony_ci#define DEFAULT_SC_BOTTOM_RIGHT			0x16e8
1958c2ecf20Sopenharmony_ci#define SC_TOP_LEFT				0x16ec
1968c2ecf20Sopenharmony_ci#define SC_BOTTOM_RIGHT				0x16f0
1978c2ecf20Sopenharmony_ci#define SRC_SC_BOTTOM_RIGHT			0x16f4
1988c2ecf20Sopenharmony_ci#define WAIT_UNTIL				0x1720
1998c2ecf20Sopenharmony_ci#define CACHE_CNTL				0x1724
2008c2ecf20Sopenharmony_ci#define GUI_STAT				0x1740
2018c2ecf20Sopenharmony_ci#define PC_GUI_MODE				0x1744
2028c2ecf20Sopenharmony_ci#define PC_GUI_CTLSTAT				0x1748
2038c2ecf20Sopenharmony_ci#define PC_DEBUG_MODE				0x1760
2048c2ecf20Sopenharmony_ci#define BRES_DST_ERR_DEC			0x1780
2058c2ecf20Sopenharmony_ci#define TRAIL_BRES_T12_ERR_DEC			0x1784
2068c2ecf20Sopenharmony_ci#define TRAIL_BRES_T12_INC			0x1788
2078c2ecf20Sopenharmony_ci#define DP_T12_CNTL				0x178c
2088c2ecf20Sopenharmony_ci#define DST_BRES_T1_LNTH			0x1790
2098c2ecf20Sopenharmony_ci#define DST_BRES_T2_LNTH			0x1794
2108c2ecf20Sopenharmony_ci#define SCALE_SRC_HEIGHT_WIDTH			0x1994
2118c2ecf20Sopenharmony_ci#define SCALE_OFFSET_0				0x1998
2128c2ecf20Sopenharmony_ci#define SCALE_PITCH				0x199c
2138c2ecf20Sopenharmony_ci#define SCALE_X_INC				0x19a0
2148c2ecf20Sopenharmony_ci#define SCALE_Y_INC				0x19a4
2158c2ecf20Sopenharmony_ci#define SCALE_HACC				0x19a8
2168c2ecf20Sopenharmony_ci#define SCALE_VACC				0x19ac
2178c2ecf20Sopenharmony_ci#define SCALE_DST_X_Y				0x19b0
2188c2ecf20Sopenharmony_ci#define SCALE_DST_HEIGHT_WIDTH			0x19b4
2198c2ecf20Sopenharmony_ci#define SCALE_3D_CNTL				0x1a00
2208c2ecf20Sopenharmony_ci#define SCALE_3D_DATATYPE			0x1a20
2218c2ecf20Sopenharmony_ci#define SETUP_CNTL				0x1bc4
2228c2ecf20Sopenharmony_ci#define SOLID_COLOR				0x1bc8
2238c2ecf20Sopenharmony_ci#define WINDOW_XY_OFFSET			0x1bcc
2248c2ecf20Sopenharmony_ci#define DRAW_LINE_POINT				0x1bd0
2258c2ecf20Sopenharmony_ci#define SETUP_CNTL_PM4				0x1bd4
2268c2ecf20Sopenharmony_ci#define DST_PITCH_OFFSET_C			0x1c80
2278c2ecf20Sopenharmony_ci#define DP_GUI_MASTER_CNTL_C			0x1c84
2288c2ecf20Sopenharmony_ci#define SC_TOP_LEFT_C				0x1c88
2298c2ecf20Sopenharmony_ci#define SC_BOTTOM_RIGHT_C			0x1c8c
2308c2ecf20Sopenharmony_ci
2318c2ecf20Sopenharmony_ci#define CLR_CMP_MASK_3D				0x1A28
2328c2ecf20Sopenharmony_ci#define MISC_3D_STATE_CNTL_REG			0x1CA0
2338c2ecf20Sopenharmony_ci#define MC_SRC1_CNTL				0x19D8
2348c2ecf20Sopenharmony_ci#define TEX_CNTL				0x1800
2358c2ecf20Sopenharmony_ci
2368c2ecf20Sopenharmony_ci/* CONSTANTS */
2378c2ecf20Sopenharmony_ci#define GUI_ACTIVE				0x80000000
2388c2ecf20Sopenharmony_ci#define ENGINE_IDLE				0x0
2398c2ecf20Sopenharmony_ci
2408c2ecf20Sopenharmony_ci#define PLL_WR_EN				0x00000080
2418c2ecf20Sopenharmony_ci
2428c2ecf20Sopenharmony_ci#define CLK_PIN_CNTL				0x0001
2438c2ecf20Sopenharmony_ci#define PPLL_CNTL				0x0002
2448c2ecf20Sopenharmony_ci#define PPLL_REF_DIV				0x0003
2458c2ecf20Sopenharmony_ci#define PPLL_DIV_0				0x0004
2468c2ecf20Sopenharmony_ci#define PPLL_DIV_1				0x0005
2478c2ecf20Sopenharmony_ci#define PPLL_DIV_2				0x0006
2488c2ecf20Sopenharmony_ci#define PPLL_DIV_3				0x0007
2498c2ecf20Sopenharmony_ci#define VCLK_ECP_CNTL				0x0008
2508c2ecf20Sopenharmony_ci#define HTOTAL_CNTL				0x0009
2518c2ecf20Sopenharmony_ci#define X_MPLL_REF_FB_DIV			0x000a
2528c2ecf20Sopenharmony_ci#define XPLL_CNTL				0x000b
2538c2ecf20Sopenharmony_ci#define XDLL_CNTL				0x000c
2548c2ecf20Sopenharmony_ci#define XCLK_CNTL				0x000d
2558c2ecf20Sopenharmony_ci#define MPLL_CNTL				0x000e
2568c2ecf20Sopenharmony_ci#define MCLK_CNTL				0x000f
2578c2ecf20Sopenharmony_ci#define AGP_PLL_CNTL				0x0010
2588c2ecf20Sopenharmony_ci#define FCP_CNTL				0x0012
2598c2ecf20Sopenharmony_ci#define PLL_TEST_CNTL				0x0013
2608c2ecf20Sopenharmony_ci#define P2PLL_CNTL				0x002a
2618c2ecf20Sopenharmony_ci#define P2PLL_REF_DIV				0x002b
2628c2ecf20Sopenharmony_ci#define P2PLL_DIV_0				0x002b
2638c2ecf20Sopenharmony_ci#define POWER_MANAGEMENT			0x002f
2648c2ecf20Sopenharmony_ci
2658c2ecf20Sopenharmony_ci#define PPLL_RESET				0x01
2668c2ecf20Sopenharmony_ci#define PPLL_ATOMIC_UPDATE_EN			0x10000
2678c2ecf20Sopenharmony_ci#define PPLL_VGA_ATOMIC_UPDATE_EN		0x20000
2688c2ecf20Sopenharmony_ci#define PPLL_REF_DIV_MASK			0x3FF
2698c2ecf20Sopenharmony_ci#define PPLL_FB3_DIV_MASK			0x7FF
2708c2ecf20Sopenharmony_ci#define PPLL_POST3_DIV_MASK			0x70000
2718c2ecf20Sopenharmony_ci#define PPLL_ATOMIC_UPDATE_R			0x8000
2728c2ecf20Sopenharmony_ci#define PPLL_ATOMIC_UPDATE_W			0x8000
2738c2ecf20Sopenharmony_ci#define MEM_CFG_TYPE_MASK			0x3
2748c2ecf20Sopenharmony_ci#define XCLK_SRC_SEL_MASK			0x7
2758c2ecf20Sopenharmony_ci#define XPLL_FB_DIV_MASK			0xFF00
2768c2ecf20Sopenharmony_ci#define X_MPLL_REF_DIV_MASK			0xFF
2778c2ecf20Sopenharmony_ci
2788c2ecf20Sopenharmony_ci/* CRTC control values (CRTC_GEN_CNTL) */
2798c2ecf20Sopenharmony_ci#define CRTC_CSYNC_EN				0x00000010
2808c2ecf20Sopenharmony_ci
2818c2ecf20Sopenharmony_ci#define CRTC2_DBL_SCAN_EN			0x00000001
2828c2ecf20Sopenharmony_ci#define CRTC2_DISPLAY_DIS			0x00800000
2838c2ecf20Sopenharmony_ci#define CRTC2_FIFO_EXTSENSE			0x00200000
2848c2ecf20Sopenharmony_ci#define CRTC2_ICON_EN				0x00100000
2858c2ecf20Sopenharmony_ci#define CRTC2_CUR_EN				0x00010000
2868c2ecf20Sopenharmony_ci#define CRTC2_EN				0x02000000
2878c2ecf20Sopenharmony_ci#define CRTC2_DISP_REQ_EN_B			0x04000000
2888c2ecf20Sopenharmony_ci
2898c2ecf20Sopenharmony_ci#define CRTC_PIX_WIDTH_MASK			0x00000700
2908c2ecf20Sopenharmony_ci#define CRTC_PIX_WIDTH_4BPP			0x00000100
2918c2ecf20Sopenharmony_ci#define CRTC_PIX_WIDTH_8BPP			0x00000200
2928c2ecf20Sopenharmony_ci#define CRTC_PIX_WIDTH_15BPP			0x00000300
2938c2ecf20Sopenharmony_ci#define CRTC_PIX_WIDTH_16BPP			0x00000400
2948c2ecf20Sopenharmony_ci#define CRTC_PIX_WIDTH_24BPP			0x00000500
2958c2ecf20Sopenharmony_ci#define CRTC_PIX_WIDTH_32BPP			0x00000600
2968c2ecf20Sopenharmony_ci
2978c2ecf20Sopenharmony_ci/* DAC_CNTL bit constants */
2988c2ecf20Sopenharmony_ci#define DAC_8BIT_EN				0x00000100
2998c2ecf20Sopenharmony_ci#define DAC_MASK				0xFF000000
3008c2ecf20Sopenharmony_ci#define DAC_BLANKING				0x00000004
3018c2ecf20Sopenharmony_ci#define DAC_RANGE_CNTL				0x00000003
3028c2ecf20Sopenharmony_ci#define DAC_CLK_SEL				0x00000010
3038c2ecf20Sopenharmony_ci#define DAC_PALETTE_ACCESS_CNTL			0x00000020
3048c2ecf20Sopenharmony_ci#define DAC_PALETTE2_SNOOP_EN			0x00000040
3058c2ecf20Sopenharmony_ci#define DAC_PDWN				0x00008000
3068c2ecf20Sopenharmony_ci
3078c2ecf20Sopenharmony_ci/* CRTC_EXT_CNTL */
3088c2ecf20Sopenharmony_ci#define CRT_CRTC_ON				0x00008000
3098c2ecf20Sopenharmony_ci
3108c2ecf20Sopenharmony_ci/* GEN_RESET_CNTL bit constants */
3118c2ecf20Sopenharmony_ci#define SOFT_RESET_GUI				0x00000001
3128c2ecf20Sopenharmony_ci#define SOFT_RESET_VCLK				0x00000100
3138c2ecf20Sopenharmony_ci#define SOFT_RESET_PCLK				0x00000200
3148c2ecf20Sopenharmony_ci#define SOFT_RESET_ECP				0x00000400
3158c2ecf20Sopenharmony_ci#define SOFT_RESET_DISPENG_XCLK			0x00000800
3168c2ecf20Sopenharmony_ci
3178c2ecf20Sopenharmony_ci/* PC_GUI_CTLSTAT bit constants */
3188c2ecf20Sopenharmony_ci#define PC_BUSY_INIT				0x10000000
3198c2ecf20Sopenharmony_ci#define PC_BUSY_GUI				0x20000000
3208c2ecf20Sopenharmony_ci#define PC_BUSY_NGUI				0x40000000
3218c2ecf20Sopenharmony_ci#define PC_BUSY					0x80000000
3228c2ecf20Sopenharmony_ci
3238c2ecf20Sopenharmony_ci#define BUS_MASTER_DIS				0x00000040
3248c2ecf20Sopenharmony_ci#define PM4_BUFFER_CNTL_NONPM4			0x00000000
3258c2ecf20Sopenharmony_ci
3268c2ecf20Sopenharmony_ci/* DP_DATATYPE bit constants */
3278c2ecf20Sopenharmony_ci#define DST_8BPP				0x00000002
3288c2ecf20Sopenharmony_ci#define DST_15BPP				0x00000003
3298c2ecf20Sopenharmony_ci#define DST_16BPP				0x00000004
3308c2ecf20Sopenharmony_ci#define DST_24BPP				0x00000005
3318c2ecf20Sopenharmony_ci#define DST_32BPP				0x00000006
3328c2ecf20Sopenharmony_ci
3338c2ecf20Sopenharmony_ci#define BRUSH_SOLIDCOLOR			0x00000d00
3348c2ecf20Sopenharmony_ci
3358c2ecf20Sopenharmony_ci/* DP_GUI_MASTER_CNTL bit constants */
3368c2ecf20Sopenharmony_ci#define	GMC_SRC_PITCH_OFFSET_DEFAULT		0x00000000
3378c2ecf20Sopenharmony_ci#define GMC_DST_PITCH_OFFSET_DEFAULT		0x00000000
3388c2ecf20Sopenharmony_ci#define GMC_SRC_CLIP_DEFAULT			0x00000000
3398c2ecf20Sopenharmony_ci#define GMC_DST_CLIP_DEFAULT			0x00000000
3408c2ecf20Sopenharmony_ci#define GMC_BRUSH_SOLIDCOLOR			0x000000d0
3418c2ecf20Sopenharmony_ci#define GMC_SRC_DSTCOLOR			0x00003000
3428c2ecf20Sopenharmony_ci#define GMC_BYTE_ORDER_MSB_TO_LSB		0x00000000
3438c2ecf20Sopenharmony_ci#define GMC_DP_SRC_RECT				0x02000000
3448c2ecf20Sopenharmony_ci#define GMC_3D_FCN_EN_CLR			0x00000000
3458c2ecf20Sopenharmony_ci#define GMC_AUX_CLIP_CLEAR			0x20000000
3468c2ecf20Sopenharmony_ci#define GMC_DST_CLR_CMP_FCN_CLEAR		0x10000000
3478c2ecf20Sopenharmony_ci#define GMC_WRITE_MASK_SET			0x40000000
3488c2ecf20Sopenharmony_ci#define GMC_DP_CONVERSION_TEMP_6500		0x00000000
3498c2ecf20Sopenharmony_ci
3508c2ecf20Sopenharmony_ci/* DP_GUI_MASTER_CNTL ROP3 named constants */
3518c2ecf20Sopenharmony_ci#define	ROP3_PATCOPY				0x00f00000
3528c2ecf20Sopenharmony_ci#define ROP3_SRCCOPY				0x00cc0000
3538c2ecf20Sopenharmony_ci
3548c2ecf20Sopenharmony_ci#define SRC_DSTCOLOR				0x00030000
3558c2ecf20Sopenharmony_ci
3568c2ecf20Sopenharmony_ci/* DP_CNTL bit constants */
3578c2ecf20Sopenharmony_ci#define DST_X_RIGHT_TO_LEFT			0x00000000
3588c2ecf20Sopenharmony_ci#define DST_X_LEFT_TO_RIGHT			0x00000001
3598c2ecf20Sopenharmony_ci#define DST_Y_BOTTOM_TO_TOP			0x00000000
3608c2ecf20Sopenharmony_ci#define DST_Y_TOP_TO_BOTTOM			0x00000002
3618c2ecf20Sopenharmony_ci#define DST_X_MAJOR				0x00000000
3628c2ecf20Sopenharmony_ci#define DST_Y_MAJOR				0x00000004
3638c2ecf20Sopenharmony_ci#define DST_X_TILE				0x00000008
3648c2ecf20Sopenharmony_ci#define DST_Y_TILE				0x00000010
3658c2ecf20Sopenharmony_ci#define DST_LAST_PEL				0x00000020
3668c2ecf20Sopenharmony_ci#define DST_TRAIL_X_RIGHT_TO_LEFT		0x00000000
3678c2ecf20Sopenharmony_ci#define DST_TRAIL_X_LEFT_TO_RIGHT		0x00000040
3688c2ecf20Sopenharmony_ci#define DST_TRAP_FILL_RIGHT_TO_LEFT		0x00000000
3698c2ecf20Sopenharmony_ci#define DST_TRAP_FILL_LEFT_TO_RIGHT		0x00000080
3708c2ecf20Sopenharmony_ci#define DST_BRES_SIGN				0x00000100
3718c2ecf20Sopenharmony_ci#define DST_HOST_BIG_ENDIAN_EN			0x00000200
3728c2ecf20Sopenharmony_ci#define DST_POLYLINE_NONLAST			0x00008000
3738c2ecf20Sopenharmony_ci#define DST_RASTER_STALL			0x00010000
3748c2ecf20Sopenharmony_ci#define DST_POLY_EDGE				0x00040000
3758c2ecf20Sopenharmony_ci
3768c2ecf20Sopenharmony_ci/* DP_MIX bit constants */
3778c2ecf20Sopenharmony_ci#define DP_SRC_RECT				0x00000200
3788c2ecf20Sopenharmony_ci#define DP_SRC_HOST				0x00000300
3798c2ecf20Sopenharmony_ci#define DP_SRC_HOST_BYTEALIGN			0x00000400
3808c2ecf20Sopenharmony_ci
3818c2ecf20Sopenharmony_ci/* LVDS_GEN_CNTL constants */
3828c2ecf20Sopenharmony_ci#define LVDS_BL_MOD_LEVEL_MASK			0x0000ff00
3838c2ecf20Sopenharmony_ci#define LVDS_BL_MOD_LEVEL_SHIFT			8
3848c2ecf20Sopenharmony_ci#define LVDS_BL_MOD_EN				0x00010000
3858c2ecf20Sopenharmony_ci#define LVDS_DIGION				0x00040000
3868c2ecf20Sopenharmony_ci#define LVDS_BLON				0x00080000
3878c2ecf20Sopenharmony_ci#define LVDS_ON					0x00000001
3888c2ecf20Sopenharmony_ci#define LVDS_DISPLAY_DIS			0x00000002
3898c2ecf20Sopenharmony_ci#define LVDS_PANEL_TYPE_2PIX_PER_CLK		0x00000004
3908c2ecf20Sopenharmony_ci#define LVDS_PANEL_24BITS_TFT			0x00000008
3918c2ecf20Sopenharmony_ci#define LVDS_FRAME_MOD_NO			0x00000000
3928c2ecf20Sopenharmony_ci#define LVDS_FRAME_MOD_2_LEVELS			0x00000010
3938c2ecf20Sopenharmony_ci#define LVDS_FRAME_MOD_4_LEVELS			0x00000020
3948c2ecf20Sopenharmony_ci#define LVDS_RST_FM				0x00000040
3958c2ecf20Sopenharmony_ci#define LVDS_EN					0x00000080
3968c2ecf20Sopenharmony_ci
3978c2ecf20Sopenharmony_ci/* CRTC2_GEN_CNTL constants */
3988c2ecf20Sopenharmony_ci#define CRTC2_EN				0x02000000
3998c2ecf20Sopenharmony_ci
4008c2ecf20Sopenharmony_ci/* POWER_MANAGEMENT constants */
4018c2ecf20Sopenharmony_ci#define PWR_MGT_ON				0x00000001
4028c2ecf20Sopenharmony_ci#define PWR_MGT_MODE_MASK			0x00000006
4038c2ecf20Sopenharmony_ci#define PWR_MGT_MODE_PIN			0x00000000
4048c2ecf20Sopenharmony_ci#define PWR_MGT_MODE_REGISTER			0x00000002
4058c2ecf20Sopenharmony_ci#define PWR_MGT_MODE_TIMER			0x00000004
4068c2ecf20Sopenharmony_ci#define PWR_MGT_MODE_PCI			0x00000006
4078c2ecf20Sopenharmony_ci#define PWR_MGT_AUTO_PWR_UP_EN			0x00000008
4088c2ecf20Sopenharmony_ci#define PWR_MGT_ACTIVITY_PIN_ON			0x00000010
4098c2ecf20Sopenharmony_ci#define PWR_MGT_STANDBY_POL			0x00000020
4108c2ecf20Sopenharmony_ci#define PWR_MGT_SUSPEND_POL			0x00000040
4118c2ecf20Sopenharmony_ci#define PWR_MGT_SELF_REFRESH			0x00000080
4128c2ecf20Sopenharmony_ci#define PWR_MGT_ACTIVITY_PIN_EN			0x00000100
4138c2ecf20Sopenharmony_ci#define PWR_MGT_KEYBD_SNOOP			0x00000200
4148c2ecf20Sopenharmony_ci#define PWR_MGT_TRISTATE_MEM_EN			0x00000800
4158c2ecf20Sopenharmony_ci#define PWR_MGT_SELW4MS				0x00001000
4168c2ecf20Sopenharmony_ci#define PWR_MGT_SLOWDOWN_MCLK			0x00002000
4178c2ecf20Sopenharmony_ci
4188c2ecf20Sopenharmony_ci#define PMI_PMSCR_REG				0x60
4198c2ecf20Sopenharmony_ci
4208c2ecf20Sopenharmony_ci/* used by ATI bug fix for hardware ROM */
4218c2ecf20Sopenharmony_ci#define RAGE128_MPP_TB_CONFIG                   0x01c0
4228c2ecf20Sopenharmony_ci
4238c2ecf20Sopenharmony_ci#endif				/* REG_RAGE128_H */
424