usb-omap.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * usb-omap.h - Platform data for the various OMAP USB IPs
  3. *
  4. * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com
  5. *
  6. * This software is distributed under the terms of the GNU General Public
  7. * License ("GPL") version 2, as published by the Free Software Foundation.
  8. *
  9. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  10. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  11. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  12. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  13. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  14. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  15. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  16. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  17. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  18. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  19. * POSSIBILITY OF SUCH DAMAGE.
  20. */
  21. #define OMAP3_HS_USB_PORTS 3
  22. enum usbhs_omap_port_mode {
  23. OMAP_USBHS_PORT_MODE_UNUSED,
  24. OMAP_EHCI_PORT_MODE_PHY,
  25. OMAP_EHCI_PORT_MODE_TLL,
  26. OMAP_EHCI_PORT_MODE_HSIC,
  27. OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0,
  28. OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM,
  29. OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0,
  30. OMAP_OHCI_PORT_MODE_PHY_4PIN_DPDM,
  31. OMAP_OHCI_PORT_MODE_TLL_6PIN_DATSE0,
  32. OMAP_OHCI_PORT_MODE_TLL_6PIN_DPDM,
  33. OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0,
  34. OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM,
  35. OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0,
  36. OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM
  37. };
  38. struct usbtll_omap_platform_data {
  39. enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS];
  40. };
  41. struct ehci_hcd_omap_platform_data {
  42. enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS];
  43. int reset_gpio_port[OMAP3_HS_USB_PORTS];
  44. struct regulator *regulator[OMAP3_HS_USB_PORTS];
  45. unsigned phy_reset:1;
  46. };
  47. struct ohci_hcd_omap_platform_data {
  48. enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS];
  49. unsigned es2_compatibility:1;
  50. };
  51. struct usbhs_omap_platform_data {
  52. int nports;
  53. enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS];
  54. int reset_gpio_port[OMAP3_HS_USB_PORTS];
  55. struct regulator *regulator[OMAP3_HS_USB_PORTS];
  56. struct ehci_hcd_omap_platform_data *ehci_data;
  57. struct ohci_hcd_omap_platform_data *ohci_data;
  58. /* OMAP3 <= ES2.1 have a single ulpi bypass control bit */
  59. unsigned single_ulpi_bypass:1;
  60. unsigned es2_compatibility:1;
  61. unsigned phy_reset:1;
  62. };
  63. /*-------------------------------------------------------------------------*/
  64. struct omap_musb_board_data {
  65. u8 interface_type;
  66. u8 mode;
  67. u16 power;
  68. unsigned extvbus:1;
  69. void (*set_phy_power)(u8 on);
  70. void (*clear_irq)(void);
  71. void (*set_mode)(u8 mode);
  72. void (*reset)(void);
  73. };
  74. enum musb_interface {
  75. MUSB_INTERFACE_ULPI,
  76. MUSB_INTERFACE_UTMI
  77. };