utmi-armada100.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * (C) Copyright 2012
  3. * eInfochips Ltd. <www.einfochips.com>
  4. * Written-by: Ajay Bhargav <ajay.bhargav@einfochips.com>
  5. *
  6. * (C) Copyright 2009
  7. * Marvell Semiconductor <www.marvell.com>
  8. *
  9. * SPDX-License-Identifier: GPL-2.0+
  10. */
  11. #ifndef __UTMI_ARMADA100__
  12. #define __UTMI_ARMADA100__
  13. #define UTMI_PHY_BASE 0xD4206000
  14. /* utmi_ctrl - bits */
  15. #define INPKT_DELAY_SOF (1 << 28)
  16. #define PLL_PWR_UP 2
  17. #define PHY_PWR_UP 1
  18. /* utmi_pll - bits */
  19. #define PLL_FBDIV_MASK 0x00000FF0
  20. #define PLL_FBDIV 4
  21. #define PLL_REFDIV_MASK 0x0000000F
  22. #define PLL_REFDIV 0
  23. #define PLL_READY 0x800000
  24. #define VCOCAL_START (1 << 21)
  25. #define N_DIVIDER 0xEE
  26. #define M_DIVIDER 0x0B
  27. /* utmi_tx - bits */
  28. #define CK60_PHSEL 17
  29. #define PHSEL_VAL 0x4
  30. #define RCAL_START (1 << 12)
  31. /*
  32. * USB PHY registers
  33. * Refer Datasheet Appendix A.21
  34. */
  35. struct armd1usb_phy_reg {
  36. u32 utmi_rev; /* USB PHY Revision */
  37. u32 utmi_ctrl; /* USB PHY Control register */
  38. u32 utmi_pll; /* PLL register */
  39. u32 utmi_tx; /* Tx register */
  40. u32 utmi_rx; /* Rx register */
  41. u32 utmi_ivref; /* IVREF register */
  42. u32 utmi_tst_g0; /* Test group 0 register */
  43. u32 utmi_tst_g1; /* Test group 1 register */
  44. u32 utmi_tst_g2; /* Test group 2 register */
  45. u32 utmi_tst_g3; /* Test group 3 register */
  46. u32 utmi_tst_g4; /* Test group 4 register */
  47. u32 utmi_tst_g5; /* Test group 5 register */
  48. u32 utmi_reserve; /* Reserve Register */
  49. u32 utmi_usb_int; /* USB interuppt register */
  50. u32 utmi_dbg_ctl; /* Debug control register */
  51. u32 utmi_otg_addon; /* OTG addon register */
  52. };
  53. int utmi_init(void);
  54. #endif /* __UTMI_ARMADA100__ */