msm_hsusb_hw.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Copyright (C) 2007 Google, Inc.
  3. * Author: Brian Swetland <swetland@google.com>
  4. *
  5. * This software is licensed under the terms of the GNU General Public
  6. * License version 2, as published by the Free Software Foundation, and
  7. * may be copied, distributed, and modified under those terms.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. */
  15. #ifndef __LINUX_USB_GADGET_MSM72K_UDC_H__
  16. #define __LINUX_USB_GADGET_MSM72K_UDC_H__
  17. #define USB_AHBBURST (MSM_USB_BASE + 0x0090)
  18. #define USB_AHBMODE (MSM_USB_BASE + 0x0098)
  19. #define USB_CAPLENGTH (MSM_USB_BASE + 0x0100) /* 8 bit */
  20. #define USB_USBCMD (MSM_USB_BASE + 0x0140)
  21. #define USB_PORTSC (MSM_USB_BASE + 0x0184)
  22. #define USB_OTGSC (MSM_USB_BASE + 0x01A4)
  23. #define USB_USBMODE (MSM_USB_BASE + 0x01A8)
  24. #define USB_PHY_CTRL (MSM_USB_BASE + 0x0240)
  25. #define USBCMD_RESET 2
  26. #define USB_USBINTR (MSM_USB_BASE + 0x0148)
  27. #define PORTSC_PHCD (1 << 23) /* phy suspend mode */
  28. #define PORTSC_PTS_MASK (3 << 30)
  29. #define PORTSC_PTS_ULPI (3 << 30)
  30. #define USB_ULPI_VIEWPORT (MSM_USB_BASE + 0x0170)
  31. #define ULPI_RUN (1 << 30)
  32. #define ULPI_WRITE (1 << 29)
  33. #define ULPI_READ (0 << 29)
  34. #define ULPI_ADDR(n) (((n) & 255) << 16)
  35. #define ULPI_DATA(n) ((n) & 255)
  36. #define ULPI_DATA_READ(n) (((n) >> 8) & 255)
  37. #define ASYNC_INTR_CTRL (1 << 29) /* Enable async interrupt */
  38. #define ULPI_STP_CTRL (1 << 30) /* Block communication with PHY */
  39. #define PHY_RETEN (1 << 1) /* PHY retention enable/disable */
  40. /* OTG definitions */
  41. #define OTGSC_INTSTS_MASK (0x7f << 16)
  42. #define OTGSC_ID (1 << 8)
  43. #define OTGSC_BSV (1 << 11)
  44. #define OTGSC_IDIS (1 << 16)
  45. #define OTGSC_BSVIS (1 << 19)
  46. #define OTGSC_IDIE (1 << 24)
  47. #define OTGSC_BSVIE (1 << 27)
  48. #endif /* __LINUX_USB_GADGET_MSM72K_UDC_H__ */