dmc400.h 57 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908
  1. /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef _DMC400_H_
  13. #define _DMC400_H_
  14. // Auto generated by dtools(see dtools.txt for its version).
  15. // Don't edit it manually!
  16. #define REG_DMC_CTRL_BASE (0x51600000)
  17. typedef volatile struct
  18. {
  19. uint32_t memc_status; // 0x00000000
  20. uint32_t memc_config; // 0x00000004
  21. uint32_t memc_cmd; // 0x00000008
  22. uint32_t __12[1]; // 0x0000000c
  23. uint32_t address_control; // 0x00000010
  24. uint32_t decode_control; // 0x00000014
  25. uint32_t format_control; // 0x00000018
  26. uint32_t __28[1]; // 0x0000001c
  27. uint32_t low_power_control; // 0x00000020
  28. uint32_t __36[3]; // 0x00000024
  29. uint32_t turnaround_priority; // 0x00000030
  30. uint32_t hit_priority; // 0x00000034
  31. uint32_t qos0_control; // 0x00000038
  32. uint32_t qos1_control; // 0x0000003c
  33. uint32_t qos2_control; // 0x00000040
  34. uint32_t qos3_control; // 0x00000044
  35. uint32_t qos4_control; // 0x00000048
  36. uint32_t qos5_control; // 0x0000004c
  37. uint32_t qos6_control; // 0x00000050
  38. uint32_t qos7_control; // 0x00000054
  39. uint32_t qos8_control; // 0x00000058
  40. uint32_t qos9_control; // 0x0000005c
  41. uint32_t qos10_control; // 0x00000060
  42. uint32_t qos11_control; // 0x00000064
  43. uint32_t qos12_control; // 0x00000068
  44. uint32_t __108[1]; // 0x0000006c
  45. uint32_t qos13_control; // 0x00000070
  46. uint32_t qos14_control; // 0x00000074
  47. uint32_t qos15_control; // 0x00000078
  48. uint32_t timeout_control; // 0x0000007c
  49. uint32_t queue_control; // 0x00000080
  50. uint32_t __132[1]; // 0x00000084
  51. uint32_t write_priority_control; // 0x00000088
  52. uint32_t write_priority_control2; // 0x0000008c
  53. uint32_t read_priority_control; // 0x00000090
  54. uint32_t read_priority_control2; // 0x00000094
  55. uint32_t access_address_match; // 0x00000098
  56. uint32_t __156[1]; // 0x0000009c
  57. uint32_t access_address_mask; // 0x000000a0
  58. uint32_t __164[23]; // 0x000000a4
  59. uint32_t channel_status; // 0x00000100
  60. uint32_t __260[1]; // 0x00000104
  61. uint32_t direct_cmd; // 0x00000108
  62. uint32_t __268[1]; // 0x0000010c
  63. uint32_t mr_data; // 0x00000110
  64. uint32_t __276[3]; // 0x00000114
  65. uint32_t refresh_control; // 0x00000120
  66. uint32_t __292[55]; // 0x00000124
  67. uint32_t t_refi; // 0x00000200
  68. uint32_t t_rfc; // 0x00000204
  69. uint32_t t_mrr; // 0x00000208
  70. uint32_t t_mrw; // 0x0000020c
  71. uint32_t __528[2]; // 0x00000210
  72. uint32_t t_rcd; // 0x00000218
  73. uint32_t t_ras; // 0x0000021c
  74. uint32_t t_rp; // 0x00000220
  75. uint32_t t_rpall; // 0x00000224
  76. uint32_t t_rrd; // 0x00000228
  77. uint32_t t_faw; // 0x0000022c
  78. uint32_t read_latency; // 0x00000230
  79. uint32_t t_rtr; // 0x00000234
  80. uint32_t t_rtw; // 0x00000238
  81. uint32_t t_rtp; // 0x0000023c
  82. uint32_t write_latency; // 0x00000240
  83. uint32_t t_wr; // 0x00000244
  84. uint32_t t_wtr; // 0x00000248
  85. uint32_t t_wtw; // 0x0000024c
  86. uint32_t t_eckd; // 0x00000250
  87. uint32_t t_xckd; // 0x00000254
  88. uint32_t t_ep; // 0x00000258
  89. uint32_t t_xp; // 0x0000025c
  90. uint32_t t_esr; // 0x00000260
  91. uint32_t t_xsr; // 0x00000264
  92. uint32_t t_srckd; // 0x00000268
  93. uint32_t t_cksrd; // 0x0000026c
  94. uint32_t __624[36]; // 0x00000270
  95. uint32_t t_rddata_en; // 0x00000300
  96. uint32_t t_phywrlat; // 0x00000304
  97. uint32_t rdlvl_control; // 0x00000308
  98. uint32_t rdlvl_mrs; // 0x0000030c
  99. uint32_t rdlvl_direct; // 0x00000310
  100. uint32_t __788[1]; // 0x00000314
  101. uint32_t t_rdlvl_en; // 0x00000318
  102. uint32_t t_rdlvl_rr; // 0x0000031c
  103. uint32_t __800[2]; // 0x00000320
  104. uint32_t wrlvl_control; // 0x00000328
  105. uint32_t wrlvl_mrs; // 0x0000032c
  106. uint32_t wrlvl_direct; // 0x00000330
  107. uint32_t __820[1]; // 0x00000334
  108. uint32_t t_wrlvl_en; // 0x00000338
  109. uint32_t t_wrlvl_ww; // 0x0000033c
  110. uint32_t __832[2]; // 0x00000340
  111. uint32_t phy_power_control; // 0x00000348
  112. uint32_t __844[1]; // 0x0000034c
  113. uint32_t phy_update_control; // 0x00000350
  114. uint32_t __852[43]; // 0x00000354
  115. uint32_t user_status; // 0x00000400
  116. uint32_t user_config0; // 0x00000404
  117. uint32_t user_config1; // 0x00000408
  118. uint32_t __1036[637]; // 0x0000040c
  119. uint32_t integ_cfg; // 0x00000e00
  120. uint32_t __3588[1]; // 0x00000e04
  121. uint32_t integ_outputs; // 0x00000e08
  122. uint32_t __3596[117]; // 0x00000e0c
  123. uint32_t periph_id_0; // 0x00000fe0
  124. uint32_t periph_id_1; // 0x00000fe4
  125. uint32_t periph_id_2; // 0x00000fe8
  126. uint32_t periph_id_3; // 0x00000fec
  127. uint32_t component_id_0; // 0x00000ff0
  128. uint32_t component_id_1; // 0x00000ff4
  129. uint32_t component_id_2; // 0x00000ff8
  130. uint32_t component_id_3; // 0x00000ffc
  131. } HWP_DMC400_T;
  132. #define hwp_dmcCtrl ((HWP_DMC400_T *)REG_ACCESS_ADDRESS(REG_DMC_CTRL_BASE))
  133. // memc_status
  134. typedef union {
  135. uint32_t v;
  136. struct
  137. {
  138. uint32_t memc_status : 2; // [1:0], read only
  139. uint32_t __31_2 : 30; // [31:2]
  140. } b;
  141. } REG_DMC400_MEMC_STATUS_T;
  142. // memc_config
  143. typedef union {
  144. uint32_t v;
  145. struct
  146. {
  147. uint32_t system_interfaces_cfg : 2; // [1:0], read only
  148. uint32_t __3_2 : 2; // [3:2]
  149. uint32_t memory_interfaces_cfg : 2; // [5:4], read only
  150. uint32_t __7_6 : 2; // [7:6]
  151. uint32_t memory_data_width_cfg : 2; // [9:8], read only
  152. uint32_t __11_10 : 2; // [11:10]
  153. uint32_t memory_chip_selects_cfg : 2; // [13:12], read only
  154. uint32_t __15_14 : 2; // [15:14]
  155. uint32_t read_queue_depth_cfg : 3; // [18:16], read only
  156. uint32_t __19_19 : 1; // [19]
  157. uint32_t write_queue_depth_cfg : 3; // [22:20], read only
  158. uint32_t __23_23 : 1; // [23]
  159. uint32_t max_burst_length_cfg : 2; // [25:24], read only
  160. uint32_t __27_26 : 2; // [27:26]
  161. uint32_t memory_ecc_cfg : 1; // [28], read only
  162. uint32_t __31_29 : 3; // [31:29]
  163. } b;
  164. } REG_DMC400_MEMC_CONFIG_T;
  165. // memc_cmd
  166. typedef union {
  167. uint32_t v;
  168. struct
  169. {
  170. uint32_t memc_cmd : 3; // [2:0]
  171. uint32_t __31_3 : 29; // [31:3]
  172. } b;
  173. } REG_DMC400_MEMC_CMD_T;
  174. // address_control
  175. typedef union {
  176. uint32_t v;
  177. struct
  178. {
  179. uint32_t column_bits : 4; // [3:0]
  180. uint32_t __7_4 : 4; // [7:4]
  181. uint32_t row_bits : 4; // [11:8]
  182. uint32_t __15_12 : 4; // [15:12]
  183. uint32_t bank_bits : 4; // [19:16]
  184. uint32_t __23_20 : 4; // [23:20]
  185. uint32_t chip_bits : 2; // [25:24]
  186. uint32_t __27_26 : 2; // [27:26]
  187. uint32_t channel_bits : 2; // [29:28]
  188. uint32_t __31_30 : 2; // [31:30]
  189. } b;
  190. } REG_DMC400_ADDRESS_CONTROL_T;
  191. // decode_control
  192. typedef union {
  193. uint32_t v;
  194. struct
  195. {
  196. uint32_t addr_decode : 2; // [1:0]
  197. uint32_t __3_2 : 2; // [3:2]
  198. uint32_t strip_decode : 4; // [7:4]
  199. uint32_t __31_8 : 24; // [31:8]
  200. } b;
  201. } REG_DMC400_DECODE_CONTROL_T;
  202. // format_control
  203. typedef union {
  204. uint32_t v;
  205. struct
  206. {
  207. uint32_t mem_width : 2; // [1:0]
  208. uint32_t __7_2 : 6; // [7:2]
  209. uint32_t mem_burst : 2; // [9:8]
  210. uint32_t __23_10 : 14; // [23:10]
  211. uint32_t acc_granu : 2; // [25:24]
  212. uint32_t __27_26 : 2; // [27:26]
  213. uint32_t align_boundary : 2; // [29:28]
  214. uint32_t __31_30 : 2; // [31:30]
  215. } b;
  216. } REG_DMC400_FORMAT_CONTROL_T;
  217. // low_power_control
  218. typedef union {
  219. uint32_t v;
  220. struct
  221. {
  222. uint32_t stop_mem_clock_idle : 1; // [0]
  223. uint32_t stop_mem_clock_sref : 1; // [1]
  224. uint32_t auto_power_down : 1; // [2]
  225. uint32_t auto_self_refresh : 1; // [3]
  226. uint32_t asr_period : 4; // [7:4]
  227. uint32_t __31_8 : 24; // [31:8]
  228. } b;
  229. } REG_DMC400_LOW_POWER_CONTROL_T;
  230. // turnaround_priority
  231. typedef union {
  232. uint32_t v;
  233. struct
  234. {
  235. uint32_t turnaround_priority : 4; // [3:0]
  236. uint32_t turnaround_limit : 4; // [7:4]
  237. uint32_t __31_8 : 24; // [31:8]
  238. } b;
  239. } REG_DMC400_TURNAROUND_PRIORITY_T;
  240. // hit_priority
  241. typedef union {
  242. uint32_t v;
  243. struct
  244. {
  245. uint32_t hit_priority : 4; // [3:0]
  246. uint32_t hit_limit : 4; // [7:4]
  247. uint32_t __31_8 : 24; // [31:8]
  248. } b;
  249. } REG_DMC400_HIT_PRIORITY_T;
  250. // qos0_control
  251. typedef union {
  252. uint32_t v;
  253. struct
  254. {
  255. uint32_t qos0_priority : 4; // [3:0]
  256. uint32_t __7_4 : 4; // [7:4]
  257. uint32_t qos0_timeout : 4; // [11:8]
  258. uint32_t __31_12 : 20; // [31:12]
  259. } b;
  260. } REG_DMC400_QOS0_CONTROL_T;
  261. // qos1_control
  262. typedef union {
  263. uint32_t v;
  264. struct
  265. {
  266. uint32_t qos1_priority : 4; // [3:0]
  267. uint32_t __7_4 : 4; // [7:4]
  268. uint32_t qos1_timeout : 4; // [11:8]
  269. uint32_t __31_12 : 20; // [31:12]
  270. } b;
  271. } REG_DMC400_QOS1_CONTROL_T;
  272. // qos2_control
  273. typedef union {
  274. uint32_t v;
  275. struct
  276. {
  277. uint32_t qos2_priority : 4; // [3:0]
  278. uint32_t __7_4 : 4; // [7:4]
  279. uint32_t qos2_timeout : 4; // [11:8]
  280. uint32_t __31_12 : 20; // [31:12]
  281. } b;
  282. } REG_DMC400_QOS2_CONTROL_T;
  283. // qos3_control
  284. typedef union {
  285. uint32_t v;
  286. struct
  287. {
  288. uint32_t qos3_priority : 4; // [3:0]
  289. uint32_t __7_4 : 4; // [7:4]
  290. uint32_t qos3_timeout : 4; // [11:8]
  291. uint32_t __31_12 : 20; // [31:12]
  292. } b;
  293. } REG_DMC400_QOS3_CONTROL_T;
  294. // qos4_control
  295. typedef union {
  296. uint32_t v;
  297. struct
  298. {
  299. uint32_t qos4_priority : 4; // [3:0]
  300. uint32_t __7_4 : 4; // [7:4]
  301. uint32_t qos4_timeout : 4; // [11:8]
  302. uint32_t __31_12 : 20; // [31:12]
  303. } b;
  304. } REG_DMC400_QOS4_CONTROL_T;
  305. // qos5_control
  306. typedef union {
  307. uint32_t v;
  308. struct
  309. {
  310. uint32_t qos5_priority : 4; // [3:0]
  311. uint32_t __7_4 : 4; // [7:4]
  312. uint32_t qos5_timeout : 4; // [11:8]
  313. uint32_t __31_12 : 20; // [31:12]
  314. } b;
  315. } REG_DMC400_QOS5_CONTROL_T;
  316. // qos6_control
  317. typedef union {
  318. uint32_t v;
  319. struct
  320. {
  321. uint32_t qos6_priority : 4; // [3:0]
  322. uint32_t __7_4 : 4; // [7:4]
  323. uint32_t qos6_timeout : 4; // [11:8]
  324. uint32_t __31_12 : 20; // [31:12]
  325. } b;
  326. } REG_DMC400_QOS6_CONTROL_T;
  327. // qos7_control
  328. typedef union {
  329. uint32_t v;
  330. struct
  331. {
  332. uint32_t qos7_priority : 4; // [3:0]
  333. uint32_t __7_4 : 4; // [7:4]
  334. uint32_t qos7_timeout : 4; // [11:8]
  335. uint32_t __31_12 : 20; // [31:12]
  336. } b;
  337. } REG_DMC400_QOS7_CONTROL_T;
  338. // qos8_control
  339. typedef union {
  340. uint32_t v;
  341. struct
  342. {
  343. uint32_t qos8_priority : 4; // [3:0]
  344. uint32_t __7_4 : 4; // [7:4]
  345. uint32_t qos8_timeout : 4; // [11:8]
  346. uint32_t __31_12 : 20; // [31:12]
  347. } b;
  348. } REG_DMC400_QOS8_CONTROL_T;
  349. // qos9_control
  350. typedef union {
  351. uint32_t v;
  352. struct
  353. {
  354. uint32_t qos9_priority : 4; // [3:0]
  355. uint32_t __7_4 : 4; // [7:4]
  356. uint32_t qos9_timeout : 4; // [11:8]
  357. uint32_t __31_12 : 20; // [31:12]
  358. } b;
  359. } REG_DMC400_QOS9_CONTROL_T;
  360. // qos10_control
  361. typedef union {
  362. uint32_t v;
  363. struct
  364. {
  365. uint32_t qos10_priority : 4; // [3:0]
  366. uint32_t __7_4 : 4; // [7:4]
  367. uint32_t qos10_timeout : 4; // [11:8]
  368. uint32_t __31_12 : 20; // [31:12]
  369. } b;
  370. } REG_DMC400_QOS10_CONTROL_T;
  371. // qos11_control
  372. typedef union {
  373. uint32_t v;
  374. struct
  375. {
  376. uint32_t qos11_priority : 4; // [3:0]
  377. uint32_t __7_4 : 4; // [7:4]
  378. uint32_t qos11_timeout : 4; // [11:8]
  379. uint32_t __31_12 : 20; // [31:12]
  380. } b;
  381. } REG_DMC400_QOS11_CONTROL_T;
  382. // qos12_control
  383. typedef union {
  384. uint32_t v;
  385. struct
  386. {
  387. uint32_t qos12_priority : 4; // [3:0]
  388. uint32_t __7_4 : 4; // [7:4]
  389. uint32_t qos12_timeout : 4; // [11:8]
  390. uint32_t __31_12 : 20; // [31:12]
  391. } b;
  392. } REG_DMC400_QOS12_CONTROL_T;
  393. // qos13_control
  394. typedef union {
  395. uint32_t v;
  396. struct
  397. {
  398. uint32_t qos13_priority : 4; // [3:0]
  399. uint32_t __7_4 : 4; // [7:4]
  400. uint32_t qos13_timeout : 4; // [11:8]
  401. uint32_t __31_12 : 20; // [31:12]
  402. } b;
  403. } REG_DMC400_QOS13_CONTROL_T;
  404. // qos14_control
  405. typedef union {
  406. uint32_t v;
  407. struct
  408. {
  409. uint32_t qos14_priority : 4; // [3:0]
  410. uint32_t __7_4 : 4; // [7:4]
  411. uint32_t qos14_timeout : 4; // [11:8]
  412. uint32_t __31_12 : 20; // [31:12]
  413. } b;
  414. } REG_DMC400_QOS14_CONTROL_T;
  415. // qos15_control
  416. typedef union {
  417. uint32_t v;
  418. struct
  419. {
  420. uint32_t qos15_priority : 4; // [3:0]
  421. uint32_t __7_4 : 4; // [7:4]
  422. uint32_t qos15_timeout : 4; // [11:8]
  423. uint32_t __31_12 : 20; // [31:12]
  424. } b;
  425. } REG_DMC400_QOS15_CONTROL_T;
  426. // timeout_control
  427. typedef union {
  428. uint32_t v;
  429. struct
  430. {
  431. uint32_t timeout_prescalar : 2; // [1:0]
  432. uint32_t __31_2 : 30; // [31:2]
  433. } b;
  434. } REG_DMC400_TIMEOUT_CONTROL_T;
  435. // queue_control
  436. typedef union {
  437. uint32_t v;
  438. struct
  439. {
  440. uint32_t s0_reserve : 4; // [3:0]
  441. uint32_t __31_4 : 28; // [31:4]
  442. } b;
  443. } REG_DMC400_QUEUE_CONTROL_T;
  444. // write_priority_control
  445. typedef union {
  446. uint32_t v;
  447. struct
  448. {
  449. uint32_t write_threshold_en : 1; // [0]
  450. uint32_t __3_1 : 3; // [3:1]
  451. uint32_t write_fill_priority_1_16ths : 4; // [7:4]
  452. uint32_t write_fill_priority_2_16ths : 4; // [11:8]
  453. uint32_t write_fill_priority_3_16ths : 4; // [15:12]
  454. uint32_t write_fill_priority_4_16ths : 4; // [19:16]
  455. uint32_t write_fill_priority_5_16ths : 4; // [23:20]
  456. uint32_t write_fill_priority_6_16ths : 4; // [27:24]
  457. uint32_t write_fill_priority_7_16ths : 4; // [31:28]
  458. } b;
  459. } REG_DMC400_WRITE_PRIORITY_CONTROL_T;
  460. // write_priority_control2
  461. typedef union {
  462. uint32_t v;
  463. struct
  464. {
  465. uint32_t write_fill_priority_8_16ths : 4; // [3:0]
  466. uint32_t write_fill_priority_9_16ths : 4; // [7:4]
  467. uint32_t write_fill_priority_10_16ths : 4; // [11:8]
  468. uint32_t write_fill_priority_11_16ths : 4; // [15:12]
  469. uint32_t write_fill_priority_12_16ths : 4; // [19:16]
  470. uint32_t write_fill_priority_13_16ths : 4; // [23:20]
  471. uint32_t write_fill_priority_14_16ths : 4; // [27:24]
  472. uint32_t write_fill_priority_15_16ths : 4; // [31:28]
  473. } b;
  474. } REG_DMC400_WRITE_PRIORITY_CONTROL2_T;
  475. // read_priority_control
  476. typedef union {
  477. uint32_t v;
  478. struct
  479. {
  480. uint32_t read_escalation : 1; // [0]
  481. uint32_t read_in_burst_prioritisation : 1; // [1]
  482. uint32_t __3_2 : 2; // [3:2]
  483. uint32_t read_fill_priority_1_16ths : 4; // [7:4]
  484. uint32_t read_fill_priority_2_16ths : 4; // [11:8]
  485. uint32_t read_fill_priority_3_16ths : 4; // [15:12]
  486. uint32_t read_fill_priority_4_16ths : 4; // [19:16]
  487. uint32_t read_fill_priority_5_16ths : 4; // [23:20]
  488. uint32_t read_fill_priority_6_16ths : 4; // [27:24]
  489. uint32_t read_fill_priority_7_16ths : 4; // [31:28]
  490. } b;
  491. } REG_DMC400_READ_PRIORITY_CONTROL_T;
  492. // read_priority_control2
  493. typedef union {
  494. uint32_t v;
  495. struct
  496. {
  497. uint32_t read_fill_priority_8_16ths : 4; // [3:0]
  498. uint32_t read_fill_priority_9_16ths : 4; // [7:4]
  499. uint32_t read_fill_priority_10_16ths : 4; // [11:8]
  500. uint32_t read_fill_priority_11_16ths : 4; // [15:12]
  501. uint32_t read_fill_priority_12_16ths : 4; // [19:16]
  502. uint32_t read_fill_priority_13_16ths : 4; // [23:20]
  503. uint32_t read_fill_priority_14_16ths : 4; // [27:24]
  504. uint32_t read_fill_priority_15_16ths : 4; // [31:28]
  505. } b;
  506. } REG_DMC400_READ_PRIORITY_CONTROL2_T;
  507. // access_address_match
  508. typedef union {
  509. uint32_t v;
  510. struct
  511. {
  512. uint32_t __11_0 : 12; // [11:0]
  513. uint32_t access_address_match : 20; // [31:12]
  514. } b;
  515. } REG_DMC400_ACCESS_ADDRESS_MATCH_T;
  516. // access_address_mask
  517. typedef union {
  518. uint32_t v;
  519. struct
  520. {
  521. uint32_t __11_0 : 12; // [11:0]
  522. uint32_t access_address_mask : 20; // [31:12]
  523. } b;
  524. } REG_DMC400_ACCESS_ADDRESS_MASK_T;
  525. // channel_status
  526. typedef union {
  527. uint32_t v;
  528. struct
  529. {
  530. uint32_t m0_state : 4; // [3:0], read only
  531. uint32_t m1_state : 4; // [7:4], read only
  532. uint32_t __31_8 : 24; // [31:8]
  533. } b;
  534. } REG_DMC400_CHANNEL_STATUS_T;
  535. // direct_cmd
  536. typedef union {
  537. uint32_t v;
  538. struct
  539. {
  540. uint32_t direct_addr : 16; // [15:0]
  541. uint32_t direct_ba : 3; // [18:16]
  542. uint32_t __19_19 : 1; // [19]
  543. uint32_t chip_addr : 1; // [20]
  544. uint32_t __23_21 : 3; // [23:21]
  545. uint32_t channel_addr : 1; // [24]
  546. uint32_t __27_25 : 3; // [27:25]
  547. uint32_t direct_cmd : 4; // [31:28]
  548. } b;
  549. } REG_DMC400_DIRECT_CMD_T;
  550. // mr_data
  551. typedef union {
  552. uint32_t v;
  553. struct
  554. {
  555. uint32_t mr_data : 8; // [7:0], read only
  556. uint32_t __31_8 : 24; // [31:8]
  557. } b;
  558. } REG_DMC400_MR_DATA_T;
  559. // refresh_control
  560. typedef union {
  561. uint32_t v;
  562. struct
  563. {
  564. uint32_t per_bank_refresh : 1; // [0]
  565. uint32_t __31_1 : 31; // [31:1]
  566. } b;
  567. } REG_DMC400_REFRESH_CONTROL_T;
  568. // t_refi
  569. typedef union {
  570. uint32_t v;
  571. struct
  572. {
  573. uint32_t t_refi : 11; // [10:0]
  574. uint32_t __31_11 : 21; // [31:11]
  575. } b;
  576. } REG_DMC400_T_REFI_T;
  577. // t_rfc
  578. typedef union {
  579. uint32_t v;
  580. struct
  581. {
  582. uint32_t t_rfc : 9; // [8:0]
  583. uint32_t __15_9 : 7; // [15:9]
  584. uint32_t t_rfcab : 9; // [24:16]
  585. uint32_t __31_25 : 7; // [31:25]
  586. } b;
  587. } REG_DMC400_T_RFC_T;
  588. // t_mrr
  589. typedef union {
  590. uint32_t v;
  591. struct
  592. {
  593. uint32_t t_mrr : 3; // [2:0]
  594. uint32_t __31_3 : 29; // [31:3]
  595. } b;
  596. } REG_DMC400_T_MRR_T;
  597. // t_mrw
  598. typedef union {
  599. uint32_t v;
  600. struct
  601. {
  602. uint32_t t_mrw : 7; // [6:0]
  603. uint32_t __31_7 : 25; // [31:7]
  604. } b;
  605. } REG_DMC400_T_MRW_T;
  606. // t_rcd
  607. typedef union {
  608. uint32_t v;
  609. struct
  610. {
  611. uint32_t t_rcd : 4; // [3:0]
  612. uint32_t __31_4 : 28; // [31:4]
  613. } b;
  614. } REG_DMC400_T_RCD_T;
  615. // t_ras
  616. typedef union {
  617. uint32_t v;
  618. struct
  619. {
  620. uint32_t t_ras : 6; // [5:0]
  621. uint32_t __31_6 : 26; // [31:6]
  622. } b;
  623. } REG_DMC400_T_RAS_T;
  624. // t_rp
  625. typedef union {
  626. uint32_t v;
  627. struct
  628. {
  629. uint32_t t_rp : 5; // [4:0]
  630. uint32_t __31_5 : 27; // [31:5]
  631. } b;
  632. } REG_DMC400_T_RP_T;
  633. // t_rpall
  634. typedef union {
  635. uint32_t v;
  636. struct
  637. {
  638. uint32_t t_rpall : 5; // [4:0]
  639. uint32_t __31_5 : 27; // [31:5]
  640. } b;
  641. } REG_DMC400_T_RPALL_T;
  642. // t_rrd
  643. typedef union {
  644. uint32_t v;
  645. struct
  646. {
  647. uint32_t t_rrd : 4; // [3:0]
  648. uint32_t __31_4 : 28; // [31:4]
  649. } b;
  650. } REG_DMC400_T_RRD_T;
  651. // t_faw
  652. typedef union {
  653. uint32_t v;
  654. struct
  655. {
  656. uint32_t t_faw : 6; // [5:0]
  657. uint32_t __31_6 : 26; // [31:6]
  658. } b;
  659. } REG_DMC400_T_FAW_T;
  660. // read_latency
  661. typedef union {
  662. uint32_t v;
  663. struct
  664. {
  665. uint32_t read_latency : 4; // [3:0]
  666. uint32_t __31_4 : 28; // [31:4]
  667. } b;
  668. } REG_DMC400_READ_LATENCY_T;
  669. // t_rtr
  670. typedef union {
  671. uint32_t v;
  672. struct
  673. {
  674. uint32_t t_rtr : 4; // [3:0]
  675. uint32_t __31_4 : 28; // [31:4]
  676. } b;
  677. } REG_DMC400_T_RTR_T;
  678. // t_rtw
  679. typedef union {
  680. uint32_t v;
  681. struct
  682. {
  683. uint32_t t_rtw : 5; // [4:0]
  684. uint32_t __31_5 : 27; // [31:5]
  685. } b;
  686. } REG_DMC400_T_RTW_T;
  687. // t_rtp
  688. typedef union {
  689. uint32_t v;
  690. struct
  691. {
  692. uint32_t t_rtp : 4; // [3:0]
  693. uint32_t __31_4 : 28; // [31:4]
  694. } b;
  695. } REG_DMC400_T_RTP_T;
  696. // write_latency
  697. typedef union {
  698. uint32_t v;
  699. struct
  700. {
  701. uint32_t write_latency : 4; // [3:0]
  702. uint32_t __31_4 : 28; // [31:4]
  703. } b;
  704. } REG_DMC400_WRITE_LATENCY_T;
  705. // t_wr
  706. typedef union {
  707. uint32_t v;
  708. struct
  709. {
  710. uint32_t t_wr : 5; // [4:0]
  711. uint32_t __31_5 : 27; // [31:5]
  712. } b;
  713. } REG_DMC400_T_WR_T;
  714. // t_wtr
  715. typedef union {
  716. uint32_t v;
  717. struct
  718. {
  719. uint32_t t_wtr : 5; // [4:0]
  720. uint32_t __15_5 : 11; // [15:5]
  721. uint32_t t_wtr_cs : 5; // [20:16]
  722. uint32_t __31_21 : 11; // [31:21]
  723. } b;
  724. } REG_DMC400_T_WTR_T;
  725. // t_wtw
  726. typedef union {
  727. uint32_t v;
  728. struct
  729. {
  730. uint32_t __15_0 : 16; // [15:0]
  731. uint32_t t_wtw : 6; // [21:16]
  732. uint32_t __31_22 : 10; // [31:22]
  733. } b;
  734. } REG_DMC400_T_WTW_T;
  735. // t_eckd
  736. typedef union {
  737. uint32_t v;
  738. struct
  739. {
  740. uint32_t t_eckd : 4; // [3:0]
  741. uint32_t __31_4 : 28; // [31:4]
  742. } b;
  743. } REG_DMC400_T_ECKD_T;
  744. // t_xckd
  745. typedef union {
  746. uint32_t v;
  747. struct
  748. {
  749. uint32_t t_xckd : 4; // [3:0]
  750. uint32_t __31_4 : 28; // [31:4]
  751. } b;
  752. } REG_DMC400_T_XCKD_T;
  753. // t_ep
  754. typedef union {
  755. uint32_t v;
  756. struct
  757. {
  758. uint32_t t_ep : 4; // [3:0]
  759. uint32_t __31_4 : 28; // [31:4]
  760. } b;
  761. } REG_DMC400_T_EP_T;
  762. // t_xp
  763. typedef union {
  764. uint32_t v;
  765. struct
  766. {
  767. uint32_t t_xp : 5; // [4:0]
  768. uint32_t __15_5 : 11; // [15:5]
  769. uint32_t t_xpdll : 5; // [20:16]
  770. uint32_t __31_21 : 11; // [31:21]
  771. } b;
  772. } REG_DMC400_T_XP_T;
  773. // t_esr
  774. typedef union {
  775. uint32_t v;
  776. struct
  777. {
  778. uint32_t t_esr : 9; // [8:0]
  779. uint32_t __31_9 : 23; // [31:9]
  780. } b;
  781. } REG_DMC400_T_ESR_T;
  782. // t_xsr
  783. typedef union {
  784. uint32_t v;
  785. struct
  786. {
  787. uint32_t t_xsr : 10; // [9:0]
  788. uint32_t __15_10 : 6; // [15:10]
  789. uint32_t t_xsrdll : 10; // [25:16]
  790. uint32_t __31_26 : 6; // [31:26]
  791. } b;
  792. } REG_DMC400_T_XSR_T;
  793. // t_srckd
  794. typedef union {
  795. uint32_t v;
  796. struct
  797. {
  798. uint32_t t_srckd : 4; // [3:0]
  799. uint32_t __31_4 : 28; // [31:4]
  800. } b;
  801. } REG_DMC400_T_SRCKD_T;
  802. // t_cksrd
  803. typedef union {
  804. uint32_t v;
  805. struct
  806. {
  807. uint32_t t_cksrd : 4; // [3:0]
  808. uint32_t __31_4 : 28; // [31:4]
  809. } b;
  810. } REG_DMC400_T_CKSRD_T;
  811. // t_rddata_en
  812. typedef union {
  813. uint32_t v;
  814. struct
  815. {
  816. uint32_t t_rddata_en : 4; // [3:0]
  817. uint32_t __31_4 : 28; // [31:4]
  818. } b;
  819. } REG_DMC400_T_RDDATA_EN_T;
  820. // t_phywrlat
  821. typedef union {
  822. uint32_t v;
  823. struct
  824. {
  825. uint32_t t_phywrlat : 4; // [3:0]
  826. uint32_t __7_4 : 4; // [7:4]
  827. uint32_t t_phywrdata : 1; // [8]
  828. uint32_t __31_9 : 23; // [31:9]
  829. } b;
  830. } REG_DMC400_T_PHYWRLAT_T;
  831. // rdlvl_control
  832. typedef union {
  833. uint32_t v;
  834. struct
  835. {
  836. uint32_t rdlvl_mode : 2; // [1:0]
  837. uint32_t __3_2 : 2; // [3:2]
  838. uint32_t rdlvl_setup : 1; // [4]
  839. uint32_t __7_5 : 3; // [7:5]
  840. uint32_t rdlvl_cmd : 1; // [8]
  841. uint32_t __11_9 : 3; // [11:9]
  842. uint32_t rdlvl_refresh : 1; // [12]
  843. uint32_t __15_13 : 3; // [15:13]
  844. uint32_t rdlvl_reg_sel : 1; // [16]
  845. uint32_t __31_17 : 15; // [31:17]
  846. } b;
  847. } REG_DMC400_RDLVL_CONTROL_T;
  848. // rdlvl_mrs
  849. typedef union {
  850. uint32_t v;
  851. struct
  852. {
  853. uint32_t rdlvl_mrs : 3; // [2:0]
  854. uint32_t __31_3 : 29; // [31:3]
  855. } b;
  856. } REG_DMC400_RDLVL_MRS_T;
  857. // rdlvl_direct
  858. typedef union {
  859. uint32_t v;
  860. struct
  861. {
  862. uint32_t rdlvl_req : 2; // [1:0]
  863. uint32_t __23_2 : 22; // [23:2]
  864. uint32_t rdlvl_chip_addr : 1; // [24]
  865. uint32_t __27_25 : 3; // [27:25]
  866. uint32_t rdlvl_channel_addr : 1; // [28]
  867. uint32_t __31_29 : 3; // [31:29]
  868. } b;
  869. } REG_DMC400_RDLVL_DIRECT_T;
  870. // t_rdlvl_en
  871. typedef union {
  872. uint32_t v;
  873. struct
  874. {
  875. uint32_t t_rdlvl_en : 6; // [5:0]
  876. uint32_t __31_6 : 26; // [31:6]
  877. } b;
  878. } REG_DMC400_T_RDLVL_EN_T;
  879. // t_rdlvl_rr
  880. typedef union {
  881. uint32_t v;
  882. struct
  883. {
  884. uint32_t t_rdlvl_rr : 6; // [5:0]
  885. uint32_t __31_6 : 26; // [31:6]
  886. } b;
  887. } REG_DMC400_T_RDLVL_RR_T;
  888. // wrlvl_control
  889. typedef union {
  890. uint32_t v;
  891. struct
  892. {
  893. uint32_t wrlvl_mode : 2; // [1:0]
  894. uint32_t __11_2 : 10; // [11:2]
  895. uint32_t wrlvl_refresh : 1; // [12]
  896. uint32_t __31_13 : 19; // [31:13]
  897. } b;
  898. } REG_DMC400_WRLVL_CONTROL_T;
  899. // wrlvl_mrs
  900. typedef union {
  901. uint32_t v;
  902. struct
  903. {
  904. uint32_t wrlvl_mrs : 13; // [12:0]
  905. uint32_t __31_13 : 19; // [31:13]
  906. } b;
  907. } REG_DMC400_WRLVL_MRS_T;
  908. // wrlvl_direct
  909. typedef union {
  910. uint32_t v;
  911. struct
  912. {
  913. uint32_t wrlvl_req : 1; // [0]
  914. uint32_t __23_1 : 23; // [23:1]
  915. uint32_t wrlvl_chip_addr : 1; // [24]
  916. uint32_t __27_25 : 3; // [27:25]
  917. uint32_t wrlvl_channel_addr : 1; // [28]
  918. uint32_t __31_29 : 3; // [31:29]
  919. } b;
  920. } REG_DMC400_WRLVL_DIRECT_T;
  921. // t_wrlvl_en
  922. typedef union {
  923. uint32_t v;
  924. struct
  925. {
  926. uint32_t t_wrlvl_en : 6; // [5:0]
  927. uint32_t __31_6 : 26; // [31:6]
  928. } b;
  929. } REG_DMC400_T_WRLVL_EN_T;
  930. // t_wrlvl_ww
  931. typedef union {
  932. uint32_t v;
  933. struct
  934. {
  935. uint32_t t_wrlvl_ww : 6; // [5:0]
  936. uint32_t __31_6 : 26; // [31:6]
  937. } b;
  938. } REG_DMC400_T_WRLVL_WW_T;
  939. // phy_power_control
  940. typedef union {
  941. uint32_t v;
  942. struct
  943. {
  944. uint32_t lp_wr_en : 1; // [0]
  945. uint32_t lp_rd_en : 1; // [1]
  946. uint32_t lp_idle_en : 1; // [2]
  947. uint32_t lp_pd_en : 1; // [3]
  948. uint32_t lp_sref_en : 1; // [4]
  949. uint32_t lp_dpd_en : 1; // [5]
  950. uint32_t __7_6 : 2; // [7:6]
  951. uint32_t lp_wakeup_wr : 4; // [11:8]
  952. uint32_t lp_wakeup_rd : 4; // [15:12]
  953. uint32_t lp_wakeup_idle : 4; // [19:16]
  954. uint32_t lp_wakeup_pd : 4; // [23:20]
  955. uint32_t lp_wakeup_sref : 4; // [27:24]
  956. uint32_t lp_wakeup_dpd : 4; // [31:28]
  957. } b;
  958. } REG_DMC400_PHY_POWER_CONTROL_T;
  959. // phy_update_control
  960. typedef union {
  961. uint32_t v;
  962. struct
  963. {
  964. uint32_t phyupd_type_00 : 2; // [1:0]
  965. uint32_t phyupd_type_01 : 2; // [3:2]
  966. uint32_t phyupd_type_10 : 2; // [5:4]
  967. uint32_t phyupd_type_11 : 2; // [7:6]
  968. uint32_t __31_8 : 24; // [31:8]
  969. } b;
  970. } REG_DMC400_PHY_UPDATE_CONTROL_T;
  971. // user_status
  972. typedef union {
  973. uint32_t v;
  974. struct
  975. {
  976. uint32_t user_status : 8; // [7:0], read only
  977. uint32_t __31_8 : 24; // [31:8]
  978. } b;
  979. } REG_DMC400_USER_STATUS_T;
  980. // user_config0
  981. typedef union {
  982. uint32_t v;
  983. struct
  984. {
  985. uint32_t user_config0 : 8; // [7:0]
  986. uint32_t __31_8 : 24; // [31:8]
  987. } b;
  988. } REG_DMC400_USER_CONFIG0_T;
  989. // user_config1
  990. typedef union {
  991. uint32_t v;
  992. struct
  993. {
  994. uint32_t user_config1 : 8; // [7:0]
  995. uint32_t __31_8 : 24; // [31:8]
  996. } b;
  997. } REG_DMC400_USER_CONFIG1_T;
  998. // integ_cfg
  999. typedef union {
  1000. uint32_t v;
  1001. struct
  1002. {
  1003. uint32_t integ_test_en : 1; // [0]
  1004. uint32_t __31_1 : 31; // [31:1]
  1005. } b;
  1006. } REG_DMC400_INTEG_CFG_T;
  1007. // integ_outputs
  1008. typedef union {
  1009. uint32_t v;
  1010. struct
  1011. {
  1012. uint32_t combined_integ : 1; // [0]
  1013. uint32_t ecc_sec_integ : 1; // [1]
  1014. uint32_t ecc_ded_integ : 1; // [2]
  1015. uint32_t ecc_overflow_integ : 1; // [3]
  1016. uint32_t __31_4 : 28; // [31:4]
  1017. } b;
  1018. } REG_DMC400_INTEG_OUTPUTS_T;
  1019. // periph_id_0
  1020. typedef union {
  1021. uint32_t v;
  1022. struct
  1023. {
  1024. uint32_t part_0 : 8; // [7:0], read only
  1025. uint32_t __31_8 : 24; // [31:8]
  1026. } b;
  1027. } REG_DMC400_PERIPH_ID_0_T;
  1028. // periph_id_1
  1029. typedef union {
  1030. uint32_t v;
  1031. struct
  1032. {
  1033. uint32_t part_1 : 4; // [3:0], read only
  1034. uint32_t des_0 : 4; // [7:4], read only
  1035. uint32_t __31_8 : 24; // [31:8]
  1036. } b;
  1037. } REG_DMC400_PERIPH_ID_1_T;
  1038. // periph_id_2
  1039. typedef union {
  1040. uint32_t v;
  1041. struct
  1042. {
  1043. uint32_t des_1 : 3; // [2:0], read only
  1044. uint32_t jedec : 1; // [3], read only
  1045. uint32_t revision : 4; // [7:4], read only
  1046. uint32_t __31_8 : 24; // [31:8]
  1047. } b;
  1048. } REG_DMC400_PERIPH_ID_2_T;
  1049. // periph_id_3
  1050. typedef union {
  1051. uint32_t v;
  1052. struct
  1053. {
  1054. uint32_t cmod : 8; // [7:0], read only
  1055. uint32_t __31_8 : 24; // [31:8]
  1056. } b;
  1057. } REG_DMC400_PERIPH_ID_3_T;
  1058. // component_id_0
  1059. typedef union {
  1060. uint32_t v;
  1061. struct
  1062. {
  1063. uint32_t prmbl_0 : 8; // [7:0], read only
  1064. uint32_t __31_8 : 24; // [31:8]
  1065. } b;
  1066. } REG_DMC400_COMPONENT_ID_0_T;
  1067. // component_id_1
  1068. typedef union {
  1069. uint32_t v;
  1070. struct
  1071. {
  1072. uint32_t prmbl_1 : 4; // [3:0], read only
  1073. uint32_t pclass : 4; // [7:4], read only
  1074. uint32_t __31_8 : 24; // [31:8]
  1075. } b;
  1076. } REG_DMC400_COMPONENT_ID_1_T;
  1077. // component_id_2
  1078. typedef union {
  1079. uint32_t v;
  1080. struct
  1081. {
  1082. uint32_t prmbl_2 : 8; // [7:0], read only
  1083. uint32_t __31_8 : 24; // [31:8]
  1084. } b;
  1085. } REG_DMC400_COMPONENT_ID_2_T;
  1086. // component_id_3
  1087. typedef union {
  1088. uint32_t v;
  1089. struct
  1090. {
  1091. uint32_t prmbl_3 : 8; // [7:0], read only
  1092. uint32_t __31_8 : 24; // [31:8]
  1093. } b;
  1094. } REG_DMC400_COMPONENT_ID_3_T;
  1095. // memc_status
  1096. #define DMC400_MEMC_STATUS(n) (((n)&0x3) << 0)
  1097. #define DMC400_MEMC_STATUS_CONFIG (0 << 0)
  1098. #define DMC400_MEMC_STATUS_LOW_POWER (1 << 0)
  1099. #define DMC400_MEMC_STATUS_PAUSED (2 << 0)
  1100. #define DMC400_MEMC_STATUS_READY (3 << 0)
  1101. #define DMC400_MEMC_STATUS_V_CONFIG (0)
  1102. #define DMC400_MEMC_STATUS_V_LOW_POWER (1)
  1103. #define DMC400_MEMC_STATUS_V_PAUSED (2)
  1104. #define DMC400_MEMC_STATUS_V_READY (3)
  1105. // memc_config
  1106. #define DMC400_SYSTEM_INTERFACES_CFG(n) (((n)&0x3) << 0)
  1107. #define DMC400_SYSTEM_INTERFACES_CFG_1_SYSTEM_INTERFACE (0 << 0)
  1108. #define DMC400_SYSTEM_INTERFACES_CFG_2_SYSTEM_INTERFACE (1 << 0)
  1109. #define DMC400_SYSTEM_INTERFACES_CFG_4_SYSTEM_INTERFACE (3 << 0)
  1110. #define DMC400_MEMORY_INTERFACES_CFG(n) (((n)&0x3) << 4)
  1111. #define DMC400_MEMORY_INTERFACES_CFG_1_MEMORY_INTERFACE (0 << 4)
  1112. #define DMC400_MEMORY_INTERFACES_CFG_2_MEMORY_INTERFACE (1 << 4)
  1113. #define DMC400_MEMORY_DATA_WIDTH_CFG(n) (((n)&0x3) << 8)
  1114. #define DMC400_MEMORY_DATA_WIDTH_CFG_32BIT_PHY_IF (1 << 8)
  1115. #define DMC400_MEMORY_DATA_WIDTH_CFG_64BIT_PHY_IF (2 << 8)
  1116. #define DMC400_MEMORY_DATA_WIDTH_CFG_128BIT_PHY_IF (3 << 8)
  1117. #define DMC400_MEMORY_CHIP_SELECTS_CFG(n) (((n)&0x3) << 12)
  1118. #define DMC400_MEMORY_CHIP_SELECTS_CFG_1_CHIP_SEL (0 << 12)
  1119. #define DMC400_MEMORY_CHIP_SELECTS_CFG_2_CHIP_SEL (1 << 12)
  1120. #define DMC400_READ_QUEUE_DEPTH_CFG(n) (((n)&0x7) << 16)
  1121. #define DMC400_READ_QUEUE_DEPTH_CFG_16_ENTRY (0 << 16)
  1122. #define DMC400_READ_QUEUE_DEPTH_CFG_32_ENTRY (1 << 16)
  1123. #define DMC400_READ_QUEUE_DEPTH_CFG_64_ENTRY (3 << 16)
  1124. #define DMC400_READ_QUEUE_DEPTH_CFG_128_ENTRY (7 << 16)
  1125. #define DMC400_WRITE_QUEUE_DEPTH_CFG(n) (((n)&0x7) << 20)
  1126. #define DMC400_WRITE_QUEUE_DEPTH_CFG_16_ENTRY (0 << 20)
  1127. #define DMC400_WRITE_QUEUE_DEPTH_CFG_32_ENTRY (1 << 20)
  1128. #define DMC400_WRITE_QUEUE_DEPTH_CFG_64_ENTRY (3 << 20)
  1129. #define DMC400_WRITE_QUEUE_DEPTH_CFG_128_ENTRY (7 << 20)
  1130. #define DMC400_MAX_BURST_LENGTH_CFG(n) (((n)&0x3) << 24)
  1131. #define DMC400_MAX_BURST_LENGTH_CFG_2_DMC_CYCLE (1 << 24)
  1132. #define DMC400_MAX_BURST_LENGTH_CFG_4_DMC_CYCLE (2 << 24)
  1133. #define DMC400_MAX_BURST_LENGTH_CFG_8_DMC_CYCLE (3 << 24)
  1134. #define DMC400_MEMORY_ECC_CFG_FALSE (0 << 28)
  1135. #define DMC400_MEMORY_ECC_CFG_TRUE (1 << 28)
  1136. #define DMC400_SYSTEM_INTERFACES_CFG_V_1_SYSTEM_INTERFACE (0)
  1137. #define DMC400_SYSTEM_INTERFACES_CFG_V_2_SYSTEM_INTERFACE (1)
  1138. #define DMC400_SYSTEM_INTERFACES_CFG_V_4_SYSTEM_INTERFACE (3)
  1139. #define DMC400_MEMORY_INTERFACES_CFG_V_1_MEMORY_INTERFACE (0)
  1140. #define DMC400_MEMORY_INTERFACES_CFG_V_2_MEMORY_INTERFACE (1)
  1141. #define DMC400_MEMORY_DATA_WIDTH_CFG_V_32BIT_PHY_IF (1)
  1142. #define DMC400_MEMORY_DATA_WIDTH_CFG_V_64BIT_PHY_IF (2)
  1143. #define DMC400_MEMORY_DATA_WIDTH_CFG_V_128BIT_PHY_IF (3)
  1144. #define DMC400_MEMORY_CHIP_SELECTS_CFG_V_1_CHIP_SEL (0)
  1145. #define DMC400_MEMORY_CHIP_SELECTS_CFG_V_2_CHIP_SEL (1)
  1146. #define DMC400_READ_QUEUE_DEPTH_CFG_V_16_ENTRY (0)
  1147. #define DMC400_READ_QUEUE_DEPTH_CFG_V_32_ENTRY (1)
  1148. #define DMC400_READ_QUEUE_DEPTH_CFG_V_64_ENTRY (3)
  1149. #define DMC400_READ_QUEUE_DEPTH_CFG_V_128_ENTRY (7)
  1150. #define DMC400_WRITE_QUEUE_DEPTH_CFG_V_16_ENTRY (0)
  1151. #define DMC400_WRITE_QUEUE_DEPTH_CFG_V_32_ENTRY (1)
  1152. #define DMC400_WRITE_QUEUE_DEPTH_CFG_V_64_ENTRY (3)
  1153. #define DMC400_WRITE_QUEUE_DEPTH_CFG_V_128_ENTRY (7)
  1154. #define DMC400_MAX_BURST_LENGTH_CFG_V_2_DMC_CYCLE (1)
  1155. #define DMC400_MAX_BURST_LENGTH_CFG_V_4_DMC_CYCLE (2)
  1156. #define DMC400_MAX_BURST_LENGTH_CFG_V_8_DMC_CYCLE (3)
  1157. #define DMC400_MEMORY_ECC_CFG_V_FALSE (0)
  1158. #define DMC400_MEMORY_ECC_CFG_V_TRUE (1)
  1159. // memc_cmd
  1160. #define DMC400_MEMC_CMD(n) (((n)&0x7) << 0)
  1161. #define DMC400_MEMC_CMD_CONFIG (0 << 0)
  1162. #define DMC400_MEMC_CMD_SLEEP (1 << 0)
  1163. #define DMC400_MEMC_CMD_PAUSE (2 << 0)
  1164. #define DMC400_MEMC_CMD_GO (3 << 0)
  1165. #define DMC400_MEMC_CMD_INVALIDATE (4 << 0)
  1166. #define DMC400_MEMC_CMD_V_CONFIG (0)
  1167. #define DMC400_MEMC_CMD_V_SLEEP (1)
  1168. #define DMC400_MEMC_CMD_V_PAUSE (2)
  1169. #define DMC400_MEMC_CMD_V_GO (3)
  1170. #define DMC400_MEMC_CMD_V_INVALIDATE (4)
  1171. // address_control
  1172. #define DMC400_COLUMN_BITS(n) (((n)&0xf) << 0)
  1173. #define DMC400_COLUMN_BITS_8_COL_BITS (0 << 0)
  1174. #define DMC400_COLUMN_BITS_9_COL_BITS (1 << 0)
  1175. #define DMC400_COLUMN_BITS_10_COL_BITS (2 << 0)
  1176. #define DMC400_COLUMN_BITS_11_COL_BITS (3 << 0)
  1177. #define DMC400_COLUMN_BITS_12_COL_BITS (4 << 0)
  1178. #define DMC400_ROW_BITS(n) (((n)&0xf) << 8)
  1179. #define DMC400_ROW_BITS_13_ROW_BITS (2 << 8)
  1180. #define DMC400_ROW_BITS_14_ROW_BITS (3 << 8)
  1181. #define DMC400_ROW_BITS_15_ROW_BITS (4 << 8)
  1182. #define DMC400_ROW_BITS_16_ROW_BITS (5 << 8)
  1183. #define DMC400_BANK_BITS(n) (((n)&0xf) << 16)
  1184. #define DMC400_BANK_BITS_2_BANK_BITS_4BK (2 << 16)
  1185. #define DMC400_BANK_BITS_3_BANK_BITS_8BK (3 << 16)
  1186. #define DMC400_CHIP_BITS(n) (((n)&0x3) << 24)
  1187. #define DMC400_CHIP_BITS_0_CHIP_BITS_1CS (0 << 24)
  1188. #define DMC400_CHIP_BITS_1_CHIP_BITS_2CS (1 << 24)
  1189. #define DMC400_CHANNEL_BITS(n) (((n)&0x3) << 28)
  1190. #define DMC400_CHANNEL_BITS_0_CHANNEL_BITS_1MEMIF (0 << 28)
  1191. #define DMC400_CHANNEL_BITS_1_CHANNEL_BITS_2MEMIF (1 << 28)
  1192. #define DMC400_COLUMN_BITS_V_8_COL_BITS (0)
  1193. #define DMC400_COLUMN_BITS_V_9_COL_BITS (1)
  1194. #define DMC400_COLUMN_BITS_V_10_COL_BITS (2)
  1195. #define DMC400_COLUMN_BITS_V_11_COL_BITS (3)
  1196. #define DMC400_COLUMN_BITS_V_12_COL_BITS (4)
  1197. #define DMC400_ROW_BITS_V_13_ROW_BITS (2)
  1198. #define DMC400_ROW_BITS_V_14_ROW_BITS (3)
  1199. #define DMC400_ROW_BITS_V_15_ROW_BITS (4)
  1200. #define DMC400_ROW_BITS_V_16_ROW_BITS (5)
  1201. #define DMC400_BANK_BITS_V_2_BANK_BITS_4BK (2)
  1202. #define DMC400_BANK_BITS_V_3_BANK_BITS_8BK (3)
  1203. #define DMC400_CHIP_BITS_V_0_CHIP_BITS_1CS (0)
  1204. #define DMC400_CHIP_BITS_V_1_CHIP_BITS_2CS (1)
  1205. #define DMC400_CHANNEL_BITS_V_0_CHANNEL_BITS_1MEMIF (0)
  1206. #define DMC400_CHANNEL_BITS_V_1_CHANNEL_BITS_2MEMIF (1)
  1207. // decode_control
  1208. #define DMC400_ADDR_DECODE(n) (((n)&0x3) << 0)
  1209. #define DMC400_ADDR_DECODE_CHANNEL_CHIP_ROW_BANK_COL (0 << 0)
  1210. #define DMC400_ADDR_DECODE_ROW_CHANNEL_CHIP_BANK_COL (1 << 0)
  1211. #define DMC400_ADDR_DECODE_CHIP_BANK_ROW_CHANNEL_COL (2 << 0)
  1212. #define DMC400_ADDR_DECODE_ROW_CHIP_BANK_CHANNEL_COL (3 << 0)
  1213. #define DMC400_STRIP_DECODE(n) (((n)&0xf) << 4)
  1214. #define DMC400_STRIP_DECODE_PAGE_ADDR_13_12 (0 << 4)
  1215. #define DMC400_STRIP_DECODE_PAGE_ADDR_12_11 (1 << 4)
  1216. #define DMC400_STRIP_DECODE_PAGE_ADDR_11_10 (2 << 4)
  1217. #define DMC400_STRIP_DECODE_PAGE_ADDR_10_9 (3 << 4)
  1218. #define DMC400_STRIP_DECODE_PAGE_ADDR_9_8 (4 << 4)
  1219. #define DMC400_STRIP_DECODE_PAGE_ADDR_8_7 (5 << 4)
  1220. #define DMC400_STRIP_DECODE_PAGE_ADDR_7_6 (6 << 4)
  1221. #define DMC400_STRIP_DECODE_PAGE_ADDR_6_5 (7 << 4)
  1222. #define DMC400_ADDR_DECODE_V_CHANNEL_CHIP_ROW_BANK_COL (0)
  1223. #define DMC400_ADDR_DECODE_V_ROW_CHANNEL_CHIP_BANK_COL (1)
  1224. #define DMC400_ADDR_DECODE_V_CHIP_BANK_ROW_CHANNEL_COL (2)
  1225. #define DMC400_ADDR_DECODE_V_ROW_CHIP_BANK_CHANNEL_COL (3)
  1226. #define DMC400_STRIP_DECODE_V_PAGE_ADDR_13_12 (0)
  1227. #define DMC400_STRIP_DECODE_V_PAGE_ADDR_12_11 (1)
  1228. #define DMC400_STRIP_DECODE_V_PAGE_ADDR_11_10 (2)
  1229. #define DMC400_STRIP_DECODE_V_PAGE_ADDR_10_9 (3)
  1230. #define DMC400_STRIP_DECODE_V_PAGE_ADDR_9_8 (4)
  1231. #define DMC400_STRIP_DECODE_V_PAGE_ADDR_8_7 (5)
  1232. #define DMC400_STRIP_DECODE_V_PAGE_ADDR_7_6 (6)
  1233. #define DMC400_STRIP_DECODE_V_PAGE_ADDR_6_5 (7)
  1234. // format_control
  1235. #define DMC400_MEM_WIDTH(n) (((n)&0x3) << 0)
  1236. #define DMC400_MEM_WIDTH_PHY_WIDTH_32_X16_DDR (1 << 0)
  1237. #define DMC400_MEM_WIDTH_PHY_WIDTH_64_X32_DDR (2 << 0)
  1238. #define DMC400_MEM_WIDTH_PHY_WIDTH_128_X64_DDR (3 << 0)
  1239. #define DMC400_MEM_BURST(n) (((n)&0x3) << 8)
  1240. #define DMC400_MEM_BURST_MEM_BURST_2_DDR_BL4 (1 << 8)
  1241. #define DMC400_MEM_BURST_MEM_BURST_4_DDR_BL8 (2 << 8)
  1242. #define DMC400_MEM_BURST_MEM_BURST_8_DDR_BL16 (3 << 8)
  1243. #define DMC400_ACC_GRANU(n) (((n)&0x3) << 24)
  1244. #define DMC400_ACC_GRANU_ACC_GRANU_1_DDR_2N (0 << 24)
  1245. #define DMC400_ACC_GRANU_ACC_GRANU_2_DDR_4N (1 << 24)
  1246. #define DMC400_ACC_GRANU_ACC_GRANU_4_DDR_8N (2 << 24)
  1247. #define DMC400_ACC_GRANU_ACC_GRANU_8_DDR_16N (3 << 24)
  1248. #define DMC400_ALIGN_BOUNDARY(n) (((n)&0x3) << 28)
  1249. #define DMC400_ALIGN_BOUNDARY_ALIGN_BOUNDARY_1_COL_1BIT (0 << 28)
  1250. #define DMC400_ALIGN_BOUNDARY_ALIGN_BOUNDARY_2_COL_2BIT (1 << 28)
  1251. #define DMC400_ALIGN_BOUNDARY_ALIGN_BOUNDARY_4_COL_3BIT (2 << 28)
  1252. #define DMC400_ALIGN_BOUNDARY_ALIGN_BOUNDARY_8_COL_4BIT (3 << 28)
  1253. #define DMC400_MEM_WIDTH_V_PHY_WIDTH_32_X16_DDR (1)
  1254. #define DMC400_MEM_WIDTH_V_PHY_WIDTH_64_X32_DDR (2)
  1255. #define DMC400_MEM_WIDTH_V_PHY_WIDTH_128_X64_DDR (3)
  1256. #define DMC400_MEM_BURST_V_MEM_BURST_2_DDR_BL4 (1)
  1257. #define DMC400_MEM_BURST_V_MEM_BURST_4_DDR_BL8 (2)
  1258. #define DMC400_MEM_BURST_V_MEM_BURST_8_DDR_BL16 (3)
  1259. #define DMC400_ACC_GRANU_V_ACC_GRANU_1_DDR_2N (0)
  1260. #define DMC400_ACC_GRANU_V_ACC_GRANU_2_DDR_4N (1)
  1261. #define DMC400_ACC_GRANU_V_ACC_GRANU_4_DDR_8N (2)
  1262. #define DMC400_ACC_GRANU_V_ACC_GRANU_8_DDR_16N (3)
  1263. #define DMC400_ALIGN_BOUNDARY_V_ALIGN_BOUNDARY_1_COL_1BIT (0)
  1264. #define DMC400_ALIGN_BOUNDARY_V_ALIGN_BOUNDARY_2_COL_2BIT (1)
  1265. #define DMC400_ALIGN_BOUNDARY_V_ALIGN_BOUNDARY_4_COL_3BIT (2)
  1266. #define DMC400_ALIGN_BOUNDARY_V_ALIGN_BOUNDARY_8_COL_4BIT (3)
  1267. // low_power_control
  1268. #define DMC400_STOP_MEM_CLOCK_IDLE_DISABLE (0 << 0)
  1269. #define DMC400_STOP_MEM_CLOCK_IDLE_ENABLE (1 << 0)
  1270. #define DMC400_STOP_MEM_CLOCK_SREF_DISABLE (0 << 1)
  1271. #define DMC400_STOP_MEM_CLOCK_SREF_ENABLE (1 << 1)
  1272. #define DMC400_AUTO_POWER_DOWN_DISABLE (0 << 2)
  1273. #define DMC400_AUTO_POWER_DOWN_ENABLE (1 << 2)
  1274. #define DMC400_AUTO_SELF_REFRESH_DISABLE (0 << 3)
  1275. #define DMC400_AUTO_SELF_REFRESH_ENABLE (1 << 3)
  1276. #define DMC400_ASR_PERIOD(n) (((n)&0xf) << 4)
  1277. #define DMC400_STOP_MEM_CLOCK_IDLE_V_DISABLE (0)
  1278. #define DMC400_STOP_MEM_CLOCK_IDLE_V_ENABLE (1)
  1279. #define DMC400_STOP_MEM_CLOCK_SREF_V_DISABLE (0)
  1280. #define DMC400_STOP_MEM_CLOCK_SREF_V_ENABLE (1)
  1281. #define DMC400_AUTO_POWER_DOWN_V_DISABLE (0)
  1282. #define DMC400_AUTO_POWER_DOWN_V_ENABLE (1)
  1283. #define DMC400_AUTO_SELF_REFRESH_V_DISABLE (0)
  1284. #define DMC400_AUTO_SELF_REFRESH_V_ENABLE (1)
  1285. // turnaround_priority
  1286. #define DMC400_TURNAROUND_PRIORITY(n) (((n)&0xf) << 0)
  1287. #define DMC400_TURNAROUND_LIMIT(n) (((n)&0xf) << 4)
  1288. // hit_priority
  1289. #define DMC400_HIT_PRIORITY(n) (((n)&0xf) << 0)
  1290. #define DMC400_HIT_LIMIT(n) (((n)&0xf) << 4)
  1291. // qos0_control
  1292. #define DMC400_QOS0_PRIORITY(n) (((n)&0xf) << 0)
  1293. #define DMC400_QOS0_TIMEOUT(n) (((n)&0xf) << 8)
  1294. // qos1_control
  1295. #define DMC400_QOS1_PRIORITY(n) (((n)&0xf) << 0)
  1296. #define DMC400_QOS1_TIMEOUT(n) (((n)&0xf) << 8)
  1297. // qos2_control
  1298. #define DMC400_QOS2_PRIORITY(n) (((n)&0xf) << 0)
  1299. #define DMC400_QOS2_TIMEOUT(n) (((n)&0xf) << 8)
  1300. // qos3_control
  1301. #define DMC400_QOS3_PRIORITY(n) (((n)&0xf) << 0)
  1302. #define DMC400_QOS3_TIMEOUT(n) (((n)&0xf) << 8)
  1303. // qos4_control
  1304. #define DMC400_QOS4_PRIORITY(n) (((n)&0xf) << 0)
  1305. #define DMC400_QOS4_TIMEOUT(n) (((n)&0xf) << 8)
  1306. // qos5_control
  1307. #define DMC400_QOS5_PRIORITY(n) (((n)&0xf) << 0)
  1308. #define DMC400_QOS5_TIMEOUT(n) (((n)&0xf) << 8)
  1309. // qos6_control
  1310. #define DMC400_QOS6_PRIORITY(n) (((n)&0xf) << 0)
  1311. #define DMC400_QOS6_TIMEOUT(n) (((n)&0xf) << 8)
  1312. // qos7_control
  1313. #define DMC400_QOS7_PRIORITY(n) (((n)&0xf) << 0)
  1314. #define DMC400_QOS7_TIMEOUT(n) (((n)&0xf) << 8)
  1315. // qos8_control
  1316. #define DMC400_QOS8_PRIORITY(n) (((n)&0xf) << 0)
  1317. #define DMC400_QOS8_TIMEOUT(n) (((n)&0xf) << 8)
  1318. // qos9_control
  1319. #define DMC400_QOS9_PRIORITY(n) (((n)&0xf) << 0)
  1320. #define DMC400_QOS9_TIMEOUT(n) (((n)&0xf) << 8)
  1321. // qos10_control
  1322. #define DMC400_QOS10_PRIORITY(n) (((n)&0xf) << 0)
  1323. #define DMC400_QOS10_TIMEOUT(n) (((n)&0xf) << 8)
  1324. // qos11_control
  1325. #define DMC400_QOS11_PRIORITY(n) (((n)&0xf) << 0)
  1326. #define DMC400_QOS11_TIMEOUT(n) (((n)&0xf) << 8)
  1327. // qos12_control
  1328. #define DMC400_QOS12_PRIORITY(n) (((n)&0xf) << 0)
  1329. #define DMC400_QOS12_TIMEOUT(n) (((n)&0xf) << 8)
  1330. // qos13_control
  1331. #define DMC400_QOS13_PRIORITY(n) (((n)&0xf) << 0)
  1332. #define DMC400_QOS13_TIMEOUT(n) (((n)&0xf) << 8)
  1333. // qos14_control
  1334. #define DMC400_QOS14_PRIORITY(n) (((n)&0xf) << 0)
  1335. #define DMC400_QOS14_TIMEOUT(n) (((n)&0xf) << 8)
  1336. // qos15_control
  1337. #define DMC400_QOS15_PRIORITY(n) (((n)&0xf) << 0)
  1338. #define DMC400_QOS15_TIMEOUT(n) (((n)&0xf) << 8)
  1339. // timeout_control
  1340. #define DMC400_TIMEOUT_PRESCALAR(n) (((n)&0x3) << 0)
  1341. #define DMC400_TIMEOUT_PRESCALAR_8_CLK (0 << 0)
  1342. #define DMC400_TIMEOUT_PRESCALAR_16_CLK (1 << 0)
  1343. #define DMC400_TIMEOUT_PRESCALAR_32_CLK (2 << 0)
  1344. #define DMC400_TIMEOUT_PRESCALAR_64_CLK (3 << 0)
  1345. #define DMC400_TIMEOUT_PRESCALAR_V_8_CLK (0)
  1346. #define DMC400_TIMEOUT_PRESCALAR_V_16_CLK (1)
  1347. #define DMC400_TIMEOUT_PRESCALAR_V_32_CLK (2)
  1348. #define DMC400_TIMEOUT_PRESCALAR_V_64_CLK (3)
  1349. // queue_control
  1350. #define DMC400_S0_RESERVE(n) (((n)&0xf) << 0)
  1351. // write_priority_control
  1352. #define DMC400_WRITE_THRESHOLD_EN_DISABLE (0 << 0)
  1353. #define DMC400_WRITE_THRESHOLD_EN_ENABLE (1 << 0)
  1354. #define DMC400_WRITE_FILL_PRIORITY_1_16THS(n) (((n)&0xf) << 4)
  1355. #define DMC400_WRITE_FILL_PRIORITY_2_16THS(n) (((n)&0xf) << 8)
  1356. #define DMC400_WRITE_FILL_PRIORITY_3_16THS(n) (((n)&0xf) << 12)
  1357. #define DMC400_WRITE_FILL_PRIORITY_4_16THS(n) (((n)&0xf) << 16)
  1358. #define DMC400_WRITE_FILL_PRIORITY_5_16THS(n) (((n)&0xf) << 20)
  1359. #define DMC400_WRITE_FILL_PRIORITY_6_16THS(n) (((n)&0xf) << 24)
  1360. #define DMC400_WRITE_FILL_PRIORITY_7_16THS(n) (((n)&0xf) << 28)
  1361. #define DMC400_WRITE_THRESHOLD_EN_V_DISABLE (0)
  1362. #define DMC400_WRITE_THRESHOLD_EN_V_ENABLE (1)
  1363. // write_priority_control2
  1364. #define DMC400_WRITE_FILL_PRIORITY_8_16THS(n) (((n)&0xf) << 0)
  1365. #define DMC400_WRITE_FILL_PRIORITY_9_16THS(n) (((n)&0xf) << 4)
  1366. #define DMC400_WRITE_FILL_PRIORITY_10_16THS(n) (((n)&0xf) << 8)
  1367. #define DMC400_WRITE_FILL_PRIORITY_11_16THS(n) (((n)&0xf) << 12)
  1368. #define DMC400_WRITE_FILL_PRIORITY_12_16THS(n) (((n)&0xf) << 16)
  1369. #define DMC400_WRITE_FILL_PRIORITY_13_16THS(n) (((n)&0xf) << 20)
  1370. #define DMC400_WRITE_FILL_PRIORITY_14_16THS(n) (((n)&0xf) << 24)
  1371. #define DMC400_WRITE_FILL_PRIORITY_15_16THS(n) (((n)&0xf) << 28)
  1372. // read_priority_control
  1373. #define DMC400_READ_ESCALATION_DISABLE (0 << 0)
  1374. #define DMC400_READ_ESCALATION_ENABLE (1 << 0)
  1375. #define DMC400_READ_IN_BURST_PRIORITISATION_DISABLE (0 << 1)
  1376. #define DMC400_READ_IN_BURST_PRIORITISATION_ENABLE (1 << 1)
  1377. #define DMC400_READ_FILL_PRIORITY_1_16THS(n) (((n)&0xf) << 4)
  1378. #define DMC400_READ_FILL_PRIORITY_2_16THS(n) (((n)&0xf) << 8)
  1379. #define DMC400_READ_FILL_PRIORITY_3_16THS(n) (((n)&0xf) << 12)
  1380. #define DMC400_READ_FILL_PRIORITY_4_16THS(n) (((n)&0xf) << 16)
  1381. #define DMC400_READ_FILL_PRIORITY_5_16THS(n) (((n)&0xf) << 20)
  1382. #define DMC400_READ_FILL_PRIORITY_6_16THS(n) (((n)&0xf) << 24)
  1383. #define DMC400_READ_FILL_PRIORITY_7_16THS(n) (((n)&0xf) << 28)
  1384. #define DMC400_READ_ESCALATION_V_DISABLE (0)
  1385. #define DMC400_READ_ESCALATION_V_ENABLE (1)
  1386. #define DMC400_READ_IN_BURST_PRIORITISATION_V_DISABLE (0)
  1387. #define DMC400_READ_IN_BURST_PRIORITISATION_V_ENABLE (1)
  1388. // read_priority_control2
  1389. #define DMC400_READ_FILL_PRIORITY_8_16THS(n) (((n)&0xf) << 0)
  1390. #define DMC400_READ_FILL_PRIORITY_9_16THS(n) (((n)&0xf) << 4)
  1391. #define DMC400_READ_FILL_PRIORITY_10_16THS(n) (((n)&0xf) << 8)
  1392. #define DMC400_READ_FILL_PRIORITY_11_16THS(n) (((n)&0xf) << 12)
  1393. #define DMC400_READ_FILL_PRIORITY_12_16THS(n) (((n)&0xf) << 16)
  1394. #define DMC400_READ_FILL_PRIORITY_13_16THS(n) (((n)&0xf) << 20)
  1395. #define DMC400_READ_FILL_PRIORITY_14_16THS(n) (((n)&0xf) << 24)
  1396. #define DMC400_READ_FILL_PRIORITY_15_16THS(n) (((n)&0xf) << 28)
  1397. // access_address_match
  1398. #define DMC400_ACCESS_ADDRESS_MATCH(n) (((n)&0xfffff) << 12)
  1399. // access_address_mask
  1400. #define DMC400_ACCESS_ADDRESS_MASK(n) (((n)&0xfffff) << 12)
  1401. // channel_status
  1402. #define DMC400_M0_STATE(n) (((n)&0xf) << 0)
  1403. #define DMC400_M0_STATE_STANDBY (0 << 0)
  1404. #define DMC400_M0_STATE_DPD (1 << 0)
  1405. #define DMC400_M0_STATE_IDLE (2 << 0)
  1406. #define DMC400_M0_STATE_SELF_REFRESH (3 << 0)
  1407. #define DMC400_M0_STATE_READING (4 << 0)
  1408. #define DMC400_M0_STATE_POWER_DOWN (5 << 0)
  1409. #define DMC400_M0_STATE_WRITING (6 << 0)
  1410. #define DMC400_M1_STATE(n) (((n)&0xf) << 4)
  1411. #define DMC400_M1_STATE_STANDBY (0 << 4)
  1412. #define DMC400_M1_STATE_DPD (1 << 4)
  1413. #define DMC400_M1_STATE_IDLE (2 << 4)
  1414. #define DMC400_M1_STATE_SELF_REFRESH (3 << 4)
  1415. #define DMC400_M1_STATE_READING (4 << 4)
  1416. #define DMC400_M1_STATE_POWER_DOWN (5 << 4)
  1417. #define DMC400_M1_STATE_WRITING (6 << 4)
  1418. #define DMC400_M0_STATE_V_STANDBY (0)
  1419. #define DMC400_M0_STATE_V_DPD (1)
  1420. #define DMC400_M0_STATE_V_IDLE (2)
  1421. #define DMC400_M0_STATE_V_SELF_REFRESH (3)
  1422. #define DMC400_M0_STATE_V_READING (4)
  1423. #define DMC400_M0_STATE_V_POWER_DOWN (5)
  1424. #define DMC400_M0_STATE_V_WRITING (6)
  1425. #define DMC400_M1_STATE_V_STANDBY (0)
  1426. #define DMC400_M1_STATE_V_DPD (1)
  1427. #define DMC400_M1_STATE_V_IDLE (2)
  1428. #define DMC400_M1_STATE_V_SELF_REFRESH (3)
  1429. #define DMC400_M1_STATE_V_READING (4)
  1430. #define DMC400_M1_STATE_V_POWER_DOWN (5)
  1431. #define DMC400_M1_STATE_V_WRITING (6)
  1432. // direct_cmd
  1433. #define DMC400_DIRECT_ADDR(n) (((n)&0xffff) << 0)
  1434. #define DMC400_DIRECT_BA(n) (((n)&0x7) << 16)
  1435. #define DMC400_CHIP_ADDR_CHIP_0 (0 << 20)
  1436. #define DMC400_CHIP_ADDR_CHIP_1 (1 << 20)
  1437. #define DMC400_CHANNEL_ADDR_CHANNEL_0 (0 << 24)
  1438. #define DMC400_CHANNEL_ADDR_CHANNEL_1 (1 << 24)
  1439. #define DMC400_DIRECT_CMD(n) (((n)&0xf) << 28)
  1440. #define DMC400_DIRECT_CMD_NOP (0 << 28)
  1441. #define DMC400_DIRECT_CMD_MRS (1 << 28)
  1442. #define DMC400_DIRECT_CMD_PRECHARGEALL (2 << 28)
  1443. #define DMC400_DIRECT_CMD_AUTOREFRESH (3 << 28)
  1444. #define DMC400_DIRECT_CMD_SELFREFRESH_ENTRY (4 << 28)
  1445. #define DMC400_DIRECT_CMD_ZQC (5 << 28)
  1446. #define DMC400_DIRECT_CMD_MRR (6 << 28)
  1447. #define DMC400_DIRECT_CMD_POWERDOWN_ENTRY (7 << 28)
  1448. #define DMC400_DIRECT_CMD_DEEP_POWERDOWN_ENTRY (8 << 28)
  1449. #define DMC400_CHIP_ADDR_V_CHIP_0 (0)
  1450. #define DMC400_CHIP_ADDR_V_CHIP_1 (1)
  1451. #define DMC400_CHANNEL_ADDR_V_CHANNEL_0 (0)
  1452. #define DMC400_CHANNEL_ADDR_V_CHANNEL_1 (1)
  1453. #define DMC400_DIRECT_CMD_V_NOP (0)
  1454. #define DMC400_DIRECT_CMD_V_MRS (1)
  1455. #define DMC400_DIRECT_CMD_V_PRECHARGEALL (2)
  1456. #define DMC400_DIRECT_CMD_V_AUTOREFRESH (3)
  1457. #define DMC400_DIRECT_CMD_V_SELFREFRESH_ENTRY (4)
  1458. #define DMC400_DIRECT_CMD_V_ZQC (5)
  1459. #define DMC400_DIRECT_CMD_V_MRR (6)
  1460. #define DMC400_DIRECT_CMD_V_POWERDOWN_ENTRY (7)
  1461. #define DMC400_DIRECT_CMD_V_DEEP_POWERDOWN_ENTRY (8)
  1462. // mr_data
  1463. #define DMC400_MR_DATA(n) (((n)&0xff) << 0)
  1464. // refresh_control
  1465. #define DMC400_PER_BANK_REFRESH_ALL_BANK_AUTOREFRESH (0 << 0)
  1466. #define DMC400_PER_BANK_REFRESH_PRE_BANK_AUTOREFRESH (1 << 0)
  1467. #define DMC400_PER_BANK_REFRESH_V_ALL_BANK_AUTOREFRESH (0)
  1468. #define DMC400_PER_BANK_REFRESH_V_PRE_BANK_AUTOREFRESH (1)
  1469. // t_refi
  1470. #define DMC400_T_REFI(n) (((n)&0x7ff) << 0)
  1471. // t_rfc
  1472. #define DMC400_T_RFC(n) (((n)&0x1ff) << 0)
  1473. #define DMC400_T_RFCAB(n) (((n)&0x1ff) << 16)
  1474. // t_mrr
  1475. #define DMC400_T_MRR(n) (((n)&0x7) << 0)
  1476. // t_mrw
  1477. #define DMC400_T_MRW(n) (((n)&0x7f) << 0)
  1478. // t_rcd
  1479. #define DMC400_T_RCD(n) (((n)&0xf) << 0)
  1480. // t_ras
  1481. #define DMC400_T_RAS(n) (((n)&0x3f) << 0)
  1482. // t_rp
  1483. #define DMC400_T_RP(n) (((n)&0x1f) << 0)
  1484. // t_rpall
  1485. #define DMC400_T_RPALL(n) (((n)&0x1f) << 0)
  1486. // t_rrd
  1487. #define DMC400_T_RRD(n) (((n)&0xf) << 0)
  1488. // t_faw
  1489. #define DMC400_T_FAW(n) (((n)&0x3f) << 0)
  1490. // read_latency
  1491. #define DMC400_READ_LATENCY(n) (((n)&0xf) << 0)
  1492. // t_rtr
  1493. #define DMC400_T_RTR(n) (((n)&0xf) << 0)
  1494. // t_rtw
  1495. #define DMC400_T_RTW(n) (((n)&0x1f) << 0)
  1496. // t_rtp
  1497. #define DMC400_T_RTP(n) (((n)&0xf) << 0)
  1498. // write_latency
  1499. #define DMC400_WRITE_LATENCY(n) (((n)&0xf) << 0)
  1500. // t_wr
  1501. #define DMC400_T_WR(n) (((n)&0x1f) << 0)
  1502. // t_wtr
  1503. #define DMC400_T_WTR(n) (((n)&0x1f) << 0)
  1504. #define DMC400_T_WTR_CS(n) (((n)&0x1f) << 16)
  1505. // t_wtw
  1506. #define DMC400_T_WTW(n) (((n)&0x3f) << 16)
  1507. // t_eckd
  1508. #define DMC400_T_ECKD(n) (((n)&0xf) << 0)
  1509. // t_xckd
  1510. #define DMC400_T_XCKD(n) (((n)&0xf) << 0)
  1511. // t_ep
  1512. #define DMC400_T_EP(n) (((n)&0xf) << 0)
  1513. // t_xp
  1514. #define DMC400_T_XP(n) (((n)&0x1f) << 0)
  1515. #define DMC400_T_XPDLL(n) (((n)&0x1f) << 16)
  1516. // t_esr
  1517. #define DMC400_T_ESR(n) (((n)&0x1ff) << 0)
  1518. // t_xsr
  1519. #define DMC400_T_XSR(n) (((n)&0x3ff) << 0)
  1520. #define DMC400_T_XSRDLL(n) (((n)&0x3ff) << 16)
  1521. // t_srckd
  1522. #define DMC400_T_SRCKD(n) (((n)&0xf) << 0)
  1523. // t_cksrd
  1524. #define DMC400_T_CKSRD(n) (((n)&0xf) << 0)
  1525. // t_rddata_en
  1526. #define DMC400_T_RDDATA_EN(n) (((n)&0xf) << 0)
  1527. // t_phywrlat
  1528. #define DMC400_T_PHYWRLAT(n) (((n)&0xf) << 0)
  1529. #define DMC400_T_PHYWRDATA (1 << 8)
  1530. // rdlvl_control
  1531. #define DMC400_RDLVL_MODE(n) (((n)&0x3) << 0)
  1532. #define DMC400_RDLVL_MODE_NO_TRAINING (0 << 0)
  1533. #define DMC400_RDLVL_MODE_PHY_INDEPENDENT_MODE (1 << 0)
  1534. #define DMC400_RDLVL_MODE_PHY_EVALUATION_MODE (2 << 0)
  1535. #define DMC400_RDLVL_SETUP_MRS_PRIOR_TRAIN (0 << 4)
  1536. #define DMC400_RDLVL_SETUP_NOP_PRIOR_TRAIN (1 << 4)
  1537. #define DMC400_RDLVL_CMD_READ_FOR_TRAIN (0 << 8)
  1538. #define DMC400_RDLVL_CMD_MRR_FOR_TRAIN (1 << 8)
  1539. #define DMC400_RDLVL_REFRESH_PRECHARGEALL_PRIOR_TRAIN (0 << 12)
  1540. #define DMC400_RDLVL_REFRESH_PRECHARGEALL_AUTOREFRESH_PRIOR_TRAIN (1 << 12)
  1541. #define DMC400_RDLVL_REG_SEL_MR32_FOR_TRAIN (0 << 16)
  1542. #define DMC400_RDLVL_REG_SEL_MR40_FOR_TRAIN (1 << 16)
  1543. #define DMC400_RDLVL_MODE_V_NO_TRAINING (0)
  1544. #define DMC400_RDLVL_MODE_V_PHY_INDEPENDENT_MODE (1)
  1545. #define DMC400_RDLVL_MODE_V_PHY_EVALUATION_MODE (2)
  1546. #define DMC400_RDLVL_SETUP_V_MRS_PRIOR_TRAIN (0)
  1547. #define DMC400_RDLVL_SETUP_V_NOP_PRIOR_TRAIN (1)
  1548. #define DMC400_RDLVL_CMD_V_READ_FOR_TRAIN (0)
  1549. #define DMC400_RDLVL_CMD_V_MRR_FOR_TRAIN (1)
  1550. #define DMC400_RDLVL_REFRESH_V_PRECHARGEALL_PRIOR_TRAIN (0)
  1551. #define DMC400_RDLVL_REFRESH_V_PRECHARGEALL_AUTOREFRESH_PRIOR_TRAIN (1)
  1552. #define DMC400_RDLVL_REG_SEL_V_MR32_FOR_TRAIN (0)
  1553. #define DMC400_RDLVL_REG_SEL_V_MR40_FOR_TRAIN (1)
  1554. // rdlvl_mrs
  1555. #define DMC400_RDLVL_MRS(n) (((n)&0x7) << 0)
  1556. // rdlvl_direct
  1557. #define DMC400_RDLVL_REQ(n) (((n)&0x3) << 0)
  1558. #define DMC400_RDLVL_REQ_READ_EYE_TRAIN (1 << 0)
  1559. #define DMC400_RDLVL_REQ_READ_GATE_TRAIN (2 << 0)
  1560. #define DMC400_RDLVL_CHIP_ADDR_CHIP_0 (0 << 24)
  1561. #define DMC400_RDLVL_CHIP_ADDR_CHIP_1 (1 << 24)
  1562. #define DMC400_RDLVL_CHANNEL_ADDR_CHANNEL_0 (0 << 28)
  1563. #define DMC400_RDLVL_CHANNEL_ADDR_CHANNEL_1 (1 << 28)
  1564. #define DMC400_RDLVL_REQ_V_READ_EYE_TRAIN (1)
  1565. #define DMC400_RDLVL_REQ_V_READ_GATE_TRAIN (2)
  1566. #define DMC400_RDLVL_CHIP_ADDR_V_CHIP_0 (0)
  1567. #define DMC400_RDLVL_CHIP_ADDR_V_CHIP_1 (1)
  1568. #define DMC400_RDLVL_CHANNEL_ADDR_V_CHANNEL_0 (0)
  1569. #define DMC400_RDLVL_CHANNEL_ADDR_V_CHANNEL_1 (1)
  1570. // t_rdlvl_en
  1571. #define DMC400_T_RDLVL_EN(n) (((n)&0x3f) << 0)
  1572. // t_rdlvl_rr
  1573. #define DMC400_T_RDLVL_RR(n) (((n)&0x3f) << 0)
  1574. // wrlvl_control
  1575. #define DMC400_WRLVL_MODE(n) (((n)&0x3) << 0)
  1576. #define DMC400_WRLVL_MODE_NO_TRAINING (0 << 0)
  1577. #define DMC400_WRLVL_MODE_PHY_INDEPENDENT_MODE (1 << 0)
  1578. #define DMC400_WRLVL_MODE_PHY_EVALUATION_MODE (2 << 0)
  1579. #define DMC400_WRLVL_REFRESH_PRECHARGEALL_PRIOR_TRAIN (0 << 12)
  1580. #define DMC400_WRLVL_REFRESH_PRECHARGEALL_AUTOREFRESH_PRIOR_TRAIN (1 << 12)
  1581. #define DMC400_WRLVL_MODE_V_NO_TRAINING (0)
  1582. #define DMC400_WRLVL_MODE_V_PHY_INDEPENDENT_MODE (1)
  1583. #define DMC400_WRLVL_MODE_V_PHY_EVALUATION_MODE (2)
  1584. #define DMC400_WRLVL_REFRESH_V_PRECHARGEALL_PRIOR_TRAIN (0)
  1585. #define DMC400_WRLVL_REFRESH_V_PRECHARGEALL_AUTOREFRESH_PRIOR_TRAIN (1)
  1586. // wrlvl_mrs
  1587. #define DMC400_WRLVL_MRS(n) (((n)&0x1fff) << 0)
  1588. // wrlvl_direct
  1589. #define DMC400_WRLVL_REQ (1 << 0)
  1590. #define DMC400_WRLVL_CHIP_ADDR_CHIP_0 (0 << 24)
  1591. #define DMC400_WRLVL_CHIP_ADDR_CHIP_1 (1 << 24)
  1592. #define DMC400_WRLVL_CHANNEL_ADDR_CHANNEL_0 (0 << 28)
  1593. #define DMC400_WRLVL_CHANNEL_ADDR_CHANNEL_1 (1 << 28)
  1594. #define DMC400_WRLVL_CHIP_ADDR_V_CHIP_0 (0)
  1595. #define DMC400_WRLVL_CHIP_ADDR_V_CHIP_1 (1)
  1596. #define DMC400_WRLVL_CHANNEL_ADDR_V_CHANNEL_0 (0)
  1597. #define DMC400_WRLVL_CHANNEL_ADDR_V_CHANNEL_1 (1)
  1598. // t_wrlvl_en
  1599. #define DMC400_T_WRLVL_EN(n) (((n)&0x3f) << 0)
  1600. // t_wrlvl_ww
  1601. #define DMC400_T_WRLVL_WW(n) (((n)&0x3f) << 0)
  1602. // phy_power_control
  1603. #define DMC400_LP_WR_EN_DISABLE (0 << 0)
  1604. #define DMC400_LP_WR_EN_ENABLE (1 << 0)
  1605. #define DMC400_LP_RD_EN_DISABLE (0 << 1)
  1606. #define DMC400_LP_RD_EN_ENABLE (1 << 1)
  1607. #define DMC400_LP_IDLE_EN_DISABLE (0 << 2)
  1608. #define DMC400_LP_IDLE_EN_ENABLE (1 << 2)
  1609. #define DMC400_LP_PD_EN_DISABLE (0 << 3)
  1610. #define DMC400_LP_PD_EN_ENABLE (1 << 3)
  1611. #define DMC400_LP_SREF_EN_DISABLE (0 << 4)
  1612. #define DMC400_LP_SREF_EN_ENABLE (1 << 4)
  1613. #define DMC400_LP_DPD_EN_DISABLE (0 << 5)
  1614. #define DMC400_LP_DPD_EN_ENABLE (1 << 5)
  1615. #define DMC400_LP_WAKEUP_WR(n) (((n)&0xf) << 8)
  1616. #define DMC400_LP_WAKEUP_RD(n) (((n)&0xf) << 12)
  1617. #define DMC400_LP_WAKEUP_IDLE(n) (((n)&0xf) << 16)
  1618. #define DMC400_LP_WAKEUP_PD(n) (((n)&0xf) << 20)
  1619. #define DMC400_LP_WAKEUP_SREF(n) (((n)&0xf) << 24)
  1620. #define DMC400_LP_WAKEUP_DPD(n) (((n)&0xf) << 28)
  1621. #define DMC400_LP_WR_EN_V_DISABLE (0)
  1622. #define DMC400_LP_WR_EN_V_ENABLE (1)
  1623. #define DMC400_LP_RD_EN_V_DISABLE (0)
  1624. #define DMC400_LP_RD_EN_V_ENABLE (1)
  1625. #define DMC400_LP_IDLE_EN_V_DISABLE (0)
  1626. #define DMC400_LP_IDLE_EN_V_ENABLE (1)
  1627. #define DMC400_LP_PD_EN_V_DISABLE (0)
  1628. #define DMC400_LP_PD_EN_V_ENABLE (1)
  1629. #define DMC400_LP_SREF_EN_V_DISABLE (0)
  1630. #define DMC400_LP_SREF_EN_V_ENABLE (1)
  1631. #define DMC400_LP_DPD_EN_V_DISABLE (0)
  1632. #define DMC400_LP_DPD_EN_V_ENABLE (1)
  1633. // phy_update_control
  1634. #define DMC400_PHYUPD_TYPE_00(n) (((n)&0x3) << 0)
  1635. #define DMC400_PHYUPD_TYPE_00_SREF (0 << 0)
  1636. #define DMC400_PHYUPD_TYPE_00_STALL (1 << 0)
  1637. #define DMC400_PHYUPD_TYPE_00_REFNSTALL (2 << 0)
  1638. #define DMC400_PHYUPD_TYPE_00_DEFER (3 << 0)
  1639. #define DMC400_PHYUPD_TYPE_01(n) (((n)&0x3) << 2)
  1640. #define DMC400_PHYUPD_TYPE_01_SREF (0 << 2)
  1641. #define DMC400_PHYUPD_TYPE_01_STALL (1 << 2)
  1642. #define DMC400_PHYUPD_TYPE_01_REFNSTALL (2 << 2)
  1643. #define DMC400_PHYUPD_TYPE_01_DEFER (3 << 2)
  1644. #define DMC400_PHYUPD_TYPE_10(n) (((n)&0x3) << 4)
  1645. #define DMC400_PHYUPD_TYPE_10_SREF (0 << 4)
  1646. #define DMC400_PHYUPD_TYPE_10_STALL (1 << 4)
  1647. #define DMC400_PHYUPD_TYPE_10_REFNSTALL (2 << 4)
  1648. #define DMC400_PHYUPD_TYPE_10_DEFER (3 << 4)
  1649. #define DMC400_PHYUPD_TYPE_11(n) (((n)&0x3) << 6)
  1650. #define DMC400_PHYUPD_TYPE_11_SREF (0 << 6)
  1651. #define DMC400_PHYUPD_TYPE_11_STALL (1 << 6)
  1652. #define DMC400_PHYUPD_TYPE_11_REFNSTALL (2 << 6)
  1653. #define DMC400_PHYUPD_TYPE_11_DEFER (3 << 6)
  1654. #define DMC400_PHYUPD_TYPE_00_V_SREF (0)
  1655. #define DMC400_PHYUPD_TYPE_00_V_STALL (1)
  1656. #define DMC400_PHYUPD_TYPE_00_V_REFNSTALL (2)
  1657. #define DMC400_PHYUPD_TYPE_00_V_DEFER (3)
  1658. #define DMC400_PHYUPD_TYPE_01_V_SREF (0)
  1659. #define DMC400_PHYUPD_TYPE_01_V_STALL (1)
  1660. #define DMC400_PHYUPD_TYPE_01_V_REFNSTALL (2)
  1661. #define DMC400_PHYUPD_TYPE_01_V_DEFER (3)
  1662. #define DMC400_PHYUPD_TYPE_10_V_SREF (0)
  1663. #define DMC400_PHYUPD_TYPE_10_V_STALL (1)
  1664. #define DMC400_PHYUPD_TYPE_10_V_REFNSTALL (2)
  1665. #define DMC400_PHYUPD_TYPE_10_V_DEFER (3)
  1666. #define DMC400_PHYUPD_TYPE_11_V_SREF (0)
  1667. #define DMC400_PHYUPD_TYPE_11_V_STALL (1)
  1668. #define DMC400_PHYUPD_TYPE_11_V_REFNSTALL (2)
  1669. #define DMC400_PHYUPD_TYPE_11_V_DEFER (3)
  1670. // user_status
  1671. #define DMC400_USER_STATUS(n) (((n)&0xff) << 0)
  1672. // user_config0
  1673. #define DMC400_USER_CONFIG0(n) (((n)&0xff) << 0)
  1674. // user_config1
  1675. #define DMC400_USER_CONFIG1(n) (((n)&0xff) << 0)
  1676. // integ_cfg
  1677. #define DMC400_INTEG_TEST_EN (1 << 0)
  1678. // integ_outputs
  1679. #define DMC400_COMBINED_INTEG (1 << 0)
  1680. #define DMC400_ECC_SEC_INTEG (1 << 1)
  1681. #define DMC400_ECC_DED_INTEG (1 << 2)
  1682. #define DMC400_ECC_OVERFLOW_INTEG (1 << 3)
  1683. // periph_id_0
  1684. #define DMC400_PART_0(n) (((n)&0xff) << 0)
  1685. // periph_id_1
  1686. #define DMC400_PART_1(n) (((n)&0xf) << 0)
  1687. #define DMC400_DES_0(n) (((n)&0xf) << 4)
  1688. // periph_id_2
  1689. #define DMC400_DES_1(n) (((n)&0x7) << 0)
  1690. #define DMC400_JEDEC (1 << 3)
  1691. #define DMC400_REVISION(n) (((n)&0xf) << 4)
  1692. // periph_id_3
  1693. #define DMC400_CMOD(n) (((n)&0xff) << 0)
  1694. // component_id_0
  1695. #define DMC400_PRMBL_0(n) (((n)&0xff) << 0)
  1696. // component_id_1
  1697. #define DMC400_PRMBL_1(n) (((n)&0xf) << 0)
  1698. #define DMC400_PCLASS(n) (((n)&0xf) << 4)
  1699. // component_id_2
  1700. #define DMC400_PRMBL_2(n) (((n)&0xff) << 0)
  1701. // component_id_3
  1702. #define DMC400_PRMBL_3(n) (((n)&0xff) << 0)
  1703. #endif // _DMC400_H_