hw_usbphyGS70.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /** ============================================================================
  2. * \file hw_usbphyGS70.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_USBPHY_GS70_H__
  42. #define __HW_USBPHY_GS70_H__
  43. #if defined(c6a811x)
  44. #include "hw_control_C6A811x.h"
  45. #endif
  46. //*****************************************************************************
  47. //
  48. // If building with a C++ compiler, make all of the definitions in this header
  49. // have a C binding.
  50. //
  51. //*****************************************************************************
  52. #ifdef __cplusplus
  53. extern "C"
  54. {
  55. #endif
  56. /******************************************************************************
  57. ** PHY REGISTER ADDRESS
  58. *******************************************************************************/
  59. #if defined(am335x)
  60. #define CFGCHIP2_USBPHYCTRL (0x44E10620)
  61. #define CFGCHIP2_USB1PHYCTRL (0x44E10628)
  62. #elif defined(c6a811x)
  63. #define CFGCHIP2_USBPHYCTRL (SOC_CONTROL_REGS + CONTROL_USB_CTRL(0))
  64. #define CFGCHIP2_USB1PHYCTRL (SOC_CONTROL_REGS + CONTROL_USB_CTRL(1))
  65. #endif
  66. /******************************************************************************
  67. ** BIT FIELDS TO USE WITH PHY REGISTER
  68. *******************************************************************************/
  69. #define USBPHY_CM_PWRDN (1 << 0)
  70. #define USBPHY_OTG_PWRDN (1 << 1)
  71. #define USBPHY_OTGVDET_EN (1 << 19)
  72. #define USBPHY_OTGSESSEND_EN (1 << 20)
  73. void UsbPhyOn(unsigned int ulIndex);
  74. void UsbPhyOff(unsigned int ulIndex);
  75. #ifdef __cplusplus
  76. }
  77. #endif
  78. #endif // __HW_USBPHY_GS70_H__