Home | History | Annotate | Line # | Download | only in ic
sl811hsreg.h revision 1.1.6.2
      1  1.1.6.2  jdolecek /*	$NetBSD: sl811hsreg.h,v 1.1.6.2 2002/09/06 08:44:36 jdolecek Exp $	*/
      2  1.1.6.2  jdolecek 
      3  1.1.6.2  jdolecek /*
      4  1.1.6.2  jdolecek  * Copyright (c) 2001 The NetBSD Foundation, Inc.
      5  1.1.6.2  jdolecek  * All rights reserved.
      6  1.1.6.2  jdolecek  *
      7  1.1.6.2  jdolecek  * This code is derived from software contributed to The NetBSD Foundation
      8  1.1.6.2  jdolecek  * by Tetsuya Isaki.
      9  1.1.6.2  jdolecek  *
     10  1.1.6.2  jdolecek  * Redistribution and use in source and binary forms, with or without
     11  1.1.6.2  jdolecek  * modification, are permitted provided that the following conditions
     12  1.1.6.2  jdolecek  * are met:
     13  1.1.6.2  jdolecek  * 1. Redistributions of source code must retain the above copyright
     14  1.1.6.2  jdolecek  *    notice, this list of conditions and the following disclaimer.
     15  1.1.6.2  jdolecek  * 2. Redistributions in binary form must reproduce the above copyright
     16  1.1.6.2  jdolecek  *    notice, this list of conditions and the following disclaimer in the
     17  1.1.6.2  jdolecek  *    documentation and/or other materials provided with the distribution.
     18  1.1.6.2  jdolecek  * 3. All advertising materials mentioning features or use of this software
     19  1.1.6.2  jdolecek  *    must display the following acknowledgement:
     20  1.1.6.2  jdolecek  *      This product includes software developed by the NetBSD
     21  1.1.6.2  jdolecek  *      Foundation, Inc. and its contributors.
     22  1.1.6.2  jdolecek  * 4. Neither the name of The NetBSD Foundation nor the names of its
     23  1.1.6.2  jdolecek  *    contributors may be used to endorse or promote products derived
     24  1.1.6.2  jdolecek  *    from this software without specific prior written permission.
     25  1.1.6.2  jdolecek  *
     26  1.1.6.2  jdolecek  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     27  1.1.6.2  jdolecek  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     28  1.1.6.2  jdolecek  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     29  1.1.6.2  jdolecek  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     30  1.1.6.2  jdolecek  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     31  1.1.6.2  jdolecek  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     32  1.1.6.2  jdolecek  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     33  1.1.6.2  jdolecek  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     34  1.1.6.2  jdolecek  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     35  1.1.6.2  jdolecek  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     36  1.1.6.2  jdolecek  * POSSIBILITY OF SUCH DAMAGE.
     37  1.1.6.2  jdolecek  */
     38  1.1.6.2  jdolecek 
     39  1.1.6.2  jdolecek /*
     40  1.1.6.2  jdolecek  * ScanLogic SL811HS/T USB Host Controller
     41  1.1.6.2  jdolecek  */
     42  1.1.6.2  jdolecek 
     43  1.1.6.2  jdolecek #define SL11_IDX_ADDR	(0x00)
     44  1.1.6.2  jdolecek #define SL11_IDX_DATA	(0x01)
     45  1.1.6.2  jdolecek #define SL11_PORTSIZE	(0x02)
     46  1.1.6.2  jdolecek 
     47  1.1.6.2  jdolecek #define SL11_E0BASE	(0x00)		/* Base of Control0 */
     48  1.1.6.2  jdolecek #define SL11_E0CTRL	(0x00)		/* Host Control Register */
     49  1.1.6.2  jdolecek #define SL11_E0ADDR	(0x01)		/* Host Base Address */
     50  1.1.6.2  jdolecek #define SL11_E0LEN	(0x02)		/* Host Base Length */
     51  1.1.6.2  jdolecek #define SL11_E0STAT	(0x03)		/* USB Status (Read) */
     52  1.1.6.2  jdolecek #define SL11_E0PID	SL11_E0STAT	/* Host PID, Device Endpoint (Write) */
     53  1.1.6.2  jdolecek #define SL11_E0CONT	(0x04)		/* Transfer Count (Read) */
     54  1.1.6.2  jdolecek #define SL11_E0DEV	SL11_E0CONT	/* Host Device Address (Write) */
     55  1.1.6.2  jdolecek 
     56  1.1.6.2  jdolecek #define SL11_E1BASE	(0x08)		/* Base of Control1 */
     57  1.1.6.2  jdolecek #define SL11_E1CTRL	(SL11_E1BASE + SL11_E0CTRL)
     58  1.1.6.2  jdolecek #define SL11_E1ADDR	(SL11_E1BASE + SL11_E0ADDR)
     59  1.1.6.2  jdolecek #define SL11_E1LEN	(SL11_E1BASE + SL11_E0LEN)
     60  1.1.6.2  jdolecek #define SL11_E1STAT	(SL11_E1BASE + SL11_E0STAT)
     61  1.1.6.2  jdolecek #define SL11_E1PID	(SL11_E1BASE + SL11_E0PID)
     62  1.1.6.2  jdolecek #define SL11_E1CONT	(SL11_E1BASE + SL11_E0CONT)
     63  1.1.6.2  jdolecek #define SL11_E1DEV	(SL11_E1BASE + SL11_E0DEV)
     64  1.1.6.2  jdolecek 
     65  1.1.6.2  jdolecek #define SL11_CTRL	(0x05)		/* Control Register1 */
     66  1.1.6.2  jdolecek #define SL11_IER	(0x06)		/* Interrupt Enable Register */
     67  1.1.6.2  jdolecek #define SL11_ISR	(0x0d)		/* Interrupt Status Register */
     68  1.1.6.2  jdolecek #define SL11_DATA	(0x0e)		/* SOF Counter Low (Write) */
     69  1.1.6.2  jdolecek #define SL11_REV	SL11_DATA	/* HW Revision Register (Read) */
     70  1.1.6.2  jdolecek #define SL811_CSOF	(0x0f)		/* SOF Counter High(R), Control2(W) */
     71  1.1.6.2  jdolecek #define SL11_MEM	(0x10)		/* Memory Buffer (0x10 - 0xff) */
     72  1.1.6.2  jdolecek 
     73  1.1.6.2  jdolecek #define SL11_EPCTRL_ARM		(0x01)
     74  1.1.6.2  jdolecek #define SL11_EPCTRL_ENABLE	(0x02)
     75  1.1.6.2  jdolecek #define SL11_EPCTRL_DIRECTION	(0x04)
     76  1.1.6.2  jdolecek #define SL11_EPCTRL_ISO		(0x10)
     77  1.1.6.2  jdolecek #define SL11_EPCTRL_SOF		(0x20)
     78  1.1.6.2  jdolecek #define SL11_EPCTRL_DATATOGGLE	(0x40)
     79  1.1.6.2  jdolecek #define SL11_EPCTRL_PREAMBLE	(0x80)
     80  1.1.6.2  jdolecek 
     81  1.1.6.2  jdolecek #define SL11_EPPID_PIDMASK	(0xf0)
     82  1.1.6.2  jdolecek #define SL11_EPPID_EPMASK	(0x0f)
     83  1.1.6.2  jdolecek 
     84  1.1.6.2  jdolecek #define SL11_EPSTAT_ACK		(0x01)
     85  1.1.6.2  jdolecek #define SL11_EPSTAT_ERROR	(0x02)
     86  1.1.6.2  jdolecek #define SL11_EPSTAT_TIMEOUT	(0x04)
     87  1.1.6.2  jdolecek #define SL11_EPSTAT_SEQUENCE	(0x08)
     88  1.1.6.2  jdolecek #define SL11_EPSTAT_SETUP	(0x10)
     89  1.1.6.2  jdolecek #define SL11_EPSTAT_OVERFLOW	(0x20)
     90  1.1.6.2  jdolecek #define SL11_EPSTAT_NAK		(0x40)
     91  1.1.6.2  jdolecek #define SL11_EPSTAT_STALL	(0x80)
     92  1.1.6.2  jdolecek 
     93  1.1.6.2  jdolecek #define SL11_CTRL_ENABLESOF	(0x01)
     94  1.1.6.2  jdolecek #define SL11_CTRL_EOF2		(0x04)
     95  1.1.6.2  jdolecek #define SL11_CTRL_RESETENGINE	(0x08)
     96  1.1.6.2  jdolecek #define SL11_CTRL_JKSTATE	(0x10)
     97  1.1.6.2  jdolecek #define SL11_CTRL_LOWSPEED	(0x20)
     98  1.1.6.2  jdolecek #define SL11_CTRL_SUSPEND	(0x40)
     99  1.1.6.2  jdolecek 
    100  1.1.6.2  jdolecek #define SL11_IER_USBA		(0x01)	/* USB-A done */
    101  1.1.6.2  jdolecek #define SL11_IER_USBB		(0x02)	/* USB-B done */
    102  1.1.6.2  jdolecek #define SL11_IER_BABBLE		(0x04)	/* Babble detection */
    103  1.1.6.2  jdolecek #define SL11_IER_SOFTIMER	(0x10)	/* 1ms SOF timer */
    104  1.1.6.2  jdolecek #define SL11_IER_INSERT		(0x20)	/* Slave Insert/Remove detection */
    105  1.1.6.2  jdolecek #define SL11_IER_RESET		(0x40)	/* USB Reset/Resume */
    106  1.1.6.2  jdolecek 
    107  1.1.6.2  jdolecek #define SL11_ISR_USBA		(0x01)	/* USB-A done */
    108  1.1.6.2  jdolecek #define SL11_ISR_USBB		(0x02)	/* USB-B done */
    109  1.1.6.2  jdolecek #define SL11_ISR_BABBLE		(0x04)	/* Babble detection */
    110  1.1.6.2  jdolecek #define SL11_ISR_SOFTIMER	(0x10)	/* 1ms SOF timer */
    111  1.1.6.2  jdolecek #define SL11_ISR_INSERT		(0x20)	/* Slave Insert/Remove detection */
    112  1.1.6.2  jdolecek #define SL11_ISR_RESET		(0x40)	/* USB Reset/Resume */
    113  1.1.6.2  jdolecek #define SL11_ISR_DATA		(0x80)	/* Value of the Data+ pin */
    114  1.1.6.2  jdolecek 
    115  1.1.6.2  jdolecek #define SL11_REV_USBA		(0x01)	/* USB-A */
    116  1.1.6.2  jdolecek #define SL11_REV_USBB		(0x02)	/* USB-B */
    117  1.1.6.2  jdolecek #define SL11_REV_REVMASK	(0xf0)	/* HW Revision */
    118  1.1.6.2  jdolecek #define SL11_REV_REVSL11H	(0x00)	/* HW is SL11H */
    119  1.1.6.2  jdolecek #define SL11_REV_REVSL811HS	(0x10)	/* HW is SL811HS */
    120  1.1.6.2  jdolecek 
    121  1.1.6.2  jdolecek #define SL811_CSOF_SOFMASK	(0x3f)	/* SOF High Counter */
    122  1.1.6.2  jdolecek #define SL811_CSOF_POLARITY	(0x40)	/* Change polarity */
    123  1.1.6.2  jdolecek #define SL811_CSOF_MASTER	(0x80)	/* Master/Slave selection */
    124  1.1.6.2  jdolecek 
    125