1*ce099b40Smartin /* $NetBSD: it8368reg.h,v 1.5 2008/04/28 20:23:21 martin Exp $ */ 2a8b695c1Such 358f851eeSuch /*- 458f851eeSuch * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. 5a8b695c1Such * All rights reserved. 6a8b695c1Such * 758f851eeSuch * This code is derived from software contributed to The NetBSD Foundation 858f851eeSuch * by UCHIYAMA Yasushi. 958f851eeSuch * 10a8b695c1Such * Redistribution and use in source and binary forms, with or without 11a8b695c1Such * modification, are permitted provided that the following conditions 12a8b695c1Such * are met: 13a8b695c1Such * 1. Redistributions of source code must retain the above copyright 14a8b695c1Such * notice, this list of conditions and the following disclaimer. 1558f851eeSuch * 2. Redistributions in binary form must reproduce the above copyright 1658f851eeSuch * notice, this list of conditions and the following disclaimer in the 1758f851eeSuch * documentation and/or other materials provided with the distribution. 18a8b695c1Such * 1958f851eeSuch * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 2058f851eeSuch * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 2158f851eeSuch * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2258f851eeSuch * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 2358f851eeSuch * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2458f851eeSuch * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2558f851eeSuch * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2658f851eeSuch * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2758f851eeSuch * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2858f851eeSuch * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2958f851eeSuch * POSSIBILITY OF SUCH DAMAGE. 30a8b695c1Such */ 31a8b695c1Such 32a8b695c1Such /* 33a8b695c1Such * ITE IT8368E PCMCIA/GPIO Buffer Chip 34a8b695c1Such * http://www.ite.com/tw/mobile/it8368v07.pdf 35a8b695c1Such */ 36a8b695c1Such #define IT8368_GPIODATAOUT_REG 0x00 37a8b695c1Such #define IT8368_MFIODATAOUT_REG 0x02 38a8b695c1Such #define IT8368_GPIODIR_REG 0x04 39a8b695c1Such #define IT8368_MFIODIR_REG 0x06 40a8b695c1Such #define IT8368_MFIOSEL_REG 0x0a 41a8b695c1Such #define IT8368_GPIODATAIN_REG 0x0c 42a8b695c1Such #define IT8368_MFIODATAIN_REG 0x0e 43a8b695c1Such #define IT8368_GPIOPOSINTEN_REG 0x10 44a8b695c1Such #define IT8368_MFIOPOSINTEN_REG 0x12 45a8b695c1Such #define IT8368_GPIONEGINTEN_REG 0x14 46a8b695c1Such #define IT8368_MFIONEGINTEN_REG 0x16 47a8b695c1Such #define IT8368_GPIOPOSINTSTAT_REG 0x18 48a8b695c1Such #define IT8368_MFIOPOSINTSTAT_REG 0x1a 49a8b695c1Such #define IT8368_GPIONEGINTSTAT_REG 0x1c 50a8b695c1Such #define IT8368_MFIONEGINTSTAT_REG 0x1e 51a8b695c1Such #define IT8368_CTRL_REG 0x20 52a8b695c1Such 53d136e27aSuch #define IT8368_GPIO_MAX 12 54d136e27aSuch #define IT8368_MFIO_MAX 10 55d136e27aSuch 56a8b695c1Such #define IT8368_GPIODATAOUT_MASK 0x1fff 57a8b695c1Such #define IT8368_MFIODATAOUT_MASK 0x07ff 58a8b695c1Such #define IT8368_GPIODIR_MASK 0x1fff 59a8b695c1Such #define IT8368_MFIODIR_MASK 0x07ff 60a8b695c1Such 61a8b695c1Such #define IT8368_MFIOSEL_VGAEN 0x0800 62a8b695c1Such #define IT8368_MFIOSEL_MASK 0x07ff 63a8b695c1Such #define IT8368_GPIODATAIN_MASK 0x1fff 64a8b695c1Such #define IT8368_MFIODATAIN_MASK 0x07ff 65a8b695c1Such #define IT8368_GPIOPOSINTEN_MASK 0x1fff 66a8b695c1Such #define IT8368_MFIOPOSINTEN_MASK 0x07ff 67a8b695c1Such #define IT8368_GPIONEGINTEN_MASK 0x1fff 68a8b695c1Such #define IT8368_MFIONEGINTEN_MASK 0x07ff 69a8b695c1Such #define IT8368_GPIOPOSINTSTAT_MASK 0x1fff 70a8b695c1Such #define IT8368_MFIOPOSINTSTAT_MASK 0x07ff 71a8b695c1Such #define IT8368_GPIONEGINTSTAT_MASK 0x1fff 72a8b695c1Such #define IT8368_MFIONEGINTSTAT_MASK 0x07ff 73a8b695c1Such 74a8b695c1Such 75a8b695c1Such #define IT8368_CTRL_FIXATTRIO 0x8000 76a8b695c1Such #define IT8368_FIXATTR_OFFSET 0x02000000 77a8b695c1Such #define IT8368_FIXIO_OFFSET 0x0 78a8b695c1Such #define IT8368_FIXIOATTR_SIZE 0x02000000 79a8b695c1Such 80a8b695c1Such #define IT8368_CTRL_ADDRSEL 0x0010 81a8b695c1Such #define IT8368_CTRL_BYTESWAP 0x0008 82a8b695c1Such #define IT8368_CTRL_CARDEN 0x0004 83a8b695c1Such #define IT8368_CTRL_GLOBALEN 0x0002 84a8b695c1Such #define IT8368_CTRL_INTTRIEN 0x0001 85a8b695c1Such 86a8b695c1Such #define IT8368_PIN_CRDSW 0x1000 87a8b695c1Such #define IT8368_PIN_CRDDET2 0x0800 88a8b695c1Such #define IT8368_PIN_CRDDET1 0x0400 89a8b695c1Such #define IT8368_PIN_CRDSENSE2 0x0200 90a8b695c1Such #define IT8368_PIN_CRDSENSE1 0x0100 91a8b695c1Such #define IT8368_PIN_CRDVCCON1 0x0080 92a8b695c1Such #define IT8368_PIN_CRDVCCON0 0x0040 93a8b695c1Such #define IT8368_PIN_CRDVPPON1 0x0020 94a8b695c1Such #define IT8368_PIN_CRDVPPON0 0x0010 95a8b695c1Such #define IT8368_PIN_BCRDWP 0x0008 96a8b695c1Such #define IT8368_PIN_BCRDRDY 0x0004 97a8b695c1Such #define IT8368_PIN_BCRBVD2 0x0002 98a8b695c1Such #define IT8368_PIN_BCRDRST 0x0001 99a8b695c1Such 100a8b695c1Such #define IT8368_PIN_CRDVCCMASK 0x00c0 101a8b695c1Such #define IT8368_PIN_CRDVPPMASK 0x0030 102a8b695c1Such #define IT8368_PIN_CRDVCC_0V 0x0000 103a8b695c1Such #define IT8368_PIN_CRDVCC_3V IT8368_PIN_CRDVCCON0 104a8b695c1Such #define IT8368_PIN_CRDVCC_5V IT8368_PIN_CRDVCCON1 105a8b695c1Such #define IT8368_PIN_CRDVPP_0V 0x0000 106a8b695c1Such #define IT8368_PIN_CRDVPP_CRDVCC IT8368_PIN_CRDVPPON0 107a8b695c1Such #define IT8368_PIN_CRDVCC_12V IT8368_PIN_CRDVPPON1 108ba8565beSuch #define IT8368_PIN_CRDVCC_HIZ (IT8368_PIN_CRDVPPON0 | \ 109ba8565beSuch IT8368_PIN_CRDVPPON1) 110