mv_usb.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Copyright (C) 2011 Marvell International Ltd. All rights reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms of the GNU General Public License as published by the
  6. * Free Software Foundation; either version 2 of the License, or (at your
  7. * option) any later version.
  8. */
  9. #ifndef __MV_PLATFORM_USB_H
  10. #define __MV_PLATFORM_USB_H
  11. enum pxa_ehci_type {
  12. EHCI_UNDEFINED = 0,
  13. PXA_U2OEHCI, /* pxa 168, 9xx */
  14. PXA_SPH, /* pxa 168, 9xx SPH */
  15. MMP3_HSIC, /* mmp3 hsic */
  16. MMP3_FSIC, /* mmp3 fsic */
  17. };
  18. enum {
  19. MV_USB_MODE_OTG,
  20. MV_USB_MODE_HOST,
  21. };
  22. enum {
  23. VBUS_LOW = 0,
  24. VBUS_HIGH = 1 << 0,
  25. };
  26. struct mv_usb_addon_irq {
  27. unsigned int irq;
  28. int (*poll)(void);
  29. };
  30. struct mv_usb_platform_data {
  31. struct mv_usb_addon_irq *id; /* Only valid for OTG. ID pin change*/
  32. struct mv_usb_addon_irq *vbus; /* valid for OTG/UDC. VBUS change*/
  33. /* only valid for HCD. OTG or Host only*/
  34. unsigned int mode;
  35. /* This flag is used for that needs id pin checked by otg */
  36. unsigned int disable_otg_clock_gating:1;
  37. /* Force a_bus_req to be asserted */
  38. unsigned int otg_force_a_bus_req:1;
  39. int (*phy_init)(void __iomem *regbase);
  40. void (*phy_deinit)(void __iomem *regbase);
  41. int (*set_vbus)(unsigned int vbus);
  42. int (*private_init)(void __iomem *opregs, void __iomem *phyregs);
  43. };
  44. #endif