hw_usbphyGS60.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /** ============================================================================
  2. * \file hw_usbphyGS60.h
  3. *
  4. * \brief This file contains the bit field values to use with the USB phy register
  5. *
  6. * ============================================================================
  7. */
  8. /*
  9. * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
  10. */
  11. /*
  12. * Redistribution and use in source and binary forms, with or without
  13. * modification, are permitted provided that the following conditions
  14. * are met:
  15. *
  16. * Redistributions of source code must retain the above copyright
  17. * notice, this list of conditions and the following disclaimer.
  18. *
  19. * Redistributions in binary form must reproduce the above copyright
  20. * notice, this list of conditions and the following disclaimer in the
  21. * documentation and/or other materials provided with the
  22. * distribution.
  23. *
  24. * Neither the name of Texas Instruments Incorporated nor the names of
  25. * its contributors may be used to endorse or promote products derived
  26. * from this software without specific prior written permission.
  27. *
  28. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  29. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  30. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  31. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  32. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  33. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  34. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  35. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  36. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  37. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  38. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  39. *
  40. */
  41. #ifndef __HW_USBPHYGS60_H__
  42. #define __HW_USBPHYGS60_H__
  43. //*****************************************************************************
  44. //
  45. // If building with a C++ compiler, make all of the definitions in this header
  46. // have a C binding.
  47. //
  48. //*****************************************************************************
  49. #ifdef __cplusplus
  50. extern "C"
  51. {
  52. #endif
  53. /******************************************************************************
  54. ** PHY REGISTER ADDRESS
  55. *******************************************************************************/
  56. #define CFGCHIP2_USBPHYCTRL SOC_USB_0_PHY_REGS
  57. /******************************************************************************
  58. ** BIT FIELDS TO USE WITH PHY REGISTER
  59. *******************************************************************************/
  60. #define CFGCHIP2_PHYCLKGD (1 << 17)
  61. #define CFGCHIP2_VBUSSENSE (1 << 16)
  62. #define CFGCHIP2_RESET (1 << 15)
  63. #define CFGCHIP2_OTGMODE (3 << 13)
  64. #define CFGCHIP2_NO_OVERRIDE (0 << 13)
  65. #define CFGCHIP2_FORCE_HOST (1 << 13)
  66. #define CFGCHIP2_FORCE_DEVICE (2 << 13)
  67. #define CFGCHIP2_FORCE_HOST_VBUS_LOW (3 << 13)
  68. #define CFGCHIP2_USB1PHYCLKMUX (1 << 12)
  69. #define CFGCHIP2_USB2PHYCLKMUX (1 << 11)
  70. #define CFGCHIP2_PHYPWRDN (1 << 10)
  71. #define CFGCHIP2_OTGPWRDN (1 << 9)
  72. #define CFGCHIP2_DATPOL (1 << 8)
  73. #define CFGCHIP2_USB1SUSPENDM (1 << 7)
  74. #define CFGCHIP2_PHY_PLLON (1 << 6) /* override PLL suspend */
  75. #define CFGCHIP2_SESENDEN (1 << 5) /* Vsess_end comparator */
  76. #define CFGCHIP2_VBDTCTEN (1 << 4) /* Vbus comparator */
  77. #define CFGCHIP2_REFFREQ (0xf << 0)
  78. #define CFGCHIP2_REFFREQ_12MHZ (1 << 0)
  79. #define CFGCHIP2_REFFREQ_24MHZ (2 << 0)
  80. #define CFGCHIP2_REFFREQ_48MHZ (3 << 0)
  81. void UsbPhyOn(unsigned int ulIndex);
  82. void UsbPhyOff(unsigned int ulIndex);
  83. #ifdef __cplusplus
  84. }
  85. #endif
  86. #endif // __HW_USBPHY_AM1808_H__