<?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: i.MX93 LPDDR4: DRAM detected as 2GB instead of 256MB on custom board (U‑Boot DDR init issue)</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX93-LPDDR4-DRAM-detected-as-2GB-instead-of-256MB-on-custom/m-p/2357073#M245032</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/242475"&gt;@sergiomauro&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can modify the&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;PHYS_SDRAM_SIZE&lt;/EM&gt;&lt;/STRONG&gt; parameter in the file below.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/nxp-imx/uboot-imx/blob/lf_v2025.04/include/configs/imx93_evk.h" target="_blank"&gt;https://github.com/nxp-imx/uboot-imx/blob/lf_v2025.04/include/configs/imx93_evk.h&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;diff --git a/include/configs/imx93_evk.h b/include/configs/imx93_evk.h&lt;BR /&gt;index 9d7951281fd..2c32963ce4d 100644&lt;BR /&gt;--- a/include/configs/imx93_evk.h&lt;BR /&gt;+++ b/include/configs/imx93_evk.h&lt;BR /&gt;@@ -26,7 +26,7 @@&lt;BR /&gt;&lt;BR /&gt;#define CFG_SYS_SDRAM_BASE 0x80000000&lt;BR /&gt;#define PHYS_SDRAM 0x80000000&lt;BR /&gt;-#define PHYS_SDRAM_SIZE 0x80000000 /* 2GB DDR */&lt;BR /&gt;+#define PHYS_SDRAM_SIZE 0x10000000 /* 256MB DDR */&lt;BR /&gt;&lt;BR /&gt;/* Using ULP WDOG for reset */&lt;BR /&gt;#define WDOG_BASE_ADDR WDG3_BASE_ADDR&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;B.R&lt;/P&gt;</description>
    <pubDate>Tue, 28 Apr 2026 08:31:50 GMT</pubDate>
    <dc:creator>pengyong_zhang</dc:creator>
    <dc:date>2026-04-28T08:31:50Z</dc:date>
    <item>
      <title>i.MX93 LPDDR4: DRAM detected as 2GB instead of 256MB on custom board (U‑Boot DDR init issue)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX93-LPDDR4-DRAM-detected-as-2GB-instead-of-256MB-on-custom/m-p/2357006#M245029</link>
      <description>&lt;P&gt;Hello everyone,&lt;BR /&gt;&lt;BR /&gt;I’m currently debugging a DRAM initialization issue on a custom &lt;STRONG&gt;i.MX93&lt;/STRONG&gt; board.&lt;BR /&gt;&lt;BR /&gt;My HW consists of a i.MX93 SoC on a custom board, equipped with a &lt;STRONG&gt;256 MB&lt;/STRONG&gt; LPDDR4 device (&lt;EM&gt;AS4C128M16MD4V&lt;/EM&gt;).&lt;BR /&gt;&lt;BR /&gt;In my actual situation, the board boots correctly, but both U‑Boot and the Linux kernel always detect the DRAM size as &lt;STRONG&gt;2 GB&lt;/STRONG&gt; (0x80000000) (u-boot with dbinfo and Linux via /proc/meminfo or top) instead of the actual 256 MB (0x10000000).&lt;BR /&gt;&lt;BR /&gt;This mismatch causes memory corruption and kernel panics, especially when exercising anonymous memory, for example unpacking large TAR files into ramfs, or after the board is up after several hours.&lt;BR /&gt;&lt;BR /&gt;Here an example panic:&lt;BR /&gt;[13991.116549] pc : handle_percpu_devid_irq+0x7c/0x120&lt;BR /&gt;[13991.121428] lr : handle_percpu_devid_irq+0x7c/0x120&lt;BR /&gt;[13991.126299] sp : ffff80008000bfb0&lt;BR /&gt;[13991.129601] x29: ffff80008000bfa0 x28: ffff00000e0dd500 x27: 0000000000000000&lt;BR /&gt;[13991.136725] x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000&lt;BR /&gt;[13991.143849] x23: 0000000060400009 x22: ffff8000800bb94c x21: ffff80008000bfd0&lt;BR /&gt;[13991.150973] x20: ffff8000800c52b4 x19: ffff80008000bfa0 x18: ffff00001feb35c0&lt;BR /&gt;[13991.158097] x17: ffff7fff9eb0f000 x16: ffff800080008000 x15: 0000000000000001&lt;BR /&gt;[13991.165221] x14: 0000e59fcd64f036 x13: 0000000000000198 x12: ffff00001fe9d640&lt;BR /&gt;[13991.172345] x11: 0000000000000040 x10: ffff00000e00e170 x9 : ffff00000e00e168&lt;BR /&gt;[13991.179469] x8 : ffff000010000270 x7 : 0000000000000000 x6 : 0000000000000000&lt;BR /&gt;[13991.186593] x5 : ffff7fff9eb0f000 x4 : 0000000000000000 x3 : ffff00000e011630&lt;BR /&gt;[13991.193717] x2 : ffff800081448c98 x1 : 0000000000001fff x0 : 0000000008030a00&lt;BR /&gt;[13991.200842] Call trace:&lt;BR /&gt;[13991.203277]&amp;nbsp; handle_percpu_devid_irq+0x7c/0x120&lt;BR /&gt;[13991.207800]&amp;nbsp; 0x1&lt;BR /&gt;[13991.209629]&amp;nbsp; gic_handle_irq+0x4c/0x11c&lt;BR /&gt;[13991.213373]&amp;nbsp; call_on_irq_stack+0x24/0x54&lt;BR /&gt;[13991.217290]&amp;nbsp; do_interrupt_handler+0x80/0x84&lt;BR /&gt;[13991.221468]&amp;nbsp; el1_interrupt+0x34/0x68&lt;BR /&gt;[13991.225038]&amp;nbsp; el1h_64_irq_handler+0x18/0x24&lt;BR /&gt;[13991.229129]&amp;nbsp; el1h_64_irq+0x64/0x68&lt;BR /&gt;[13991.232518]&amp;nbsp; default_idle_call+0x28/0x3c&lt;BR /&gt;[13991.236426]&amp;nbsp; do_idle+0xa0/0xf0&lt;BR /&gt;[13991.239477]&amp;nbsp; cpu_startup_entry+0x34/0x3c&lt;BR /&gt;[13991.243386]&amp;nbsp; secondary_start_kernel+0x124/0x150&lt;BR /&gt;[13991.247910]&amp;nbsp; __secondary_switched+0xb8/0xbc&lt;BR /&gt;[13991.252092] Code: f9400a81 2a1603e0 8b030021 d63f0040 (f94026a1)&lt;BR /&gt;[13991.258173] ---[ end trace 0000000000000000 ]---&lt;BR /&gt;[13991.262784] Kernel panic - not syncing: Oops: Fatal exception in interrupt&lt;BR /&gt;[13991.269647] SMP: stopping secondary CPUs&lt;BR /&gt;[13991.273561] Kernel Offset: disabled&lt;BR /&gt;[13991.277039] CPU features: 0x08,00000004,00280928,4200720b&lt;BR /&gt;[13991.282429] Memory Limit: 512 MB&lt;BR /&gt;[13991.285646] ---[ end Kernel panic - not syncing: Oops: Fatal exception in interrupt ]---&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;For now, In both U‑Boot and kernel Device Trees, the memory node is explicitly limited to 256 MB:&lt;BR /&gt;&lt;BR /&gt;memory@80000000 {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; device_type = "memory";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; reg = &amp;lt;0x0 0x80000000 0x0 0x10000000&amp;gt;;&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;And In U‑Boot, the board configuration was patched so that in imx93_evk.h:&lt;BR /&gt;&lt;STRONG&gt;PHYS_SDRAM_SIZE&lt;/STRONG&gt; was changed from 0x80000000 to &lt;STRONG&gt;0x10000000&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;LPDDR4 timings were regenerated using the official NXP DDR Configuration Tool and the generated lpddr4x_timing.c was patched accordingly.&lt;BR /&gt;&lt;BR /&gt;Despite all of the above, U‑Boot still reports 2GB of RAM.&lt;BR /&gt;&lt;BR /&gt;I also tried forcing a limit via &lt;STRONG&gt;bootargs&lt;/STRONG&gt;:&lt;BR /&gt;mem=256M&lt;BR /&gt;&lt;BR /&gt;This always leads to an early OOM / deadlock:&lt;BR /&gt;Memory Limit: 256 MB&lt;BR /&gt;Kernel panic - not syncing: System is deadlocked on memory&lt;BR /&gt;&lt;BR /&gt;To mitigate memory-related issues in Linux, we are currently limiting the usable memory via kernel bootargs mem=512.&lt;BR /&gt;&lt;BR /&gt;With this limitation, the system is more stable and the issue occurs less frequently.&lt;BR /&gt;&lt;BR /&gt;My questions are if anyone successfully used LPDDR4 devices smaller than 1 GB or 2 GB on i.MX93 or similar boards, and if so, were additional changes required beyond DTS and PHYS_SDRAM_SIZE? (Note: OP-TEE is not enabled, so did not update conf.mk CFG_DDR_SIZE = 0x10000000).&lt;/P&gt;&lt;P&gt;And, if there are additional places in U‑Boot DDR code where DRAM capacity must be explicitly constrained for smaller LPDDR4 devices?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance for any insights or experience you can share.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Sergio&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2026 07:34:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX93-LPDDR4-DRAM-detected-as-2GB-instead-of-256MB-on-custom/m-p/2357006#M245029</guid>
      <dc:creator>sergiomauro</dc:creator>
      <dc:date>2026-04-28T07:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX93 LPDDR4: DRAM detected as 2GB instead of 256MB on custom board (U‑Boot DDR init issue)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX93-LPDDR4-DRAM-detected-as-2GB-instead-of-256MB-on-custom/m-p/2357073#M245032</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/242475"&gt;@sergiomauro&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can modify the&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;PHYS_SDRAM_SIZE&lt;/EM&gt;&lt;/STRONG&gt; parameter in the file below.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/nxp-imx/uboot-imx/blob/lf_v2025.04/include/configs/imx93_evk.h" target="_blank"&gt;https://github.com/nxp-imx/uboot-imx/blob/lf_v2025.04/include/configs/imx93_evk.h&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;diff --git a/include/configs/imx93_evk.h b/include/configs/imx93_evk.h&lt;BR /&gt;index 9d7951281fd..2c32963ce4d 100644&lt;BR /&gt;--- a/include/configs/imx93_evk.h&lt;BR /&gt;+++ b/include/configs/imx93_evk.h&lt;BR /&gt;@@ -26,7 +26,7 @@&lt;BR /&gt;&lt;BR /&gt;#define CFG_SYS_SDRAM_BASE 0x80000000&lt;BR /&gt;#define PHYS_SDRAM 0x80000000&lt;BR /&gt;-#define PHYS_SDRAM_SIZE 0x80000000 /* 2GB DDR */&lt;BR /&gt;+#define PHYS_SDRAM_SIZE 0x10000000 /* 256MB DDR */&lt;BR /&gt;&lt;BR /&gt;/* Using ULP WDOG for reset */&lt;BR /&gt;#define WDOG_BASE_ADDR WDG3_BASE_ADDR&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;B.R&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2026 08:31:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX93-LPDDR4-DRAM-detected-as-2GB-instead-of-256MB-on-custom/m-p/2357073#M245032</guid>
      <dc:creator>pengyong_zhang</dc:creator>
      <dc:date>2026-04-28T08:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX93 LPDDR4: DRAM detected as 2GB instead of 256MB on custom board (U‑Boot DDR init issue)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX93-LPDDR4-DRAM-detected-as-2GB-instead-of-256MB-on-custom/m-p/2357082#M245033</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/202673"&gt;@pengyong_zhang&lt;/a&gt;,&lt;BR /&gt;thanks for the suggestion.&lt;/P&gt;&lt;P&gt;That change to &lt;STRONG&gt;PHYS_SDRAM_SIZE&lt;/STRONG&gt; is already applied on our side.&lt;BR /&gt;In our U‑Boot build, PHYS_SDRAM_SIZE in include/configs/imx93_evk.h is set to &lt;STRONG&gt;0x10000000&lt;/STRONG&gt; (256 MB), exactly as you suggested.&lt;/P&gt;&lt;P&gt;Despite this, U‑Boot still reports a 2 GB DRAM bank:&lt;BR /&gt;=&amp;gt; bdinfo&lt;BR /&gt;DRAM bank = 0x0000000080000000&lt;/P&gt;&lt;P&gt;For this reason, we believe the root cause is not in imx93_evk.h anymore.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you confirm whether this change is expected to be sufficient on its own, or if there are additional settings on i.MX93 that should be adjusted to correctly reflect a 256 MB LPDDR4 device?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;BR&lt;BR /&gt;Sergio&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2026 08:41:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX93-LPDDR4-DRAM-detected-as-2GB-instead-of-256MB-on-custom/m-p/2357082#M245033</guid>
      <dc:creator>sergiomauro</dc:creator>
      <dc:date>2026-04-28T08:41:28Z</dc:date>
    </item>
  </channel>
</rss>

