Home | History | Annotate | Line # | Download | only in dev
plumvideoreg.h revision 1.5
      1  1.5  uch /*	$NetBSD: plumvideoreg.h,v 1.5 2000/10/04 13:53:55 uch Exp $ */
      2  1.1  uch 
      3  1.3  uch /*-
      4  1.5  uch  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
      5  1.5  uch  * All rights reserved.
      6  1.5  uch  *
      7  1.5  uch  * This code is derived from software contributed to The NetBSD Foundation
      8  1.5  uch  * by UCHIYAMA Yasushi.
      9  1.1  uch  *
     10  1.1  uch  * Redistribution and use in source and binary forms, with or without
     11  1.1  uch  * modification, are permitted provided that the following conditions
     12  1.1  uch  * are met:
     13  1.1  uch  * 1. Redistributions of source code must retain the above copyright
     14  1.1  uch  *    notice, this list of conditions and the following disclaimer.
     15  1.3  uch  * 2. Redistributions in binary form must reproduce the above copyright
     16  1.3  uch  *    notice, this list of conditions and the following disclaimer in the
     17  1.3  uch  *    documentation and/or other materials provided with the distribution.
     18  1.5  uch  * 3. All advertising materials mentioning features or use of this software
     19  1.5  uch  *    must display the following acknowledgement:
     20  1.5  uch  *        This product includes software developed by the NetBSD
     21  1.5  uch  *        Foundation, Inc. and its contributors.
     22  1.5  uch  * 4. Neither the name of The NetBSD Foundation nor the names of its
     23  1.5  uch  *    contributors may be used to endorse or promote products derived
     24  1.5  uch  *    from this software without specific prior written permission.
     25  1.1  uch  *
     26  1.5  uch  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     27  1.5  uch  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     28  1.5  uch  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     29  1.5  uch  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     30  1.5  uch  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     31  1.5  uch  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     32  1.5  uch  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     33  1.5  uch  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     34  1.5  uch  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     35  1.5  uch  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     36  1.5  uch  * POSSIBILITY OF SUCH DAMAGE.
     37  1.1  uch  */
     38  1.3  uch 
     39  1.1  uch /* (CS3) */
     40  1.1  uch #define	PLUM_VIDEO_REGBASE		0x1000
     41  1.1  uch #define	PLUM_VIDEO_REGSIZE		0x200
     42  1.1  uch 
     43  1.1  uch /* (MCS0) */
     44  1.1  uch /* VRAM 4MByte */
     45  1.3  uch #define PLUM_VIDEO_VRAM_IOBASE_PHYSICAL	0x6c000000
     46  1.1  uch #define PLUM_VIDEO_VRAM_IOBASE		0x00000000
     47  1.1  uch #define PLUM_VIDEO_VRAM_IOSIZE		0x00400000
     48  1.1  uch /* Color palette LCD 4KByte */
     49  1.1  uch #define	PLUM_VIDEO_CLUT_LCD_IOBASE	0x00400000
     50  1.1  uch #define	PLUM_VIDEO_CLUT_LCD_IOSIZE	0x00001000
     51  1.1  uch /* Color palette CRT 4KByte */
     52  1.1  uch #define	PLUM_VIDEO_CLUT_CRT_IOBASE	0x00401000
     53  1.1  uch #define	PLUM_VIDEO_CLUT_CRT_IOSIZE	0x00001000
     54  1.1  uch /* BitBlt 4KByte */
     55  1.1  uch #define PLUM_VIDEO_BITBLT_IOBASE	0x00402000
     56  1.1  uch #define PLUM_VIDEO_BITBLT_IOSIZE	0x00401000
     57  1.1  uch 
     58  1.1  uch /*
     59  1.1  uch  *	Common Control Register
     60  1.1  uch  */
     61  1.1  uch /* Interrupt Status enable and IRQ line enable */
     62  1.1  uch #define	PLUM_VIDEO_POSENIEN_REG		0x000
     63  1.1  uch /* Interrupt Status */
     64  1.1  uch #define	PLUM_VIDEO_POIST_REG		0x004
     65  1.1  uch /* Buffer Control */
     66  1.1  uch #define	PLUM_VIDEO_POBFC_REG		0x008
     67  1.1  uch /* VRAM Control */
     68  1.1  uch #define	PLUM_VIDEO_PORAM_REG		0x00c
     69  1.1  uch /* VRAM Refresh Control */
     70  1.1  uch #define	PLUM_VIDEO_POREF_REG		0x010
     71  1.1  uch /* LCD Clock Source select and control */
     72  1.1  uch #define	PLUM_VIDEO_POCKL_REG		0x014
     73  1.1  uch /* CRT Clock Source select and control */
     74  1.1  uch #define	PLUM_VIDEO_POCKC_REG		0x018
     75  1.1  uch /* PLL Clock Source select and control */
     76  1.1  uch #define	PLUM_VIDEO_POPLL_REG		0x01c
     77  1.1  uch 
     78  1.1  uch /*
     79  1.1  uch  *	LCD Panel Control Register
     80  1.1  uch  */
     81  1.1  uch /* LCD Control */
     82  1.1  uch #define	PLUM_VIDEO_PLCNT_REG		0x040
     83  1.1  uch /* STN Control */
     84  1.1  uch #define	PLUM_VIDEO_PLSTN_REG		0x044
     85  1.1  uch /* LCD Level control */
     86  1.1  uch #define	PLUM_VIDEO_PLLEV_REG		0x048
     87  1.1  uch /* LCD Luminance control */
     88  1.1  uch #define	PLUM_VIDEO_PLLUM_REG		0x04c
     89  1.5  uch #define PLUM_VIDEO_PLLUM_MAX		0x3
     90  1.5  uch #define PLUM_VIDEO_PLLUM_MIN		0x0
     91  1.1  uch /* DSTN Dither Pattern base address */
     92  1.1  uch #define	PLUM_VIDEO_PLDPA_REG		0x050
     93  1.1  uch /* DSTN VRAM Offscreen buffer address */
     94  1.1  uch #define	PLUM_VIDEO_PLOSA_REG		0x054
     95  1.1  uch 
     96  1.1  uch /*
     97  1.1  uch  *	CRT Control Register
     98  1.1  uch  */
     99  1.1  uch /* DAC Control */
    100  1.1  uch #define	PLUM_VIDEO_PCDAC_REG		0x060
    101  1.1  uch /* CRT Border Color */
    102  1.1  uch #define	PLUM_VIDEO_PCBOC_REG		0x064
    103  1.1  uch /* Palette snoop */
    104  1.1  uch #define	PLUM_VIDEO_PCSNP_REG		0x068
    105  1.1  uch 
    106  1.1  uch /*
    107  1.1  uch  *	LCD Timing Register
    108  1.1  uch  */
    109  1.1  uch /* Horizontanl Total */
    110  1.1  uch #define	PLUM_VIDEO_PLHT_REG		0x080
    111  1.1  uch /* Horizontal Display Start */
    112  1.1  uch #define	PLUM_VIDEO_PLHDS_REG		0x084
    113  1.1  uch /* H-Sync Start/End */
    114  1.1  uch #define	PLUM_VIDEO_PLHSEHSS_REG		0x088
    115  1.1  uch /* H-Blanking Start/End */
    116  1.1  uch #define	PLUM_VIDEO_PLHBEHSS_REG		0x08c
    117  1.1  uch /* Horizontal # of pixel */
    118  1.1  uch #define	PLUM_VIDEO_PLHPX_REG		0x090
    119  1.1  uch /* Vertical Total */
    120  1.1  uch #define	PLUM_VIDEO_PLVT_REG		0x094
    121  1.1  uch /* Vertical Display Start */
    122  1.1  uch #define	PLUM_VIDEO_PLVDS_REG		0x098
    123  1.1  uch /* V-Sync Start/End */
    124  1.1  uch #define	PLUM_VIDEO_PLVSEVSS_REG		0x09c
    125  1.1  uch /* V-Blankng Start/End */
    126  1.1  uch #define	PLUM_VIDEO_PLVBEVBS_REG		0x0a0
    127  1.1  uch /* Current Line # */
    128  1.1  uch #define	PLUM_VIDEO_PLCLN_REG		0x0a8
    129  1.1  uch /* Interrupt Line # */
    130  1.1  uch #define	PLUM_VIDEO_PLILN_REG		0x0ac
    131  1.1  uch /* Mode */
    132  1.1  uch #define	PLUM_VIDEO_PLMOD_REG		0x0b0
    133  1.1  uch /* LCD controller test */
    134  1.1  uch #define	PLUM_VIDEO_PLTST_REG		0x0bc
    135  1.1  uch 
    136  1.1  uch /*
    137  1.1  uch  *	LCD Graphics Register
    138  1.1  uch  */
    139  1.1  uch /* Double Buffer Select */
    140  1.1  uch #define	PLUM_VIDEO_PLBSL_REG		0x0c0
    141  1.1  uch /* Graphics Display Start Address */
    142  1.1  uch #define	PLUM_VIDEO_PLDSA0_REG		0x0c4
    143  1.1  uch #define	PLUM_VIDEO_PLDSA1_REG		0x0c8
    144  1.1  uch /* VRAM Pitch 1 */
    145  1.1  uch #define	PLUM_VIDEO_PLPIT1_REG		0x0cc
    146  1.1  uch /* VRAM Pitch 2 */
    147  1.1  uch #define	PLUM_VIDEO_PLPIT2_REG		0x0d0
    148  1.2  uch #define PLUM_VIDEO_PLPIT2_MASK		0xffffffe0
    149  1.1  uch /* VRAM Offset */
    150  1.1  uch #define	PLUM_VIDEO_PLOFS_REG		0x0d4
    151  1.1  uch /* VRAM Lower Screen Address offset */
    152  1.1  uch #define	PLUM_VIDEO_PLLSA_REG		0x0d8
    153  1.1  uch /* Graphics Mode */
    154  1.1  uch #define	PLUM_VIDEO_PLGMD_REG		0x0dc
    155  1.1  uch 
    156  1.4  uch #define PLUM_VIDEO_PLGMD_GMODE_MASK	0x3
    157  1.1  uch #define PLUM_VIDEO_PLGMD_DISABLE	0x0
    158  1.1  uch #define PLUM_VIDEO_PLGMD_8BPP		0x1
    159  1.1  uch #define PLUM_VIDEO_PLGMD_16BPP		0x2
    160  1.4  uch 
    161  1.4  uch #define PLUM_VIDEO_PLGMD_MODE_DISPLAY	0x4
    162  1.4  uch #define PLUM_VIDEO_PLGMD_PALETTE_ENABLE 0x8
    163  1.4  uch 
    164  1.1  uch /*
    165  1.1  uch  *	CRT Timing Register
    166  1.1  uch  */
    167  1.1  uch /* notyet */
    168  1.1  uch /*
    169  1.1  uch  *	CRT Graphics Register
    170  1.1  uch  */
    171  1.1  uch /* notyet */
    172