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