1249259Sdim/* $NetBSD: augpioreg.h,v 1.2 2006/02/13 04:30:47 gdamore Exp $ */ 2249259Sdim 3249259Sdim/*- 4249259Sdim * Copyright (c) 2006 Itronix Inc. 5249259Sdim * All rights reserved. 6249259Sdim * 7249259Sdim * Written by Garrett D'Amore for Itronix Inc. 8249259Sdim * 9249259Sdim * Redistribution and use in source and binary forms, with or without 10249259Sdim * modification, are permitted provided that the following conditions 11249259Sdim * are met: 12249259Sdim * 1. Redistributions of source code must retain the above copyright 13249259Sdim * notice, this list of conditions and the following disclaimer. 14249259Sdim * 2. Redistributions in binary form must reproduce the above copyright 15249259Sdim * notice, this list of conditions and the following disclaimer in the 16249259Sdim * documentation and/or other materials provided with the distribution. 17249259Sdim * 3. The name of Itronix Inc. may not be used to endorse 18249259Sdim * or promote products derived from this software without specific 19249259Sdim * prior written permission. 20249259Sdim * 21249259Sdim * THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND 22249259Sdim * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 23249259Sdim * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 24249259Sdim * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY 25249259Sdim * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 26249259Sdim * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27249259Sdim * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 28249259Sdim * ON ANY THEORY OF LIABILITY, WHETHER IN 29249259Sdim * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30249259Sdim * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31249259Sdim * POSSIBILITY OF SUCH DAMAGE. 32249259Sdim */ 33249259Sdim 34249259Sdim#ifndef _MIPS_ALCHEMY_DEV_AUGPIOREG_H 35249259Sdim#define _MIPS_ALCHEMY_DEV_AUGPIOREG_H 36249259Sdim 37249259Sdim#define AUGPIO_NPINS 64 38249259Sdim 39249259Sdim/* 40249259Sdim * SYS_GPIO registers -- offset from GPIO_BASE. 41263508Sdim * 42249259Sdim * This excludes SYS_PINFUNC, that has to be included in the SYS_BASE 43249259Sdim * registers -- it is surrounded by other non-GPIO related regs. 44249259Sdim */ 45249259Sdim#define AUGPIO_TRIOUTRD 0x00 46249259Sdim#define AUGPIO_TRIOUTCLR 0x00 47249259Sdim#define AUGPIO_OUTPUTRD 0x08 48249259Sdim#define AUGPIO_OUTPUTSET 0x08 49249259Sdim#define AUGPIO_OUTPUTCLR 0x0C 50249259Sdim#define AUGPIO_PINSTATERD 0x10 51249259Sdim#define AUGPIO_PININPUTEN 0x10 52249259Sdim#define AUGPIO_SIZE 0x14 53249259Sdim 54249259Sdim/* GPIO2 registers -- offset from GPIO2_BASE */ 55249259Sdim#define AUGPIO2_DIR 0x00 56249259Sdim#define AUGPIO2_OUTPUT 0x08 57249259Sdim#define AUGPIO2_PINSTATE 0x0C 58249259Sdim#define AUGPIO2_INTEN 0x10 59249259Sdim#define AUGPIO2_ENABLE 0x14 60249259Sdim#define AUGPIO2_SIZE 0x18 61249259Sdim 62249259Sdim#define AUGPIO_GPIO2_ENABLE_CE 0x1 63249259Sdim#define AUGPIO_GPIO2_ENABLE_MR 0x2 64249259Sdim 65249259Sdim#endif /* _MIPS_ALCHEMY_DEV_AUPCIREG_H */ 66249259Sdim