cvmx-uctlx-defs.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  1. /***********************license start***************
  2. * Author: Cavium Networks
  3. *
  4. * Contact: support@caviumnetworks.com
  5. * This file is part of the OCTEON SDK
  6. *
  7. * Copyright (c) 2003-2012 Cavium Networks
  8. *
  9. * This file is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License, Version 2, as
  11. * published by the Free Software Foundation.
  12. *
  13. * This file is distributed in the hope that it will be useful, but
  14. * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
  15. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
  16. * NONINFRINGEMENT. See the GNU General Public License for more
  17. * details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this file; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  22. * or visit http://www.gnu.org/licenses/.
  23. *
  24. * This file may also be available under a different license from Cavium.
  25. * Contact Cavium Networks for more information
  26. ***********************license end**************************************/
  27. #ifndef __CVMX_UCTLX_DEFS_H__
  28. #define __CVMX_UCTLX_DEFS_H__
  29. #define CVMX_UCTLX_BIST_STATUS(block_id) (CVMX_ADD_IO_SEG(0x000118006F0000A0ull))
  30. #define CVMX_UCTLX_CLK_RST_CTL(block_id) (CVMX_ADD_IO_SEG(0x000118006F000000ull))
  31. #define CVMX_UCTLX_EHCI_CTL(block_id) (CVMX_ADD_IO_SEG(0x000118006F000080ull))
  32. #define CVMX_UCTLX_EHCI_FLA(block_id) (CVMX_ADD_IO_SEG(0x000118006F0000A8ull))
  33. #define CVMX_UCTLX_ERTO_CTL(block_id) (CVMX_ADD_IO_SEG(0x000118006F000090ull))
  34. #define CVMX_UCTLX_IF_ENA(block_id) (CVMX_ADD_IO_SEG(0x000118006F000030ull))
  35. #define CVMX_UCTLX_INT_ENA(block_id) (CVMX_ADD_IO_SEG(0x000118006F000028ull))
  36. #define CVMX_UCTLX_INT_REG(block_id) (CVMX_ADD_IO_SEG(0x000118006F000020ull))
  37. #define CVMX_UCTLX_OHCI_CTL(block_id) (CVMX_ADD_IO_SEG(0x000118006F000088ull))
  38. #define CVMX_UCTLX_ORTO_CTL(block_id) (CVMX_ADD_IO_SEG(0x000118006F000098ull))
  39. #define CVMX_UCTLX_PPAF_WM(block_id) (CVMX_ADD_IO_SEG(0x000118006F000038ull))
  40. #define CVMX_UCTLX_UPHY_CTL_STATUS(block_id) (CVMX_ADD_IO_SEG(0x000118006F000008ull))
  41. #define CVMX_UCTLX_UPHY_PORTX_CTL_STATUS(offset, block_id) (CVMX_ADD_IO_SEG(0x000118006F000010ull) + (((offset) & 1) + ((block_id) & 0) * 0x0ull) * 8)
  42. union cvmx_uctlx_bist_status {
  43. uint64_t u64;
  44. struct cvmx_uctlx_bist_status_s {
  45. #ifdef __BIG_ENDIAN_BITFIELD
  46. uint64_t reserved_6_63:58;
  47. uint64_t data_bis:1;
  48. uint64_t desc_bis:1;
  49. uint64_t erbm_bis:1;
  50. uint64_t orbm_bis:1;
  51. uint64_t wrbm_bis:1;
  52. uint64_t ppaf_bis:1;
  53. #else
  54. uint64_t ppaf_bis:1;
  55. uint64_t wrbm_bis:1;
  56. uint64_t orbm_bis:1;
  57. uint64_t erbm_bis:1;
  58. uint64_t desc_bis:1;
  59. uint64_t data_bis:1;
  60. uint64_t reserved_6_63:58;
  61. #endif
  62. } s;
  63. struct cvmx_uctlx_bist_status_s cn61xx;
  64. struct cvmx_uctlx_bist_status_s cn63xx;
  65. struct cvmx_uctlx_bist_status_s cn63xxp1;
  66. struct cvmx_uctlx_bist_status_s cn66xx;
  67. struct cvmx_uctlx_bist_status_s cn68xx;
  68. struct cvmx_uctlx_bist_status_s cn68xxp1;
  69. struct cvmx_uctlx_bist_status_s cnf71xx;
  70. };
  71. union cvmx_uctlx_clk_rst_ctl {
  72. uint64_t u64;
  73. struct cvmx_uctlx_clk_rst_ctl_s {
  74. #ifdef __BIG_ENDIAN_BITFIELD
  75. uint64_t reserved_25_63:39;
  76. uint64_t clear_bist:1;
  77. uint64_t start_bist:1;
  78. uint64_t ehci_sm:1;
  79. uint64_t ohci_clkcktrst:1;
  80. uint64_t ohci_sm:1;
  81. uint64_t ohci_susp_lgcy:1;
  82. uint64_t app_start_clk:1;
  83. uint64_t o_clkdiv_rst:1;
  84. uint64_t h_clkdiv_byp:1;
  85. uint64_t h_clkdiv_rst:1;
  86. uint64_t h_clkdiv_en:1;
  87. uint64_t o_clkdiv_en:1;
  88. uint64_t h_div:4;
  89. uint64_t p_refclk_sel:2;
  90. uint64_t p_refclk_div:2;
  91. uint64_t reserved_4_4:1;
  92. uint64_t p_com_on:1;
  93. uint64_t p_por:1;
  94. uint64_t p_prst:1;
  95. uint64_t hrst:1;
  96. #else
  97. uint64_t hrst:1;
  98. uint64_t p_prst:1;
  99. uint64_t p_por:1;
  100. uint64_t p_com_on:1;
  101. uint64_t reserved_4_4:1;
  102. uint64_t p_refclk_div:2;
  103. uint64_t p_refclk_sel:2;
  104. uint64_t h_div:4;
  105. uint64_t o_clkdiv_en:1;
  106. uint64_t h_clkdiv_en:1;
  107. uint64_t h_clkdiv_rst:1;
  108. uint64_t h_clkdiv_byp:1;
  109. uint64_t o_clkdiv_rst:1;
  110. uint64_t app_start_clk:1;
  111. uint64_t ohci_susp_lgcy:1;
  112. uint64_t ohci_sm:1;
  113. uint64_t ohci_clkcktrst:1;
  114. uint64_t ehci_sm:1;
  115. uint64_t start_bist:1;
  116. uint64_t clear_bist:1;
  117. uint64_t reserved_25_63:39;
  118. #endif
  119. } s;
  120. struct cvmx_uctlx_clk_rst_ctl_s cn61xx;
  121. struct cvmx_uctlx_clk_rst_ctl_s cn63xx;
  122. struct cvmx_uctlx_clk_rst_ctl_s cn63xxp1;
  123. struct cvmx_uctlx_clk_rst_ctl_s cn66xx;
  124. struct cvmx_uctlx_clk_rst_ctl_s cn68xx;
  125. struct cvmx_uctlx_clk_rst_ctl_s cn68xxp1;
  126. struct cvmx_uctlx_clk_rst_ctl_s cnf71xx;
  127. };
  128. union cvmx_uctlx_ehci_ctl {
  129. uint64_t u64;
  130. struct cvmx_uctlx_ehci_ctl_s {
  131. #ifdef __BIG_ENDIAN_BITFIELD
  132. uint64_t reserved_20_63:44;
  133. uint64_t desc_rbm:1;
  134. uint64_t reg_nb:1;
  135. uint64_t l2c_dc:1;
  136. uint64_t l2c_bc:1;
  137. uint64_t l2c_0pag:1;
  138. uint64_t l2c_stt:1;
  139. uint64_t l2c_buff_emod:2;
  140. uint64_t l2c_desc_emod:2;
  141. uint64_t inv_reg_a2:1;
  142. uint64_t ehci_64b_addr_en:1;
  143. uint64_t l2c_addr_msb:8;
  144. #else
  145. uint64_t l2c_addr_msb:8;
  146. uint64_t ehci_64b_addr_en:1;
  147. uint64_t inv_reg_a2:1;
  148. uint64_t l2c_desc_emod:2;
  149. uint64_t l2c_buff_emod:2;
  150. uint64_t l2c_stt:1;
  151. uint64_t l2c_0pag:1;
  152. uint64_t l2c_bc:1;
  153. uint64_t l2c_dc:1;
  154. uint64_t reg_nb:1;
  155. uint64_t desc_rbm:1;
  156. uint64_t reserved_20_63:44;
  157. #endif
  158. } s;
  159. struct cvmx_uctlx_ehci_ctl_s cn61xx;
  160. struct cvmx_uctlx_ehci_ctl_s cn63xx;
  161. struct cvmx_uctlx_ehci_ctl_s cn63xxp1;
  162. struct cvmx_uctlx_ehci_ctl_s cn66xx;
  163. struct cvmx_uctlx_ehci_ctl_s cn68xx;
  164. struct cvmx_uctlx_ehci_ctl_s cn68xxp1;
  165. struct cvmx_uctlx_ehci_ctl_s cnf71xx;
  166. };
  167. union cvmx_uctlx_ehci_fla {
  168. uint64_t u64;
  169. struct cvmx_uctlx_ehci_fla_s {
  170. #ifdef __BIG_ENDIAN_BITFIELD
  171. uint64_t reserved_6_63:58;
  172. uint64_t fla:6;
  173. #else
  174. uint64_t fla:6;
  175. uint64_t reserved_6_63:58;
  176. #endif
  177. } s;
  178. struct cvmx_uctlx_ehci_fla_s cn61xx;
  179. struct cvmx_uctlx_ehci_fla_s cn63xx;
  180. struct cvmx_uctlx_ehci_fla_s cn63xxp1;
  181. struct cvmx_uctlx_ehci_fla_s cn66xx;
  182. struct cvmx_uctlx_ehci_fla_s cn68xx;
  183. struct cvmx_uctlx_ehci_fla_s cn68xxp1;
  184. struct cvmx_uctlx_ehci_fla_s cnf71xx;
  185. };
  186. union cvmx_uctlx_erto_ctl {
  187. uint64_t u64;
  188. struct cvmx_uctlx_erto_ctl_s {
  189. #ifdef __BIG_ENDIAN_BITFIELD
  190. uint64_t reserved_32_63:32;
  191. uint64_t to_val:27;
  192. uint64_t reserved_0_4:5;
  193. #else
  194. uint64_t reserved_0_4:5;
  195. uint64_t to_val:27;
  196. uint64_t reserved_32_63:32;
  197. #endif
  198. } s;
  199. struct cvmx_uctlx_erto_ctl_s cn61xx;
  200. struct cvmx_uctlx_erto_ctl_s cn63xx;
  201. struct cvmx_uctlx_erto_ctl_s cn63xxp1;
  202. struct cvmx_uctlx_erto_ctl_s cn66xx;
  203. struct cvmx_uctlx_erto_ctl_s cn68xx;
  204. struct cvmx_uctlx_erto_ctl_s cn68xxp1;
  205. struct cvmx_uctlx_erto_ctl_s cnf71xx;
  206. };
  207. union cvmx_uctlx_if_ena {
  208. uint64_t u64;
  209. struct cvmx_uctlx_if_ena_s {
  210. #ifdef __BIG_ENDIAN_BITFIELD
  211. uint64_t reserved_1_63:63;
  212. uint64_t en:1;
  213. #else
  214. uint64_t en:1;
  215. uint64_t reserved_1_63:63;
  216. #endif
  217. } s;
  218. struct cvmx_uctlx_if_ena_s cn61xx;
  219. struct cvmx_uctlx_if_ena_s cn63xx;
  220. struct cvmx_uctlx_if_ena_s cn63xxp1;
  221. struct cvmx_uctlx_if_ena_s cn66xx;
  222. struct cvmx_uctlx_if_ena_s cn68xx;
  223. struct cvmx_uctlx_if_ena_s cn68xxp1;
  224. struct cvmx_uctlx_if_ena_s cnf71xx;
  225. };
  226. union cvmx_uctlx_int_ena {
  227. uint64_t u64;
  228. struct cvmx_uctlx_int_ena_s {
  229. #ifdef __BIG_ENDIAN_BITFIELD
  230. uint64_t reserved_8_63:56;
  231. uint64_t ec_ovf_e:1;
  232. uint64_t oc_ovf_e:1;
  233. uint64_t wb_pop_e:1;
  234. uint64_t wb_psh_f:1;
  235. uint64_t cf_psh_f:1;
  236. uint64_t or_psh_f:1;
  237. uint64_t er_psh_f:1;
  238. uint64_t pp_psh_f:1;
  239. #else
  240. uint64_t pp_psh_f:1;
  241. uint64_t er_psh_f:1;
  242. uint64_t or_psh_f:1;
  243. uint64_t cf_psh_f:1;
  244. uint64_t wb_psh_f:1;
  245. uint64_t wb_pop_e:1;
  246. uint64_t oc_ovf_e:1;
  247. uint64_t ec_ovf_e:1;
  248. uint64_t reserved_8_63:56;
  249. #endif
  250. } s;
  251. struct cvmx_uctlx_int_ena_s cn61xx;
  252. struct cvmx_uctlx_int_ena_s cn63xx;
  253. struct cvmx_uctlx_int_ena_s cn63xxp1;
  254. struct cvmx_uctlx_int_ena_s cn66xx;
  255. struct cvmx_uctlx_int_ena_s cn68xx;
  256. struct cvmx_uctlx_int_ena_s cn68xxp1;
  257. struct cvmx_uctlx_int_ena_s cnf71xx;
  258. };
  259. union cvmx_uctlx_int_reg {
  260. uint64_t u64;
  261. struct cvmx_uctlx_int_reg_s {
  262. #ifdef __BIG_ENDIAN_BITFIELD
  263. uint64_t reserved_8_63:56;
  264. uint64_t ec_ovf_e:1;
  265. uint64_t oc_ovf_e:1;
  266. uint64_t wb_pop_e:1;
  267. uint64_t wb_psh_f:1;
  268. uint64_t cf_psh_f:1;
  269. uint64_t or_psh_f:1;
  270. uint64_t er_psh_f:1;
  271. uint64_t pp_psh_f:1;
  272. #else
  273. uint64_t pp_psh_f:1;
  274. uint64_t er_psh_f:1;
  275. uint64_t or_psh_f:1;
  276. uint64_t cf_psh_f:1;
  277. uint64_t wb_psh_f:1;
  278. uint64_t wb_pop_e:1;
  279. uint64_t oc_ovf_e:1;
  280. uint64_t ec_ovf_e:1;
  281. uint64_t reserved_8_63:56;
  282. #endif
  283. } s;
  284. struct cvmx_uctlx_int_reg_s cn61xx;
  285. struct cvmx_uctlx_int_reg_s cn63xx;
  286. struct cvmx_uctlx_int_reg_s cn63xxp1;
  287. struct cvmx_uctlx_int_reg_s cn66xx;
  288. struct cvmx_uctlx_int_reg_s cn68xx;
  289. struct cvmx_uctlx_int_reg_s cn68xxp1;
  290. struct cvmx_uctlx_int_reg_s cnf71xx;
  291. };
  292. union cvmx_uctlx_ohci_ctl {
  293. uint64_t u64;
  294. struct cvmx_uctlx_ohci_ctl_s {
  295. #ifdef __BIG_ENDIAN_BITFIELD
  296. uint64_t reserved_19_63:45;
  297. uint64_t reg_nb:1;
  298. uint64_t l2c_dc:1;
  299. uint64_t l2c_bc:1;
  300. uint64_t l2c_0pag:1;
  301. uint64_t l2c_stt:1;
  302. uint64_t l2c_buff_emod:2;
  303. uint64_t l2c_desc_emod:2;
  304. uint64_t inv_reg_a2:1;
  305. uint64_t reserved_8_8:1;
  306. uint64_t l2c_addr_msb:8;
  307. #else
  308. uint64_t l2c_addr_msb:8;
  309. uint64_t reserved_8_8:1;
  310. uint64_t inv_reg_a2:1;
  311. uint64_t l2c_desc_emod:2;
  312. uint64_t l2c_buff_emod:2;
  313. uint64_t l2c_stt:1;
  314. uint64_t l2c_0pag:1;
  315. uint64_t l2c_bc:1;
  316. uint64_t l2c_dc:1;
  317. uint64_t reg_nb:1;
  318. uint64_t reserved_19_63:45;
  319. #endif
  320. } s;
  321. struct cvmx_uctlx_ohci_ctl_s cn61xx;
  322. struct cvmx_uctlx_ohci_ctl_s cn63xx;
  323. struct cvmx_uctlx_ohci_ctl_s cn63xxp1;
  324. struct cvmx_uctlx_ohci_ctl_s cn66xx;
  325. struct cvmx_uctlx_ohci_ctl_s cn68xx;
  326. struct cvmx_uctlx_ohci_ctl_s cn68xxp1;
  327. struct cvmx_uctlx_ohci_ctl_s cnf71xx;
  328. };
  329. union cvmx_uctlx_orto_ctl {
  330. uint64_t u64;
  331. struct cvmx_uctlx_orto_ctl_s {
  332. #ifdef __BIG_ENDIAN_BITFIELD
  333. uint64_t reserved_32_63:32;
  334. uint64_t to_val:24;
  335. uint64_t reserved_0_7:8;
  336. #else
  337. uint64_t reserved_0_7:8;
  338. uint64_t to_val:24;
  339. uint64_t reserved_32_63:32;
  340. #endif
  341. } s;
  342. struct cvmx_uctlx_orto_ctl_s cn61xx;
  343. struct cvmx_uctlx_orto_ctl_s cn63xx;
  344. struct cvmx_uctlx_orto_ctl_s cn63xxp1;
  345. struct cvmx_uctlx_orto_ctl_s cn66xx;
  346. struct cvmx_uctlx_orto_ctl_s cn68xx;
  347. struct cvmx_uctlx_orto_ctl_s cn68xxp1;
  348. struct cvmx_uctlx_orto_ctl_s cnf71xx;
  349. };
  350. union cvmx_uctlx_ppaf_wm {
  351. uint64_t u64;
  352. struct cvmx_uctlx_ppaf_wm_s {
  353. #ifdef __BIG_ENDIAN_BITFIELD
  354. uint64_t reserved_5_63:59;
  355. uint64_t wm:5;
  356. #else
  357. uint64_t wm:5;
  358. uint64_t reserved_5_63:59;
  359. #endif
  360. } s;
  361. struct cvmx_uctlx_ppaf_wm_s cn61xx;
  362. struct cvmx_uctlx_ppaf_wm_s cn63xx;
  363. struct cvmx_uctlx_ppaf_wm_s cn63xxp1;
  364. struct cvmx_uctlx_ppaf_wm_s cn66xx;
  365. struct cvmx_uctlx_ppaf_wm_s cnf71xx;
  366. };
  367. union cvmx_uctlx_uphy_ctl_status {
  368. uint64_t u64;
  369. struct cvmx_uctlx_uphy_ctl_status_s {
  370. #ifdef __BIG_ENDIAN_BITFIELD
  371. uint64_t reserved_10_63:54;
  372. uint64_t bist_done:1;
  373. uint64_t bist_err:1;
  374. uint64_t hsbist:1;
  375. uint64_t fsbist:1;
  376. uint64_t lsbist:1;
  377. uint64_t siddq:1;
  378. uint64_t vtest_en:1;
  379. uint64_t uphy_bist:1;
  380. uint64_t bist_en:1;
  381. uint64_t ate_reset:1;
  382. #else
  383. uint64_t ate_reset:1;
  384. uint64_t bist_en:1;
  385. uint64_t uphy_bist:1;
  386. uint64_t vtest_en:1;
  387. uint64_t siddq:1;
  388. uint64_t lsbist:1;
  389. uint64_t fsbist:1;
  390. uint64_t hsbist:1;
  391. uint64_t bist_err:1;
  392. uint64_t bist_done:1;
  393. uint64_t reserved_10_63:54;
  394. #endif
  395. } s;
  396. struct cvmx_uctlx_uphy_ctl_status_s cn61xx;
  397. struct cvmx_uctlx_uphy_ctl_status_s cn63xx;
  398. struct cvmx_uctlx_uphy_ctl_status_s cn63xxp1;
  399. struct cvmx_uctlx_uphy_ctl_status_s cn66xx;
  400. struct cvmx_uctlx_uphy_ctl_status_s cn68xx;
  401. struct cvmx_uctlx_uphy_ctl_status_s cn68xxp1;
  402. struct cvmx_uctlx_uphy_ctl_status_s cnf71xx;
  403. };
  404. union cvmx_uctlx_uphy_portx_ctl_status {
  405. uint64_t u64;
  406. struct cvmx_uctlx_uphy_portx_ctl_status_s {
  407. #ifdef __BIG_ENDIAN_BITFIELD
  408. uint64_t reserved_43_63:21;
  409. uint64_t tdata_out:4;
  410. uint64_t txbiststuffenh:1;
  411. uint64_t txbiststuffen:1;
  412. uint64_t dmpulldown:1;
  413. uint64_t dppulldown:1;
  414. uint64_t vbusvldext:1;
  415. uint64_t portreset:1;
  416. uint64_t txhsvxtune:2;
  417. uint64_t txvreftune:4;
  418. uint64_t txrisetune:1;
  419. uint64_t txpreemphasistune:1;
  420. uint64_t txfslstune:4;
  421. uint64_t sqrxtune:3;
  422. uint64_t compdistune:3;
  423. uint64_t loop_en:1;
  424. uint64_t tclk:1;
  425. uint64_t tdata_sel:1;
  426. uint64_t taddr_in:4;
  427. uint64_t tdata_in:8;
  428. #else
  429. uint64_t tdata_in:8;
  430. uint64_t taddr_in:4;
  431. uint64_t tdata_sel:1;
  432. uint64_t tclk:1;
  433. uint64_t loop_en:1;
  434. uint64_t compdistune:3;
  435. uint64_t sqrxtune:3;
  436. uint64_t txfslstune:4;
  437. uint64_t txpreemphasistune:1;
  438. uint64_t txrisetune:1;
  439. uint64_t txvreftune:4;
  440. uint64_t txhsvxtune:2;
  441. uint64_t portreset:1;
  442. uint64_t vbusvldext:1;
  443. uint64_t dppulldown:1;
  444. uint64_t dmpulldown:1;
  445. uint64_t txbiststuffen:1;
  446. uint64_t txbiststuffenh:1;
  447. uint64_t tdata_out:4;
  448. uint64_t reserved_43_63:21;
  449. #endif
  450. } s;
  451. struct cvmx_uctlx_uphy_portx_ctl_status_s cn61xx;
  452. struct cvmx_uctlx_uphy_portx_ctl_status_s cn63xx;
  453. struct cvmx_uctlx_uphy_portx_ctl_status_s cn63xxp1;
  454. struct cvmx_uctlx_uphy_portx_ctl_status_s cn66xx;
  455. struct cvmx_uctlx_uphy_portx_ctl_status_s cn68xx;
  456. struct cvmx_uctlx_uphy_portx_ctl_status_s cn68xxp1;
  457. struct cvmx_uctlx_uphy_portx_ctl_status_s cnf71xx;
  458. };
  459. #endif