Home | History | Annotate | Line # | Download | only in dev
      1 /*	$NetBSD: mntvareg.h,v 1.2 2017/10/04 09:44:09 rkujawa Exp $  */
      2 
      3 /*
      4  * Copyright (c) 2012, 2016 The NetBSD Foundation, Inc.
      5  * All rights reserved.
      6  *
      7  * This code is derived from software contributed to The NetBSD Foundation
      8  * by Lukas F. Hartmann.
      9  * This code is derived from software contributed to The NetBSD Foundation
     10  * by Radoslaw Kujawa.
     11  *
     12  * Redistribution and use in source and binary forms, with or without
     13  * modification, are permitted provided that the following conditions
     14  * are met:
     15  * 1. Redistributions of source code must retain the above copyright
     16  *    notice, this list of conditions and the following disclaimer.
     17  * 2. Redistributions in binary form must reproduce the above copyright
     18  *    notice, this list of conditions and the following disclaimer in the
     19  *    documentation and/or other materials provided with the distribution.
     20  *
     21  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     22  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     23  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     24  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     25  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     26  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     30  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     31  */
     32 
     33 #ifndef MNTVA2000REG_H
     34 #define MNTVA2000REG_H
     35 
     36 /* address space */
     37 #define MNTVA_OFF_REG		0x000000	/* memory mapped registers */
     38 #define MNTVA_REG_SIZE	0x001000
     39 
     40 #define MNTVA_OFF_FB		0x010000	/* frame buffer */
     41 #define MNTVA_FB_SIZE		0x5f0000
     42 
     43 /* registers */
     44 #define MNTVA_SCALEMODE		0x04
     45 #define MNTVA_SCALEMODE1X		0
     46 #define MNTVA_SCALEMODE2X		1
     47 #define MNTVA_SCALEMODE3X		2
     48 #define MNTVA_SCALEMODE4X		3
     49 
     50 #define MNTVA_LINEW     0x02
     51 #define MNTVA_SCREENW		0x06
     52 #define MNTVA_SCREENH		0x08
     53 #define MNTVA_MARGIN_X  0x0c
     54 #define MNTVA_SAFE_X    0x14
     55 
     56 #define MNTVA_BLITTERBASEHI	0x1C	/* [23:16] */
     57 #define MNTVA_BLITTERBASELO	0x1E	/* [15:0] */
     58 
     59 #define MNTVA_BLITTERX1		0x20
     60 #define MNTVA_BLITTERY1		0x22
     61 #define MNTVA_BLITTERX2		0x24
     62 #define MNTVA_BLITTERY2		0x26
     63 #define MNTVA_BLITTERRGB	0x28	/* filling for 16bit and 8bit modes */
     64 
     65 #define MNTVA_BLITTER_ENABLE	0x2A
     66 #define MNTVA_BLITTER_FILL		__BIT(0) /* fill [x1,y1]-[x2,y2] */
     67 #define MNTVA_BLITTER_COPY		__BIT(1) /* copy [x3,y3]-[x4,y4] to
     68 						         [x1,y1]-[x2,y2] */
     69 #define MNTVA_BLITTERX3		0x2C
     70 #define MNTVA_BLITTERY3		0x2E
     71 #define MNTVA_BLITTERX4		0x30
     72 #define MNTVA_BLITTERY4		0x32
     73 #define MNTVA_BLITTERRGB32HI	0x34	/* filling for 24bit and 32bit modes */
     74 #define MNTVA_BLITTERRGB32LO	0x36	/* filling for 24bit and 32bit modes */
     75 
     76 #define MNTVA_COLORMODE 	0x48
     77 #define MNTVA_COLORMODE8		0
     78 #define MNTVA_COLORMODE16		__BIT(0)
     79 #define MNTVA_COLORMODE32		__BIT(1)
     80 
     81 #define MNTVA_PANPTRHI 0x38 /* [23:16] */
     82 #define MNTVA_PANPTRLO 0x3A /* [15:0] */
     83 
     84 #define MNTVA_BLITTERX1		0x20
     85 #define MNTVA_BLITTERY1		0x22
     86 #define MNTVA_BLITTERX2		0x24
     87 #define MNTVA_BLITTERY2		0x26
     88 #define MNTVA_BLITTERRGB	0x28	/* filling for 16bit and 8bit modes */
     89 
     90 #define MNTVA_BLITTER_ENABLE	0x2A
     91 #define MNTVA_BLITTER_FILL		__BIT(0) /* fill [x1,y1]-[x2,y2] */
     92 #define MNTVA_BLITTER_COPY		__BIT(1) /* copy [x3,y3]-[x4,y4] to
     93 						         [x1,y1]-[x2,y2] */
     94 #define MNTVA_BLITTERX3		0x2C
     95 #define MNTVA_BLITTERY3		0x2E
     96 #define MNTVA_BLITTERX4		0x30
     97 #define MNTVA_BLITTERY4		0x32
     98 #define MNTVA_BLITTERRGB32HI	0x34	/* filling for 24bit and 32bit modes */
     99 #define MNTVA_BLITTERRGB32LO	0x36	/* filling for 24bit and 32bit modes */
    100 
    101 #define MNTVA_COLORMODE 	0x48
    102 #define MNTVA_COLORMODE8		0
    103 #define MNTVA_COLORMODE16		__BIT(0)
    104 #define MNTVA_COLORMODE32		__BIT(1)
    105 
    106 #define MNTVA_BLITTER_ROW_PITCH 0x42
    107 #define MNTVA_BLITTER_ROW_PITCH_SHIFT 0x44
    108 #define MNTVA_BLITTER_COLORMODE 0x46
    109 
    110 #define MNTVA_PANPTRHI 0x38 /* [23:16] */
    111 #define MNTVA_PANPTRLO 0x3A /* [15:0] */
    112 
    113 #define MNTVA_CAPTURE_MODE 0x4E
    114 
    115 #define MNTVA_ROW_PITCH       0x58
    116 #define MNTVA_ROW_PITCH_SHIFT 0x5c
    117 
    118 #define MNTVA_H_SYNC_START  0x70
    119 #define MNTVA_H_SYNC_END    0x72
    120 #define MNTVA_H_MAX         0x74
    121 #define MNTVA_V_SYNC_START  0x76
    122 #define MNTVA_V_SYNC_END    0x78
    123 #define MNTVA_V_MAX         0x7a
    124 
    125 #define MNTVA_PIXEL_CLK_SEL 0x7c
    126 #define MNTVA_CLK_75MHZ 0
    127 #define MNTVA_CLK_40MHZ 1
    128 
    129 #endif /* MNTVA2000REG_H */
    130