1*e53470feSOleksandr Tymoshenko /* 2*e53470feSOleksandr Tymoshenko * Copyright (c) 2010 3*e53470feSOleksandr Tymoshenko * Ben Gray <ben.r.gray@gmail.com>. 4*e53470feSOleksandr Tymoshenko * All rights reserved. 5*e53470feSOleksandr Tymoshenko * 6*e53470feSOleksandr Tymoshenko * Redistribution and use in source and binary forms, with or without 7*e53470feSOleksandr Tymoshenko * modification, are permitted provided that the following conditions 8*e53470feSOleksandr Tymoshenko * are met: 9*e53470feSOleksandr Tymoshenko * 1. Redistributions of source code must retain the above copyright 10*e53470feSOleksandr Tymoshenko * notice, this list of conditions and the following disclaimer. 11*e53470feSOleksandr Tymoshenko * 2. Redistributions in binary form must reproduce the above copyright 12*e53470feSOleksandr Tymoshenko * notice, this list of conditions and the following disclaimer in the 13*e53470feSOleksandr Tymoshenko * documentation and/or other materials provided with the distribution. 14*e53470feSOleksandr Tymoshenko * 3. All advertising materials mentioning features or use of this software 15*e53470feSOleksandr Tymoshenko * must display the following acknowledgement: 16*e53470feSOleksandr Tymoshenko * This product includes software developed by Ben Gray. 17*e53470feSOleksandr Tymoshenko * 4. The name of the company nor the name of the author may be used to 18*e53470feSOleksandr Tymoshenko * endorse or promote products derived from this software without specific 19*e53470feSOleksandr Tymoshenko * prior written permission. 20*e53470feSOleksandr Tymoshenko * 21*e53470feSOleksandr Tymoshenko * THIS SOFTWARE IS PROVIDED BY BEN GRAY ``AS IS'' AND ANY EXPRESS OR 22*e53470feSOleksandr Tymoshenko * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23*e53470feSOleksandr Tymoshenko * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24*e53470feSOleksandr Tymoshenko * IN NO EVENT SHALL BEN GRAY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25*e53470feSOleksandr Tymoshenko * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26*e53470feSOleksandr Tymoshenko * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 27*e53470feSOleksandr Tymoshenko * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28*e53470feSOleksandr Tymoshenko * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 29*e53470feSOleksandr Tymoshenko * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 30*e53470feSOleksandr Tymoshenko * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31*e53470feSOleksandr Tymoshenko * 32*e53470feSOleksandr Tymoshenko * $FreeBSD$ 33*e53470feSOleksandr Tymoshenko */ 34*e53470feSOleksandr Tymoshenko 35*e53470feSOleksandr Tymoshenko #ifndef _OMAP_USB_H_ 36*e53470feSOleksandr Tymoshenko #define _OMAP_USB_H_ 37*e53470feSOleksandr Tymoshenko 38*e53470feSOleksandr Tymoshenko /* 39*e53470feSOleksandr Tymoshenko * USB TTL Module 40*e53470feSOleksandr Tymoshenko */ 41*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_REVISION 0x0000 42*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_SYSCONFIG 0x0010 43*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_SYSSTATUS 0x0014 44*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_IRQSTATUS 0x0018 45*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_IRQENABLE 0x001C 46*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_TLL_SHARED_CONF 0x0030 47*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_TLL_CHANNEL_CONF(i) (0x0040 + (0x04 * (i))) 48*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_SAR_CNTX(i) (0x0400 + (0x04 * (i))) 49*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_VENDOR_ID_LO(i) (0x0800 + (0x100 * (i))) 50*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_VENDOR_ID_HI(i) (0x0801 + (0x100 * (i))) 51*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_PRODUCT_ID_LO(i) (0x0802 + (0x100 * (i))) 52*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_PRODUCT_ID_HI(i) (0x0803 + (0x100 * (i))) 53*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_FUNCTION_CTRL(i) (0x0804 + (0x100 * (i))) 54*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_FUNCTION_CTRL_SET(i) (0x0805 + (0x100 * (i))) 55*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_FUNCTION_CTRL_CLR(i) (0x0806 + (0x100 * (i))) 56*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_INTERFACE_CTRL(i) (0x0807 + (0x100 * (i))) 57*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_INTERFACE_CTRL_SET(i) (0x0808 + (0x100 * (i))) 58*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_INTERFACE_CTRL_CLR(i) (0x0809 + (0x100 * (i))) 59*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_OTG_CTRL(i) (0x080A + (0x100 * (i))) 60*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_OTG_CTRL_SET(i) (0x080B + (0x100 * (i))) 61*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_OTG_CTRL_CLR(i) (0x080C + (0x100 * (i))) 62*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_USB_INT_EN_RISE(i) (0x080D + (0x100 * (i))) 63*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_USB_INT_EN_RISE_SET(i) (0x080E + (0x100 * (i))) 64*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_USB_INT_EN_RISE_CLR(i) (0x080F + (0x100 * (i))) 65*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_USB_INT_EN_FALL(i) (0x0810 + (0x100 * (i))) 66*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_USB_INT_EN_FALL_SET(i) (0x0811 + (0x100 * (i))) 67*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_USB_INT_EN_FALL_CLR(i) (0x0812 + (0x100 * (i))) 68*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_USB_INT_STATUS(i) (0x0813 + (0x100 * (i))) 69*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_USB_INT_LATCH(i) (0x0814 + (0x100 * (i))) 70*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_DEBUG(i) (0x0815 + (0x100 * (i))) 71*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_SCRATCH_REGISTER(i) (0x0816 + (0x100 * (i))) 72*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_SCRATCH_REGISTER_SET(i) (0x0817 + (0x100 * (i))) 73*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_SCRATCH_REGISTER_CLR(i) (0x0818 + (0x100 * (i))) 74*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_EXTENDED_SET_ACCESS(i) (0x082F + (0x100 * (i))) 75*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_UTMI_VCONTROL_EN(i) (0x0830 + (0x100 * (i))) 76*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_UTMI_VCONTROL_EN_SET(i) (0x0831 + (0x100 * (i))) 77*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_UTMI_VCONTROL_EN_CLR(i) (0x0832 + (0x100 * (i))) 78*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_UTMI_VCONTROL_STATUS(i) (0x0833 + (0x100 * (i))) 79*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_UTMI_VCONTROL_LATCH(i) (0x0834 + (0x100 * (i))) 80*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_UTMI_VSTATUS(i) (0x0835 + (0x100 * (i))) 81*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_UTMI_VSTATUS_SET(i) (0x0836 + (0x100 * (i))) 82*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_UTMI_VSTATUS_CLR(i) (0x0837 + (0x100 * (i))) 83*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_USB_INT_LATCH_NOCLR(i) (0x0838 + (0x100 * (i))) 84*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_VENDOR_INT_EN(i) (0x083B + (0x100 * (i))) 85*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_VENDOR_INT_EN_SET(i) (0x083C + (0x100 * (i))) 86*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_VENDOR_INT_EN_CLR(i) (0x083D + (0x100 * (i))) 87*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_VENDOR_INT_STATUS(i) (0x083E + (0x100 * (i))) 88*e53470feSOleksandr Tymoshenko #define OMAP_USBTLL_ULPI_VENDOR_INT_LATCH(i) (0x083F + (0x100 * (i))) 89*e53470feSOleksandr Tymoshenko 90*e53470feSOleksandr Tymoshenko 91*e53470feSOleksandr Tymoshenko /* 92*e53470feSOleksandr Tymoshenko * USB Host Module 93*e53470feSOleksandr Tymoshenko */ 94*e53470feSOleksandr Tymoshenko 95*e53470feSOleksandr Tymoshenko /* UHH */ 96*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_UHH_REVISION 0x0000 97*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_UHH_SYSCONFIG 0x0010 98*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_UHH_SYSSTATUS 0x0014 99*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_UHH_HOSTCONFIG 0x0040 100*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_UHH_DEBUG_CSR 0x0044 101*e53470feSOleksandr Tymoshenko 102*e53470feSOleksandr Tymoshenko /* EHCI */ 103*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_HCCAPBASE 0x0000 104*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_HCSPARAMS 0x0004 105*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_HCCPARAMS 0x0008 106*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_USBCMD 0x0010 107*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_USBSTS 0x0014 108*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_USBINTR 0x0018 109*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_FRINDEX 0x001C 110*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_CTRLDSSEGMENT 0x0020 111*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_PERIODICLISTBASE 0x0024 112*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_ASYNCLISTADDR 0x0028 113*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_CONFIGFLAG 0x0050 114*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_PORTSC(i) (0x0054 + (0x04 * (i))) 115*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_INSNREG00 0x0090 116*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_INSNREG01 0x0094 117*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_INSNREG02 0x0098 118*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_INSNREG03 0x009C 119*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_INSNREG04 0x00A0 120*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_INSNREG05_UTMI 0x00A4 121*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_INSNREG05_ULPI 0x00A4 122*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_INSNREG06 0x00A8 123*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_INSNREG07 0x00AC 124*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_INSNREG08 0x00B0 125*e53470feSOleksandr Tymoshenko 126*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_INSNREG04_DISABLE_UNSUSPEND (1 << 5) 127*e53470feSOleksandr Tymoshenko 128*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_INSNREG05_ULPI_CONTROL_SHIFT 31 129*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_INSNREG05_ULPI_PORTSEL_SHIFT 24 130*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_INSNREG05_ULPI_OPSEL_SHIFT 22 131*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_INSNREG05_ULPI_REGADD_SHIFT 16 132*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_INSNREG05_ULPI_EXTREGADD_SHIFT 8 133*e53470feSOleksandr Tymoshenko #define OMAP_USBHOST_INSNREG05_ULPI_WRDATA_SHIFT 0 134*e53470feSOleksandr Tymoshenko 135*e53470feSOleksandr Tymoshenko 136*e53470feSOleksandr Tymoshenko 137*e53470feSOleksandr Tymoshenko 138*e53470feSOleksandr Tymoshenko 139*e53470feSOleksandr Tymoshenko /* TLL Register Set */ 140*e53470feSOleksandr Tymoshenko #define TLL_SYSCONFIG_CACTIVITY (1UL << 8) 141*e53470feSOleksandr Tymoshenko #define TLL_SYSCONFIG_SIDLE_SMART_IDLE (2UL << 3) 142*e53470feSOleksandr Tymoshenko #define TLL_SYSCONFIG_SIDLE_NO_IDLE (1UL << 3) 143*e53470feSOleksandr Tymoshenko #define TLL_SYSCONFIG_SIDLE_FORCED_IDLE (0UL << 3) 144*e53470feSOleksandr Tymoshenko #define TLL_SYSCONFIG_ENAWAKEUP (1UL << 2) 145*e53470feSOleksandr Tymoshenko #define TLL_SYSCONFIG_SOFTRESET (1UL << 1) 146*e53470feSOleksandr Tymoshenko #define TLL_SYSCONFIG_AUTOIDLE (1UL << 0) 147*e53470feSOleksandr Tymoshenko 148*e53470feSOleksandr Tymoshenko #define TLL_SYSSTATUS_RESETDONE (1UL << 0) 149*e53470feSOleksandr Tymoshenko 150*e53470feSOleksandr Tymoshenko #define TLL_SHARED_CONF_USB_90D_DDR_EN (1UL << 6) 151*e53470feSOleksandr Tymoshenko #define TLL_SHARED_CONF_USB_180D_SDR_EN (1UL << 5) 152*e53470feSOleksandr Tymoshenko #define TLL_SHARED_CONF_USB_DIVRATIO_MASK (7UL << 2) 153*e53470feSOleksandr Tymoshenko #define TLL_SHARED_CONF_USB_DIVRATIO_128 (7UL << 2) 154*e53470feSOleksandr Tymoshenko #define TLL_SHARED_CONF_USB_DIVRATIO_64 (6UL << 2) 155*e53470feSOleksandr Tymoshenko #define TLL_SHARED_CONF_USB_DIVRATIO_32 (5UL << 2) 156*e53470feSOleksandr Tymoshenko #define TLL_SHARED_CONF_USB_DIVRATIO_16 (4UL << 2) 157*e53470feSOleksandr Tymoshenko #define TLL_SHARED_CONF_USB_DIVRATIO_8 (3UL << 2) 158*e53470feSOleksandr Tymoshenko #define TLL_SHARED_CONF_USB_DIVRATIO_4 (2UL << 2) 159*e53470feSOleksandr Tymoshenko #define TLL_SHARED_CONF_USB_DIVRATIO_2 (1UL << 2) 160*e53470feSOleksandr Tymoshenko #define TLL_SHARED_CONF_USB_DIVRATIO_1 (0UL << 2) 161*e53470feSOleksandr Tymoshenko #define TLL_SHARED_CONF_FCLK_REQ (1UL << 1) 162*e53470feSOleksandr Tymoshenko #define TLL_SHARED_CONF_FCLK_IS_ON (1UL << 0) 163*e53470feSOleksandr Tymoshenko 164*e53470feSOleksandr Tymoshenko #define TLL_CHANNEL_CONF_DRVVBUS (1UL << 16) 165*e53470feSOleksandr Tymoshenko #define TLL_CHANNEL_CONF_CHRGVBUS (1UL << 15) 166*e53470feSOleksandr Tymoshenko #define TLL_CHANNEL_CONF_ULPINOBITSTUFF (1UL << 11) 167*e53470feSOleksandr Tymoshenko #define TLL_CHANNEL_CONF_ULPIAUTOIDLE (1UL << 10) 168*e53470feSOleksandr Tymoshenko #define TLL_CHANNEL_CONF_UTMIAUTOIDLE (1UL << 9) 169*e53470feSOleksandr Tymoshenko #define TLL_CHANNEL_CONF_ULPIDDRMODE (1UL << 8) 170*e53470feSOleksandr Tymoshenko #define TLL_CHANNEL_CONF_ULPIOUTCLKMODE (1UL << 7) 171*e53470feSOleksandr Tymoshenko #define TLL_CHANNEL_CONF_TLLFULLSPEED (1UL << 6) 172*e53470feSOleksandr Tymoshenko #define TLL_CHANNEL_CONF_TLLCONNECT (1UL << 5) 173*e53470feSOleksandr Tymoshenko #define TLL_CHANNEL_CONF_TLLATTACH (1UL << 4) 174*e53470feSOleksandr Tymoshenko #define TLL_CHANNEL_CONF_UTMIISADEV (1UL << 3) 175*e53470feSOleksandr Tymoshenko #define TLL_CHANNEL_CONF_CHANEN (1UL << 0) 176*e53470feSOleksandr Tymoshenko 177*e53470feSOleksandr Tymoshenko 178*e53470feSOleksandr Tymoshenko /* UHH Register Set */ 179*e53470feSOleksandr Tymoshenko #define UHH_SYSCONFIG_MIDLEMODE_MASK (3UL << 12) 180*e53470feSOleksandr Tymoshenko #define UHH_SYSCONFIG_MIDLEMODE_SMARTSTANDBY (2UL << 12) 181*e53470feSOleksandr Tymoshenko #define UHH_SYSCONFIG_MIDLEMODE_NOSTANDBY (1UL << 12) 182*e53470feSOleksandr Tymoshenko #define UHH_SYSCONFIG_MIDLEMODE_FORCESTANDBY (0UL << 12) 183*e53470feSOleksandr Tymoshenko #define UHH_SYSCONFIG_CLOCKACTIVITY (1UL << 8) 184*e53470feSOleksandr Tymoshenko #define UHH_SYSCONFIG_SIDLEMODE_MASK (3UL << 3) 185*e53470feSOleksandr Tymoshenko #define UHH_SYSCONFIG_SIDLEMODE_SMARTIDLE (2UL << 3) 186*e53470feSOleksandr Tymoshenko #define UHH_SYSCONFIG_SIDLEMODE_NOIDLE (1UL << 3) 187*e53470feSOleksandr Tymoshenko #define UHH_SYSCONFIG_SIDLEMODE_FORCEIDLE (0UL << 3) 188*e53470feSOleksandr Tymoshenko #define UHH_SYSCONFIG_ENAWAKEUP (1UL << 2) 189*e53470feSOleksandr Tymoshenko #define UHH_SYSCONFIG_SOFTRESET (1UL << 1) 190*e53470feSOleksandr Tymoshenko #define UHH_SYSCONFIG_AUTOIDLE (1UL << 0) 191*e53470feSOleksandr Tymoshenko 192*e53470feSOleksandr Tymoshenko #define UHH_HOSTCONFIG_APP_START_CLK (1UL << 31) 193*e53470feSOleksandr Tymoshenko #define UHH_HOSTCONFIG_P3_CONNECT_STATUS (1UL << 10) 194*e53470feSOleksandr Tymoshenko #define UHH_HOSTCONFIG_P2_CONNECT_STATUS (1UL << 9) 195*e53470feSOleksandr Tymoshenko #define UHH_HOSTCONFIG_P1_CONNECT_STATUS (1UL << 8) 196*e53470feSOleksandr Tymoshenko #define UHH_HOSTCONFIG_ENA_INCR_ALIGN (1UL << 5) 197*e53470feSOleksandr Tymoshenko #define UHH_HOSTCONFIG_ENA_INCR16 (1UL << 4) 198*e53470feSOleksandr Tymoshenko #define UHH_HOSTCONFIG_ENA_INCR8 (1UL << 3) 199*e53470feSOleksandr Tymoshenko #define UHH_HOSTCONFIG_ENA_INCR4 (1UL << 2) 200*e53470feSOleksandr Tymoshenko #define UHH_HOSTCONFIG_AUTOPPD_ON_OVERCUR_EN (1UL << 1) 201*e53470feSOleksandr Tymoshenko #define UHH_HOSTCONFIG_P1_ULPI_BYPASS (1UL << 0) 202*e53470feSOleksandr Tymoshenko 203*e53470feSOleksandr Tymoshenko /* The following are on rev2 (OMAP44xx) of the EHCI only */ 204*e53470feSOleksandr Tymoshenko #define UHH_SYSCONFIG_IDLEMODE_MASK (3UL << 2) 205*e53470feSOleksandr Tymoshenko #define UHH_SYSCONFIG_IDLEMODE_NOIDLE (1UL << 2) 206*e53470feSOleksandr Tymoshenko #define UHH_SYSCONFIG_STANDBYMODE_MASK (3UL << 4) 207*e53470feSOleksandr Tymoshenko #define UHH_SYSCONFIG_STANDBYMODE_NOSTDBY (1UL << 4) 208*e53470feSOleksandr Tymoshenko 209*e53470feSOleksandr Tymoshenko #define UHH_HOSTCONFIG_P1_MODE_MASK (3UL << 16) 210*e53470feSOleksandr Tymoshenko #define UHH_HOSTCONFIG_P1_MODE_ULPI_PHY (0UL << 16) 211*e53470feSOleksandr Tymoshenko #define UHH_HOSTCONFIG_P1_MODE_UTMI_PHY (1UL << 16) 212*e53470feSOleksandr Tymoshenko #define UHH_HOSTCONFIG_P1_MODE_HSIC (3UL << 16) 213*e53470feSOleksandr Tymoshenko #define UHH_HOSTCONFIG_P2_MODE_MASK (3UL << 18) 214*e53470feSOleksandr Tymoshenko #define UHH_HOSTCONFIG_P2_MODE_ULPI_PHY (0UL << 18) 215*e53470feSOleksandr Tymoshenko #define UHH_HOSTCONFIG_P2_MODE_UTMI_PHY (1UL << 18) 216*e53470feSOleksandr Tymoshenko #define UHH_HOSTCONFIG_P2_MODE_HSIC (3UL << 18) 217*e53470feSOleksandr Tymoshenko 218*e53470feSOleksandr Tymoshenko #define ULPI_FUNC_CTRL_RESET (1 << 5) 219*e53470feSOleksandr Tymoshenko 220*e53470feSOleksandr Tymoshenko /*-------------------------------------------------------------------------*/ 221*e53470feSOleksandr Tymoshenko 222*e53470feSOleksandr Tymoshenko /* 223*e53470feSOleksandr Tymoshenko * Macros for Set and Clear 224*e53470feSOleksandr Tymoshenko * See ULPI 1.1 specification to find the registers with Set and Clear offsets 225*e53470feSOleksandr Tymoshenko */ 226*e53470feSOleksandr Tymoshenko #define ULPI_SET(a) (a + 1) 227*e53470feSOleksandr Tymoshenko #define ULPI_CLR(a) (a + 2) 228*e53470feSOleksandr Tymoshenko 229*e53470feSOleksandr Tymoshenko /*-------------------------------------------------------------------------*/ 230*e53470feSOleksandr Tymoshenko 231*e53470feSOleksandr Tymoshenko /* 232*e53470feSOleksandr Tymoshenko * Register Map 233*e53470feSOleksandr Tymoshenko */ 234*e53470feSOleksandr Tymoshenko #define ULPI_VENDOR_ID_LOW 0x00 235*e53470feSOleksandr Tymoshenko #define ULPI_VENDOR_ID_HIGH 0x01 236*e53470feSOleksandr Tymoshenko #define ULPI_PRODUCT_ID_LOW 0x02 237*e53470feSOleksandr Tymoshenko #define ULPI_PRODUCT_ID_HIGH 0x03 238*e53470feSOleksandr Tymoshenko #define ULPI_FUNC_CTRL 0x04 239*e53470feSOleksandr Tymoshenko #define ULPI_IFC_CTRL 0x07 240*e53470feSOleksandr Tymoshenko #define ULPI_OTG_CTRL 0x0a 241*e53470feSOleksandr Tymoshenko #define ULPI_USB_INT_EN_RISE 0x0d 242*e53470feSOleksandr Tymoshenko #define ULPI_USB_INT_EN_FALL 0x10 243*e53470feSOleksandr Tymoshenko #define ULPI_USB_INT_STS 0x13 244*e53470feSOleksandr Tymoshenko #define ULPI_USB_INT_LATCH 0x14 245*e53470feSOleksandr Tymoshenko #define ULPI_DEBUG 0x15 246*e53470feSOleksandr Tymoshenko #define ULPI_SCRATCH 0x16 247*e53470feSOleksandr Tymoshenko 248*e53470feSOleksandr Tymoshenko /* 249*e53470feSOleksandr Tymoshenko * Values of UHH_REVISION - Note: these are not given in the TRM but taken 250*e53470feSOleksandr Tymoshenko * from the linux OMAP EHCI driver (thanks guys). It has been verified on 251*e53470feSOleksandr Tymoshenko * a Panda and Beagle board. 252*e53470feSOleksandr Tymoshenko */ 253*e53470feSOleksandr Tymoshenko #define OMAP_EHCI_REV1 0x00000010 /* OMAP3 */ 254*e53470feSOleksandr Tymoshenko #define OMAP_EHCI_REV2 0x50700100 /* OMAP4 */ 255*e53470feSOleksandr Tymoshenko 256*e53470feSOleksandr Tymoshenko #define EHCI_VENDORID_OMAP3 0x42fa05 257*e53470feSOleksandr Tymoshenko #define OMAP_EHCI_HC_DEVSTR "TI OMAP USB 2.0 controller" 258*e53470feSOleksandr Tymoshenko 259*e53470feSOleksandr Tymoshenko #define EHCI_HCD_OMAP_MODE_UNKNOWN 0 260*e53470feSOleksandr Tymoshenko #define EHCI_HCD_OMAP_MODE_PHY 1 261*e53470feSOleksandr Tymoshenko #define EHCI_HCD_OMAP_MODE_TLL 2 262*e53470feSOleksandr Tymoshenko #define EHCI_HCD_OMAP_MODE_HSIC 3 263*e53470feSOleksandr Tymoshenko 264*e53470feSOleksandr Tymoshenko #endif /* _OMAP_USB_H_ */ 265