diff options
Diffstat (limited to 'include/asm-arm/arch-omap/usb.h')
-rw-r--r-- | include/asm-arm/arch-omap/usb.h | 40 |
1 files changed, 35 insertions, 5 deletions
diff --git a/include/asm-arm/arch-omap/usb.h b/include/asm-arm/arch-omap/usb.h index 054fb9a8e0c6..99ae9eabaf71 100644 --- a/include/asm-arm/arch-omap/usb.h +++ b/include/asm-arm/arch-omap/usb.h | |||
@@ -7,9 +7,27 @@ | |||
7 | 7 | ||
8 | /*-------------------------------------------------------------------------*/ | 8 | /*-------------------------------------------------------------------------*/ |
9 | 9 | ||
10 | #define OTG_BASE 0xfffb0400 | 10 | #define OMAP1_OTG_BASE 0xfffb0400 |
11 | #define UDC_BASE 0xfffb4000 | 11 | #define OMAP1_UDC_BASE 0xfffb4000 |
12 | #define OMAP_OHCI_BASE 0xfffba000 | 12 | #define OMAP1_OHCI_BASE 0xfffba000 |
13 | |||
14 | #define OMAP2_OHCI_BASE 0x4805e000 | ||
15 | #define OMAP2_UDC_BASE 0x4805e200 | ||
16 | #define OMAP2_OTG_BASE 0x4805e300 | ||
17 | |||
18 | #ifdef CONFIG_ARCH_OMAP1 | ||
19 | |||
20 | #define OTG_BASE OMAP1_OTG_BASE | ||
21 | #define UDC_BASE OMAP1_UDC_BASE | ||
22 | #define OMAP_OHCI_BASE OMAP1_OHCI_BASE | ||
23 | |||
24 | #else | ||
25 | |||
26 | #define OTG_BASE OMAP2_OTG_BASE | ||
27 | #define UDC_BASE OMAP2_UDC_BASE | ||
28 | #define OMAP_OHCI_BASE OMAP2_OHCI_BASE | ||
29 | |||
30 | #endif | ||
13 | 31 | ||
14 | /*-------------------------------------------------------------------------*/ | 32 | /*-------------------------------------------------------------------------*/ |
15 | 33 | ||
@@ -28,6 +46,7 @@ | |||
28 | # define HST_IDLE_EN (1 << 14) | 46 | # define HST_IDLE_EN (1 << 14) |
29 | # define DEV_IDLE_EN (1 << 13) | 47 | # define DEV_IDLE_EN (1 << 13) |
30 | # define OTG_RESET_DONE (1 << 2) | 48 | # define OTG_RESET_DONE (1 << 2) |
49 | # define OTG_SOFT_RESET (1 << 1) | ||
31 | #define OTG_SYSCON_2_REG OTG_REG32(0x08) | 50 | #define OTG_SYSCON_2_REG OTG_REG32(0x08) |
32 | # define OTG_EN (1 << 31) | 51 | # define OTG_EN (1 << 31) |
33 | # define USBX_SYNCHRO (1 << 30) | 52 | # define USBX_SYNCHRO (1 << 30) |
@@ -103,6 +122,7 @@ | |||
103 | 122 | ||
104 | /*-------------------------------------------------------------------------*/ | 123 | /*-------------------------------------------------------------------------*/ |
105 | 124 | ||
125 | /* OMAP1 */ | ||
106 | #define USB_TRANSCEIVER_CTRL_REG __REG32(0xfffe1000 + 0x0064) | 126 | #define USB_TRANSCEIVER_CTRL_REG __REG32(0xfffe1000 + 0x0064) |
107 | # define CONF_USB2_UNI_R (1 << 8) | 127 | # define CONF_USB2_UNI_R (1 << 8) |
108 | # define CONF_USB1_UNI_R (1 << 7) | 128 | # define CONF_USB1_UNI_R (1 << 7) |
@@ -111,7 +131,17 @@ | |||
111 | # define CONF_USB_PWRDN_DM_R (1 << 2) | 131 | # define CONF_USB_PWRDN_DM_R (1 << 2) |
112 | # define CONF_USB_PWRDN_DP_R (1 << 1) | 132 | # define CONF_USB_PWRDN_DP_R (1 << 1) |
113 | 133 | ||
114 | 134 | /* OMAP2 */ | |
115 | 135 | #define CONTROL_DEVCONF_REG __REG32(L4_24XX_BASE + 0x0274) | |
136 | # define USB_UNIDIR 0x0 | ||
137 | # define USB_UNIDIR_TLL 0x1 | ||
138 | # define USB_BIDIR 0x2 | ||
139 | # define USB_BIDIR_TLL 0x3 | ||
140 | # define USBT0WRMODEI(x) ((x) << 22) | ||
141 | # define USBT1WRMODEI(x) ((x) << 20) | ||
142 | # define USBT2WRMODEI(x) ((x) << 18) | ||
143 | # define USBT2TLL5PI (1 << 17) | ||
144 | # define USB0PUENACTLOI (1 << 16) | ||
145 | # define USBSTANDBYCTRL (1 << 15) | ||
116 | 146 | ||
117 | #endif /* __ASM_ARCH_OMAP_USB_H */ | 147 | #endif /* __ASM_ARCH_OMAP_USB_H */ |