<?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>topic Re: LS1088A DDR4 driver porting problem in Layerscape</title>
    <link>https://community.nxp.com/t5/Layerscape/LS1088A-DDR4-driver-porting-problem/m-p/1338139#M8880</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;we are having a DDR4 size problem on LS1088a platform.&amp;nbsp; We have 4GB DDR4 on the board. When u-boot starts it is confirmed that board has 4GB DDR4. But when we checked on kernel with cat /proc/meminfo or free commands, it shows that RAM is 2GB.&amp;nbsp; We did tried what&amp;nbsp;&lt;SPAN&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/52411"&gt;@yipingwang&lt;/a&gt;&amp;nbsp;post but nothing changed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Do you have any idea why are we having mismatch DDR size in u-boot and kernel ?&lt;/P&gt;&lt;P&gt;Attached photos you can see the differences.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ubootddr4.jpg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/155698i4AD0E5F351A3DFB2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ubootddr4.jpg" alt="ubootddr4.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="freeddr4.jpg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/155700iBE35CB49F12A9A6B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="freeddr4.jpg" alt="freeddr4.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="meminfoddr.jpg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/155701i95D521ABECDED5B7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="meminfoddr.jpg" alt="meminfoddr.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Sep 2021 06:55:23 GMT</pubDate>
    <dc:creator>TahaBenderli</dc:creator>
    <dc:date>2021-09-10T06:55:23Z</dc:date>
    <item>
      <title>LS1088A DDR4 driver porting problem</title>
      <link>https://community.nxp.com/t5/Layerscape/LS1088A-DDR4-driver-porting-problem/m-p/1209252#M7326</link>
      <description>&lt;P&gt;On LS1088A platform, based on LSDK20.04 version, using onboard particle DDR4 design, the model MT40A512M16LY-075 (64 bit width +8 bit ECC, 4GB in total, 4 pieces of 512M*16 bit DDR4), DDR4 running at 1600MHz, has been produced at present .C file, please see the attachment for details.&lt;/P&gt;&lt;P&gt;The operation process is as follows:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&amp;nbsp;Imported DDR register value,&lt;SPAN&gt; a&lt;/SPAN&gt;dd the values in the generated dd&lt;SPAN&gt;rtfa_1.c file to the ddr_init.c&lt;/SPAN&gt; file in the ATF folder as CONFIG_STATIC_DDR in section 5.2.3 of LSDK&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;Copy all contents of the generated uboot_ddr1.c file to DDR. C file in the u-boot folder&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;3. Compile ATF and U-Boot folders in Linux interface, then synthesize image and burn it into NOR flash&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Enable static DDR, Open the # define CONFIG_STATIC_DDR&lt;/P&gt;&lt;P&gt;Refer to the RM file 2.2 System Memory Map and set the starting address to 0x0080_8000_0000.&lt;/P&gt;&lt;P&gt;Use DDR Region #2 as recommended, which is DRAM1 in the code,&amp;nbsp; Please refer to attachment 1:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Switch to DRAM1 completely in the BL2 setup file, Please refer to attachment 1:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In setup of BL31, change addr to 80_80000000 and size to 0x100000000//4GB, Please refer to attachment 1:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RCW modifies DDR multiplier to 16, modifies DDR_REFCLK_SEL=0, and selects single-ended DDRCLK input clock,Please refer to attachment 1:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After the compilation is completed, the printed information is Please refer to attachment&amp;nbsp;1&amp;nbsp;:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please check whether the current process is correct and how to modify it. Please help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Sun, 10 Jan 2021 08:50:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/LS1088A-DDR4-driver-porting-problem/m-p/1209252#M7326</guid>
      <dc:creator>jack_huang1</dc:creator>
      <dc:date>2021-01-10T08:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: LS1088A DDR4 driver porting problem</title>
      <link>https://community.nxp.com/t5/Layerscape/LS1088A-DDR4-driver-porting-problem/m-p/1209379#M7327</link>
      <description>&lt;P&gt;If you want to use fixed DDR registers configurations to initialize DDR controller, you need to define&amp;nbsp;CONFIG_STATIC_DDR in&amp;nbsp;platform_def.h, define function&amp;nbsp;board_static_ddr and structure&amp;nbsp;ddr_cfg_regs in&amp;nbsp;plat/nxp/soc-ls1088/ls1088ardb/ddr_init.c in atf folder. You could refer to&amp;nbsp;plat/nxp/soc-ls1046/ls1046ardb/ddr_init.c.&lt;/P&gt;
&lt;P&gt;For example&lt;/P&gt;
&lt;P&gt;In plat/nxp/soc-ls1088/ls1088ardb/platform_def.h&lt;/P&gt;
&lt;P&gt;#define NXP_DDRCLK_FREQ 100000000&lt;BR /&gt;#define NUM_OF_DDRC 2&lt;BR /&gt;#define DDRC_NUM_DIMM 2&lt;BR /&gt;#define &lt;STRONG&gt;CONFIG_STATIC_DDR&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;In plat/nxp/soc-ls1088/ls1088ardb/ddr_init.c&lt;/P&gt;
&lt;P&gt;#ifdef CONFIG_STATIC_DDR&lt;BR /&gt;const struct ddr_cfg_regs static_1600 = {&lt;BR /&gt;&amp;nbsp;.cs[0].config = 0x80040322,&lt;BR /&gt;.cs[0].bnds = 0x1FF,&lt;BR /&gt;.cs[1].config = 0x80000322,&lt;BR /&gt;.cs[1].bnds = 0x1FF,&lt;BR /&gt;.sdram_cfg[0] = 0xE5004000,&lt;BR /&gt;.sdram_cfg[1] = 0x401151,&lt;BR /&gt;.sdram_cfg[2] = 0x0,&lt;BR /&gt;.timing_cfg[0] = 0x91550018,&lt;BR /&gt;.timing_cfg[1] = 0xBAB48E44,&lt;BR /&gt;.timing_cfg[2] = 0x490111,&lt;BR /&gt;.timing_cfg[3] = 0x10C1000,&lt;BR /&gt;.timing_cfg[4] = 0x220002,&lt;BR /&gt;.timing_cfg[5] = 0x3401400,&lt;BR /&gt;.timing_cfg[6] = 0x0,&lt;BR /&gt;.timing_cfg[7] = 0x13300000,&lt;BR /&gt;.timing_cfg[8] = 0x1224800,&lt;BR /&gt;.timing_cfg[9] = 0x0,&lt;BR /&gt;.dq_map[0] = 0x32C57554,&lt;BR /&gt;.dq_map[1] = 0xD4BB0BD4,&lt;BR /&gt;.dq_map[2] = 0x2EC2F554,&lt;BR /&gt;.dq_map[3] = 0xD95D4001,&lt;BR /&gt;.sdram_mode[0] = 0x3010211,&lt;BR /&gt;.sdram_mode[1] = 0x0,&lt;BR /&gt;.sdram_mode[9] = 0x400000,&lt;BR /&gt;.sdram_mode[8] = 0x500,&lt;BR /&gt;.sdram_mode[2] = 0x10211,&lt;BR /&gt;.sdram_mode[3] = 0x0,&lt;BR /&gt;.sdram_mode[10] = 0x400,&lt;/P&gt;
&lt;P&gt;.sdram_mode[11] = 0x400000,&lt;BR /&gt;.sdram_mode[4] = 0x10211,&lt;BR /&gt;.sdram_mode[5] = 0x0,&lt;BR /&gt;.sdram_mode[12] = 0x400,&lt;BR /&gt;.sdram_mode[13] = 0x400000,&lt;BR /&gt;.sdram_mode[6] = 0x10211,&lt;BR /&gt;.sdram_mode[7] = 0x0,&lt;BR /&gt;.sdram_mode[14] = 0x400,&lt;BR /&gt;.sdram_mode[15] = 0x400000,&lt;BR /&gt;.interval = 0x18600618,&lt;BR /&gt;.zq_cntl = 0x8A090705,&lt;BR /&gt;.ddr_sr_cntr = 0x0,&lt;BR /&gt;.clk_cntl = 0x2000000,&lt;BR /&gt;.cdr[0] = 0x80040000,&lt;BR /&gt;.cdr[1] = 0xC1,&lt;BR /&gt;.wrlvl_cntl[0] = 0x86750607,&lt;BR /&gt;.wrlvl_cntl[1] = 0x8090A0B,&lt;BR /&gt;.wrlvl_cntl[2] = 0xD0E0F0C,&lt;BR /&gt;};&lt;/P&gt;
&lt;P&gt;long long board_static_ddr(struct ddr_info *priv)&lt;BR /&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;memcpy(&amp;amp;priv-&amp;gt;ddr_reg, &amp;amp;static_1600, sizeof(static_1600));&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;return &lt;SPAN&gt;0x100000000&lt;/SPAN&gt;; /*hardcoded DDR size 4GB*/&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 04:30:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/LS1088A-DDR4-driver-porting-problem/m-p/1209379#M7327</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2021-01-11T04:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: LS1088A DDR4 driver porting problem</title>
      <link>https://community.nxp.com/t5/Layerscape/LS1088A-DDR4-driver-porting-problem/m-p/1209530#M7330</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;A href="https://community.nxp.com/t5/user/viewprofilepage/user-id/52411" target="_self"&gt;&lt;SPAN class=""&gt;yipingwang&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Refer to ddr_init.c in atf\plat\nxp\soc-ls1046\ls1046ardb, I found that:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;size = 0x200000000UL; //8GB&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;simultaneously in&amp;nbsp;&lt;SPAN class=""&gt;atf\plat\nxp\soc-ls1046\ls1046ardb\platform_def.h, I found that:&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;#define PLAT_DEF_DRAM0_SIZE 0x80000000 /* 2G */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;It seems that&amp;nbsp;&lt;SPAN class=""&gt;PLAT_DEF_DRAM0_SIZE is not required modify when ddr is over 2GB, even though reference manual chapter 2.2 described GPP DRAM Region #1 is 0~2GB at start addr 0x8000_0000&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 09:02:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/LS1088A-DDR4-driver-porting-problem/m-p/1209530#M7330</guid>
      <dc:creator>suezure</dc:creator>
      <dc:date>2021-01-11T09:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: LS1088A DDR4 driver porting problem</title>
      <link>https://community.nxp.com/t5/Layerscape/LS1088A-DDR4-driver-porting-problem/m-p/1209549#M7332</link>
      <description>&lt;P&gt;Yes, no need to modify&amp;nbsp;&lt;SPAN&gt;PLAT_DEF_DRAM0_SIZE.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 09:24:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/LS1088A-DDR4-driver-porting-problem/m-p/1209549#M7332</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2021-01-11T09:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: LS1088A DDR4 driver porting problem</title>
      <link>https://community.nxp.com/t5/Layerscape/LS1088A-DDR4-driver-porting-problem/m-p/1338139#M8880</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;we are having a DDR4 size problem on LS1088a platform.&amp;nbsp; We have 4GB DDR4 on the board. When u-boot starts it is confirmed that board has 4GB DDR4. But when we checked on kernel with cat /proc/meminfo or free commands, it shows that RAM is 2GB.&amp;nbsp; We did tried what&amp;nbsp;&lt;SPAN&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/52411"&gt;@yipingwang&lt;/a&gt;&amp;nbsp;post but nothing changed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Do you have any idea why are we having mismatch DDR size in u-boot and kernel ?&lt;/P&gt;&lt;P&gt;Attached photos you can see the differences.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ubootddr4.jpg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/155698i4AD0E5F351A3DFB2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ubootddr4.jpg" alt="ubootddr4.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="freeddr4.jpg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/155700iBE35CB49F12A9A6B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="freeddr4.jpg" alt="freeddr4.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="meminfoddr.jpg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/155701i95D521ABECDED5B7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="meminfoddr.jpg" alt="meminfoddr.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 06:55:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/LS1088A-DDR4-driver-porting-problem/m-p/1338139#M8880</guid>
      <dc:creator>TahaBenderli</dc:creator>
      <dc:date>2021-09-10T06:55:23Z</dc:date>
    </item>
  </channel>
</rss>

