ssusb_usb2_csr_c_header.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. /* SSUSB_USB2_CSR REGISTER DEFINITION */
  2. #define U3D_XHCI_PORT_CTRL (SSUSB_USB2_CSR_BASE+0x0000)
  3. #define U3D_POWER_MANAGEMENT (SSUSB_USB2_CSR_BASE+0x0004)
  4. #define U3D_TIMING_TEST_MODE (SSUSB_USB2_CSR_BASE+0x0008)
  5. #define U3D_DEVICE_CONTROL (SSUSB_USB2_CSR_BASE+0x000C)
  6. #define U3D_POWER_UP_COUNTER (SSUSB_USB2_CSR_BASE+0x0010)
  7. #define U3D_USB2_TEST_MODE (SSUSB_USB2_CSR_BASE+0x0014)
  8. #define U3D_COMMON_USB_INTR_ENABLE (SSUSB_USB2_CSR_BASE+0x0018)
  9. #define U3D_COMMON_USB_INTR (SSUSB_USB2_CSR_BASE+0x001C)
  10. #define U3D_USB_BUS_PERFORMANCE (SSUSB_USB2_CSR_BASE+0x0020)
  11. #define U3D_LINK_RESET_INFO (SSUSB_USB2_CSR_BASE+0x0024)
  12. #define U3D_RESET_RESUME_TIME_VALUE (SSUSB_USB2_CSR_BASE+0x0034)
  13. #define U3D_UTMI_SIGNAL_SEL (SSUSB_USB2_CSR_BASE+0x0038)
  14. #define U3D_USB20_FRAME_NUM (SSUSB_USB2_CSR_BASE+0x003C)
  15. #define U3D_USB20_TIMING_PARAMETER (SSUSB_USB2_CSR_BASE+0x0040)
  16. #define U3D_USB20_LPM_PARAMETER (SSUSB_USB2_CSR_BASE+0x0044)
  17. #define U3D_USB20_LPM_ENTRY_COUNT (SSUSB_USB2_CSR_BASE+0x0048)
  18. #define U3D_USB20_MISC_CONTROL (SSUSB_USB2_CSR_BASE+0x004C)
  19. #define U3D_USB20_LPM_TIMING_PARAM (SSUSB_USB2_CSR_BASE+0x0050)
  20. #define U3D_USB20_OPSTATE (SSUSB_USB2_CSR_BASE+0x0060)
  21. /* SSUSB_USB2_CSR FIELD DEFINITION */
  22. /* U3D_XHCI_PORT_CTRL */
  23. #define GO_POLLING (0x1<<7) /* 7:7 */
  24. /* U3D_POWER_MANAGEMENT */
  25. #define LPM_BESL_STALL (0x1<<14) /* 14:14 */
  26. #define LPM_BESLD_STALL (0x1<<13) /* 13:13 */
  27. #define BC12_EN (0x1<<12) /* 12:12 */
  28. #define LPM_RWP (0x1<<11) /* 11:11 */
  29. #define LPM_HRWE (0x1<<10) /* 10:10 */
  30. #define LPM_MODE (0x3<<8) /* 9:8 */
  31. #define ISO_UPDATE (0x1<<7) /* 7:7 */
  32. #define SOFT_CONN (0x1<<6) /* 6:6 */
  33. #define HS_ENABLE (0x1<<5) /* 5:5 */
  34. #define HS_MODE (0x1<<4) /* 4:4 */
  35. #define BUS_RESET (0x1<<3) /* 3:3 */
  36. #define RESUME (0x1<<2) /* 2:2 */
  37. #define SUSPEND (0x1<<1) /* 1:1 */
  38. #define SUSPENDM_ENABLE (0x1<<0) /* 0:0 */
  39. /* U3D_TIMING_TEST_MODE */
  40. #define FS_DIS_SEL (0xf<<4) /* 7:4 */
  41. #define PHY_CLK_VALID (0x1<<3) /* 3:3 */
  42. #define FS_DIS_NE (0x1<<2) /* 2:2 */
  43. #define TM1 (0x1<<0) /* 0:0 */
  44. /* U3D_DEVICE_CONTROL */
  45. #define HW_AUTO_SENDRST_EN (0x1<<8) /* 8:8 */
  46. #define B_DEV (0x1<<7) /* 7:7 */
  47. #define FS_DEV (0x1<<6) /* 6:6 */
  48. #define LS_DEV (0x1<<5) /* 5:5 */
  49. #define VBUS (0x3<<3) /* 4:3 */
  50. #define HOSTMODE (0x1<<2) /* 2:2 */
  51. #define HOSTREQ (0x1<<1) /* 1:1 */
  52. #define SESSION (0x1<<0) /* 0:0 */
  53. /* U3D_POWER_UP_COUNTER */
  54. #define LPM_HUBDRVRMP_TIME (0xffff<<8) /* 23:8 */
  55. #define PWR_UP_CNT_LMT (0xf<<0) /* 3:0 */
  56. /* U3D_USB2_TEST_MODE */
  57. #define U2U3_AUTO_SWITCH (0x1<<10) /* 10:10 */
  58. #define HOST_FORCE_EN (0x1<<9) /* 9:9 */
  59. #define LPM_FORCE_STALL (0x1<<8) /* 8:8 */
  60. #define FORCE_HOST (0x1<<7) /* 7:7 */
  61. #define FIFO_ACCESS (0x1<<6) /* 6:6 */
  62. #define FORCE_FS (0x1<<5) /* 5:5 */
  63. #define FORCE_HS (0x1<<4) /* 4:4 */
  64. #define TEST_PACKET_MODE (0x1<<3) /* 3:3 */
  65. #define TEST_K_MODE (0x1<<2) /* 2:2 */
  66. #define TEST_J_MODE (0x1<<1) /* 1:1 */
  67. #define TEST_SE0_NAK_MODE (0x1<<0) /* 0:0 */
  68. /* U3D_COMMON_USB_INTR_ENABLE */
  69. #define LPM_RESUME_INTR_EN (0x1<<9) /* 9:9 */
  70. #define LPM_INTR_EN (0x1<<8) /* 8:8 */
  71. #define VBUSERR_INTR_EN (0x1<<7) /* 7:7 */
  72. #define SESSION_REQ_INTR_EN (0x1<<6) /* 6:6 */
  73. #define DISCONN_INTR_EN (0x1<<5) /* 5:5 */
  74. #define CONN_INTR_EN (0x1<<4) /* 4:4 */
  75. #define SOF_INTR_EN (0x1<<3) /* 3:3 */
  76. #define RESET_INTR_EN (0x1<<2) /* 2:2 */
  77. #define RESUME_INTR_EN (0x1<<1) /* 1:1 */
  78. #define SUSPEND_INTR_EN (0x1<<0) /* 0:0 */
  79. /* U3D_COMMON_USB_INTR */
  80. #define LPM_RESUME_INTR (0x1<<9) /* 9:9 */
  81. #define LPM_INTR (0x1<<8) /* 8:8 */
  82. #define VBUSERR_INTR (0x1<<7) /* 7:7 */
  83. #define SESSION_REQ_INTR (0x1<<6) /* 6:6 */
  84. #define DISCONN_INTR (0x1<<5) /* 5:5 */
  85. #define CONN_INTR (0x1<<4) /* 4:4 */
  86. #define SOF_INTR (0x1<<3) /* 3:3 */
  87. #define RESET_INTR (0x1<<2) /* 2:2 */
  88. #define RESUME_INTR (0x1<<1) /* 1:1 */
  89. #define SUSPEND_INTR (0x1<<0) /* 0:0 */
  90. /* U3D_USB_BUS_PERFORMANCE */
  91. #define XFER_START_FROM_SOF (0x1<<24) /* 24:24 */
  92. #define VBUSERR_MODE (0x1<<23) /* 23:23 */
  93. #define TX_FLUSH_EN (0x1<<22) /* 22:22 */
  94. #define NOISE_STILL_SOF (0x1<<21) /* 21:21 */
  95. #define UNDO_SRP_FIX (0x1<<19) /* 19:19 */
  96. #define OTG_DEGLITCH_DISABLE (0x1<<18) /* 18:18 */
  97. #define SWRST (0x1<<17) /* 17:17 */
  98. #define DIS_USB_RESET (0x1<<16) /* 16:16 */
  99. #define SOFT_DEBOUCE (0x1<<0) /* 0:0 */
  100. /* U3D_LINK_RESET_INFO */
  101. #define WTWRSM (0xf<<28) /* 31:28 */
  102. #define WTRSMK (0xf<<24) /* 27:24 */
  103. #define WRFSSE0 (0xf<<20) /* 23:20 */
  104. #define WTCHRP (0xf<<16) /* 19:16 */
  105. #define VPLEN (0xff<<8) /* 15:8 */
  106. #define WTCON (0xf<<4) /* 7:4 */
  107. #define WTID (0xf<<0) /* 3:0 */
  108. /* U3D_RESET_RESUME_TIME_VALUE */
  109. #define USB20_RESET_TIME_VALUE (0xffff<<0) /* 15:0 */
  110. /* U3D_UTMI_SIGNAL_SEL */
  111. #define TX_SIGNAL_SEL (0x3<<2) /* 3:2 */
  112. #define RX_SIGNAL_SEL (0x3<<0) /* 1:0 */
  113. /* U3D_USB20_FRAME_NUM */
  114. #define FRAME_NUMBER (0x7ff<<0) /* 10:0 */
  115. /* U3D_USB20_TIMING_PARAMETER */
  116. #define CHOPPER_DELAY_TIME (0xff<<16) /* 23:16 */
  117. #define SOFTCON_DELAY_TIME (0xff<<8) /* 15:8 */
  118. #define TIME_VALUE_1US (0xff<<0) /* 7:0 */
  119. /* U3D_USB20_LPM_PARAMETER */
  120. #define BESLCK_U3 (0xf<<12) /* 15:12 */
  121. #define BESLCK (0xf<<8) /* 11:8 */
  122. #define BESLDCK (0xf<<4) /* 7:4 */
  123. #define BESL (0xf<<0) /* 3:0 */
  124. /* U3D_USB20_LPM_ENTRY_COUNT */
  125. #define LPM_EXIT_COUNT (0xff<<16) /* 23:16 */
  126. #define LPM_EXIT_COUNT_RESET (0x1<<9) /* 9:9 */
  127. #define LPM_ENTRY_COUNT_RESET (0x1<<8) /* 8:8 */
  128. #define LPM_ENTRY_COUNT (0xff<<0) /* 7:0 */
  129. /* U3D_USB20_MISC_CONTROL */
  130. #define LPM_U3_ACK_EN (0x1<<0) /* 0:0 */
  131. /* U3D_USB20_LPM_TIMING_PARAM */
  132. #define LPM_L1_TOKENRETRY (0x1ff<<16) /* 24:16 */
  133. #define LPM_L1_RESIDENCY (0xfff<<0) /* 11:0 */
  134. /* U3D_USB20_OPSTATE */
  135. #define OPSTATE_SYS (0x3f<<0) /* 5:0 */
  136. /* SSUSB_USB2_CSR FIELD OFFSET DEFINITION */
  137. /* U3D_XHCI_PORT_CTRL */
  138. #define GO_POLLING_OFST (7)
  139. /* U3D_POWER_MANAGEMENT */
  140. #define LPM_BESL_STALL_OFST (14)
  141. #define LPM_BESLD_STALL_OFST (13)
  142. #define BC12_EN_OFST (12)
  143. #define LPM_RWP_OFST (11)
  144. #define LPM_HRWE_OFST (10)
  145. #define LPM_MODE_OFST (8)
  146. #define ISO_UPDATE_OFST (7)
  147. #define SOFT_CONN_OFST (6)
  148. #define HS_ENABLE_OFST (5)
  149. #define HS_MODE_OFST (4)
  150. #define BUS_RESET_OFST (3)
  151. #define RESUME_OFST (2)
  152. #define SUSPEND_OFST (1)
  153. #define SUSPENDM_ENABLE_OFST (0)
  154. /* U3D_TIMING_TEST_MODE */
  155. #define FS_DIS_SEL_OFST (4)
  156. #define PHY_CLK_VALID_OFST (3)
  157. #define FS_DIS_NE_OFST (2)
  158. #define TM1_OFST (0)
  159. /* U3D_DEVICE_CONTROL */
  160. #define HW_AUTO_SENDRST_EN_OFST (8)
  161. #define B_DEV_OFST (7)
  162. #define FS_DEV_OFST (6)
  163. #define LS_DEV_OFST (5)
  164. #define VBUS_OFST (3)
  165. #define HOSTMODE_OFST (2)
  166. #define HOSTREQ_OFST (1)
  167. #define SESSION_OFST (0)
  168. /* U3D_POWER_UP_COUNTER */
  169. #define LPM_HUBDRVRMP_TIME_OFST (8)
  170. #define PWR_UP_CNT_LMT_OFST (0)
  171. /* U3D_USB2_TEST_MODE */
  172. #define U2U3_AUTO_SWITCH_OFST (10)
  173. #define HOST_FORCE_EN_OFST (9)
  174. #define LPM_FORCE_STALL_OFST (8)
  175. #define FORCE_HOST_OFST (7)
  176. #define FIFO_ACCESS_OFST (6)
  177. #define FORCE_FS_OFST (5)
  178. #define FORCE_HS_OFST (4)
  179. #define TEST_PACKET_MODE_OFST (3)
  180. #define TEST_K_MODE_OFST (2)
  181. #define TEST_J_MODE_OFST (1)
  182. #define TEST_SE0_NAK_MODE_OFST (0)
  183. /* U3D_COMMON_USB_INTR_ENABLE */
  184. #define LPM_RESUME_INTR_EN_OFST (9)
  185. #define LPM_INTR_EN_OFST (8)
  186. #define VBUSERR_INTR_EN_OFST (7)
  187. #define SESSION_REQ_INTR_EN_OFST (6)
  188. #define DISCONN_INTR_EN_OFST (5)
  189. #define CONN_INTR_EN_OFST (4)
  190. #define SOF_INTR_EN_OFST (3)
  191. #define RESET_INTR_EN_OFST (2)
  192. #define RESUME_INTR_EN_OFST (1)
  193. #define SUSPEND_INTR_EN_OFST (0)
  194. /* U3D_COMMON_USB_INTR */
  195. #define LPM_RESUME_INTR_OFST (9)
  196. #define LPM_INTR_OFST (8)
  197. #define VBUSERR_INTR_OFST (7)
  198. #define SESSION_REQ_INTR_OFST (6)
  199. #define DISCONN_INTR_OFST (5)
  200. #define CONN_INTR_OFST (4)
  201. #define SOF_INTR_OFST (3)
  202. #define RESET_INTR_OFST (2)
  203. #define RESUME_INTR_OFST (1)
  204. #define SUSPEND_INTR_OFST (0)
  205. /* U3D_USB_BUS_PERFORMANCE */
  206. #define XFER_START_FROM_SOF_OFST (24)
  207. #define VBUSERR_MODE_OFST (23)
  208. #define TX_FLUSH_EN_OFST (22)
  209. #define NOISE_STILL_SOF_OFST (21)
  210. #define UNDO_SRP_FIX_OFST (19)
  211. #define OTG_DEGLITCH_DISABLE_OFST (18)
  212. #define SWRST_OFST (17)
  213. #define DIS_USB_RESET_OFST (16)
  214. #define SOFT_DEBOUCE_OFST (0)
  215. /* U3D_LINK_RESET_INFO */
  216. #define WTWRSM_OFST (28)
  217. #define WTRSMK_OFST (24)
  218. #define WRFSSE0_OFST (20)
  219. #define WTCHRP_OFST (16)
  220. #define VPLEN_OFST (8)
  221. #define WTCON_OFST (4)
  222. #define WTID_OFST (0)
  223. /* U3D_RESET_RESUME_TIME_VALUE */
  224. #define USB20_RESET_TIME_VALUE_OFST (0)
  225. /* U3D_UTMI_SIGNAL_SEL */
  226. #define TX_SIGNAL_SEL_OFST (2)
  227. #define RX_SIGNAL_SEL_OFST (0)
  228. /* U3D_USB20_FRAME_NUM */
  229. #define FRAME_NUMBER_OFST (0)
  230. /* U3D_USB20_TIMING_PARAMETER */
  231. #define CHOPPER_DELAY_TIME_OFST (16)
  232. #define SOFTCON_DELAY_TIME_OFST (8)
  233. #define TIME_VALUE_1US_OFST (0)
  234. /* U3D_USB20_LPM_PARAMETER */
  235. #define BESLCK_U3_OFST (12)
  236. #define BESLCK_OFST (8)
  237. #define BESLDCK_OFST (4)
  238. #define BESL_OFST (0)
  239. /* U3D_USB20_LPM_ENTRY_COUNT */
  240. #define LPM_EXIT_COUNT_OFST (16)
  241. #define LPM_EXIT_COUNT_RESET_OFST (9)
  242. #define LPM_ENTRY_COUNT_RESET_OFST (8)
  243. #define LPM_ENTRY_COUNT_OFST (0)
  244. /* U3D_USB20_MISC_CONTROL */
  245. #define LPM_U3_ACK_EN_OFST (0)
  246. /* U3D_USB20_LPM_TIMING_PARAM */
  247. #define LPM_L1_TOKENRETRY_OFST (16)
  248. #define LPM_L1_RESIDENCY_OFST (0)
  249. /* U3D_USB20_OPSTATE */
  250. #define OPSTATE_SYS_OFST (0)
  251. /* //////////////////////////////////////////////////////////////////// */