<?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 IMX8MN reserved memory for 512MB LPDDR4 in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MN-reserved-memory-for-512MB-LPDDR4/m-p/1468189#M191113</link>
    <description>&lt;P&gt;Hello, I'm using a custom IMX8MN board with an ISSI 512MB LPDDR4 memory as follows:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.issi.com/WW/pdf/43-46LQ16256-32128A-AL_.pdf" target="_blank"&gt;https://www.issi.com/WW/pdf/43-46LQ16256-32128A-AL_.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have the following configuration:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;/tmp/work/imx8mnevk-poky-linux/u-boot-imx/1_2020.04-r0/git/arch/arm/dts/&lt;STRONG&gt;imx8mn.dtsi&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="markup"&gt;memory@40000000 {
device_type = "memory";
reg = &amp;lt;0x0 0x40000000 0 0x20000000&amp;gt;;
};&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;/tmp/work-shared/imx8mnevk/kernel-source/arch/arm64/boot/dts/freescale/&lt;STRONG&gt;imx8mn.dtsi&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="markup"&gt;memory@40000000 {
		device_type = "memory";
		reg = &amp;lt;0x0 0x40000000 0 0x20000000&amp;gt;;
	};

	resmem: reserved-memory {
		#address-cells = &amp;lt;2&amp;gt;;
		#size-cells = &amp;lt;2&amp;gt;;
		ranges;

		/* global autoconfigured region for contiguous allocations */
		linux,cma {
			compatible = "shared-dma-pool";
			reusable;
			size = &amp;lt;0 0xa000000&amp;gt;;
			alloc-ranges = &amp;lt;0 0x40000000 0 0x48000000&amp;gt;;
			linux,cma-default;
		};
	};&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;&amp;nbsp;/tmp/work/imx8mnevk-poky-linux/u-boot-imx/1_2020.04-r0/git/include/configs/&lt;STRONG&gt;imx8mn_evk.h&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="markup"&gt;/* Size of malloc() pool */
#define CONFIG_SYS_MALLOC_LEN		SZ_32M

#define CONFIG_SYS_SDRAM_BASE           0x40000000
#define PHYS_SDRAM                      0x40000000

#ifdef CONFIG_TARGET_IMX8MN_DDR3_EVK
#define PHYS_SDRAM_SIZE			0x40000000 /* 1GB DDR */
#else
//#define PHYS_SDRAM_SIZE			0x80000000 /* 2GB DDR */
//#define PHYS_SDRAM_SIZE			0x40000000 /* 1GB DDR */
#define PHYS_SDRAM_SIZE			0x20000000 /* 512MB DDR */
#endif

#define CONFIG_SYS_MEMTEST_START	0x60000000
#define CONFIG_SYS_MEMTEST_END      (CONFIG_SYS_MEMTEST_START + (PHYS_SDRAM_SIZE &amp;gt;&amp;gt; 2))

#define CONFIG_MXC_UART_BASE		UART2_BASE_ADDR&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Boot is working fine but when is going to run the Kernel, it stops.&lt;/P&gt;&lt;P&gt;This is what I got:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;U-Boot SPL 2020.04-5.4.70-2.3.3+g06d688e819 (Jun 02 2022 - 09:00:08 +0000)
Can't find PMIC:PCA9450
DDRINFO: start DRAM init
DDRINFO: DRAM rate 3200MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
Normal Boot
Trying to boot from BOOTROM
image offset 0x8000, pagesize 0x200, ivt offset 0x0
NOTICE:  BL31: v2.2(release):rel_imx_5.4.70_2.3.6-0-g15e8ff164
NOTICE:  BL31: Built : 12:45:09, Apr 19 2022


U-Boot 2020.04-5.4.70-2.3.3+g06d688e819 (Jun 02 2022 - 09:00:08 +0000)

CPU:   i.MX8MNano QuadLite rev1.0 1500 MHz (running at 1200 MHz)
CPU:   Commercial temperature grade (0C to 95C) at 36C
Reset cause: POR
Model: NXP i.MX8MNano LPDDR4 AQUA-UBOOT board
DRAM:  480 MiB
tcpc_init: Can't find device id=0x52
setup_typec: tcpc port2 init failed, err=-19
TCPC:  Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C1 0x50]
SNK.Default on CC2
tcpc_pd_receive_message: Polling ALERT register, TCPC_ALERT_RX_STATUS bit failed, ret = -62
Power supply on USB1
MMC:   FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... Run CMD11 1.8V switch
*** Warning - bad CRC, using default environment

[*]-Video Link 0Can't find cec device id=0x3c
fail to probe panel device adv7535@3d
failed to get any video link display timings
probe video device failed, ret -22

        [0] lcd-controller@32e00000, video
        [1] dsi_controller@32e10000, video_bridge
        [2] adv7535@3d, panel
Can't find cec device id=0x3c
fail to probe panel device adv7535@3d
failed to get any video link display timings
probe video device failed, ret -22
In:    serial
Out:   serial
Err:   serial

 BuildInfo:
  - ATF 15e8ff1
  - U-Boot 2020.04-5.4.70-2.3.3+g06d688e819

switch to partitions #0, OK
mmc1 is current device
flash target is MMC:1
Net:   Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
No ethernet found.

Fastboot: Normal
Normal Boot
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc1 is current device
28078592 bytes read in 1207 ms (22.2 MiB/s)
Booting from mmc ...
41998 bytes read in 18 ms (2.2 MiB/s)
## Flattened Device Tree blob at 43000000
   Booting using the fdt blob at 0x43000000
   Using Device Tree in place at 0000000043000000, end 000000004300d40d
Found /gpu@38000000 node
Modify /gpu@38000000:status disabled
Can't find cec device id=0x3c
fail to probe panel device adv7535@3d
failed to get any video link display timings
probe video device failed, ret -22

Starting kernel ...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think that is a CMA reserved memory problem so I have tried different configurations but I still not know how to set this properly.&lt;/P&gt;&lt;P&gt;Could anyone explain me how do I set different size configuratios for LPDDR memory?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards, Sonia.&lt;/P&gt;</description>
    <pubDate>Thu, 02 Jun 2022 10:59:21 GMT</pubDate>
    <dc:creator>SoniaArevalo</dc:creator>
    <dc:date>2022-06-02T10:59:21Z</dc:date>
    <item>
      <title>IMX8MN reserved memory for 512MB LPDDR4</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MN-reserved-memory-for-512MB-LPDDR4/m-p/1468189#M191113</link>
      <description>&lt;P&gt;Hello, I'm using a custom IMX8MN board with an ISSI 512MB LPDDR4 memory as follows:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.issi.com/WW/pdf/43-46LQ16256-32128A-AL_.pdf" target="_blank"&gt;https://www.issi.com/WW/pdf/43-46LQ16256-32128A-AL_.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have the following configuration:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;/tmp/work/imx8mnevk-poky-linux/u-boot-imx/1_2020.04-r0/git/arch/arm/dts/&lt;STRONG&gt;imx8mn.dtsi&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="markup"&gt;memory@40000000 {
device_type = "memory";
reg = &amp;lt;0x0 0x40000000 0 0x20000000&amp;gt;;
};&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;/tmp/work-shared/imx8mnevk/kernel-source/arch/arm64/boot/dts/freescale/&lt;STRONG&gt;imx8mn.dtsi&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="markup"&gt;memory@40000000 {
		device_type = "memory";
		reg = &amp;lt;0x0 0x40000000 0 0x20000000&amp;gt;;
	};

	resmem: reserved-memory {
		#address-cells = &amp;lt;2&amp;gt;;
		#size-cells = &amp;lt;2&amp;gt;;
		ranges;

		/* global autoconfigured region for contiguous allocations */
		linux,cma {
			compatible = "shared-dma-pool";
			reusable;
			size = &amp;lt;0 0xa000000&amp;gt;;
			alloc-ranges = &amp;lt;0 0x40000000 0 0x48000000&amp;gt;;
			linux,cma-default;
		};
	};&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;&amp;nbsp;/tmp/work/imx8mnevk-poky-linux/u-boot-imx/1_2020.04-r0/git/include/configs/&lt;STRONG&gt;imx8mn_evk.h&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="markup"&gt;/* Size of malloc() pool */
#define CONFIG_SYS_MALLOC_LEN		SZ_32M

#define CONFIG_SYS_SDRAM_BASE           0x40000000
#define PHYS_SDRAM                      0x40000000

#ifdef CONFIG_TARGET_IMX8MN_DDR3_EVK
#define PHYS_SDRAM_SIZE			0x40000000 /* 1GB DDR */
#else
//#define PHYS_SDRAM_SIZE			0x80000000 /* 2GB DDR */
//#define PHYS_SDRAM_SIZE			0x40000000 /* 1GB DDR */
#define PHYS_SDRAM_SIZE			0x20000000 /* 512MB DDR */
#endif

#define CONFIG_SYS_MEMTEST_START	0x60000000
#define CONFIG_SYS_MEMTEST_END      (CONFIG_SYS_MEMTEST_START + (PHYS_SDRAM_SIZE &amp;gt;&amp;gt; 2))

#define CONFIG_MXC_UART_BASE		UART2_BASE_ADDR&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Boot is working fine but when is going to run the Kernel, it stops.&lt;/P&gt;&lt;P&gt;This is what I got:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;U-Boot SPL 2020.04-5.4.70-2.3.3+g06d688e819 (Jun 02 2022 - 09:00:08 +0000)
Can't find PMIC:PCA9450
DDRINFO: start DRAM init
DDRINFO: DRAM rate 3200MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
Normal Boot
Trying to boot from BOOTROM
image offset 0x8000, pagesize 0x200, ivt offset 0x0
NOTICE:  BL31: v2.2(release):rel_imx_5.4.70_2.3.6-0-g15e8ff164
NOTICE:  BL31: Built : 12:45:09, Apr 19 2022


U-Boot 2020.04-5.4.70-2.3.3+g06d688e819 (Jun 02 2022 - 09:00:08 +0000)

CPU:   i.MX8MNano QuadLite rev1.0 1500 MHz (running at 1200 MHz)
CPU:   Commercial temperature grade (0C to 95C) at 36C
Reset cause: POR
Model: NXP i.MX8MNano LPDDR4 AQUA-UBOOT board
DRAM:  480 MiB
tcpc_init: Can't find device id=0x52
setup_typec: tcpc port2 init failed, err=-19
TCPC:  Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C1 0x50]
SNK.Default on CC2
tcpc_pd_receive_message: Polling ALERT register, TCPC_ALERT_RX_STATUS bit failed, ret = -62
Power supply on USB1
MMC:   FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... Run CMD11 1.8V switch
*** Warning - bad CRC, using default environment

[*]-Video Link 0Can't find cec device id=0x3c
fail to probe panel device adv7535@3d
failed to get any video link display timings
probe video device failed, ret -22

        [0] lcd-controller@32e00000, video
        [1] dsi_controller@32e10000, video_bridge
        [2] adv7535@3d, panel
Can't find cec device id=0x3c
fail to probe panel device adv7535@3d
failed to get any video link display timings
probe video device failed, ret -22
In:    serial
Out:   serial
Err:   serial

 BuildInfo:
  - ATF 15e8ff1
  - U-Boot 2020.04-5.4.70-2.3.3+g06d688e819

switch to partitions #0, OK
mmc1 is current device
flash target is MMC:1
Net:   Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
No ethernet found.

Fastboot: Normal
Normal Boot
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc1 is current device
28078592 bytes read in 1207 ms (22.2 MiB/s)
Booting from mmc ...
41998 bytes read in 18 ms (2.2 MiB/s)
## Flattened Device Tree blob at 43000000
   Booting using the fdt blob at 0x43000000
   Using Device Tree in place at 0000000043000000, end 000000004300d40d
Found /gpu@38000000 node
Modify /gpu@38000000:status disabled
Can't find cec device id=0x3c
fail to probe panel device adv7535@3d
failed to get any video link display timings
probe video device failed, ret -22

Starting kernel ...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think that is a CMA reserved memory problem so I have tried different configurations but I still not know how to set this properly.&lt;/P&gt;&lt;P&gt;Could anyone explain me how do I set different size configuratios for LPDDR memory?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards, Sonia.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 10:59:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MN-reserved-memory-for-512MB-LPDDR4/m-p/1468189#M191113</guid>
      <dc:creator>SoniaArevalo</dc:creator>
      <dc:date>2022-06-02T10:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MN reserved memory for 512MB LPDDR4</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MN-reserved-memory-for-512MB-LPDDR4/m-p/1468463#M191129</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I would like to ask if you have run the DDR stress test and passed?&lt;BR /&gt;If not, please find it here:&lt;BR /&gt;&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;&lt;BR /&gt;&lt;BR /&gt;Also, regarding CMA you may refer to the following community document&lt;BR /&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/aarch64-Linux-Kernel-Memory-Management/ta-p/1108866" target="_blank"&gt;https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/aarch64-Linux-Kernel-Memory-Management/ta-p/1108866&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Aldo.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 22:39:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MN-reserved-memory-for-512MB-LPDDR4/m-p/1468463#M191129</guid>
      <dc:creator>AldoG</dc:creator>
      <dc:date>2022-06-02T22:39:53Z</dc:date>
    </item>
  </channel>
</rss>

