2 * Copyright (C) 2005-2006 by Texas Instruments
4 * The Inventra Controller Driver for Linux is free software; you
5 * can redistribute it and/or modify it under the terms of the GNU
6 * General Public License version 2 as published by the Free Software
10 #ifndef __MUSB_OMAP243X_H__
11 #define __MUSB_OMAP243X_H__
13 #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3430)
14 #include <asm/arch/hardware.h>
15 #include <asm/arch/usb.h>
17 * OMAP2430-specific definitions
20 #define MENTOR_BASE_OFFSET 0
21 #if defined(CONFIG_ARCH_OMAP2430)
22 #define OMAP_HSOTG_BASE (OMAP243X_HS_BASE)
23 #elif defined(CONFIG_ARCH_OMAP3430)
24 #define OMAP_HSOTG_BASE (HS_BASE)
26 #define OMAP_HSOTG(offset) __REG32(OMAP_HSOTG_BASE + 0x400 + (offset))
27 #define OTG_REVISION_REG OMAP_HSOTG(0x0)
28 #define OTG_SYSCONFIG_REG OMAP_HSOTG(0x4)
29 # define MIDLEMODE 12 /* bit position */
30 # define FORCESTDBY (0 << MIDLEMODE)
31 # define NOSTDBY (1 << MIDLEMODE)
32 # define SMARTSTDBY (2 << MIDLEMODE)
33 # define SIDLEMODE 3 /* bit position */
34 # define FORCEIDLE (0 << SIDLEMODE)
35 # define NOIDLE (1 << SIDLEMODE)
36 # define SMARTIDLE (2 << SIDLEMODE)
37 # define ENABLEWAKEUP (1 << 2)
38 # define SOFTRST (1 << 1)
39 # define AUTOIDLE (1 << 0)
40 #define OTG_SYSSTATUS_REG OMAP_HSOTG(0x8)
41 # define RESETDONE (1 << 0)
42 #define OTG_INTERFSEL_REG OMAP_HSOTG(0xc)
43 # define EXTCP (1 << 2)
44 # define PHYSEL 0 /* bit position */
45 # define UTMI_8BIT (0 << PHYSEL)
46 # define ULPI_12PIN (1 << PHYSEL)
47 # define ULPI_8PIN (2 << PHYSEL)
48 #define OTG_SIMENABLE_REG OMAP_HSOTG(0x10)
50 #define OTG_FORCESTDBY_REG OMAP_HSOTG(0x14)
51 # define ENABLEFORCE (1 << 0)
53 #endif /* CONFIG_ARCH_OMAP2430 */
55 #endif /* __MUSB_OMAP243X_H__ */