Home | History | Annotate | Line # | Download | only in vr
bcureg.h revision 1.3
      1  1.3      sato /*	$NetBSD: bcureg.h,v 1.3 2000/01/27 06:25:54 sato Exp $	*/
      2  1.1  takemura 
      3  1.1  takemura /*-
      4  1.1  takemura  * Copyright (c) 1999 SATO Kazumi. All rights reserved.
      5  1.1  takemura  * Copyright (c) 1999 PocketBSD Project. All rights reserved.
      6  1.1  takemura  *
      7  1.1  takemura  * Redistribution and use in source and binary forms, with or without
      8  1.1  takemura  * modification, are permitted provided that the following conditions
      9  1.1  takemura  * are met:
     10  1.1  takemura  * 1. Redistributions of source code must retain the above copyright
     11  1.1  takemura  *    notice, this list of conditions and the following disclaimer.
     12  1.1  takemura  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.1  takemura  *    notice, this list of conditions and the following disclaimer in the
     14  1.1  takemura  *    documentation and/or other materials provided with the distribution.
     15  1.1  takemura  * 3. All advertising materials mentioning features or use of this software
     16  1.1  takemura  *    must display the following acknowledgement:
     17  1.1  takemura  *	This product includes software developed by the PocketBSD project
     18  1.1  takemura  *	and its contributors.
     19  1.1  takemura  * 4. Neither the name of the project nor the names of its contributors
     20  1.1  takemura  *    may be used to endorse or promote products derived from this software
     21  1.1  takemura  *    without specific prior written permission.
     22  1.1  takemura  *
     23  1.1  takemura  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     24  1.1  takemura  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     25  1.1  takemura  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     26  1.1  takemura  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     27  1.1  takemura  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     28  1.1  takemura  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     29  1.1  takemura  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     30  1.1  takemura  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     31  1.1  takemura  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     32  1.1  takemura  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     33  1.1  takemura  * SUCH DAMAGE.
     34  1.1  takemura  *
     35  1.1  takemura  */
     36  1.1  takemura 
     37  1.1  takemura /*
     38  1.1  takemura  *	BCU (Bus Control Unit) Registers definitions.
     39  1.1  takemura  *		start 0xB000000
     40  1.1  takemura  */
     41  1.1  takemura 
     42  1.1  takemura #define	BCUCNT1_REG_W		0x000	/* BCU Control Register 1 */
     43  1.1  takemura 
     44  1.1  takemura #define		BCUCNT1_ROMMASK		(1<<15)	/* ROM SIZE */
     45  1.1  takemura #define		BCUCNT1_ROM64M		(1<<15)	/* ROM SIZE 64Mbit*/
     46  1.1  takemura #define		BCUCNT1_ROM32M		(0<<15)	/* ROM SIZE 32Mbit*/
     47  1.1  takemura 
     48  1.1  takemura #define		BCUCNT1_DRAMMASK	(1<<14)	/* DRAM SIZE */
     49  1.1  takemura #define		BCUCNT1_DRAM64M		(1<<14)	/* DRAM SIZE 64Mbit*/
     50  1.1  takemura #define		BCUCNT1_DRAM32M		(0<<14)	/* DRAM SIZE 32Mbit*/
     51  1.1  takemura 
     52  1.1  takemura #define		BCUCNT1_ISAMLCD		(1<<13)	/* ISAM/LCD 0x0a000000 to 0xaffffff*/
     53  1.1  takemura #define		BCUCNT1_ISA		(1<<13)	/* ISA memory space */
     54  1.1  takemura #define		BCUCNT1_LCD		(0<<13)	/* LCD  space*/
     55  1.1  takemura 
     56  1.1  takemura #define		BCUCNT1_PAGEMASK	(1<<12)	/* Maximum burst access size for Page Rom */
     57  1.1  takemura #define		BCUCNT1_PAGE128		(1<<12)	/* 128bit */
     58  1.1  takemura #define		BCUCNT1_PAGE64		(0<<12)	/* 64bit */
     59  1.1  takemura 
     60  1.1  takemura #define		BCUCNT1_PAGE2MASK	(1<<10)	/* */
     61  1.1  takemura #define		BCUCNT1_PAGE2PAGE	(1<<10)	/* Page ROM */
     62  1.1  takemura #define		BCUCNT1_PAGE2ORD	(0<<10)	/* Prginary ROM */
     63  1.1  takemura 
     64  1.1  takemura #define		BCUCNT1_PAGE0MASK	(1<<8)	/* */
     65  1.1  takemura #define		BCUCNT1_PAGE0PAGE	(1<<8)	/* Page ROM */
     66  1.1  takemura #define		BCUCNT1_PAGE0ORD	(0<<8)	/* Prginary ROM */
     67  1.1  takemura 
     68  1.1  takemura #define		BCUCNT1_ROMWEN2		(1<<6)	/* Enable Flash memory write ROM 2*/
     69  1.1  takemura #define		BCUCNT1_ROMWEN2EN	(1<<6)	/* Enable */
     70  1.1  takemura #define		BCUCNT1_ROMWEN2DS	(0<<6)	/* Prohibit */
     71  1.1  takemura 
     72  1.1  takemura #define		BCUCNT1_ROMWEN0		(1<<4)	/* Enable Flash memory write ROM 0*/
     73  1.1  takemura #define		BCUCNT1_ROMWEN0EN	(1<<4)	/* Enable */
     74  1.1  takemura #define		BCUCNT1_ROMWEN0DS	(0<<4)	/* Prohibit */
     75  1.1  takemura 
     76  1.1  takemura #define		BCUCNT1_BUSHERR		(1<<1)	/* Bus Timeout detection enable */
     77  1.1  takemura 
     78  1.1  takemura #define		BCUCNT1_BUSHERREN	(1<<1)	/* Enable */
     79  1.1  takemura #define		BCUCNT1_BUSHERRDS	(0<<1)	/* Prohibit */
     80  1.1  takemura 
     81  1.1  takemura #define		BCUCNT1_RSTOUT		(1)	/* RSTOUT control bit */
     82  1.1  takemura #define		BCUCNT1_RSTOUTH		(1)	/* RSTOUT high level*/
     83  1.1  takemura #define		BCUCNT1_RSTOUTL		(0)	/* RSTOUT low level*/
     84  1.1  takemura 
     85  1.1  takemura 
     86  1.1  takemura #define	BCUCNT2_REG_W		0x002	/* BCU Control Register 2 */
     87  1.1  takemura 
     88  1.1  takemura #define		BCUCNT2_GMODE		(1)	/* LCD access control */
     89  1.1  takemura #define		BCUCNT2_GMODENOM	(1)	/* not invert LCD */
     90  1.1  takemura #define		BCUCNT2_GMODEINV	(0)	/* invert LCD */
     91  1.1  takemura 
     92  1.1  takemura 
     93  1.1  takemura #define	BCUSPEED_REG_W		0x00A	/* BCU Access Cycle Change Register */
     94  1.1  takemura 
     95  1.1  takemura #define		BCUSPD_WPROM		(0x3<<12)	/* Page ROM access speed */
     96  1.1  takemura #define		BCUSPD_WPROMRFU		(0x3<<12)	/* RFU */
     97  1.1  takemura #define		BCUSPD_WPROM1T		(0x2<<12)	/* 1TClock */
     98  1.1  takemura #define		BCUSPD_WPROM2T		(0x1<<12)	/* 2TClock */
     99  1.1  takemura #define		BCUSPD_WPROM3T		(0x0<<12)	/* 3TClock */
    100  1.1  takemura 
    101  1.1  takemura #define		BCUSPD_WLCDM		(0x7<<18)	/* access speed 0x0a000000-0affffff */
    102  1.1  takemura 
    103  1.1  takemura 		/* BCUCNT1_ISAMLCD == BCUCNT1_LCD */
    104  1.1  takemura #define		BCUSPD_WLCDRFU		(0x7<<12)	/* LCD RFU */
    105  1.1  takemura #define		BCUSPD_WLCDRFU1		(0x6<<12)	/* LCD RFU */
    106  1.1  takemura #define		BCUSPD_WLCDRFU2		(0x5<<12)	/* LCD RFU */
    107  1.1  takemura #define		BCUSPD_WLCDRFU3		(0x4<<12)	/* LCD RFU */
    108  1.1  takemura #define		BCUSPD_WLCD2T		(0x3<<12)	/* LCD 2TClock */
    109  1.1  takemura #define		BCUSPD_WLCD4T		(0x2<<12)	/* LCD 4TClock */
    110  1.1  takemura #define		BCUSPD_WLCD6T		(0x1<<12)	/* LCD 6TClock */
    111  1.1  takemura #define		BCUSPD_WLCD8T		(0x0<<12)	/* LCD 8TClock */
    112  1.1  takemura 		/* BCUCNT1_ISAMLCD == BCUCNT1_ISAM */
    113  1.1  takemura #define		BCUSPD_ISAM1T		(0x7<<12)	/* ISAM 1TClock */
    114  1.1  takemura #define		BCUSPD_ISAM2T		(0x6<<12)	/* ISAM 2TClock */
    115  1.1  takemura #define		BCUSPD_ISAM3T		(0x5<<12)	/* ISAM 3TClock */
    116  1.1  takemura #define		BCUSPD_ISAM4T		(0x4<<12)	/* ISAM 4TClock */
    117  1.1  takemura #define		BCUSPD_ISAM5T		(0x3<<12)	/* ISAM 5TClock */
    118  1.1  takemura #define		BCUSPD_ISAM6T		(0x2<<12)	/* ISAM 6TClock */
    119  1.1  takemura #define		BCUSPD_ISAM7T		(0x1<<12)	/* ISAM 7TClock */
    120  1.1  takemura #define		BCUSPD_ISAM8T		(0x0<<12)	/* ISAM 8TClock */
    121  1.1  takemura 
    122  1.1  takemura #define		BCUSPD_WISAA		(0x7<<4)	/* System Bus Access Speed */
    123  1.1  takemura #define		BCUSPD_WISAA3T		(0x5<<4)	/* 3TClock */
    124  1.1  takemura #define		BCUSPD_WISAA4T		(0x4<<4)	/* 4TClock */
    125  1.1  takemura #define		BCUSPD_WISAA5T		(0x3<<4)	/* 5TClock */
    126  1.1  takemura #define		BCUSPD_WISAA6T		(0x2<<4)	/* 6TClock */
    127  1.1  takemura #define		BCUSPD_WISAA7T		(0x1<<4)	/* 7TClock */
    128  1.1  takemura #define		BCUSPD_WISAA8T		(0x0<<4)	/* 8TClock */
    129  1.1  takemura 
    130  1.1  takemura #define		BCUSPD_WROMA		(0x7<<0)	/* System Bus Access Speed */
    131  1.1  takemura #define		BCUSPD_WROMA2T		(0x7<<0)	/* 2TClock */
    132  1.1  takemura #define		BCUSPD_WROMA3T		(0x6<<0)	/* 3TClock */
    133  1.1  takemura #define		BCUSPD_WROMA4T		(0x5<<0)	/* 4TClock */
    134  1.1  takemura #define		BCUSPD_WROMA5T		(0x4<<0)	/* 5TClock */
    135  1.1  takemura #define		BCUSPD_WROMA6T		(0x3<<0)	/* 6TClock */
    136  1.1  takemura #define		BCUSPD_WROMA7T		(0x2<<0)	/* 7TClock */
    137  1.1  takemura #define		BCUSPD_WROMA8T		(0x1<<0)	/* 8TClock */
    138  1.1  takemura #define		BCUSPD_WROMA9T		(0x0<<0)	/* 9TClock */
    139  1.1  takemura 
    140  1.1  takemura 
    141  1.1  takemura #define	BCUERRST_REG_W		0x00C	/* BCU BUS ERROR Status Register */
    142  1.1  takemura 
    143  1.1  takemura #define		BCUERRST_BUSERRMASK	(1)		/* Bus error, clear to 0 when 1 is written */
    144  1.1  takemura #define		BCUERRST_BUSERR		(1)		/* Bus error */
    145  1.1  takemura #define		BCUERRST_BUSNORM	(0)		/* Normal */
    146  1.1  takemura 
    147  1.1  takemura 
    148  1.1  takemura #define	BCURFCNT_REG_W		0x00E	/* BCU Refresh Control Register */
    149  1.1  takemura 
    150  1.1  takemura #define		BCURFCNT_MASK		0x3fff		/* refresh interval MASK */
    151  1.1  takemura 
    152  1.1  takemura 
    153  1.1  takemura #define	BCUREVID_REG_W		0x010	/* BCU Revision ID Register */
    154  1.1  takemura 
    155  1.1  takemura #define		BCUREVID_RIDMASK	(0x7<<12)	/* Revision ID */
    156  1.1  takemura #define		BCUREVID_RIDSHFT	(12)		/* Revision ID */
    157  1.1  takemura #define		BCUREVID_RID_4121	(0x3)		/* VR4121 */
    158  1.1  takemura #define		BCUREVID_RID_4111	(0x2)		/* VR4111 */
    159  1.1  takemura #define		BCUREVID_RID_4102	(0x1)		/* VR4102 */
    160  1.1  takemura #define		BCUREVID_RID_4101	(0x0)		/* VR4101 */
    161  1.1  takemura 
    162  1.1  takemura #define		BCUREVID_MJREVMASK	(0x7<<8)	/* Major Revision */
    163  1.1  takemura #define		BCUREVID_MJREVSHFT	(8)		/* Major Revision */
    164  1.1  takemura 
    165  1.1  takemura #define		BCUREVID_MNREVMASK	(0x7)		/* Minor Revision */
    166  1.1  takemura #define		BCUREVID_MNREVSHFT	(0)		/* Minor Revision */
    167  1.1  takemura 
    168  1.1  takemura 
    169  1.1  takemura #define	BCUREFCOUNT_REG_W	0x012	/* BCU Refresh Count Register */
    170  1.1  takemura 
    171  1.1  takemura #define		BCUREFCOUNT_MASK	0x3fff	/* refresh 	count MASK */
    172  1.1  takemura 
    173  1.1  takemura 
    174  1.1  takemura #define	BCUCLKSPEED_REG_W	0x014	/* Clock Speed Register */
    175  1.1  takemura 
    176  1.3      sato #define		BCUCLKSPEED_DIVT2B	(1<<15)		/* (= vr4102, vr4111) */
    177  1.3      sato #define		BCUCLKSPEED_DIVT3B	(1<<14)		/* (= vr4111) */
    178  1.3      sato #define		BCUCLKSPEED_DIVT4B	(1<<13)		/* (= vr4111) */
    179  1.3      sato 
    180  1.3      sato #define		BCUCLKSPEED_DIVTMASK	(0xf<<12)	/* (= vr4121) */
    181  1.3      sato #define			BCUCLKSPEED_DIVT3	0x3
    182  1.3      sato #define			BCUCLKSPEED_DIVT4	0x4
    183  1.3      sato #define			BCUCLKSPEED_DIVT5	0x5
    184  1.3      sato #define			BCUCLKSPEED_DIVT6	0x6
    185  1.3      sato #define		BCUCLKSPEED_DIVTSHFT	(12)
    186  1.3      sato 
    187  1.3      sato #define		BCUCLKSPEED_DIVVTMASK	(0xf<<8)	/* (= vr4121) */
    188  1.3      sato #define			BCUCLKSPEED_DIVVT1	0x1
    189  1.3      sato #define			BCUCLKSPEED_DIVVT2	0x2
    190  1.3      sato #define			BCUCLKSPEED_DIVVT3	0x3
    191  1.3      sato #define			BCUCLKSPEED_DIVVT4	0x4
    192  1.3      sato #define			BCUCLKSPEED_DIVVT5	0x5
    193  1.3      sato #define			BCUCLKSPEED_DIVVT6	0x6
    194  1.3      sato #define			BCUCLKSPEED_DIVVT1_5	0x9
    195  1.3      sato #define			BCUCLKSPEED_DIVVT2_5	0xa
    196  1.3      sato #define		BCUCLKSPEED_DIVVTSHFT	(8)
    197  1.1  takemura 
    198  1.3      sato #define		BCUCLKSPEED_CLKSPMASK	(0x1f)		/* calculate for Clock */
    199  1.1  takemura #define		BCUCLKSPEED_CLKSPSHFT	(0)
    200  1.1  takemura 
    201  1.2      sato #define	BCUCNT3_REG_W		0x016	/* BCU Control Register 3 (>= vr4111) */
    202  1.1  takemura 
    203  1.1  takemura #define		BCUCNT3_EXTROMMASK	(1<<15)		/* ROM SIZE */
    204  1.2      sato #define		BCUCNT3_EXTROM64M	(1<<15)		/* 64Mbit DRAM */
    205  1.2      sato #define		BCUCNT3_EXTROM32M	(0<<15)		/* 32Mbit DRAM */
    206  1.1  takemura 
    207  1.2      sato #define		BCUCNT3_EXTDRAMMASK	(1<<14)		/* DRAM SIZE */
    208  1.2      sato #define		BCUCNT3_EXTDRAM64M	(1<<14)		/* 64Mbit DRAM */
    209  1.2      sato #define		BCUCNT3_EXTDRAM16M	(0<<14)		/* 16Mbit DRAM */
    210  1.1  takemura 
    211  1.1  takemura #define		BCUCNT3_EXTROMCS	(0x3<<12)	/* Bank3,2 */
    212  1.1  takemura #define		BCUCNT3_ROMROM		(0x3<<12)	/* Bank3 ROM ,2 ROM  */
    213  1.1  takemura #define		BCUCNT3_ROMRAM		(0x2<<12)	/* Bank3 ROM ,2 RAM  */
    214  1.1  takemura #define		BCUCNT3_RAMRAM		(0x0<<12)	/* Bank3 RAM ,2 RAM  */
    215  1.1  takemura 
    216  1.1  takemura #define		BCUCNT3_EXTMEM		(1<<11)		/* EXT MEN enable */
    217  1.1  takemura #define		BCUCNT3_EXTMEMEN	(1<<11)		/* EXT MEN enable */
    218  1.1  takemura #define		BCUCNT3_EXTMEMDS	(0<<11)		/* EXT MEN disable */
    219  1.1  takemura 
    220  1.1  takemura #define		BCUCNT3_LCDSIZE		(1<<7)		/* LCD bus size */
    221  1.1  takemura #define		BCUCNT3_LCD32		(1<<7)		/* LCD bus 32bit */
    222  1.1  takemura #define		BCUCNT3_LCD16		(0<<7)		/* LCD bus 16bit */
    223  1.1  takemura 
    224  1.1  takemura /* END bcureg.h */
    225