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