2 * am35x.h - TI's AM35x platform specific usb wrapper definitions.
4 * Author: Ajay Kumar Gupta <ajay.gupta@ti.com>
6 * Based on drivers/usb/musb/da8xx.h
8 * Copyright (c) 2010 Texas Instruments Incorporated
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #ifndef __AM35X_USB_H__
26 #define __AM35X_USB_H__
28 #include <asm/arch/am35x_def.h>
29 #include "musb_core.h"
31 /* Base address of musb wrapper */
32 #define AM35X_USB_OTG_BASE 0x5C040000
34 /* Base address of musb core */
35 #define AM35X_USB_OTG_CORE_BASE (AM35X_USB_OTG_BASE + 0x400)
37 /* Timeout for AM35x usb module */
38 #define AM35X_USB_OTG_TIMEOUT 0x3FFFFFF
41 * AM35x platform USB wrapper register overlay.
43 struct am35x_usb_regs {
75 #define am35x_usb_regs ((struct am35x_usb_regs *)AM35X_USB_OTG_BASE)
77 /* USB 2.0 PHY Control */
78 #define DEVCONF2_PHY_GPIOMODE (1 << 23)
79 #define DEVCONF2_OTGMODE (3 << 14)
80 #define DEVCONF2_SESENDEN (1 << 13) /* Vsess_end comparator */
81 #define DEVCONF2_VBDTCTEN (1 << 12) /* Vbus comparator */
82 #define DEVCONF2_REFFREQ_24MHZ (2 << 8)
83 #define DEVCONF2_REFFREQ_26MHZ (7 << 8)
84 #define DEVCONF2_REFFREQ_13MHZ (6 << 8)
85 #define DEVCONF2_REFFREQ (0xf << 8)
86 #define DEVCONF2_PHYCKGD (1 << 7)
87 #define DEVCONF2_VBUSSENSE (1 << 6)
88 #define DEVCONF2_PHY_PLLON (1 << 5) /* override PLL suspend */
89 #define DEVCONF2_RESET (1 << 4)
90 #define DEVCONF2_PHYPWRDN (1 << 3)
91 #define DEVCONF2_OTGPWRDN (1 << 2)
92 #define DEVCONF2_DATPOL (1 << 1)
94 #endif /* __AM35X_USB_H__ */