<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックRe: lpddr4 training code generation</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/lpddr4-training-code-generation/m-p/1476623#M191659</link>
    <description>&lt;P&gt;I have to think so. All this code is automatically generated by mscale_ddr_tool _v3.30&lt;/P&gt;</description>
    <pubDate>Mon, 20 Jun 2022 08:35:16 GMT</pubDate>
    <dc:creator>AlexyTarasov</dc:creator>
    <dc:date>2022-06-20T08:35:16Z</dc:date>
    <item>
      <title>lpddr4 training code generation</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/lpddr4-training-code-generation/m-p/1463166#M190768</link>
      <description>&lt;P&gt;Our company is developing several computational modules which are based on pairs imx8mp + lpddr4(AS4C256M32MD4-062BAN 1 chip) and imx8m + lpddr4(MT53E512M32D2NP-046 WT:E 1 chip). Currently our primary goal is to prepare DDR memory trainings for each of modules. In accordance with this &lt;A href="https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX-8M-Family-DDR-Tool-Release/ta-p/1104467" target="_blank"&gt;https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX-8M-Family-DDR-Tool-Release/ta-p/1104467&lt;/A&gt; information we prepared two excel files: IMX8MP_AS4C256M32MD4-062BAN and IMX8M_MT53E512M32D2NP-046WTE. We got DDR stress test files from each of the excel files. Using mscale_ddr_tool _v3.30 imx8mp_lpddr4_timing.c and imx8m_lpddr4_timing.c were created. After that these files were placed inside u-boot source tree (sources repository &lt;A href="https://source.codeaurora.org/external/imx/uboot-imx.git" target="_blank"&gt;https://source.codeaurora.org/external/imx/uboot-imx.git&lt;/A&gt; branch lf_v2020.04) and compiled. During boot process we got the following message and cpu goes into cyclic reboot.&lt;/P&gt;&lt;P&gt;U-Boot SPL&lt;BR /&gt;pmic_alloc: new pmic struct: 0x184000&lt;BR /&gt;pmic_get: pmic PCA9450 -&amp;gt; 0x184000&lt;BR /&gt;Bus: 0 PMIC:PCA9450 probed!&lt;BR /&gt;Can't find PMIC:PCA9450&lt;BR /&gt;DDRINFO: start DRAM init&lt;BR /&gt;DDRINFO: cfg clk&lt;BR /&gt;DDRINFO: DRAM rate 3200MTS&lt;BR /&gt;DDRINFO: ddrc config start&lt;BR /&gt;DDRINFO: ddrc config done&lt;BR /&gt;DDRINFO:ddrphy config start&lt;BR /&gt;DRAM PHY training for 3200MTS&lt;BR /&gt;check ddr_pmu_train_imem code&lt;BR /&gt;check ddr_pmu_train_imem code pass&lt;BR /&gt;check ddr4_pmu_train_dmem code&lt;BR /&gt;check ddr_pmu_train_dmem code pass&lt;BR /&gt;PMU String index = 0x00b00001&lt;BR /&gt;arg[0] = 0x00001000&lt;BR /&gt;PMU String index = 0x00a70001&lt;BR /&gt;arg[0] = 0x00000000&lt;BR /&gt;Training PASS&lt;/P&gt;&lt;P&gt;This message and behaviour are the same for both SoC.&lt;/P&gt;&lt;P&gt;In result of some research a cause of cyclic rebooting was found. To our surprise the cause is in register addresses that are placed in an array struct dram_cfg_param ddr_phy_pie[]. The ddr_phy_pie array is in generated by the mscale_ddr_tool _v3.30 files xxx_lpddr4_timing.c. If to be more concrete a problem of SoC's rebooting is in pairs of values :&lt;BR /&gt;{ 0x31000005, 0x1 },&lt;BR /&gt;{ 0x314bff50, 0x0 },&lt;BR /&gt;{ 0x31000005, 0x3a },&lt;BR /&gt;{ 0x315500c0, 0x1 },&lt;BR /&gt;{ 0x31000000, 0x3 },&lt;BR /&gt;{ 0xed5540a, 0x0 },&lt;BR /&gt;{ 0x31552448, 0x154003a },&lt;BR /&gt;{ 0x3100002e, 0x1 },&lt;BR /&gt;{ 0x315522f0, 0x0 },&lt;BR /&gt;{ 0x31404000, 0x0 },&lt;BR /&gt;{ 0x31550030, 0x3a00003a },&lt;BR /&gt;{ 0x31000005, 0x17 },&lt;BR /&gt;{ 0x310e8000, 0x6d0000 },&lt;BR /&gt;{ 0x31000017, 0x1540270 },&lt;BR /&gt;{ 0x31000005, 0x1540270 },&lt;BR /&gt;{ 0x31404000, 0x17 },&lt;BR /&gt;{ 0x31000000, 0x12ffcfc },&lt;BR /&gt;{ 0xed55773, 0x12ffe60 },&lt;BR /&gt;{ 0xed62b48, 0xf711acbd },&lt;BR /&gt;{ 0x30ffffff, 0x12ffd4c },&lt;BR /&gt;{ 0xed65e3f, 0x0 }&lt;/P&gt;&lt;P&gt;Reboot occurs in function dwc_ddrphy_apb_wr (drivers/ddr/imx/imx8m/ddrphy_train.c) at the moment of memory access by transformed register address (the first value in paris). The transformation is 0x3c000000 + 4 * reg_addr. Taking into account values of register addresses provided above the transformed addresses aren't in SoC address space. As a result CPU tries to access unavailable memory and gets error and reboots.&lt;/P&gt;&lt;P&gt;Ultimately we have not working ddr memory training subsystem.&lt;/P&gt;&lt;P&gt;Also we are interested in to create (and of course to have strong knowledge how to do it) ddr memory training configuration files like those that are for imx8mq_evk, imx8mp_evk and so on boards. The utility mscale_ddr_tool _v3.30 creates training configurations just for single clock frequency and single dimension (FW_1D_IMAGE). But mention above configurations for EVK boards have much more rich parameters&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 10:41:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/lpddr4-training-code-generation/m-p/1463166#M190768</guid>
      <dc:creator>AlexyTarasov</dc:creator>
      <dc:date>2022-05-24T10:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: lpddr4 training code generation</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/lpddr4-training-code-generation/m-p/1475068#M191544</link>
      <description>&lt;P&gt;We are facing exactly same&amp;nbsp;cyclic reboot issue too. Is it a code generator bug?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 06:36:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/lpddr4-training-code-generation/m-p/1475068#M191544</guid>
      <dc:creator>torus1000</dc:creator>
      <dc:date>2022-06-16T06:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: lpddr4 training code generation</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/lpddr4-training-code-generation/m-p/1476623#M191659</link>
      <description>&lt;P&gt;I have to think so. All this code is automatically generated by mscale_ddr_tool _v3.30&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 08:35:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/lpddr4-training-code-generation/m-p/1476623#M191659</guid>
      <dc:creator>AlexyTarasov</dc:creator>
      <dc:date>2022-06-20T08:35:16Z</dc:date>
    </item>
  </channel>
</rss>

