162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci/*  $Id: aty128.h,v 1.1 1999/10/12 11:00:40 geert Exp $
362306a36Sopenharmony_ci *  linux/drivers/video/aty128.h
462306a36Sopenharmony_ci *  Register definitions for ATI Rage128 boards
562306a36Sopenharmony_ci *
662306a36Sopenharmony_ci *  Anthony Tong <atong@uiuc.edu>, 1999
762306a36Sopenharmony_ci *  Brad Douglas <brad@neruo.com>, 2000
862306a36Sopenharmony_ci */
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#ifndef REG_RAGE128_H
1162306a36Sopenharmony_ci#define REG_RAGE128_H
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci#define CLOCK_CNTL_INDEX			0x0008
1462306a36Sopenharmony_ci#define CLOCK_CNTL_DATA				0x000c
1562306a36Sopenharmony_ci#define BIOS_0_SCRATCH				0x0010
1662306a36Sopenharmony_ci#define BUS_CNTL				0x0030
1762306a36Sopenharmony_ci#define BUS_CNTL1				0x0034
1862306a36Sopenharmony_ci#define GEN_INT_CNTL				0x0040
1962306a36Sopenharmony_ci#define CRTC_GEN_CNTL				0x0050
2062306a36Sopenharmony_ci#define CRTC_EXT_CNTL				0x0054
2162306a36Sopenharmony_ci#define DAC_CNTL				0x0058
2262306a36Sopenharmony_ci#define I2C_CNTL_1				0x0094
2362306a36Sopenharmony_ci#define PALETTE_INDEX				0x00b0
2462306a36Sopenharmony_ci#define PALETTE_DATA				0x00b4
2562306a36Sopenharmony_ci#define CNFG_CNTL				0x00e0
2662306a36Sopenharmony_ci#define GEN_RESET_CNTL				0x00f0
2762306a36Sopenharmony_ci#define CNFG_MEMSIZE				0x00f8
2862306a36Sopenharmony_ci#define MEM_CNTL				0x0140
2962306a36Sopenharmony_ci#define MEM_POWER_MISC				0x015c
3062306a36Sopenharmony_ci#define AGP_BASE				0x0170
3162306a36Sopenharmony_ci#define AGP_CNTL				0x0174
3262306a36Sopenharmony_ci#define AGP_APER_OFFSET				0x0178
3362306a36Sopenharmony_ci#define PCI_GART_PAGE				0x017c
3462306a36Sopenharmony_ci#define PC_NGUI_MODE				0x0180
3562306a36Sopenharmony_ci#define PC_NGUI_CTLSTAT				0x0184
3662306a36Sopenharmony_ci#define MPP_TB_CONFIG				0x01C0
3762306a36Sopenharmony_ci#define MPP_GP_CONFIG				0x01C8
3862306a36Sopenharmony_ci#define VIPH_CONTROL				0x01D0
3962306a36Sopenharmony_ci#define CRTC_H_TOTAL_DISP			0x0200
4062306a36Sopenharmony_ci#define CRTC_H_SYNC_STRT_WID			0x0204
4162306a36Sopenharmony_ci#define CRTC_V_TOTAL_DISP			0x0208
4262306a36Sopenharmony_ci#define CRTC_V_SYNC_STRT_WID			0x020c
4362306a36Sopenharmony_ci#define CRTC_VLINE_CRNT_VLINE			0x0210
4462306a36Sopenharmony_ci#define CRTC_CRNT_FRAME				0x0214
4562306a36Sopenharmony_ci#define CRTC_GUI_TRIG_VLINE			0x0218
4662306a36Sopenharmony_ci#define CRTC_OFFSET				0x0224
4762306a36Sopenharmony_ci#define CRTC_OFFSET_CNTL			0x0228
4862306a36Sopenharmony_ci#define CRTC_PITCH				0x022c
4962306a36Sopenharmony_ci#define OVR_CLR					0x0230
5062306a36Sopenharmony_ci#define OVR_WID_LEFT_RIGHT			0x0234
5162306a36Sopenharmony_ci#define OVR_WID_TOP_BOTTOM			0x0238
5262306a36Sopenharmony_ci#define LVDS_GEN_CNTL				0x02d0
5362306a36Sopenharmony_ci#define DDA_CONFIG				0x02e0
5462306a36Sopenharmony_ci#define DDA_ON_OFF				0x02e4
5562306a36Sopenharmony_ci#define VGA_DDA_CONFIG				0x02e8
5662306a36Sopenharmony_ci#define VGA_DDA_ON_OFF				0x02ec
5762306a36Sopenharmony_ci#define CRTC2_H_TOTAL_DISP			0x0300
5862306a36Sopenharmony_ci#define CRTC2_H_SYNC_STRT_WID			0x0304
5962306a36Sopenharmony_ci#define CRTC2_V_TOTAL_DISP			0x0308
6062306a36Sopenharmony_ci#define CRTC2_V_SYNC_STRT_WID			0x030c
6162306a36Sopenharmony_ci#define CRTC2_VLINE_CRNT_VLINE			0x0310
6262306a36Sopenharmony_ci#define CRTC2_CRNT_FRAME			0x0314
6362306a36Sopenharmony_ci#define CRTC2_GUI_TRIG_VLINE			0x0318
6462306a36Sopenharmony_ci#define CRTC2_OFFSET				0x0324
6562306a36Sopenharmony_ci#define CRTC2_OFFSET_CNTL			0x0328
6662306a36Sopenharmony_ci#define CRTC2_PITCH				0x032c
6762306a36Sopenharmony_ci#define DDA2_CONFIG				0x03e0
6862306a36Sopenharmony_ci#define DDA2_ON_OFF				0x03e4
6962306a36Sopenharmony_ci#define CRTC2_GEN_CNTL				0x03f8
7062306a36Sopenharmony_ci#define CRTC2_STATUS				0x03fc
7162306a36Sopenharmony_ci#define OV0_SCALE_CNTL				0x0420
7262306a36Sopenharmony_ci#define SUBPIC_CNTL				0x0540
7362306a36Sopenharmony_ci#define PM4_BUFFER_OFFSET			0x0700
7462306a36Sopenharmony_ci#define PM4_BUFFER_CNTL				0x0704
7562306a36Sopenharmony_ci#define PM4_BUFFER_WM_CNTL			0x0708
7662306a36Sopenharmony_ci#define PM4_BUFFER_DL_RPTR_ADDR			0x070c
7762306a36Sopenharmony_ci#define PM4_BUFFER_DL_RPTR			0x0710
7862306a36Sopenharmony_ci#define PM4_BUFFER_DL_WPTR			0x0714
7962306a36Sopenharmony_ci#define PM4_VC_FPU_SETUP			0x071c
8062306a36Sopenharmony_ci#define PM4_FPU_CNTL				0x0720
8162306a36Sopenharmony_ci#define PM4_VC_FORMAT				0x0724
8262306a36Sopenharmony_ci#define PM4_VC_CNTL				0x0728
8362306a36Sopenharmony_ci#define PM4_VC_I01				0x072c
8462306a36Sopenharmony_ci#define PM4_VC_VLOFF				0x0730
8562306a36Sopenharmony_ci#define PM4_VC_VLSIZE				0x0734
8662306a36Sopenharmony_ci#define PM4_IW_INDOFF				0x0738
8762306a36Sopenharmony_ci#define PM4_IW_INDSIZE				0x073c
8862306a36Sopenharmony_ci#define PM4_FPU_FPX0				0x0740
8962306a36Sopenharmony_ci#define PM4_FPU_FPY0				0x0744
9062306a36Sopenharmony_ci#define PM4_FPU_FPX1				0x0748
9162306a36Sopenharmony_ci#define PM4_FPU_FPY1				0x074c
9262306a36Sopenharmony_ci#define PM4_FPU_FPX2				0x0750
9362306a36Sopenharmony_ci#define PM4_FPU_FPY2				0x0754
9462306a36Sopenharmony_ci#define PM4_FPU_FPY3				0x0758
9562306a36Sopenharmony_ci#define PM4_FPU_FPY4				0x075c
9662306a36Sopenharmony_ci#define PM4_FPU_FPY5				0x0760
9762306a36Sopenharmony_ci#define PM4_FPU_FPY6				0x0764
9862306a36Sopenharmony_ci#define PM4_FPU_FPR				0x0768
9962306a36Sopenharmony_ci#define PM4_FPU_FPG				0x076c
10062306a36Sopenharmony_ci#define PM4_FPU_FPB				0x0770
10162306a36Sopenharmony_ci#define PM4_FPU_FPA				0x0774
10262306a36Sopenharmony_ci#define PM4_FPU_INTXY0				0x0780
10362306a36Sopenharmony_ci#define PM4_FPU_INTXY1				0x0784
10462306a36Sopenharmony_ci#define PM4_FPU_INTXY2				0x0788
10562306a36Sopenharmony_ci#define PM4_FPU_INTARGB				0x078c
10662306a36Sopenharmony_ci#define PM4_FPU_FPTWICEAREA			0x0790
10762306a36Sopenharmony_ci#define PM4_FPU_DMAJOR01			0x0794
10862306a36Sopenharmony_ci#define PM4_FPU_DMAJOR12			0x0798
10962306a36Sopenharmony_ci#define PM4_FPU_DMAJOR02			0x079c
11062306a36Sopenharmony_ci#define PM4_FPU_STAT				0x07a0
11162306a36Sopenharmony_ci#define PM4_STAT				0x07b8
11262306a36Sopenharmony_ci#define PM4_TEST_CNTL				0x07d0
11362306a36Sopenharmony_ci#define PM4_MICROCODE_ADDR			0x07d4
11462306a36Sopenharmony_ci#define PM4_MICROCODE_RADDR			0x07d8
11562306a36Sopenharmony_ci#define PM4_MICROCODE_DATAH			0x07dc
11662306a36Sopenharmony_ci#define PM4_MICROCODE_DATAL			0x07e0
11762306a36Sopenharmony_ci#define PM4_CMDFIFO_ADDR			0x07e4
11862306a36Sopenharmony_ci#define PM4_CMDFIFO_DATAH			0x07e8
11962306a36Sopenharmony_ci#define PM4_CMDFIFO_DATAL			0x07ec
12062306a36Sopenharmony_ci#define PM4_BUFFER_ADDR				0x07f0
12162306a36Sopenharmony_ci#define PM4_BUFFER_DATAH			0x07f4
12262306a36Sopenharmony_ci#define PM4_BUFFER_DATAL			0x07f8
12362306a36Sopenharmony_ci#define PM4_MICRO_CNTL				0x07fc
12462306a36Sopenharmony_ci#define CAP0_TRIG_CNTL				0x0950
12562306a36Sopenharmony_ci#define CAP1_TRIG_CNTL				0x09c0
12662306a36Sopenharmony_ci
12762306a36Sopenharmony_ci/******************************************************************************
12862306a36Sopenharmony_ci *                  GUI Block Memory Mapped Registers                         *
12962306a36Sopenharmony_ci *                     These registers are FIFOed.                            *
13062306a36Sopenharmony_ci *****************************************************************************/
13162306a36Sopenharmony_ci#define PM4_FIFO_DATA_EVEN			0x1000
13262306a36Sopenharmony_ci#define PM4_FIFO_DATA_ODD			0x1004
13362306a36Sopenharmony_ci
13462306a36Sopenharmony_ci#define DST_OFFSET				0x1404
13562306a36Sopenharmony_ci#define DST_PITCH				0x1408
13662306a36Sopenharmony_ci#define DST_WIDTH				0x140c
13762306a36Sopenharmony_ci#define DST_HEIGHT				0x1410
13862306a36Sopenharmony_ci#define SRC_X					0x1414
13962306a36Sopenharmony_ci#define SRC_Y					0x1418
14062306a36Sopenharmony_ci#define DST_X					0x141c
14162306a36Sopenharmony_ci#define DST_Y					0x1420
14262306a36Sopenharmony_ci#define SRC_PITCH_OFFSET			0x1428
14362306a36Sopenharmony_ci#define DST_PITCH_OFFSET			0x142c
14462306a36Sopenharmony_ci#define SRC_Y_X					0x1434
14562306a36Sopenharmony_ci#define DST_Y_X					0x1438
14662306a36Sopenharmony_ci#define DST_HEIGHT_WIDTH			0x143c
14762306a36Sopenharmony_ci#define DP_GUI_MASTER_CNTL			0x146c
14862306a36Sopenharmony_ci#define BRUSH_SCALE				0x1470
14962306a36Sopenharmony_ci#define BRUSH_Y_X				0x1474
15062306a36Sopenharmony_ci#define DP_BRUSH_BKGD_CLR			0x1478
15162306a36Sopenharmony_ci#define DP_BRUSH_FRGD_CLR			0x147c
15262306a36Sopenharmony_ci#define DST_WIDTH_X				0x1588
15362306a36Sopenharmony_ci#define DST_HEIGHT_WIDTH_8			0x158c
15462306a36Sopenharmony_ci#define SRC_X_Y					0x1590
15562306a36Sopenharmony_ci#define DST_X_Y					0x1594
15662306a36Sopenharmony_ci#define DST_WIDTH_HEIGHT			0x1598
15762306a36Sopenharmony_ci#define DST_WIDTH_X_INCY			0x159c
15862306a36Sopenharmony_ci#define DST_HEIGHT_Y				0x15a0
15962306a36Sopenharmony_ci#define DST_X_SUB				0x15a4
16062306a36Sopenharmony_ci#define DST_Y_SUB				0x15a8
16162306a36Sopenharmony_ci#define SRC_OFFSET				0x15ac
16262306a36Sopenharmony_ci#define SRC_PITCH				0x15b0
16362306a36Sopenharmony_ci#define DST_HEIGHT_WIDTH_BW			0x15b4
16462306a36Sopenharmony_ci#define CLR_CMP_CNTL				0x15c0
16562306a36Sopenharmony_ci#define CLR_CMP_CLR_SRC				0x15c4
16662306a36Sopenharmony_ci#define CLR_CMP_CLR_DST				0x15c8
16762306a36Sopenharmony_ci#define CLR_CMP_MASK				0x15cc
16862306a36Sopenharmony_ci#define DP_SRC_FRGD_CLR				0x15d8
16962306a36Sopenharmony_ci#define DP_SRC_BKGD_CLR				0x15dc
17062306a36Sopenharmony_ci#define DST_BRES_ERR				0x1628
17162306a36Sopenharmony_ci#define DST_BRES_INC				0x162c
17262306a36Sopenharmony_ci#define DST_BRES_DEC				0x1630
17362306a36Sopenharmony_ci#define DST_BRES_LNTH				0x1634
17462306a36Sopenharmony_ci#define DST_BRES_LNTH_SUB			0x1638
17562306a36Sopenharmony_ci#define SC_LEFT					0x1640
17662306a36Sopenharmony_ci#define SC_RIGHT				0x1644
17762306a36Sopenharmony_ci#define SC_TOP					0x1648
17862306a36Sopenharmony_ci#define SC_BOTTOM				0x164c
17962306a36Sopenharmony_ci#define SRC_SC_RIGHT				0x1654
18062306a36Sopenharmony_ci#define SRC_SC_BOTTOM				0x165c
18162306a36Sopenharmony_ci#define GUI_DEBUG0				0x16a0
18262306a36Sopenharmony_ci#define GUI_DEBUG1				0x16a4
18362306a36Sopenharmony_ci#define GUI_TIMEOUT				0x16b0
18462306a36Sopenharmony_ci#define GUI_TIMEOUT0				0x16b4
18562306a36Sopenharmony_ci#define GUI_TIMEOUT1				0x16b8
18662306a36Sopenharmony_ci#define GUI_PROBE				0x16bc
18762306a36Sopenharmony_ci#define DP_CNTL					0x16c0
18862306a36Sopenharmony_ci#define DP_DATATYPE				0x16c4
18962306a36Sopenharmony_ci#define DP_MIX					0x16c8
19062306a36Sopenharmony_ci#define DP_WRITE_MASK				0x16cc
19162306a36Sopenharmony_ci#define DP_CNTL_XDIR_YDIR_YMAJOR		0x16d0
19262306a36Sopenharmony_ci#define DEFAULT_OFFSET				0x16e0
19362306a36Sopenharmony_ci#define DEFAULT_PITCH				0x16e4
19462306a36Sopenharmony_ci#define DEFAULT_SC_BOTTOM_RIGHT			0x16e8
19562306a36Sopenharmony_ci#define SC_TOP_LEFT				0x16ec
19662306a36Sopenharmony_ci#define SC_BOTTOM_RIGHT				0x16f0
19762306a36Sopenharmony_ci#define SRC_SC_BOTTOM_RIGHT			0x16f4
19862306a36Sopenharmony_ci#define WAIT_UNTIL				0x1720
19962306a36Sopenharmony_ci#define CACHE_CNTL				0x1724
20062306a36Sopenharmony_ci#define GUI_STAT				0x1740
20162306a36Sopenharmony_ci#define PC_GUI_MODE				0x1744
20262306a36Sopenharmony_ci#define PC_GUI_CTLSTAT				0x1748
20362306a36Sopenharmony_ci#define PC_DEBUG_MODE				0x1760
20462306a36Sopenharmony_ci#define BRES_DST_ERR_DEC			0x1780
20562306a36Sopenharmony_ci#define TRAIL_BRES_T12_ERR_DEC			0x1784
20662306a36Sopenharmony_ci#define TRAIL_BRES_T12_INC			0x1788
20762306a36Sopenharmony_ci#define DP_T12_CNTL				0x178c
20862306a36Sopenharmony_ci#define DST_BRES_T1_LNTH			0x1790
20962306a36Sopenharmony_ci#define DST_BRES_T2_LNTH			0x1794
21062306a36Sopenharmony_ci#define SCALE_SRC_HEIGHT_WIDTH			0x1994
21162306a36Sopenharmony_ci#define SCALE_OFFSET_0				0x1998
21262306a36Sopenharmony_ci#define SCALE_PITCH				0x199c
21362306a36Sopenharmony_ci#define SCALE_X_INC				0x19a0
21462306a36Sopenharmony_ci#define SCALE_Y_INC				0x19a4
21562306a36Sopenharmony_ci#define SCALE_HACC				0x19a8
21662306a36Sopenharmony_ci#define SCALE_VACC				0x19ac
21762306a36Sopenharmony_ci#define SCALE_DST_X_Y				0x19b0
21862306a36Sopenharmony_ci#define SCALE_DST_HEIGHT_WIDTH			0x19b4
21962306a36Sopenharmony_ci#define SCALE_3D_CNTL				0x1a00
22062306a36Sopenharmony_ci#define SCALE_3D_DATATYPE			0x1a20
22162306a36Sopenharmony_ci#define SETUP_CNTL				0x1bc4
22262306a36Sopenharmony_ci#define SOLID_COLOR				0x1bc8
22362306a36Sopenharmony_ci#define WINDOW_XY_OFFSET			0x1bcc
22462306a36Sopenharmony_ci#define DRAW_LINE_POINT				0x1bd0
22562306a36Sopenharmony_ci#define SETUP_CNTL_PM4				0x1bd4
22662306a36Sopenharmony_ci#define DST_PITCH_OFFSET_C			0x1c80
22762306a36Sopenharmony_ci#define DP_GUI_MASTER_CNTL_C			0x1c84
22862306a36Sopenharmony_ci#define SC_TOP_LEFT_C				0x1c88
22962306a36Sopenharmony_ci#define SC_BOTTOM_RIGHT_C			0x1c8c
23062306a36Sopenharmony_ci
23162306a36Sopenharmony_ci#define CLR_CMP_MASK_3D				0x1A28
23262306a36Sopenharmony_ci#define MISC_3D_STATE_CNTL_REG			0x1CA0
23362306a36Sopenharmony_ci#define MC_SRC1_CNTL				0x19D8
23462306a36Sopenharmony_ci#define TEX_CNTL				0x1800
23562306a36Sopenharmony_ci
23662306a36Sopenharmony_ci/* CONSTANTS */
23762306a36Sopenharmony_ci#define GUI_ACTIVE				0x80000000
23862306a36Sopenharmony_ci#define ENGINE_IDLE				0x0
23962306a36Sopenharmony_ci
24062306a36Sopenharmony_ci#define PLL_WR_EN				0x00000080
24162306a36Sopenharmony_ci
24262306a36Sopenharmony_ci#define CLK_PIN_CNTL				0x0001
24362306a36Sopenharmony_ci#define PPLL_CNTL				0x0002
24462306a36Sopenharmony_ci#define PPLL_REF_DIV				0x0003
24562306a36Sopenharmony_ci#define PPLL_DIV_0				0x0004
24662306a36Sopenharmony_ci#define PPLL_DIV_1				0x0005
24762306a36Sopenharmony_ci#define PPLL_DIV_2				0x0006
24862306a36Sopenharmony_ci#define PPLL_DIV_3				0x0007
24962306a36Sopenharmony_ci#define VCLK_ECP_CNTL				0x0008
25062306a36Sopenharmony_ci#define HTOTAL_CNTL				0x0009
25162306a36Sopenharmony_ci#define X_MPLL_REF_FB_DIV			0x000a
25262306a36Sopenharmony_ci#define XPLL_CNTL				0x000b
25362306a36Sopenharmony_ci#define XDLL_CNTL				0x000c
25462306a36Sopenharmony_ci#define XCLK_CNTL				0x000d
25562306a36Sopenharmony_ci#define MPLL_CNTL				0x000e
25662306a36Sopenharmony_ci#define MCLK_CNTL				0x000f
25762306a36Sopenharmony_ci#define AGP_PLL_CNTL				0x0010
25862306a36Sopenharmony_ci#define FCP_CNTL				0x0012
25962306a36Sopenharmony_ci#define PLL_TEST_CNTL				0x0013
26062306a36Sopenharmony_ci#define P2PLL_CNTL				0x002a
26162306a36Sopenharmony_ci#define P2PLL_REF_DIV				0x002b
26262306a36Sopenharmony_ci#define P2PLL_DIV_0				0x002b
26362306a36Sopenharmony_ci#define POWER_MANAGEMENT			0x002f
26462306a36Sopenharmony_ci
26562306a36Sopenharmony_ci#define PPLL_RESET				0x01
26662306a36Sopenharmony_ci#define PPLL_ATOMIC_UPDATE_EN			0x10000
26762306a36Sopenharmony_ci#define PPLL_VGA_ATOMIC_UPDATE_EN		0x20000
26862306a36Sopenharmony_ci#define PPLL_REF_DIV_MASK			0x3FF
26962306a36Sopenharmony_ci#define PPLL_FB3_DIV_MASK			0x7FF
27062306a36Sopenharmony_ci#define PPLL_POST3_DIV_MASK			0x70000
27162306a36Sopenharmony_ci#define PPLL_ATOMIC_UPDATE_R			0x8000
27262306a36Sopenharmony_ci#define PPLL_ATOMIC_UPDATE_W			0x8000
27362306a36Sopenharmony_ci#define MEM_CFG_TYPE_MASK			0x3
27462306a36Sopenharmony_ci#define XCLK_SRC_SEL_MASK			0x7
27562306a36Sopenharmony_ci#define XPLL_FB_DIV_MASK			0xFF00
27662306a36Sopenharmony_ci#define X_MPLL_REF_DIV_MASK			0xFF
27762306a36Sopenharmony_ci
27862306a36Sopenharmony_ci/* CRTC control values (CRTC_GEN_CNTL) */
27962306a36Sopenharmony_ci#define CRTC_CSYNC_EN				0x00000010
28062306a36Sopenharmony_ci
28162306a36Sopenharmony_ci#define CRTC2_DBL_SCAN_EN			0x00000001
28262306a36Sopenharmony_ci#define CRTC2_DISPLAY_DIS			0x00800000
28362306a36Sopenharmony_ci#define CRTC2_FIFO_EXTSENSE			0x00200000
28462306a36Sopenharmony_ci#define CRTC2_ICON_EN				0x00100000
28562306a36Sopenharmony_ci#define CRTC2_CUR_EN				0x00010000
28662306a36Sopenharmony_ci#define CRTC2_EN				0x02000000
28762306a36Sopenharmony_ci#define CRTC2_DISP_REQ_EN_B			0x04000000
28862306a36Sopenharmony_ci
28962306a36Sopenharmony_ci#define CRTC_PIX_WIDTH_MASK			0x00000700
29062306a36Sopenharmony_ci#define CRTC_PIX_WIDTH_4BPP			0x00000100
29162306a36Sopenharmony_ci#define CRTC_PIX_WIDTH_8BPP			0x00000200
29262306a36Sopenharmony_ci#define CRTC_PIX_WIDTH_15BPP			0x00000300
29362306a36Sopenharmony_ci#define CRTC_PIX_WIDTH_16BPP			0x00000400
29462306a36Sopenharmony_ci#define CRTC_PIX_WIDTH_24BPP			0x00000500
29562306a36Sopenharmony_ci#define CRTC_PIX_WIDTH_32BPP			0x00000600
29662306a36Sopenharmony_ci
29762306a36Sopenharmony_ci/* DAC_CNTL bit constants */
29862306a36Sopenharmony_ci#define DAC_8BIT_EN				0x00000100
29962306a36Sopenharmony_ci#define DAC_MASK				0xFF000000
30062306a36Sopenharmony_ci#define DAC_BLANKING				0x00000004
30162306a36Sopenharmony_ci#define DAC_RANGE_CNTL				0x00000003
30262306a36Sopenharmony_ci#define DAC_CLK_SEL				0x00000010
30362306a36Sopenharmony_ci#define DAC_PALETTE_ACCESS_CNTL			0x00000020
30462306a36Sopenharmony_ci#define DAC_PALETTE2_SNOOP_EN			0x00000040
30562306a36Sopenharmony_ci#define DAC_PDWN				0x00008000
30662306a36Sopenharmony_ci
30762306a36Sopenharmony_ci/* CRTC_EXT_CNTL */
30862306a36Sopenharmony_ci#define CRT_CRTC_ON				0x00008000
30962306a36Sopenharmony_ci
31062306a36Sopenharmony_ci/* GEN_RESET_CNTL bit constants */
31162306a36Sopenharmony_ci#define SOFT_RESET_GUI				0x00000001
31262306a36Sopenharmony_ci#define SOFT_RESET_VCLK				0x00000100
31362306a36Sopenharmony_ci#define SOFT_RESET_PCLK				0x00000200
31462306a36Sopenharmony_ci#define SOFT_RESET_ECP				0x00000400
31562306a36Sopenharmony_ci#define SOFT_RESET_DISPENG_XCLK			0x00000800
31662306a36Sopenharmony_ci
31762306a36Sopenharmony_ci/* PC_GUI_CTLSTAT bit constants */
31862306a36Sopenharmony_ci#define PC_BUSY_INIT				0x10000000
31962306a36Sopenharmony_ci#define PC_BUSY_GUI				0x20000000
32062306a36Sopenharmony_ci#define PC_BUSY_NGUI				0x40000000
32162306a36Sopenharmony_ci#define PC_BUSY					0x80000000
32262306a36Sopenharmony_ci
32362306a36Sopenharmony_ci#define BUS_MASTER_DIS				0x00000040
32462306a36Sopenharmony_ci#define PM4_BUFFER_CNTL_NONPM4			0x00000000
32562306a36Sopenharmony_ci
32662306a36Sopenharmony_ci/* DP_DATATYPE bit constants */
32762306a36Sopenharmony_ci#define DST_8BPP				0x00000002
32862306a36Sopenharmony_ci#define DST_15BPP				0x00000003
32962306a36Sopenharmony_ci#define DST_16BPP				0x00000004
33062306a36Sopenharmony_ci#define DST_24BPP				0x00000005
33162306a36Sopenharmony_ci#define DST_32BPP				0x00000006
33262306a36Sopenharmony_ci
33362306a36Sopenharmony_ci#define BRUSH_SOLIDCOLOR			0x00000d00
33462306a36Sopenharmony_ci
33562306a36Sopenharmony_ci/* DP_GUI_MASTER_CNTL bit constants */
33662306a36Sopenharmony_ci#define	GMC_SRC_PITCH_OFFSET_DEFAULT		0x00000000
33762306a36Sopenharmony_ci#define GMC_DST_PITCH_OFFSET_DEFAULT		0x00000000
33862306a36Sopenharmony_ci#define GMC_SRC_CLIP_DEFAULT			0x00000000
33962306a36Sopenharmony_ci#define GMC_DST_CLIP_DEFAULT			0x00000000
34062306a36Sopenharmony_ci#define GMC_BRUSH_SOLIDCOLOR			0x000000d0
34162306a36Sopenharmony_ci#define GMC_SRC_DSTCOLOR			0x00003000
34262306a36Sopenharmony_ci#define GMC_BYTE_ORDER_MSB_TO_LSB		0x00000000
34362306a36Sopenharmony_ci#define GMC_DP_SRC_RECT				0x02000000
34462306a36Sopenharmony_ci#define GMC_3D_FCN_EN_CLR			0x00000000
34562306a36Sopenharmony_ci#define GMC_AUX_CLIP_CLEAR			0x20000000
34662306a36Sopenharmony_ci#define GMC_DST_CLR_CMP_FCN_CLEAR		0x10000000
34762306a36Sopenharmony_ci#define GMC_WRITE_MASK_SET			0x40000000
34862306a36Sopenharmony_ci#define GMC_DP_CONVERSION_TEMP_6500		0x00000000
34962306a36Sopenharmony_ci
35062306a36Sopenharmony_ci/* DP_GUI_MASTER_CNTL ROP3 named constants */
35162306a36Sopenharmony_ci#define	ROP3_PATCOPY				0x00f00000
35262306a36Sopenharmony_ci#define ROP3_SRCCOPY				0x00cc0000
35362306a36Sopenharmony_ci
35462306a36Sopenharmony_ci#define SRC_DSTCOLOR				0x00030000
35562306a36Sopenharmony_ci
35662306a36Sopenharmony_ci/* DP_CNTL bit constants */
35762306a36Sopenharmony_ci#define DST_X_RIGHT_TO_LEFT			0x00000000
35862306a36Sopenharmony_ci#define DST_X_LEFT_TO_RIGHT			0x00000001
35962306a36Sopenharmony_ci#define DST_Y_BOTTOM_TO_TOP			0x00000000
36062306a36Sopenharmony_ci#define DST_Y_TOP_TO_BOTTOM			0x00000002
36162306a36Sopenharmony_ci#define DST_X_MAJOR				0x00000000
36262306a36Sopenharmony_ci#define DST_Y_MAJOR				0x00000004
36362306a36Sopenharmony_ci#define DST_X_TILE				0x00000008
36462306a36Sopenharmony_ci#define DST_Y_TILE				0x00000010
36562306a36Sopenharmony_ci#define DST_LAST_PEL				0x00000020
36662306a36Sopenharmony_ci#define DST_TRAIL_X_RIGHT_TO_LEFT		0x00000000
36762306a36Sopenharmony_ci#define DST_TRAIL_X_LEFT_TO_RIGHT		0x00000040
36862306a36Sopenharmony_ci#define DST_TRAP_FILL_RIGHT_TO_LEFT		0x00000000
36962306a36Sopenharmony_ci#define DST_TRAP_FILL_LEFT_TO_RIGHT		0x00000080
37062306a36Sopenharmony_ci#define DST_BRES_SIGN				0x00000100
37162306a36Sopenharmony_ci#define DST_HOST_BIG_ENDIAN_EN			0x00000200
37262306a36Sopenharmony_ci#define DST_POLYLINE_NONLAST			0x00008000
37362306a36Sopenharmony_ci#define DST_RASTER_STALL			0x00010000
37462306a36Sopenharmony_ci#define DST_POLY_EDGE				0x00040000
37562306a36Sopenharmony_ci
37662306a36Sopenharmony_ci/* DP_MIX bit constants */
37762306a36Sopenharmony_ci#define DP_SRC_RECT				0x00000200
37862306a36Sopenharmony_ci#define DP_SRC_HOST				0x00000300
37962306a36Sopenharmony_ci#define DP_SRC_HOST_BYTEALIGN			0x00000400
38062306a36Sopenharmony_ci
38162306a36Sopenharmony_ci/* LVDS_GEN_CNTL constants */
38262306a36Sopenharmony_ci#define LVDS_BL_MOD_LEVEL_MASK			0x0000ff00
38362306a36Sopenharmony_ci#define LVDS_BL_MOD_LEVEL_SHIFT			8
38462306a36Sopenharmony_ci#define LVDS_BL_MOD_EN				0x00010000
38562306a36Sopenharmony_ci#define LVDS_DIGION				0x00040000
38662306a36Sopenharmony_ci#define LVDS_BLON				0x00080000
38762306a36Sopenharmony_ci#define LVDS_ON					0x00000001
38862306a36Sopenharmony_ci#define LVDS_DISPLAY_DIS			0x00000002
38962306a36Sopenharmony_ci#define LVDS_PANEL_TYPE_2PIX_PER_CLK		0x00000004
39062306a36Sopenharmony_ci#define LVDS_PANEL_24BITS_TFT			0x00000008
39162306a36Sopenharmony_ci#define LVDS_FRAME_MOD_NO			0x00000000
39262306a36Sopenharmony_ci#define LVDS_FRAME_MOD_2_LEVELS			0x00000010
39362306a36Sopenharmony_ci#define LVDS_FRAME_MOD_4_LEVELS			0x00000020
39462306a36Sopenharmony_ci#define LVDS_RST_FM				0x00000040
39562306a36Sopenharmony_ci#define LVDS_EN					0x00000080
39662306a36Sopenharmony_ci
39762306a36Sopenharmony_ci/* CRTC2_GEN_CNTL constants */
39862306a36Sopenharmony_ci#define CRTC2_EN				0x02000000
39962306a36Sopenharmony_ci
40062306a36Sopenharmony_ci/* POWER_MANAGEMENT constants */
40162306a36Sopenharmony_ci#define PWR_MGT_ON				0x00000001
40262306a36Sopenharmony_ci#define PWR_MGT_MODE_MASK			0x00000006
40362306a36Sopenharmony_ci#define PWR_MGT_MODE_PIN			0x00000000
40462306a36Sopenharmony_ci#define PWR_MGT_MODE_REGISTER			0x00000002
40562306a36Sopenharmony_ci#define PWR_MGT_MODE_TIMER			0x00000004
40662306a36Sopenharmony_ci#define PWR_MGT_MODE_PCI			0x00000006
40762306a36Sopenharmony_ci#define PWR_MGT_AUTO_PWR_UP_EN			0x00000008
40862306a36Sopenharmony_ci#define PWR_MGT_ACTIVITY_PIN_ON			0x00000010
40962306a36Sopenharmony_ci#define PWR_MGT_STANDBY_POL			0x00000020
41062306a36Sopenharmony_ci#define PWR_MGT_SUSPEND_POL			0x00000040
41162306a36Sopenharmony_ci#define PWR_MGT_SELF_REFRESH			0x00000080
41262306a36Sopenharmony_ci#define PWR_MGT_ACTIVITY_PIN_EN			0x00000100
41362306a36Sopenharmony_ci#define PWR_MGT_KEYBD_SNOOP			0x00000200
41462306a36Sopenharmony_ci#define PWR_MGT_TRISTATE_MEM_EN			0x00000800
41562306a36Sopenharmony_ci#define PWR_MGT_SELW4MS				0x00001000
41662306a36Sopenharmony_ci#define PWR_MGT_SLOWDOWN_MCLK			0x00002000
41762306a36Sopenharmony_ci
41862306a36Sopenharmony_ci#define PMI_PMSCR_REG				0x60
41962306a36Sopenharmony_ci
42062306a36Sopenharmony_ci/* used by ATI bug fix for hardware ROM */
42162306a36Sopenharmony_ci#define RAGE128_MPP_TB_CONFIG                   0x01c0
42262306a36Sopenharmony_ci
42362306a36Sopenharmony_ci#endif				/* REG_RAGE128_H */
424