xref: /openbmc/linux/include/video/cirrus.h (revision e5451c8f8330e03ad3cfa16048b4daf961af434f)
11da177e4SLinus Torvalds /*
21da177e4SLinus Torvalds  * drivers/video/clgenfb.h - Cirrus Logic chipset constants
31da177e4SLinus Torvalds  *
41da177e4SLinus Torvalds  * Copyright 1999 Jeff Garzik <jgarzik@pobox.com>
51da177e4SLinus Torvalds  *
61da177e4SLinus Torvalds  * Original clgenfb author:  Frank Neumann
71da177e4SLinus Torvalds  *
81da177e4SLinus Torvalds  * Based on retz3fb.c and clgen.c:
91da177e4SLinus Torvalds  *      Copyright (C) 1997 Jes Sorensen
101da177e4SLinus Torvalds  *      Copyright (C) 1996 Frank Neumann
111da177e4SLinus Torvalds  *
121da177e4SLinus Torvalds  ***************************************************************
131da177e4SLinus Torvalds  *
141da177e4SLinus Torvalds  * Format this code with GNU indent '-kr -i8 -pcs' options.
151da177e4SLinus Torvalds  *
161da177e4SLinus Torvalds  * This file is subject to the terms and conditions of the GNU General Public
171da177e4SLinus Torvalds  * License.  See the file COPYING in the main directory of this archive
181da177e4SLinus Torvalds  * for more details.
191da177e4SLinus Torvalds  *
201da177e4SLinus Torvalds  */
211da177e4SLinus Torvalds 
221da177e4SLinus Torvalds #ifndef __CLGENFB_H__
231da177e4SLinus Torvalds #define __CLGENFB_H__
241da177e4SLinus Torvalds 
251da177e4SLinus Torvalds /* OLD COMMENT: definitions for Piccolo/SD64 VGA controller chip   */
261da177e4SLinus Torvalds /* OLD COMMENT: these definitions might most of the time also work */
271da177e4SLinus Torvalds /* OLD COMMENT: for other CL-GD542x/543x based boards..            */
281da177e4SLinus Torvalds 
291da177e4SLinus Torvalds /*** External/General Registers ***/
301da177e4SLinus Torvalds #define CL_POS102	0x102  	/* POS102 register */
311da177e4SLinus Torvalds #define CL_VSSM		0x46e8 	/* Adapter Sleep */
321da177e4SLinus Torvalds #define CL_VSSM2	0x3c3	/* Motherboard Sleep */
331da177e4SLinus Torvalds 
341da177e4SLinus Torvalds /*** VGA Sequencer Registers ***/
351da177e4SLinus Torvalds /* the following are from the "extension registers" group */
361da177e4SLinus Torvalds #define CL_SEQR6	0x6	/* Unlock ALL Extensions */
371da177e4SLinus Torvalds #define CL_SEQR7	0x7	/* Extended Sequencer Mode */
381da177e4SLinus Torvalds #define CL_SEQR8	0x8	/* EEPROM Control */
391da177e4SLinus Torvalds #define CL_SEQR9	0x9	/* Scratch Pad 0 (do not access!) */
401da177e4SLinus Torvalds #define CL_SEQRA	0xa	/* Scratch Pad 1 (do not access!) */
411da177e4SLinus Torvalds #define CL_SEQRB	0xb	/* VCLK0 Numerator */
421da177e4SLinus Torvalds #define CL_SEQRC	0xc	/* VCLK1 Numerator */
431da177e4SLinus Torvalds #define CL_SEQRD	0xd	/* VCLK2 Numerator */
441da177e4SLinus Torvalds #define CL_SEQRE	0xe	/* VCLK3 Numerator */
451da177e4SLinus Torvalds #define CL_SEQRF	0xf	/* DRAM Control */
461da177e4SLinus Torvalds #define CL_SEQR10	0x10	/* Graphics Cursor X Position */
471da177e4SLinus Torvalds #define CL_SEQR11	0x11	/* Graphics Cursor Y Position */
481da177e4SLinus Torvalds #define CL_SEQR12	0x12	/* Graphics Cursor Attributes */
491da177e4SLinus Torvalds #define CL_SEQR13	0x13	/* Graphics Cursor Pattern Address Offset */
501da177e4SLinus Torvalds #define CL_SEQR14	0x14	/* Scratch Pad 2 (CL-GD5426/'28 Only) (do not access!) */
511da177e4SLinus Torvalds #define CL_SEQR15	0x15	/* Scratch Pad 3 (CL-GD5426/'28 Only) (do not access!) */
521da177e4SLinus Torvalds #define CL_SEQR16	0x16	/* Performance Tuning (CL-GD5424/'26/'28 Only) */
531da177e4SLinus Torvalds #define CL_SEQR17	0x17	/* Configuration ReadBack and Extended Control (CL-GF5428 Only) */
541da177e4SLinus Torvalds #define CL_SEQR18	0x18	/* Signature Generator Control (Not CL-GD5420) */
551da177e4SLinus Torvalds #define CL_SEQR19	0x19	/* Signature Generator Result Low Byte (Not CL-GD5420) */
561da177e4SLinus Torvalds #define CL_SEQR1A	0x1a	/* Signature Generator Result High Byte (Not CL-GD5420) */
571da177e4SLinus Torvalds #define CL_SEQR1B	0x1b	/* VCLK0 Denominator and Post-Scalar Value */
581da177e4SLinus Torvalds #define CL_SEQR1C	0x1c	/* VCLK1 Denominator and Post-Scalar Value */
591da177e4SLinus Torvalds #define CL_SEQR1D	0x1d	/* VCLK2 Denominator and Post-Scalar Value */
601da177e4SLinus Torvalds #define CL_SEQR1E	0x1e	/* VCLK3 Denominator and Post-Scalar Value */
611da177e4SLinus Torvalds #define CL_SEQR1F	0x1f	/* BIOS ROM write enable and MCLK Select */
621da177e4SLinus Torvalds 
631da177e4SLinus Torvalds /*** CRT Controller Registers ***/
641da177e4SLinus Torvalds #define CL_CRT22	0x22	/* Graphics Data Latches ReadBack */
651da177e4SLinus Torvalds #define CL_CRT24	0x24	/* Attribute Controller Toggle ReadBack */
661da177e4SLinus Torvalds #define CL_CRT26	0x26	/* Attribute Controller Index ReadBack */
671da177e4SLinus Torvalds /* the following are from the "extension registers" group */
681da177e4SLinus Torvalds #define CL_CRT19	0x19	/* Interlace End */
691da177e4SLinus Torvalds #define CL_CRT1A	0x1a	/* Interlace Control */
701da177e4SLinus Torvalds #define CL_CRT1B	0x1b	/* Extended Display Controls */
711da177e4SLinus Torvalds #define CL_CRT1C	0x1c	/* Sync adjust and genlock register */
721da177e4SLinus Torvalds #define CL_CRT1D	0x1d	/* Overlay Extended Control register */
73*213d4bddSKrzysztof Helt #define CL_CRT1E	0x1e	/* Another overflow register */
741da177e4SLinus Torvalds #define CL_CRT25	0x25	/* Part Status Register */
751da177e4SLinus Torvalds #define CL_CRT27	0x27	/* ID Register */
761da177e4SLinus Torvalds #define CL_CRT51	0x51	/* P4 disable "flicker fixer" */
771da177e4SLinus Torvalds 
781da177e4SLinus Torvalds /*** Graphics Controller Registers ***/
791da177e4SLinus Torvalds /* the following are from the "extension registers" group */
801da177e4SLinus Torvalds #define CL_GR9		0x9	/* Offset Register 0 */
811da177e4SLinus Torvalds #define CL_GRA		0xa	/* Offset Register 1 */
821da177e4SLinus Torvalds #define CL_GRB		0xb	/* Graphics Controller Mode Extensions */
831da177e4SLinus Torvalds #define CL_GRC		0xc	/* Color Key (CL-GD5424/'26/'28 Only) */
841da177e4SLinus Torvalds #define CL_GRD		0xd	/* Color Key Mask (CL-GD5424/'26/'28 Only) */
851da177e4SLinus Torvalds #define CL_GRE		0xe	/* Miscellaneous Control (Cl-GD5428 Only) */
861da177e4SLinus Torvalds #define CL_GRF		0xf	/* Display Compression Control register */
871da177e4SLinus Torvalds #define CL_GR10		0x10	/* 16-bit Pixel BG Color High Byte (Not CL-GD5420) */
881da177e4SLinus Torvalds #define CL_GR11		0x11	/* 16-bit Pixel FG Color High Byte (Not CL-GD5420) */
891da177e4SLinus Torvalds #define CL_GR12		0x12	/* Background Color Byte 2 Register */
901da177e4SLinus Torvalds #define CL_GR13		0x13	/* Foreground Color Byte 2 Register */
911da177e4SLinus Torvalds #define CL_GR14		0x14	/* Background Color Byte 3 Register */
921da177e4SLinus Torvalds #define CL_GR15		0x15	/* Foreground Color Byte 3 Register */
931da177e4SLinus Torvalds /* the following are CL-GD5426/'28 specific blitter registers */
941da177e4SLinus Torvalds #define CL_GR20		0x20	/* BLT Width Low */
951da177e4SLinus Torvalds #define CL_GR21		0x21	/* BLT Width High */
961da177e4SLinus Torvalds #define CL_GR22		0x22	/* BLT Height Low */
971da177e4SLinus Torvalds #define CL_GR23		0x23	/* BLT Height High */
981da177e4SLinus Torvalds #define CL_GR24		0x24	/* BLT Destination Pitch Low */
991da177e4SLinus Torvalds #define CL_GR25		0x25	/* BLT Destination Pitch High */
1001da177e4SLinus Torvalds #define CL_GR26		0x26	/* BLT Source Pitch Low */
1011da177e4SLinus Torvalds #define CL_GR27		0x27	/* BLT Source Pitch High */
1021da177e4SLinus Torvalds #define CL_GR28		0x28	/* BLT Destination Start Low */
1031da177e4SLinus Torvalds #define CL_GR29		0x29	/* BLT Destination Start Mid */
1041da177e4SLinus Torvalds #define CL_GR2A		0x2a	/* BLT Destination Start High */
1051da177e4SLinus Torvalds #define CL_GR2C		0x2c	/* BLT Source Start Low */
1061da177e4SLinus Torvalds #define CL_GR2D		0x2d	/* BLT Source Start Mid */
1071da177e4SLinus Torvalds #define CL_GR2E		0x2e	/* BLT Source Start High */
1081da177e4SLinus Torvalds #define CL_GR2F		0x2f	/* Picasso IV Blitter compat mode..? */
1091da177e4SLinus Torvalds #define CL_GR30		0x30	/* BLT Mode */
1101da177e4SLinus Torvalds #define CL_GR31		0x31	/* BLT Start/Status */
1111da177e4SLinus Torvalds #define CL_GR32		0x32	/* BLT Raster Operation */
1121da177e4SLinus Torvalds #define CL_GR33		0x33	/* another P4 "compat" register.. */
1131da177e4SLinus Torvalds #define CL_GR34		0x34	/* Transparent Color Select Low */
1141da177e4SLinus Torvalds #define CL_GR35		0x35	/* Transparent Color Select High */
1151da177e4SLinus Torvalds #define CL_GR38		0x38	/* Source Transparent Color Mask Low */
1161da177e4SLinus Torvalds #define CL_GR39		0x39	/* Source Transparent Color Mask High */
1171da177e4SLinus Torvalds 
1181da177e4SLinus Torvalds /*** Attribute Controller Registers ***/
1191da177e4SLinus Torvalds #define CL_AR33		0x33	/* The "real" Pixel Panning register (?) */
1201da177e4SLinus Torvalds #define CL_AR34		0x34	/* TEST */
1211da177e4SLinus Torvalds 
1221da177e4SLinus Torvalds #endif /* __CLGENFB_H__ */
123