mnpmusrammsgblock_lpddr4.h 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925
  1. /*
  2. * Copyright (C) 2021-2024, STMicroelectronics - All Rights Reserved
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef MNPMUSRAMMSGBLOCK_LPDDR4_H
  7. #define MNPMUSRAMMSGBLOCK_LPDDR4_H
  8. /* LPDDR4_1D training firmware message block structure
  9. *
  10. * Please refer to the Training Firmware App Note for futher information about
  11. * the usage for Message Block.
  12. */
  13. struct pmu_smb_ddr_1d {
  14. uint8_t reserved00; /*
  15. * Byte offset 0x00, CSR Addr 0x54000, Direction=In
  16. * reserved00[0:4] RFU, must be zero
  17. *
  18. * reserved00[5] = Quick Rd2D during 1D Training
  19. * 0x1 = Read Deskew will begin by enabling and quickly
  20. * training the phy's per-lane reference voltages.
  21. * Training the vrefDACs CSRs will increase the maximum 1D
  22. * training time by around half a millisecond, but will
  23. * improve 1D training accuracy on systems with
  24. * significant voltage-offsets between lane read eyes.
  25. * 0x0 = Read Deskew will assume the messageblock's
  26. * phyVref setting is optimal for all lanes.
  27. *
  28. * reserved00[6] = Enable High Effort WrDQ1D
  29. * 0x1 = WrDQ1D will conditionally retry training at
  30. * several extra RxClkDly Timings. This will increase the
  31. * maximum 1D training time by up to 4 extra iterations of
  32. * WrDQ1D. This is only required in systems that suffer
  33. * from very large, asymmetric eye-collapse when receiving
  34. * PRBS patterns.
  35. * 0x0 = WrDQ1D assume rxClkDly values found by SI
  36. * Friendly RdDqs1D will work for receiving PRBS patterns
  37. *
  38. * reserved00[7] = Optimize for the special hard macros in
  39. * TSMC28.
  40. * 0x1 = set if the phy being trained was manufactured in
  41. * any TSMC28 process node.
  42. * 0x0 = otherwise, when not training a TSMC28 phy, leave
  43. * this field as 0.
  44. */
  45. uint8_t msgmisc; /*
  46. * Byte offset 0x01, CSR Addr 0x54000, Direction=In
  47. * Contains various global options for training.
  48. *
  49. * Bit fields:
  50. *
  51. * msgmisc[0] MTESTEnable
  52. * 0x1 = Pulse primary digital test output bump at the end
  53. * of each major training stage. This enables observation
  54. * of training stage completion by observing the digital
  55. * test output.
  56. * 0x0 = Do not pulse primary digital test output bump
  57. *
  58. * msgmisc[1] SimulationOnlyReset
  59. * 0x1 = Verilog only simulation option to shorten
  60. * duration of DRAM reset pulse length to 1ns.
  61. * Must never be set to 1 in silicon.
  62. * 0x0 = Use reset pulse length specified by JEDEC
  63. * standard.
  64. *
  65. * msgmisc[2] SimulationOnlyTraining
  66. * 0x1 = Verilog only simulation option to shorten the
  67. * duration of the training steps by performing fewer
  68. * iterations.
  69. * Must never be set to 1 in silicon.
  70. * 0x0 = Use standard training duration.
  71. *
  72. * msgmisc[3] Disable Boot Clock
  73. * 0x1 = Disable boot frequency clock when initializing
  74. * DRAM. (not recommended)
  75. * 0x0 = Use Boot Frequency Clock
  76. *
  77. * msgmisc[4] Suppress streaming messages, including
  78. * assertions, regardless of hdtctrl setting.
  79. * Stage Completion messages, as well as training completion
  80. * and error messages are still sent depending on hdtctrl
  81. * setting.
  82. *
  83. * msgmisc[5] PerByteMaxRdLat
  84. * 0x1 = Each DBYTE will return dfi_rddata_valid at the
  85. * lowest possible latency. This may result in unaligned
  86. * data between bytes to be returned to the DFI.
  87. * 0x0 = Every DBYTE will return dfi_rddata_valid
  88. * simultaneously. This will ensure that data bytes will
  89. * return aligned accesses to the DFI.
  90. *
  91. * msgmisc[7-6] RFU, must be zero
  92. *
  93. * Notes:
  94. *
  95. * - SimulationOnlyReset and SimulationOnlyTraining can be
  96. * used to speed up simulation run times, and must never
  97. * be used in real silicon. Some VIPs may have checks on
  98. * DRAM reset parameters that may need to be disabled when
  99. * using SimulationOnlyReset.
  100. */
  101. uint16_t pmurevision; /*
  102. * Byte offset 0x02, CSR Addr 0x54001, Direction=Out
  103. * PMU firmware revision ID
  104. * After training is run, this address will contain the
  105. * revision ID of the firmware
  106. */
  107. uint8_t pstate; /*
  108. * Byte offset 0x04, CSR Addr 0x54002, Direction=In
  109. * Must be set to the target pstate to be trained
  110. * 0x0 = pstate 0
  111. * 0x1 = pstate 1
  112. * 0x2 = pstate 2
  113. * 0x3 = pstate 3
  114. * All other encodings are reserved
  115. */
  116. uint8_t pllbypassen; /*
  117. * Byte offset 0x05, CSR Addr 0x54002, Direction=In
  118. * Set according to whether target pstate uses PHY PLL
  119. * bypass
  120. * 0x0 = PHY PLL is enabled for target pstate
  121. * 0x1 = PHY PLL is bypassed for target pstate
  122. */
  123. uint16_t dramfreq; /*
  124. * Byte offset 0x06, CSR Addr 0x54003, Direction=In
  125. * DDR data rate for the target pstate in units of MT/s.
  126. * For example enter 0x0640 for DDR1600.
  127. */
  128. uint8_t dfifreqratio; /*
  129. * Byte offset 0x08, CSR Addr 0x54004, Direction=In
  130. * Frequency ratio betwen DfiCtlClk and SDRAM memclk.
  131. * 0x1 = 1:1
  132. * 0x2 = 1:2
  133. * 0x4 = 1:4
  134. */
  135. uint8_t bpznresval; /*
  136. * Byte offset 0x09, CSR Addr 0x54004, Direction=In
  137. * Overwrite the value of precision resistor connected to
  138. * Phy BP_ZN
  139. * 0x00 = Do not program. Use current CSR value.
  140. * 0xf0 = 240 Ohm
  141. * 0x78 = 120 Ohm
  142. * 0x28 = 40 Ohm
  143. * All other values are reserved.
  144. * It is recommended to set this to 0x00.
  145. */
  146. uint8_t phyodtimpedance; /*
  147. * Byte offset 0x0a, CSR Addr 0x54005, Direction=In
  148. * Must be programmed to the termination impedance in ohms
  149. * used by PHY during reads.
  150. *
  151. * 0x0 = Firmware skips programming (must be manually
  152. * programmed by user prior to training start)
  153. *
  154. * See PHY databook for legal termination impedance values.
  155. *
  156. * For digital simulation, any legal value can be used. For
  157. * silicon, the users must determine the correct value
  158. * through SI simulation or other methods.
  159. */
  160. uint8_t phydrvimpedance; /*
  161. * Byte offset 0x0b, CSR Addr 0x54005, Direction=In
  162. * Must be programmed to the driver impedance in ohms used
  163. * by PHY during writes for all DBYTE drivers
  164. * (DQ/DM/DBI/DQS).
  165. *
  166. * 0x0 = Firmware skips programming (must be manually
  167. * programmed by user prior to training start)
  168. *
  169. * See PHY databook for legal R_on driver impedance values.
  170. *
  171. * For digital simulation, any value can be used that is not
  172. * Hi-Z. For silicon, the users must determine the correct
  173. * value through SI simulation or other methods.
  174. */
  175. uint8_t phyvref; /*
  176. * Byte offset 0x0c, CSR Addr 0x54006, Direction=In
  177. * Must be programmed with the Vref level to be used by the
  178. * PHY during reads
  179. *
  180. * The units of this field are a percentage of VDDQ
  181. * according to the following equation:
  182. *
  183. * Receiver Vref = VDDQ*phyvref[6:0]/128
  184. *
  185. * For example to set Vref at 0.25*VDDQ, set this field to
  186. * 0x20.
  187. *
  188. * For digital simulation, any legal value can be used. For
  189. * silicon, the users must calculate the analytical Vref by
  190. * using the impedances, terminations, and series resistance
  191. * present in the system.
  192. */
  193. uint8_t lp4misc; /*
  194. * Byte offset 0x0d, CSR Addr 0x54006, Direction=In
  195. * Lp4 specific options for training.
  196. *
  197. * Bit fields:
  198. *
  199. * lp4misc[0] Enable dfi_reset_n
  200. *
  201. * 0x0 = (Recommended) PHY internal registers control
  202. * memreset during training, and also after training.
  203. * dfi_reset_n cannot control the PHY BP_MEMRESET_L pin.
  204. *
  205. * 0x1 = Enables dfi_reset_n to control memreset after
  206. * training. PHY Internal registers control memreset
  207. * during training only. To ensure that no glitches occur
  208. * on BP_MEMRESET at the end of training, The MC must
  209. * drive dfi_reset_n=1'b1 _prior to starting training_
  210. *
  211. * lp4misc[7-1] RFU, must be zero
  212. */
  213. uint8_t reserved0e; /*
  214. * Byte offset 0x0e, CSR Addr 0x54007, Direction=In
  215. * Bit Field for enabling optional 2D training features
  216. * that impact both Rx2D and Tx2D.
  217. *
  218. * reserved0E[0:3]: bitTimeControl
  219. * input for the amount of data bits 2D writes/reads per DQ
  220. * before deciding if any specific voltage and delay setting
  221. * passes or fails. Every time this input increases by 1,
  222. * the number of 2D data comparisons is doubled. The 2D run
  223. * time will increase proportionally to the number of bit
  224. * times requested per point.
  225. * 0 = 288 bits per point (legacy behavior)
  226. * 1 = 576 bits per point
  227. * 2 = 1.125 kilobits per point
  228. * . . .
  229. * 15 = 9 megabits per point
  230. *
  231. * reserved0E[4]: Exhaustive2D
  232. * 0 = 2D optimization assumes the optimal trained point
  233. * is near the 1D trained point (legacy behavior)
  234. * 1 = 2D optimization searches the entire passing region
  235. * at the cost of run time. Recommended for optimal
  236. * results any time the optimal trained point is expected
  237. * to be near the edges of the eyes instead of near the 1D
  238. * trained point.
  239. *
  240. * reserved0E[5]: Detect Vref Eye Truncation, ignored if
  241. * eyeWeight2DControl == 0.
  242. * 0 = 2D optimizes for the passing region it can measure.
  243. * 1 = For every eye, 2D checks If the legal voltage range
  244. * truncated the eye. If the true voltage margin cannot be
  245. * measured, 2D will optimize heavily for delay margin
  246. * instead of using incomplete voltage margin data. Eyes
  247. * that are not truncated will still be optimized using
  248. * user programmed weights.
  249. *
  250. * reserved0E[6]: eyeWeight2DControl
  251. * 0 = Use 8 bit weights for Delay_Weight2D and
  252. * Voltage_Weight2D and disable TrunkV behavior.
  253. * 1 = Use 4 bit weights for Delay_weight2D and
  254. * Voltage_Weight2D and enable TrunkV behavior.
  255. *
  256. * reserved0E[7]: RFU, must be 0
  257. */
  258. uint8_t cstestfail; /*
  259. * Byte offset 0x0f, CSR Addr 0x54007, Direction=Out
  260. * This field will be set if training fails on any rank.
  261. * 0x0 = No failures
  262. * non-zero = one or more ranks failed training
  263. */
  264. uint16_t sequencectrl; /*
  265. * Byte offset 0x10, CSR Addr 0x54008, Direction=In
  266. * Controls the training steps to be run. Each bit
  267. * corresponds to a training step.
  268. *
  269. * If the bit is set to 1, the training step will run.
  270. * If the bit is set to 0, the training step will be
  271. * skipped.
  272. *
  273. * Training step to bit mapping:
  274. * sequencectrl[0] = Run DevInit - Device/phy
  275. * initialization. Should always be set.
  276. * sequencectrl[1] = Run WrLvl - Write leveling
  277. * sequencectrl[2] = Run RxEn - Read gate training
  278. * sequencectrl[3] = Run RdDQS1D - 1d read dqs training
  279. * sequencectrl[4] = Run WrDQ1D - 1d write dq training
  280. * sequencectrl[5] = RFU, must be zero
  281. * sequencectrl[6] = RFU, must be zero
  282. * sequencectrl[7] = RFU, must be zero
  283. * sequencectrl[8] = Run RdDeskew - Per lane read dq deskew
  284. * training
  285. * sequencectrl[9] = Run MxRdLat - Max read latency training
  286. * sequencectrl[11-10] = RFU, must be zero
  287. * sequencectrl[12] = Run LPCA - CA Training
  288. * sequencectrl[15-13] = RFU, must be zero
  289. */
  290. uint8_t hdtctrl; /*
  291. * Byte offset 0x12, CSR Addr 0x54009, Direction=In
  292. * To control the total number of debug messages, a
  293. * verbosity subfield (hdtctrl, Hardware Debug Trace
  294. * Control) exists in the message block. Every message has a
  295. * verbosity level associated with it, and as the hdtctrl
  296. * value is increased, less important s messages stop being
  297. * sent through the mailboxes. The meanings of several major
  298. * hdtctrl thresholds are explained below:
  299. *
  300. * 0x04 = Maximal debug messages (e.g., Eye contours)
  301. * 0x05 = Detailed debug messages (e.g. Eye delays)
  302. * 0x0A = Coarse debug messages (e.g. rank information)
  303. * 0xC8 = Stage completion
  304. * 0xC9 = Assertion messages
  305. * 0xFF = Firmware completion messages only
  306. */
  307. uint8_t reserved13; /*
  308. * Byte offset 0x13, CSR Addr 0x54009, Direction=In
  309. *
  310. * 0 = Default operation, unchanged.
  311. * Others = RD DQ calibration Training steps are completed
  312. * with user specified pattern.
  313. */
  314. uint8_t reserved14; /*
  315. * Byte offset 0x14, CSR Addr 0x5400a, Direction=In
  316. * Configure rd2D search iteration from a starting seed
  317. * point:
  318. *
  319. * reserved14[5:0]: If reserved14[6] is 0, Number of search
  320. * iterations (if 0, then default is 20); otherwise if this
  321. * value non zero, this value is used as a delta to filter
  322. * out points during the averaging: when averaging over a
  323. * dimension (delay or voltage), the points having a margin
  324. * smaller than the max of the eye in this dimension by at
  325. * least this delta value are filtered out.
  326. *
  327. * reserved14[6]: If set, instead of search, extract center
  328. * using an averaging function over the eye surface area,
  329. * where some points can be filtered out using
  330. * reserved14[5:0]
  331. *
  332. * reserved14[7]: if set, start search with large step size,
  333. * decreasing at each 4 iterations, down to 1 (do not care
  334. * if reserved14[6] is set)
  335. */
  336. uint8_t reserved15; /*
  337. * Byte offset 0x15, CSR Addr 0x5400a, Direction=In
  338. * Configure wr2D search iteration from a starting seed
  339. * point:
  340. *
  341. * reserved15[5:0]: If reserved15[6] is 0, Number of search
  342. * iterations (if 0, then default is 20); otherwise if this
  343. * value non zero, this value is used as a delta to filter
  344. * out points during the averaging: when averaging over a
  345. * dimension (delay or voltage), the points having a margin
  346. * smaller than the max of the eye in this dimension by at
  347. * least this delta value are filtered out.
  348. *
  349. * reserved15[6]: If set, instead of search, extract center
  350. * using an averaging function over the eye surface area,
  351. * where some points can be filtered out using
  352. * reserved15[5:0]
  353. *
  354. * reserved15[7]: if set, start search with large step size,
  355. * decreasing at each 4 iterations, down to 1 (do not care
  356. * if reserved15[6] is set)
  357. */
  358. uint8_t dfimrlmargin; /*
  359. * Byte offset 0x16, CSR Addr 0x5400b, Direction=In
  360. * Margin added to smallest passing trained DFI Max Read
  361. * Latency value, in units of DFI clocks. Recommended to be
  362. * >= 1.
  363. *
  364. * This margin must include the maximum positive drift
  365. * expected in tDQSCK over the target temperature and
  366. * voltage range of the users system.
  367. */
  368. uint8_t reserved17; /*
  369. * Byte offset 0x17, CSR Addr 0x5400b, Direction=In
  370. * Configure DB from which extra info is dump during 2D
  371. * training when maximal debug is set:
  372. *
  373. * reserved17[3:0]: first DB
  374. *
  375. * reserved17[7:4]: number of DB, including first DB (if 0,
  376. * no extra debug per DB is dump)
  377. */
  378. uint8_t usebroadcastmr; /*
  379. * Byte offset 0x18, CSR Addr 0x5400c, Direction=In
  380. * Training firmware can optionally set per rank mode
  381. * register values for DRAM partial array self-refresh
  382. * features if desired.
  383. *
  384. * 0x0 = Use mr<1:4, 11:14, 16:17, 22, 24>_a0 for rank 0
  385. * channel A
  386. * Use mr<1:4, 11:14, 16:17, 22, 24>_b0 for rank 0
  387. * channel B
  388. * Use mr<1:4, 11:14, 16:17, 22, 24>_a1 for rank 1
  389. * channel A
  390. * Use mr<1:4, 11:14, 16:17, 22, 24>_b1 for rank 1
  391. * channel B
  392. *
  393. * 0x1 = Use mr<1:4, 11:14, 16:17, 22, 24>_a0 setting for
  394. * all channels/ranks
  395. *
  396. * It is recommended in most LPDDR4 system configurations
  397. * to set this to 1.
  398. * It is recommended in LPDDR4x system configurations to
  399. * set this to 0.
  400. */
  401. uint8_t lp4quickboot; /*
  402. * Byte offset 0x19, CSR Addr 0x5400c, Direction=In
  403. * Enable Quickboot. It must be set to 0x0 since Quickboot
  404. * is only supported in dedicated Quickboot firmware.
  405. */
  406. uint8_t reserved1a; /*
  407. * Byte offset 0x1a, CSR Addr 0x5400d, Direction=In
  408. * Input for constraining the range of vref(DQ) values
  409. * training will collect data for, usually reducing training
  410. * time. However, too large of a voltage range may cause
  411. * longer 2D training times while too small of a voltage
  412. * range may truncate passing regions. When in doubt, leave
  413. * this field set to 0.
  414. * Used by 2D stages: Rd2D, Wr2D
  415. *
  416. * reserved1A[0-3]: Rd2D Voltage Range
  417. * 0 = Training will search all phy vref(DQ) settings
  418. * 1 = limit to +/-2 %VDDQ from phyVref
  419. * 2 = limit to +/-4 %VDDQ from phyVref
  420. * . . .
  421. * 15 = limit to +/-30% VDDQ from phyVref
  422. *
  423. * reserved1A[4-7]: Wr2D Voltage Range
  424. * 0 = Training will search all dram vref(DQ) settings
  425. * 1 = limit to +/-2 %VDDQ from mr14
  426. * 2 = limit to +/-4 %VDDQ from mr14
  427. * . . .
  428. * 15 = limit to +/-30% VDDQ from mr14
  429. */
  430. uint8_t catrainopt; /*
  431. * Byte offset 0x1b, CSR Addr 0x5400d, Direction=In
  432. * CA training option bit field
  433. * [0] CA VREF Training
  434. * 1 = Enable CA VREF Training
  435. * 0 = Disable CA VREF Training
  436. * WARNING: catrainopt[0] must be set to the same value in
  437. * 1D and 2D training.
  438. *
  439. * [1] Train terminated Rank only
  440. * 1 = Only train terminated rank in CA training
  441. * 0 = Train all ranks in CA training
  442. *
  443. * [2-7] RFU must be zero
  444. */
  445. uint8_t x8mode; /*
  446. * Byte offset 0x1c, CSR Addr 0x5400e, Direction=In
  447. * X8 mode configuration:
  448. * 0x0 = x16 configuration for all devices
  449. * 0xF = x8 configuration for all devices
  450. * All other values are RFU
  451. */
  452. uint8_t reserved1d; /* Byte offset 0x1d, CSR Addr 0x5400e, Direction=N/A */
  453. uint8_t reserved1e; /* Byte offset 0x1e, CSR Addr 0x5400f, Direction=N/A */
  454. uint8_t share2dvrefresult; /*
  455. * Byte offset 0x1f, CSR Addr 0x5400f, Direction=In
  456. * Bitmap that designates the phy's vref source for every
  457. * pstate
  458. * If share2dvrefresult[x] = 0, then after 2D training,
  459. * pstate x will continue using the phyVref provided in
  460. * pstate x's 1D messageblock.
  461. * If share2dvrefresult[x] = 1, then after 2D training,
  462. * pstate x will use the per-lane VrefDAC0/1 CSRs trained by
  463. * 2d training.
  464. */
  465. uint8_t reserved20; /* Byte offset 0x20, CSR Addr 0x54010, Direction=N/A */
  466. uint8_t reserved21; /* Byte offset 0x21, CSR Addr 0x54010, Direction=N/A */
  467. uint16_t phyconfigoverride; /*
  468. * Byte offset 0x22, CSR Addr 0x54011, Direction=In
  469. * Override PhyConfig csr.
  470. * 0x0: Use hardware csr value for PhyConfing
  471. * (recommended)
  472. * Other values: Use value for PhyConfig instead of
  473. * Hardware value.
  474. *
  475. */
  476. uint8_t enableddqscha; /*
  477. * Byte offset 0x24, CSR Addr 0x54012, Direction=In
  478. * Total number of DQ bits enabled in PHY Channel A
  479. */
  480. uint8_t cspresentcha; /*
  481. * Byte offset 0x25, CSR Addr 0x54012, Direction=In
  482. * Indicates presence of DRAM at each chip select for PHY
  483. * channel A.
  484. * 0x1 = CS0 is populated with DRAM
  485. * 0x3 = CS0 and CS1 are populated with DRAM
  486. *
  487. * All other encodings are illegal
  488. */
  489. int8_t cdd_cha_rr_1_0; /*
  490. * Byte offset 0x26, CSR Addr 0x54013, Direction=Out
  491. * This is a signed integer value.
  492. * Read to read critical delay difference from cs 1 to cs 0
  493. * on Channel A.
  494. */
  495. int8_t cdd_cha_rr_0_1; /*
  496. * Byte offset 0x27, CSR Addr 0x54013, Direction=Out
  497. * This is a signed integer value.
  498. * Read to read critical delay difference from cs 0 to cs 1
  499. * on Channel A.
  500. */
  501. int8_t cdd_cha_rw_1_1; /*
  502. * Byte offset 0x28, CSR Addr 0x54014, Direction=Out
  503. * This is a signed integer value.
  504. * Read to write critical delay difference from cs 1 to cs 1
  505. * on Channel A.
  506. */
  507. int8_t cdd_cha_rw_1_0; /*
  508. * Byte offset 0x29, CSR Addr 0x54014, Direction=Out
  509. * This is a signed integer value.
  510. * Read to write critical delay difference from cs 1 to cs 0
  511. * on Channel A.
  512. */
  513. int8_t cdd_cha_rw_0_1; /*
  514. * Byte offset 0x2a, CSR Addr 0x54015, Direction=Out
  515. * This is a signed integer value.
  516. * Read to write critical delay difference from cs 0 to cs 1
  517. * on Channel A.
  518. */
  519. int8_t cdd_cha_rw_0_0; /*
  520. * Byte offset 0x2b, CSR Addr 0x54015, Direction=Out
  521. * This is a signed integer value.
  522. * Read to write critical delay difference from cs0 to cs 0
  523. * on Channel A.
  524. */
  525. int8_t cdd_cha_wr_1_1; /*
  526. * Byte offset 0x2c, CSR Addr 0x54016, Direction=Out
  527. * This is a signed integer value.
  528. * Write to read critical delay difference from cs 1 to cs 1
  529. * on Channel A.
  530. */
  531. int8_t cdd_cha_wr_1_0; /*
  532. * Byte offset 0x2d, CSR Addr 0x54016, Direction=Out
  533. * This is a signed integer value.
  534. * Write to read critical delay difference from cs 1 to cs 0
  535. * on Channel A.
  536. */
  537. int8_t cdd_cha_wr_0_1; /*
  538. * Byte offset 0x2e, CSR Addr 0x54017, Direction=Out
  539. * This is a signed integer value.
  540. * Write to read critical delay difference from cs 0 to cs 1
  541. * on Channel A.
  542. */
  543. int8_t cdd_cha_wr_0_0; /*
  544. * Byte offset 0x2f, CSR Addr 0x54017, Direction=Out
  545. * This is a signed integer value.
  546. * Write to read critical delay difference from cs 0 to cs 0
  547. * on Channel A.
  548. */
  549. int8_t cdd_cha_ww_1_0; /*
  550. * Byte offset 0x30, CSR Addr 0x54018, Direction=Out
  551. * This is a signed integer value.
  552. * Write to write critical delay difference from cs 1 to cs
  553. * 0 on Channel A.
  554. */
  555. int8_t cdd_cha_ww_0_1; /*
  556. * Byte offset 0x31, CSR Addr 0x54018, Direction=Out
  557. * This is a signed integer value.
  558. * Write to write critical delay difference from cs 0 to cs
  559. * 1 on Channel A.
  560. */
  561. uint8_t mr1_a0; /*
  562. * Byte offset 0x32, CSR Addr 0x54019, Direction=In
  563. * Value to be programmed in DRAM Mode Register 1
  564. * {Channel A, Rank 0}
  565. */
  566. uint8_t mr2_a0; /*
  567. * Byte offset 0x33, CSR Addr 0x54019, Direction=In
  568. * Value to be programmed in DRAM Mode Register 2
  569. * {Channel A, Rank 0}
  570. */
  571. uint8_t mr3_a0; /*
  572. * Byte offset 0x34, CSR Addr 0x5401a, Direction=In
  573. * Value to be programmed in DRAM Mode Register 3
  574. * {Channel A, Rank 0}
  575. */
  576. uint8_t mr4_a0; /*
  577. * Byte offset 0x35, CSR Addr 0x5401a, Direction=In
  578. * Value to be programmed in DRAM Mode Register 4
  579. * {Channel A, Rank 0}
  580. */
  581. uint8_t mr11_a0; /*
  582. * Byte offset 0x36, CSR Addr 0x5401b, Direction=In
  583. * Value to be programmed in DRAM Mode Register 11
  584. * {Channel A, Rank 0}
  585. */
  586. uint8_t mr12_a0; /*
  587. * Byte offset 0x37, CSR Addr 0x5401b, Direction=In
  588. * Value to be programmed in DRAM Mode Register 12
  589. * {Channel A, Rank 0}
  590. */
  591. uint8_t mr13_a0; /*
  592. * Byte offset 0x38, CSR Addr 0x5401c, Direction=In
  593. * Value to be programmed in DRAM Mode Register 13
  594. * {Channel A, Rank 0}
  595. */
  596. uint8_t mr14_a0; /*
  597. * Byte offset 0x39, CSR Addr 0x5401c, Direction=In
  598. * Value to be programmed in DRAM Mode Register 14
  599. * {Channel A, Rank 0}
  600. */
  601. uint8_t mr16_a0; /*
  602. * Byte offset 0x3a, CSR Addr 0x5401d, Direction=In
  603. * Value to be programmed in DRAM Mode Register 16
  604. * {Channel A, Rank 0}
  605. */
  606. uint8_t mr17_a0; /*
  607. * Byte offset 0x3b, CSR Addr 0x5401d, Direction=In
  608. * Value to be programmed in DRAM Mode Register 17
  609. * {Channel A, Rank 0}
  610. */
  611. uint8_t mr22_a0; /*
  612. * Byte offset 0x3c, CSR Addr 0x5401e, Direction=In
  613. * Value to be programmed in DRAM Mode Register 22
  614. * {Channel A, Rank 0}
  615. */
  616. uint8_t mr24_a0; /*
  617. * Byte offset 0x3d, CSR Addr 0x5401e, Direction=In
  618. * Value to be programmed in DRAM Mode Register 24
  619. * {Channel A, Rank 0}
  620. */
  621. uint8_t mr1_a1; /*
  622. * Byte offset 0x3e, CSR Addr 0x5401f, Direction=In
  623. * Value to be programmed in DRAM Mode Register 1
  624. * {Channel A, Rank 1}
  625. */
  626. uint8_t mr2_a1; /*
  627. * Byte offset 0x3f, CSR Addr 0x5401f, Direction=In
  628. * Value to be programmed in DRAM Mode Register 2
  629. * {Channel A, Rank 1}
  630. */
  631. uint8_t mr3_a1; /*
  632. * Byte offset 0x40, CSR Addr 0x54020, Direction=In
  633. * Value to be programmed in DRAM Mode Register 3
  634. * {Channel A, Rank 1}
  635. */
  636. uint8_t mr4_a1; /*
  637. * Byte offset 0x41, CSR Addr 0x54020, Direction=In
  638. * Value to be programmed in DRAM Mode Register 4
  639. * {Channel A, Rank 1}
  640. */
  641. uint8_t mr11_a1; /*
  642. * Byte offset 0x42, CSR Addr 0x54021, Direction=In
  643. * Value to be programmed in DRAM Mode Register 11
  644. * {Channel A, Rank 1}
  645. */
  646. uint8_t mr12_a1; /*
  647. * Byte offset 0x43, CSR Addr 0x54021, Direction=In
  648. * Value to be programmed in DRAM Mode Register 12
  649. * {Channel A, Rank 1}
  650. */
  651. uint8_t mr13_a1; /*
  652. * Byte offset 0x44, CSR Addr 0x54022, Direction=In
  653. * Value to be programmed in DRAM Mode Register 13
  654. * {Channel A, Rank 1}
  655. */
  656. uint8_t mr14_a1; /*
  657. * Byte offset 0x45, CSR Addr 0x54022, Direction=In
  658. * Value to be programmed in DRAM Mode Register 14
  659. * {Channel A, Rank 1}
  660. */
  661. uint8_t mr16_a1; /*
  662. * Byte offset 0x46, CSR Addr 0x54023, Direction=In
  663. * Value to be programmed in DRAM Mode Register 16
  664. * {Channel A, Rank 1}
  665. */
  666. uint8_t mr17_a1; /*
  667. * Byte offset 0x47, CSR Addr 0x54023, Direction=In
  668. * Value to be programmed in DRAM Mode Register 17
  669. * {Channel A, Rank 1}
  670. */
  671. uint8_t mr22_a1; /*
  672. * Byte offset 0x48, CSR Addr 0x54024, Direction=In
  673. * Value to be programmed in DRAM Mode Register 22
  674. * {Channel A, Rank 1}
  675. */
  676. uint8_t mr24_a1; /*
  677. * Byte offset 0x49, CSR Addr 0x54024, Direction=In
  678. * Value to be programmed in DRAM Mode Register 24
  679. * {Channel A, Rank 1}
  680. */
  681. uint8_t caterminatingrankcha; /* Byte offset 0x4a, CSR Addr 0x54025, Direction=In
  682. * Terminating Rank for CA bus on Channel A
  683. * 0x0 = Rank 0 is terminating rank
  684. * 0x1 = Rank 1 is terminating rank
  685. */
  686. uint8_t reserved4b; /* Byte offset 0x4b, CSR Addr 0x54025, Direction=N/A */
  687. uint8_t reserved4c; /* Byte offset 0x4c, CSR Addr 0x54026, Direction=N/A */
  688. uint8_t reserved4d; /* Byte offset 0x4d, CSR Addr 0x54026, Direction=N/A */
  689. uint8_t reserved4e; /* Byte offset 0x4e, CSR Addr 0x54027, Direction=N/A */
  690. uint8_t reserved4f; /* Byte offset 0x4f, CSR Addr 0x54027, Direction=N/A */
  691. uint8_t reserved50; /* Byte offset 0x50, CSR Addr 0x54028, Direction=N/A */
  692. uint8_t reserved51; /* Byte offset 0x51, CSR Addr 0x54028, Direction=N/A */
  693. uint8_t reserved52; /* Byte offset 0x52, CSR Addr 0x54029, Direction=N/A */
  694. uint8_t reserved53; /* Byte offset 0x53, CSR Addr 0x54029, Direction=N/A */
  695. uint8_t reserved54; /* Byte offset 0x54, CSR Addr 0x5402a, Direction=N/A */
  696. uint8_t reserved55; /* Byte offset 0x55, CSR Addr 0x5402a, Direction=N/A */
  697. uint8_t reserved56; /* Byte offset 0x56, CSR Addr 0x5402b, Direction=N/A */
  698. uint8_t enableddqschb; /*
  699. * Byte offset 0x57, CSR Addr 0x5402b, Direction=In
  700. * Total number of DQ bits enabled in PHY Channel B
  701. */
  702. uint8_t cspresentchb; /*
  703. * Byte offset 0x58, CSR Addr 0x5402c, Direction=In
  704. * Indicates presence of DRAM at each chip select for PHY
  705. * channel B.
  706. * 0x0 = No chip selects are populated with DRAM
  707. * 0x1 = CS0 is populated with DRAM
  708. * 0x3 = CS0 and CS1 are populated with DRAM
  709. *
  710. * All other encodings are illegal
  711. */
  712. int8_t cdd_chb_rr_1_0; /*
  713. * Byte offset 0x59, CSR Addr 0x5402c, Direction=Out
  714. * This is a signed integer value.
  715. * Read to read critical delay difference from cs 1 to cs 0
  716. * on Channel B.
  717. */
  718. int8_t cdd_chb_rr_0_1; /*
  719. * Byte offset 0x5a, CSR Addr 0x5402d, Direction=Out
  720. * This is a signed integer value.
  721. * Read to read critical delay difference from cs 0 to cs 1
  722. * on Channel B.
  723. */
  724. int8_t cdd_chb_rw_1_1; /*
  725. * Byte offset 0x5b, CSR Addr 0x5402d, Direction=Out
  726. * This is a signed integer value.
  727. * Read to write critical delay difference from cs 1 to cs 1
  728. * on Channel B.
  729. */
  730. int8_t cdd_chb_rw_1_0; /*
  731. * Byte offset 0x5c, CSR Addr 0x5402e, Direction=Out
  732. * This is a signed integer value.
  733. * Read to write critical delay difference from cs 1 to cs 0
  734. * on Channel B.
  735. */
  736. int8_t cdd_chb_rw_0_1; /*
  737. * Byte offset 0x5d, CSR Addr 0x5402e, Direction=Out
  738. * This is a signed integer value.
  739. * Read to write critical delay difference from cs 0 to cs 1
  740. * on Channel B.
  741. */
  742. int8_t cdd_chb_rw_0_0; /*
  743. * Byte offset 0x5e, CSR Addr 0x5402f, Direction=Out
  744. * This is a signed integer value.
  745. * Read to write critical delay difference from cs01 to cs 0
  746. * on Channel B.
  747. */
  748. int8_t cdd_chb_wr_1_1; /*
  749. * Byte offset 0x5f, CSR Addr 0x5402f, Direction=Out
  750. * This is a signed integer value.
  751. * Write to read critical delay difference from cs 1 to cs 1
  752. * on Channel B.
  753. */
  754. int8_t cdd_chb_wr_1_0; /*
  755. * Byte offset 0x60, CSR Addr 0x54030, Direction=Out
  756. * This is a signed integer value.
  757. * Write to read critical delay difference from cs 1 to cs 0
  758. * on Channel B.
  759. */
  760. int8_t cdd_chb_wr_0_1; /*
  761. * Byte offset 0x61, CSR Addr 0x54030, Direction=Out
  762. * This is a signed integer value.
  763. * Write to read critical delay difference from cs 0 to cs 1
  764. * on Channel B.
  765. */
  766. int8_t cdd_chb_wr_0_0; /*
  767. * Byte offset 0x62, CSR Addr 0x54031, Direction=Out
  768. * This is a signed integer value.
  769. * Write to read critical delay difference from cs 0 to cs 0
  770. * on Channel B.
  771. */
  772. int8_t cdd_chb_ww_1_0; /*
  773. * Byte offset 0x63, CSR Addr 0x54031, Direction=Out
  774. * This is a signed integer value.
  775. * Write to write critical delay difference from cs 1 to cs
  776. * 0 on Channel B.
  777. */
  778. int8_t cdd_chb_ww_0_1; /*
  779. * Byte offset 0x64, CSR Addr 0x54032, Direction=Out
  780. * This is a signed integer value.
  781. * Write to write critical delay difference from cs 0 to cs
  782. * 1 on Channel B.
  783. */
  784. uint8_t mr1_b0; /*
  785. * Byte offset 0x65, CSR Addr 0x54032, Direction=In
  786. * Value to be programmed in DRAM Mode Register 1
  787. * {Channel B, Rank 0}
  788. */
  789. uint8_t mr2_b0; /*
  790. * Byte offset 0x66, CSR Addr 0x54033, Direction=In
  791. * Value to be programmed in DRAM Mode Register 2
  792. * {Channel B, Rank 0}
  793. */
  794. uint8_t mr3_b0; /*
  795. * Byte offset 0x67, CSR Addr 0x54033, Direction=In
  796. * Value to be programmed in DRAM Mode Register 3
  797. * {Channel B, Rank 0}
  798. */
  799. uint8_t mr4_b0; /*
  800. * Byte offset 0x68, CSR Addr 0x54034, Direction=In
  801. * Value to be programmed in DRAM Mode Register 4
  802. * {Channel B, Rank 0}
  803. */
  804. uint8_t mr11_b0; /*
  805. * Byte offset 0x69, CSR Addr 0x54034, Direction=In
  806. * Value to be programmed in DRAM Mode Register 11
  807. * {Channel B, Rank 0}
  808. */
  809. uint8_t mr12_b0; /*
  810. * Byte offset 0x6a, CSR Addr 0x54035, Direction=In
  811. * Value to be programmed in DRAM Mode Register 12
  812. * {Channel B, Rank 0}
  813. */
  814. uint8_t mr13_b0; /*
  815. * Byte offset 0x6b, CSR Addr 0x54035, Direction=In
  816. * Value to be programmed in DRAM Mode Register 13
  817. * {Channel B, Rank 0}
  818. */
  819. uint8_t mr14_b0; /*
  820. * Byte offset 0x6c, CSR Addr 0x54036, Direction=In
  821. * Value to be programmed in DRAM Mode Register 14
  822. * {Channel B, Rank 0}
  823. */
  824. uint8_t mr16_b0; /*
  825. * Byte offset 0x6d, CSR Addr 0x54036, Direction=In
  826. * Value to be programmed in DRAM Mode Register 16
  827. * {Channel B, Rank 0}
  828. */
  829. uint8_t mr17_b0; /*
  830. * Byte offset 0x6e, CSR Addr 0x54037, Direction=In
  831. * Value to be programmed in DRAM Mode Register 17
  832. * {Channel B, Rank 0}
  833. */
  834. uint8_t mr22_b0; /*
  835. * Byte offset 0x6f, CSR Addr 0x54037, Direction=In
  836. * Value to be programmed in DRAM Mode Register 22
  837. * {Channel B, Rank 0}
  838. */
  839. uint8_t mr24_b0; /*
  840. * Byte offset 0x70, CSR Addr 0x54038, Direction=In
  841. * Value to be programmed in DRAM Mode Register 24
  842. * {Channel B, Rank 0}
  843. */
  844. uint8_t mr1_b1; /*
  845. * Byte offset 0x71, CSR Addr 0x54038, Direction=In
  846. * Value to be programmed in DRAM Mode Register 1
  847. * {Channel B, Rank 1}
  848. */
  849. uint8_t mr2_b1; /*
  850. * Byte offset 0x72, CSR Addr 0x54039, Direction=In
  851. * Value to be programmed in DRAM Mode Register 2
  852. * {Channel B, Rank 1}
  853. */
  854. uint8_t mr3_b1; /*
  855. * Byte offset 0x73, CSR Addr 0x54039, Direction=In
  856. * Value to be programmed in DRAM Mode Register 3
  857. * {Channel B, Rank 1}
  858. */
  859. uint8_t mr4_b1; /*
  860. * Byte offset 0x74, CSR Addr 0x5403a, Direction=In
  861. * Value to be programmed in DRAM Mode Register 4
  862. * {Channel B, Rank 1}
  863. */
  864. uint8_t mr11_b1; /*
  865. * Byte offset 0x75, CSR Addr 0x5403a, Direction=In
  866. * Value to be programmed in DRAM Mode Register 11
  867. * {Channel B, Rank 1}
  868. */
  869. uint8_t mr12_b1; /*
  870. * Byte offset 0x76, CSR Addr 0x5403b, Direction=In
  871. * Value to be programmed in DRAM Mode Register 12
  872. * {Channel B, Rank 1}
  873. */
  874. uint8_t mr13_b1; /*
  875. * Byte offset 0x77, CSR Addr 0x5403b, Direction=In
  876. * Value to be programmed in DRAM Mode Register 13
  877. * {Channel B, Rank 1}
  878. */
  879. uint8_t mr14_b1; /*
  880. * Byte offset 0x78, CSR Addr 0x5403c, Direction=In
  881. * Value to be programmed in DRAM Mode Register 14
  882. * {Channel B, Rank 1}
  883. */
  884. uint8_t mr16_b1; /*
  885. * Byte offset 0x79, CSR Addr 0x5403c, Direction=In
  886. * Value to be programmed in DRAM Mode Register 16
  887. * {Channel B, Rank 1}
  888. */
  889. uint8_t mr17_b1; /*
  890. * Byte offset 0x7a, CSR Addr 0x5403d, Direction=In
  891. * Value to be programmed in DRAM Mode Register 17
  892. * {Channel B, Rank 1}
  893. */
  894. uint8_t mr22_b1; /*
  895. * Byte offset 0x7b, CSR Addr 0x5403d, Direction=In
  896. * Value to be programmed in DRAM Mode Register 22
  897. * {Channel B, Rank 1}
  898. */
  899. uint8_t mr24_b1; /*
  900. * Byte offset 0x7c, CSR Addr 0x5403e, Direction=In
  901. * Value to be programmed in DRAM Mode Register 24
  902. * {Channel B, Rank 1}
  903. */
  904. uint8_t caterminatingrankchb; /* Byte offset 0x7d, CSR Addr 0x5403e, Direction=In
  905. * Terminating Rank for CA bus on Channel B
  906. * 0x0 = Rank 0 is terminating rank
  907. * 0x1 = Rank 1 is terminating rank
  908. */
  909. uint8_t reserved7e; /* Byte offset 0x7e, CSR Addr 0x5403f, Direction=N/A */
  910. uint8_t reserved7f; /* Byte offset 0x7f, CSR Addr 0x5403f, Direction=N/A */
  911. uint8_t reserved80; /* Byte offset 0x80, CSR Addr 0x54040, Direction=N/A */
  912. uint8_t reserved81; /* Byte offset 0x81, CSR Addr 0x54040, Direction=N/A */
  913. uint8_t reserved82; /* Byte offset 0x82, CSR Addr 0x54041, Direction=N/A */
  914. uint8_t reserved83; /* Byte offset 0x83, CSR Addr 0x54041, Direction=N/A */
  915. uint8_t reserved84; /* Byte offset 0x84, CSR Addr 0x54042, Direction=N/A */
  916. uint8_t reserved85; /* Byte offset 0x85, CSR Addr 0x54042, Direction=N/A */
  917. uint8_t reserved86; /* Byte offset 0x86, CSR Addr 0x54043, Direction=N/A */
  918. uint8_t reserved87; /* Byte offset 0x87, CSR Addr 0x54043, Direction=N/A */
  919. uint8_t reserved88; /* Byte offset 0x88, CSR Addr 0x54044, Direction=N/A */
  920. uint8_t reserved89; /* Byte offset 0x89, CSR Addr 0x54044, Direction=N/A */
  921. } __packed __aligned(2);
  922. #endif /* MNPMUSRAMMSGBLOCK_LPDDR4_H */