Home | History | Annotate | Line # | Download | only in dev
it8368reg.h revision 1.1
      1  1.1  uch /*	$NetBSD: it8368reg.h,v 1.1 1999/11/21 06:48:59 uch Exp $ */
      2  1.1  uch 
      3  1.1  uch /*
      4  1.1  uch  * Copyright (c) 1999, by UCHIYAMA Yasushi
      5  1.1  uch  * All rights reserved.
      6  1.1  uch  *
      7  1.1  uch  * Redistribution and use in source and binary forms, with or without
      8  1.1  uch  * modification, are permitted provided that the following conditions
      9  1.1  uch  * are met:
     10  1.1  uch  * 1. Redistributions of source code must retain the above copyright
     11  1.1  uch  *    notice, this list of conditions and the following disclaimer.
     12  1.1  uch  * 2. The name of the developer may NOT be used to endorse or promote products
     13  1.1  uch  *    derived from this software without specific prior written permission.
     14  1.1  uch  *
     15  1.1  uch  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
     16  1.1  uch  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     17  1.1  uch  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     18  1.1  uch  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
     19  1.1  uch  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     20  1.1  uch  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     21  1.1  uch  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     22  1.1  uch  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     23  1.1  uch  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     24  1.1  uch  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     25  1.1  uch  * SUCH DAMAGE.
     26  1.1  uch  *
     27  1.1  uch  */
     28  1.1  uch 
     29  1.1  uch /*
     30  1.1  uch  *	ITE IT8368E PCMCIA/GPIO Buffer Chip
     31  1.1  uch  *	http://www.ite.com/tw/mobile/it8368v07.pdf
     32  1.1  uch  */
     33  1.1  uch #define IT8368_GPIODATAOUT_REG		0x00
     34  1.1  uch #define IT8368_MFIODATAOUT_REG		0x02
     35  1.1  uch #define IT8368_GPIODIR_REG		0x04
     36  1.1  uch #define IT8368_MFIODIR_REG		0x06
     37  1.1  uch #define IT8368_MFIOSEL_REG		0x0a
     38  1.1  uch #define IT8368_GPIODATAIN_REG		0x0c
     39  1.1  uch #define IT8368_MFIODATAIN_REG		0x0e
     40  1.1  uch #define IT8368_GPIOPOSINTEN_REG		0x10
     41  1.1  uch #define IT8368_MFIOPOSINTEN_REG		0x12
     42  1.1  uch #define IT8368_GPIONEGINTEN_REG		0x14
     43  1.1  uch #define IT8368_MFIONEGINTEN_REG		0x16
     44  1.1  uch #define IT8368_GPIOPOSINTSTAT_REG	0x18
     45  1.1  uch #define IT8368_MFIOPOSINTSTAT_REG	0x1a
     46  1.1  uch #define IT8368_GPIONEGINTSTAT_REG	0x1c
     47  1.1  uch #define IT8368_MFIONEGINTSTAT_REG	0x1e
     48  1.1  uch #define IT8368_CTRL_REG			0x20
     49  1.1  uch 
     50  1.1  uch #define IT8368_GPIODATAOUT_MASK		0x1fff
     51  1.1  uch #define IT8368_MFIODATAOUT_MASK		0x07ff
     52  1.1  uch #define IT8368_GPIODIR_MASK		0x1fff
     53  1.1  uch #define IT8368_MFIODIR_MASK		0x07ff
     54  1.1  uch 
     55  1.1  uch #define IT8368_MFIOSEL_VGAEN		0x0800
     56  1.1  uch #define IT8368_MFIOSEL_MASK		0x07ff
     57  1.1  uch #define IT8368_GPIODATAIN_MASK		0x1fff
     58  1.1  uch #define IT8368_MFIODATAIN_MASK		0x07ff
     59  1.1  uch #define IT8368_GPIOPOSINTEN_MASK	0x1fff
     60  1.1  uch #define IT8368_MFIOPOSINTEN_MASK	0x07ff
     61  1.1  uch #define IT8368_GPIONEGINTEN_MASK	0x1fff
     62  1.1  uch #define IT8368_MFIONEGINTEN_MASK	0x07ff
     63  1.1  uch #define IT8368_GPIOPOSINTSTAT_MASK	0x1fff
     64  1.1  uch #define IT8368_MFIOPOSINTSTAT_MASK	0x07ff
     65  1.1  uch #define IT8368_GPIONEGINTSTAT_MASK	0x1fff
     66  1.1  uch #define IT8368_MFIONEGINTSTAT_MASK	0x07ff
     67  1.1  uch 
     68  1.1  uch 
     69  1.1  uch #define IT8368_CTRL_FIXATTRIO		0x8000
     70  1.1  uch #define IT8368_FIXATTR_OFFSET		0x02000000
     71  1.1  uch #define IT8368_FIXIO_OFFSET		0x0
     72  1.1  uch #define IT8368_FIXIOATTR_SIZE		0x02000000
     73  1.1  uch 
     74  1.1  uch #define	IT8368_CTRL_ADDRSEL		0x0010
     75  1.1  uch #define	IT8368_CTRL_BYTESWAP		0x0008
     76  1.1  uch #define	IT8368_CTRL_CARDEN		0x0004
     77  1.1  uch #define	IT8368_CTRL_GLOBALEN		0x0002
     78  1.1  uch #define	IT8368_CTRL_INTTRIEN		0x0001
     79  1.1  uch 
     80  1.1  uch #define	IT8368_PIN_CRDSW		0x1000
     81  1.1  uch #define	IT8368_PIN_CRDDET2		0x0800
     82  1.1  uch #define	IT8368_PIN_CRDDET1		0x0400
     83  1.1  uch #define	IT8368_PIN_CRDSENSE2		0x0200
     84  1.1  uch #define	IT8368_PIN_CRDSENSE1		0x0100
     85  1.1  uch #define	IT8368_PIN_CRDVCCON1		0x0080
     86  1.1  uch #define	IT8368_PIN_CRDVCCON0		0x0040
     87  1.1  uch #define	IT8368_PIN_CRDVPPON1		0x0020
     88  1.1  uch #define	IT8368_PIN_CRDVPPON0		0x0010
     89  1.1  uch #define	IT8368_PIN_BCRDWP		0x0008
     90  1.1  uch #define	IT8368_PIN_BCRDRDY		0x0004
     91  1.1  uch #define	IT8368_PIN_BCRBVD2		0x0002
     92  1.1  uch #define	IT8368_PIN_BCRDRST		0x0001
     93  1.1  uch 
     94  1.1  uch #define IT8368_PIN_CRDVCCMASK		0x00c0
     95  1.1  uch #define IT8368_PIN_CRDVPPMASK		0x0030
     96  1.1  uch #define IT8368_PIN_CRDVCC_0V		0x0000
     97  1.1  uch #define IT8368_PIN_CRDVCC_3V		IT8368_PIN_CRDVCCON0
     98  1.1  uch #define IT8368_PIN_CRDVCC_5V		IT8368_PIN_CRDVCCON1
     99  1.1  uch #define IT8368_PIN_CRDVPP_0V		0x0000
    100  1.1  uch #define IT8368_PIN_CRDVPP_CRDVCC	IT8368_PIN_CRDVPPON0
    101  1.1  uch #define IT8368_PIN_CRDVCC_12V		IT8368_PIN_CRDVPPON1
    102  1.1  uch #define IT8368_PIN_CRDVCC_HIZ		(IT8368_PIN_CRDVPPON0|IT8368_PIN_CRDVPPON1)
    103