2012-10-25 01:26:19 +04:00
|
|
|
/*
|
|
|
|
* usb-omap.h - Platform data for the various OMAP USB IPs
|
|
|
|
*
|
|
|
|
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com
|
|
|
|
*
|
|
|
|
* This software is distributed under the terms of the GNU General Public
|
|
|
|
* License ("GPL") version 2, as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
|
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
|
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
2005-04-17 02:20:36 +04:00
|
|
|
|
2009-11-22 21:11:00 +03:00
|
|
|
#define OMAP3_HS_USB_PORTS 3
|
|
|
|
|
2011-03-01 17:38:16 +03:00
|
|
|
enum usbhs_omap_port_mode {
|
|
|
|
OMAP_USBHS_PORT_MODE_UNUSED,
|
|
|
|
OMAP_EHCI_PORT_MODE_PHY,
|
|
|
|
OMAP_EHCI_PORT_MODE_TLL,
|
|
|
|
OMAP_EHCI_PORT_MODE_HSIC,
|
2010-05-10 20:26:10 +04:00
|
|
|
OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0,
|
|
|
|
OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM,
|
|
|
|
OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0,
|
|
|
|
OMAP_OHCI_PORT_MODE_PHY_4PIN_DPDM,
|
|
|
|
OMAP_OHCI_PORT_MODE_TLL_6PIN_DATSE0,
|
|
|
|
OMAP_OHCI_PORT_MODE_TLL_6PIN_DPDM,
|
|
|
|
OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0,
|
|
|
|
OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM,
|
|
|
|
OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0,
|
2011-03-01 17:38:16 +03:00
|
|
|
OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM
|
2010-05-10 20:26:10 +04:00
|
|
|
};
|
|
|
|
|
2012-10-25 01:26:19 +04:00
|
|
|
struct usbtll_omap_platform_data {
|
|
|
|
enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS];
|
|
|
|
};
|
2012-06-04 11:56:15 +04:00
|
|
|
|
2011-03-01 17:38:16 +03:00
|
|
|
struct ehci_hcd_omap_platform_data {
|
|
|
|
enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS];
|
|
|
|
int reset_gpio_port[OMAP3_HS_USB_PORTS];
|
|
|
|
struct regulator *regulator[OMAP3_HS_USB_PORTS];
|
|
|
|
unsigned phy_reset:1;
|
|
|
|
};
|
2010-05-10 20:26:10 +04:00
|
|
|
|
2011-03-01 17:38:16 +03:00
|
|
|
struct ohci_hcd_omap_platform_data {
|
|
|
|
enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS];
|
2010-05-10 20:26:10 +04:00
|
|
|
unsigned es2_compatibility:1;
|
|
|
|
};
|
|
|
|
|
2011-03-01 17:38:16 +03:00
|
|
|
struct usbhs_omap_platform_data {
|
2012-11-08 21:18:08 +04:00
|
|
|
int nports;
|
2013-02-13 15:12:35 +04:00
|
|
|
enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS];
|
|
|
|
int reset_gpio_port[OMAP3_HS_USB_PORTS];
|
|
|
|
struct regulator *regulator[OMAP3_HS_USB_PORTS];
|
2011-03-01 17:38:16 +03:00
|
|
|
|
|
|
|
struct ehci_hcd_omap_platform_data *ehci_data;
|
|
|
|
struct ohci_hcd_omap_platform_data *ohci_data;
|
2012-12-14 21:09:11 +04:00
|
|
|
|
|
|
|
/* OMAP3 <= ES2.1 have a single ulpi bypass control bit */
|
2013-02-13 15:12:35 +04:00
|
|
|
unsigned single_ulpi_bypass:1;
|
|
|
|
unsigned es2_compatibility:1;
|
|
|
|
unsigned phy_reset:1;
|
2011-03-01 17:38:16 +03:00
|
|
|
};
|
2012-07-16 17:31:08 +04:00
|
|
|
|
2005-04-17 02:20:36 +04:00
|
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
|
2010-02-18 01:09:30 +03:00
|
|
|
struct omap_musb_board_data {
|
|
|
|
u8 interface_type;
|
|
|
|
u8 mode;
|
2010-03-25 14:14:23 +03:00
|
|
|
u16 power;
|
2010-03-25 14:25:27 +03:00
|
|
|
unsigned extvbus:1;
|
2010-12-07 16:27:45 +03:00
|
|
|
void (*set_phy_power)(u8 on);
|
|
|
|
void (*clear_irq)(void);
|
|
|
|
void (*set_mode)(u8 mode);
|
|
|
|
void (*reset)(void);
|
2010-02-18 01:09:30 +03:00
|
|
|
};
|
|
|
|
|
2012-10-25 01:26:19 +04:00
|
|
|
enum musb_interface {
|
|
|
|
MUSB_INTERFACE_ULPI,
|
|
|
|
MUSB_INTERFACE_UTMI
|
|
|
|
};
|