regs-usb.h 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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 __ASM_ARCH_REGS_USB_H
  10. #define __ASM_ARCH_REGS_USB_H
  11. #define PXA168_U2O_REGBASE (0xd4208000)
  12. #define PXA168_U2O_PHYBASE (0xd4207000)
  13. #define PXA168_U2H_REGBASE (0xd4209000)
  14. #define PXA168_U2H_PHYBASE (0xd4206000)
  15. #define MMP3_HSIC1_REGBASE (0xf0001000)
  16. #define MMP3_HSIC1_PHYBASE (0xf0001800)
  17. #define MMP3_HSIC2_REGBASE (0xf0002000)
  18. #define MMP3_HSIC2_PHYBASE (0xf0002800)
  19. #define MMP3_FSIC_REGBASE (0xf0003000)
  20. #define MMP3_FSIC_PHYBASE (0xf0003800)
  21. #define USB_REG_RANGE (0x1ff)
  22. #define USB_PHY_RANGE (0xff)
  23. /* registers */
  24. #define U2x_CAPREGS_OFFSET 0x100
  25. /* phy regs */
  26. #define UTMI_REVISION 0x0
  27. #define UTMI_CTRL 0x4
  28. #define UTMI_PLL 0x8
  29. #define UTMI_TX 0xc
  30. #define UTMI_RX 0x10
  31. #define UTMI_IVREF 0x14
  32. #define UTMI_T0 0x18
  33. #define UTMI_T1 0x1c
  34. #define UTMI_T2 0x20
  35. #define UTMI_T3 0x24
  36. #define UTMI_T4 0x28
  37. #define UTMI_T5 0x2c
  38. #define UTMI_RESERVE 0x30
  39. #define UTMI_USB_INT 0x34
  40. #define UTMI_DBG_CTL 0x38
  41. #define UTMI_OTG_ADDON 0x3c
  42. /* For UTMICTRL Register */
  43. #define UTMI_CTRL_USB_CLK_EN (1 << 31)
  44. /* pxa168 */
  45. #define UTMI_CTRL_SUSPEND_SET1 (1 << 30)
  46. #define UTMI_CTRL_SUSPEND_SET2 (1 << 29)
  47. #define UTMI_CTRL_RXBUF_PDWN (1 << 24)
  48. #define UTMI_CTRL_TXBUF_PDWN (1 << 11)
  49. #define UTMI_CTRL_INPKT_DELAY_SHIFT 30
  50. #define UTMI_CTRL_INPKT_DELAY_SOF_SHIFT 28
  51. #define UTMI_CTRL_PU_REF_SHIFT 20
  52. #define UTMI_CTRL_ARC_PULLDN_SHIFT 12
  53. #define UTMI_CTRL_PLL_PWR_UP_SHIFT 1
  54. #define UTMI_CTRL_PWR_UP_SHIFT 0
  55. /* For UTMI_PLL Register */
  56. #define UTMI_PLL_PLLCALI12_SHIFT 29
  57. #define UTMI_PLL_PLLCALI12_MASK (0x3 << 29)
  58. #define UTMI_PLL_PLLVDD18_SHIFT 27
  59. #define UTMI_PLL_PLLVDD18_MASK (0x3 << 27)
  60. #define UTMI_PLL_PLLVDD12_SHIFT 25
  61. #define UTMI_PLL_PLLVDD12_MASK (0x3 << 25)
  62. #define UTMI_PLL_CLK_BLK_EN_SHIFT 24
  63. #define CLK_BLK_EN (0x1 << 24)
  64. #define PLL_READY (0x1 << 23)
  65. #define KVCO_EXT (0x1 << 22)
  66. #define VCOCAL_START (0x1 << 21)
  67. #define UTMI_PLL_KVCO_SHIFT 15
  68. #define UTMI_PLL_KVCO_MASK (0x7 << 15)
  69. #define UTMI_PLL_ICP_SHIFT 12
  70. #define UTMI_PLL_ICP_MASK (0x7 << 12)
  71. #define UTMI_PLL_FBDIV_SHIFT 4
  72. #define UTMI_PLL_FBDIV_MASK (0xFF << 4)
  73. #define UTMI_PLL_REFDIV_SHIFT 0
  74. #define UTMI_PLL_REFDIV_MASK (0xF << 0)
  75. /* For UTMI_TX Register */
  76. #define UTMI_TX_REG_EXT_FS_RCAL_SHIFT 27
  77. #define UTMI_TX_REG_EXT_FS_RCAL_MASK (0xf << 27)
  78. #define UTMI_TX_REG_EXT_FS_RCAL_EN_SHIFT 26
  79. #define UTMI_TX_REG_EXT_FS_RCAL_EN_MASK (0x1 << 26)
  80. #define UTMI_TX_TXVDD12_SHIFT 22
  81. #define UTMI_TX_TXVDD12_MASK (0x3 << 22)
  82. #define UTMI_TX_CK60_PHSEL_SHIFT 17
  83. #define UTMI_TX_CK60_PHSEL_MASK (0xf << 17)
  84. #define UTMI_TX_IMPCAL_VTH_SHIFT 14
  85. #define UTMI_TX_IMPCAL_VTH_MASK (0x7 << 14)
  86. #define REG_RCAL_START (0x1 << 12)
  87. #define UTMI_TX_LOW_VDD_EN_SHIFT 11
  88. #define UTMI_TX_AMP_SHIFT 0
  89. #define UTMI_TX_AMP_MASK (0x7 << 0)
  90. /* For UTMI_RX Register */
  91. #define UTMI_REG_SQ_LENGTH_SHIFT 15
  92. #define UTMI_REG_SQ_LENGTH_MASK (0x3 << 15)
  93. #define UTMI_RX_SQ_THRESH_SHIFT 4
  94. #define UTMI_RX_SQ_THRESH_MASK (0xf << 4)
  95. #define UTMI_OTG_ADDON_OTG_ON (1 << 0)
  96. /* For MMP3 USB Phy */
  97. #define USB2_PLL_REG0 0x4
  98. #define USB2_PLL_REG1 0x8
  99. #define USB2_TX_REG0 0x10
  100. #define USB2_TX_REG1 0x14
  101. #define USB2_TX_REG2 0x18
  102. #define USB2_RX_REG0 0x20
  103. #define USB2_RX_REG1 0x24
  104. #define USB2_RX_REG2 0x28
  105. #define USB2_ANA_REG0 0x30
  106. #define USB2_ANA_REG1 0x34
  107. #define USB2_ANA_REG2 0x38
  108. #define USB2_DIG_REG0 0x3C
  109. #define USB2_DIG_REG1 0x40
  110. #define USB2_DIG_REG2 0x44
  111. #define USB2_DIG_REG3 0x48
  112. #define USB2_TEST_REG0 0x4C
  113. #define USB2_TEST_REG1 0x50
  114. #define USB2_TEST_REG2 0x54
  115. #define USB2_CHARGER_REG0 0x58
  116. #define USB2_OTG_REG0 0x5C
  117. #define USB2_PHY_MON0 0x60
  118. #define USB2_RESETVE_REG0 0x64
  119. #define USB2_ICID_REG0 0x78
  120. #define USB2_ICID_REG1 0x7C
  121. /* USB2_PLL_REG0 */
  122. /* This is for Ax stepping */
  123. #define USB2_PLL_FBDIV_SHIFT_MMP3 0
  124. #define USB2_PLL_FBDIV_MASK_MMP3 (0xFF << 0)
  125. #define USB2_PLL_REFDIV_SHIFT_MMP3 8
  126. #define USB2_PLL_REFDIV_MASK_MMP3 (0xF << 8)
  127. #define USB2_PLL_VDD12_SHIFT_MMP3 12
  128. #define USB2_PLL_VDD18_SHIFT_MMP3 14
  129. /* This is for B0 stepping */
  130. #define USB2_PLL_FBDIV_SHIFT_MMP3_B0 0
  131. #define USB2_PLL_REFDIV_SHIFT_MMP3_B0 9
  132. #define USB2_PLL_VDD18_SHIFT_MMP3_B0 14
  133. #define USB2_PLL_FBDIV_MASK_MMP3_B0 0x01FF
  134. #define USB2_PLL_REFDIV_MASK_MMP3_B0 0x3E00
  135. #define USB2_PLL_CAL12_SHIFT_MMP3 0
  136. #define USB2_PLL_CALI12_MASK_MMP3 (0x3 << 0)
  137. #define USB2_PLL_VCOCAL_START_SHIFT_MMP3 2
  138. #define USB2_PLL_KVCO_SHIFT_MMP3 4
  139. #define USB2_PLL_KVCO_MASK_MMP3 (0x7<<4)
  140. #define USB2_PLL_ICP_SHIFT_MMP3 8
  141. #define USB2_PLL_ICP_MASK_MMP3 (0x7<<8)
  142. #define USB2_PLL_LOCK_BYPASS_SHIFT_MMP3 12
  143. #define USB2_PLL_PU_PLL_SHIFT_MMP3 13
  144. #define USB2_PLL_PU_PLL_MASK (0x1 << 13)
  145. #define USB2_PLL_READY_MASK_MMP3 (0x1 << 15)
  146. /* USB2_TX_REG0 */
  147. #define USB2_TX_IMPCAL_VTH_SHIFT_MMP3 8
  148. #define USB2_TX_IMPCAL_VTH_MASK_MMP3 (0x7 << 8)
  149. #define USB2_TX_RCAL_START_SHIFT_MMP3 13
  150. /* USB2_TX_REG1 */
  151. #define USB2_TX_CK60_PHSEL_SHIFT_MMP3 0
  152. #define USB2_TX_CK60_PHSEL_MASK_MMP3 (0xf << 0)
  153. #define USB2_TX_AMP_SHIFT_MMP3 4
  154. #define USB2_TX_AMP_MASK_MMP3 (0x7 << 4)
  155. #define USB2_TX_VDD12_SHIFT_MMP3 8
  156. #define USB2_TX_VDD12_MASK_MMP3 (0x3 << 8)
  157. /* USB2_TX_REG2 */
  158. #define USB2_TX_DRV_SLEWRATE_SHIFT 10
  159. /* USB2_RX_REG0 */
  160. #define USB2_RX_SQ_THRESH_SHIFT_MMP3 4
  161. #define USB2_RX_SQ_THRESH_MASK_MMP3 (0xf << 4)
  162. #define USB2_RX_SQ_LENGTH_SHIFT_MMP3 10
  163. #define USB2_RX_SQ_LENGTH_MASK_MMP3 (0x3 << 10)
  164. /* USB2_ANA_REG1*/
  165. #define USB2_ANA_PU_ANA_SHIFT_MMP3 14
  166. /* USB2_OTG_REG0 */
  167. #define USB2_OTG_PU_OTG_SHIFT_MMP3 3
  168. /* fsic registers */
  169. #define FSIC_MISC 0x4
  170. #define FSIC_INT 0x28
  171. #define FSIC_CTRL 0x30
  172. /* HSIC registers */
  173. #define HSIC_PAD_CTRL 0x4
  174. #define HSIC_CTRL 0x8
  175. #define HSIC_CTRL_HSIC_ENABLE (1<<7)
  176. #define HSIC_CTRL_PLL_BYPASS (1<<4)
  177. #define TEST_GRP_0 0xc
  178. #define TEST_GRP_1 0x10
  179. #define HSIC_INT 0x14
  180. #define HSIC_INT_READY_INT_EN (1<<10)
  181. #define HSIC_INT_CONNECT_INT_EN (1<<9)
  182. #define HSIC_INT_CORE_INT_EN (1<<8)
  183. #define HSIC_INT_HS_READY (1<<2)
  184. #define HSIC_INT_CONNECT (1<<1)
  185. #define HSIC_INT_CORE (1<<0)
  186. #define HSIC_CONFIG 0x18
  187. #define USBHSIC_CTRL 0x20
  188. #define HSIC_USB_CTRL 0x28
  189. #define HSIC_USB_CTRL_CLKEN 1
  190. #define HSIC_USB_CLK_PHY 0x0
  191. #define HSIC_USB_CLK_PMU 0x1
  192. #endif /* __ASM_ARCH_PXA_U2O_H */