mv_usb.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. unsigned int clknum;
  32. char **clkname;
  33. struct mv_usb_addon_irq *id; /* Only valid for OTG. ID pin change*/
  34. struct mv_usb_addon_irq *vbus; /* valid for OTG/UDC. VBUS change*/
  35. /* only valid for HCD. OTG or Host only*/
  36. unsigned int mode;
  37. /* This flag is used for that needs id pin checked by otg */
  38. unsigned int disable_otg_clock_gating:1;
  39. /* Force a_bus_req to be asserted */
  40. unsigned int otg_force_a_bus_req:1;
  41. int (*phy_init)(void __iomem *regbase);
  42. void (*phy_deinit)(void __iomem *regbase);
  43. int (*set_vbus)(unsigned int vbus);
  44. int (*private_init)(void __iomem *opregs, void __iomem *phyregs);
  45. };
  46. #endif