156818Sralph /*- 2*63208Sbostic * Copyright (c) 1992, 1993 3*63208Sbostic * The Regents of the University of California. All rights reserved. 456818Sralph * 556818Sralph * This code is derived from software contributed to Berkeley by 656818Sralph * Ralph Campbell and Rick Macklem. 756818Sralph * 856818Sralph * %sccs.include.redist.c% 956818Sralph * 10*63208Sbostic * @(#)xcfbreg.h 8.1 (Berkeley) 06/10/93 1156818Sralph */ 1256818Sralph 1356818Sralph /* 1456818Sralph * Mach Operating System 1556818Sralph * Copyright (c) 1991,1990,1989 Carnegie Mellon University 1656818Sralph * All Rights Reserved. 1756818Sralph * 1856818Sralph * Permission to use, copy, modify and distribute this software and its 1956818Sralph * documentation is hereby granted, provided that both the copyright 2056818Sralph * notice and this permission notice appear in all copies of the 2156818Sralph * software, derivative works or modified versions, and any portions 2256818Sralph * thereof, and that both notices appear in supporting documentation. 2356818Sralph * 2456818Sralph * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 2556818Sralph * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 2656818Sralph * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 2756818Sralph * 2856818Sralph * Carnegie Mellon requests users of this software to return to 2956818Sralph * 3056818Sralph * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 3156818Sralph * School of Computer Science 3256818Sralph * Carnegie Mellon University 3356818Sralph * Pittsburgh PA 15213-3890 3456818Sralph * 3556818Sralph * any improvements or extensions that they make and grant Carnegie Mellon 3656818Sralph * the rights to redistribute these changes. 3756818Sralph */ 3856818Sralph /* 3956818Sralph * Defines for the Inmos IMS-G332 Colour video controller 4056818Sralph * Author: Alessandro Forin, Carnegie Mellon University 4156818Sralph * See: IMS G332 Colour Video Controller, 1990 Databook, pg 139-163, 4256818Sralph * Inmos, Ltd. 4356818Sralph */ 4456818Sralph 4556818Sralph #define IMS332_ADDRESS 0xbc140000 4656818Sralph #define VRAM_OFFSET 0x2000000 4756818Sralph #define IMS332_RESET_ADDRESS 0xbc040100 4856818Sralph 4956818Sralph /* 5056818Sralph * Although the chip is built to be memory-mapped 5156818Sralph * it can be programmed for 32 or 64 bit addressing. 5256818Sralph * Moreover, the hardware bits have been twisted 5356818Sralph * even more on the machine I am writing this for. 5456818Sralph * So I'll just define the chip's offsets and leave 5556818Sralph * it to the implementation to define the rest. 5656818Sralph */ 5756818Sralph #define IMS332_REG_BOOT 0x000 /* boot time config */ 5856818Sralph 5956818Sralph #define IMS332_REG_HALF_SYNCH 0x021 /* datapath registers */ 6056818Sralph #define IMS332_REG_BACK_PORCH 0x022 6156818Sralph #define IMS332_REG_DISPLAY 0x023 6256818Sralph #define IMS332_REG_SHORT_DIS 0x024 6356818Sralph #define IMS332_REG_BROAD_PULSE 0x025 6456818Sralph #define IMS332_REG_V_SYNC 0x026 6556818Sralph #define IMS332_REG_V_PRE_EQUALIZE 0x027 6656818Sralph #define IMS332_REG_V_POST_EQUALIZE 0x028 6756818Sralph #define IMS332_REG_V_BLANK 0x029 6856818Sralph #define IMS332_REG_V_DISPLAY 0x02a 6956818Sralph #define IMS332_REG_LINE_TIME 0x02b 7056818Sralph #define IMS332_REG_LINE_START 0x02c 7156818Sralph #define IMS332_REG_MEM_INIT 0x02d 7256818Sralph #define IMS332_REG_XFER_DELAY 0x02e 7356818Sralph 7456818Sralph #define IMS332_REG_COLOR_MASK 0x040 /* color mask register */ 7556818Sralph 7656818Sralph #define IMS332_REG_CSR_A 0x060 7756818Sralph 7856818Sralph #define IMS332_REG_CSR_B 0x070 7956818Sralph 8056818Sralph #define IMS332_REG_TOP_SCREEN 0x080 /* top-of-screen offset */ 8156818Sralph 8256818Sralph #define IMS332_REG_CURSOR_LUT_0 0x0a1 /* cursor palette */ 8356818Sralph #define IMS332_REG_CURSOR_LUT_1 0x0a2 8456818Sralph #define IMS332_REG_CURSOR_LUT_2 0x0a3 8556818Sralph 8656818Sralph #define IMS332_REG_RGB_CKSUM_0 0x0c0 /* test registers */ 8756818Sralph #define IMS332_REG_RGB_CKSUM_1 0x0c1 8856818Sralph #define IMS332_REG_RGB_CKSUM_2 0x0c2 8956818Sralph 9056818Sralph #define IMS332_REG_CURSOR_LOC 0x0c7 /* cursor location */ 9156818Sralph 9256818Sralph #define IMS332_REG_LUT_BASE 0x100 /* color palette */ 9356818Sralph #define IMS332_REG_LUT_END 0x1ff 9456818Sralph 9556818Sralph #define IMS332_REG_CURSOR_RAM 0x200 /* cursor bitmap */ 9656818Sralph #define IMS332_REG_CURSOR_RAM_END 0x3ff 9756818Sralph 9856818Sralph /* 9956818Sralph * Control register A 10056818Sralph */ 10156818Sralph 10256818Sralph #define IMS332_CSR_A_VTG_ENABLE 0x000001 /* vertical timing generator */ 10356818Sralph #define IMS332_CSR_A_INTERLACED 0x000002 /* screen format */ 10456818Sralph #define IMS332_CSR_A_CCIR 0x000004 /* default is EIA */ 10556818Sralph #define IMS332_CSR_A_SLAVE_SYNC 0x000008 /* else from our pll */ 10656818Sralph #define IMS332_CSR_A_PLAIN_SYNC 0x000010 /* else tesselated */ 10756818Sralph #define IMS332_CSR_A_SEPARATE_SYNC 0x000020 /* else composite */ 10856818Sralph #define IMS332_CSR_A_VIDEO_ONLY 0x000040 /* else video+sync */ 10956818Sralph #define IMS332_CSR_A_BLANK_PEDESTAL 0x000080 /* blank level */ 11056818Sralph #define IMS332_CSR_A_CBLANK_IS_OUT 0x000100 11156818Sralph #define IMS332_CSR_A_CBLANK_NO_DELAY 0x000200 11256818Sralph #define IMS332_CSR_A_FORCE_BLANK 0x000400 11356818Sralph #define IMS332_CSR_A_BLANK_DISABLE 0x000800 11456818Sralph #define IMS332_CSR_A_VRAM_INCREMENT 0x003000 11556818Sralph # define IMS332_VRAM_INC_1 0x000000 11656818Sralph # define IMS332_VRAM_INC_256 0x001000 /* except interlaced->2 */ 11756818Sralph # define IMS332_VRAM_INC_512 0x002000 11856818Sralph # define IMS332_VRAM_INC_1024 0x003000 11956818Sralph #define IMS332_CSR_A_DMA_DISABLE 0x004000 12056818Sralph #define IMS332_CSR_A_SYNC_DELAY_MASK 0x038000 /* 0-7 VTG clk delays */ 12156818Sralph #define IMS332_CSR_A_PIXEL_INTERLEAVE 0x040000 12256818Sralph #define IMS332_CSR_A_DELAYED_SAMPLING 0x080000 12356818Sralph #define IMS332_CSR_A_BITS_PER_PIXEL 0x700000 12456818Sralph # define IMS332_BPP_1 0x000000 12556818Sralph # define IMS332_BPP_2 0x100000 12656818Sralph # define IMS332_BPP_4 0x200000 12756818Sralph # define IMS332_BPP_8 0x300000 12856818Sralph # define IMS332_BPP_15 0x400000 12956818Sralph # define IMS332_BPP_16 0x500000 13056818Sralph #define IMS332_CSR_A_DISABLE_CURSOR 0x800000 13156818Sralph 13256818Sralph 13356818Sralph /* 13456818Sralph * Control register B is mbz 13556818Sralph */ 13656818Sralph 13756818Sralph /* 13856818Sralph * Boot register 13956818Sralph */ 14056818Sralph 14156818Sralph #define IMS332_BOOT_PLL 0x00001f /* xPLL, binary */ 14256818Sralph #define IMS332_BOOT_CLOCK_PLL 0x000020 /* else xternal */ 14356818Sralph #define IMS332_BOOT_64_BIT_MODE 0x000040 /* else 32 */ 14456818Sralph #define IMS332_BOOT_xxx 0xffff80 /* reserved, mbz */ 145