imx8mp 2G lpddr4

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx8mp 2G lpddr4

Jump to solution
3,577 Views
liyun1
Contributor II

NXP,你好!

我尝试在imx8mp上使用2G lpddr4未成功,请帮忙支持。

情况如下:

DDR校准完成,且做过"Over Night Test",确定ds OK, 焊接OK。

且生成lpddr4_timing.c替换到uboot,成功编译支持2G的uboot bin。

 

下载LF_v5.10.52-2.1.0_images_IMX8MPEVK.zip,

用我自己的2G uboot替换到imx-boot-imx8mpevk-sd.bin-flash_evk

使用uuu uuu.auto完成烧录

boot up,中断uboot,输ums 0 mmc 2,接电脑替换我的dtb和Image

 

dts中修改:

memory@40000000 {
device_type = "memory";
reg = <0x0 0x40000000 0 0x80000000>;
};

&resmem {
linux,cma {
size = <0 0x3c000000>;
alloc-ranges = <0 0x40000000 0 0x80000000>;
};
};

&mix_gpu_ml {
reg = <0x0 0x40000000 0x0 0x80000000>, <0x0 0x0 0x0 0x10000000>;
};

 

开机后随机发生:

[ 20.346583] Unable to handle kernel paging request at virtual address f7ff800011691300
[ 20.356323] Mem abort info:
[ 20.361642] ESR = 0x96000004
[ 20.364764] EC = 0x25: DABT (current EL), IL = 32 bits
[ 20.370876] SET = 0, FnV = 0
[ 20.373939] EA = 0, S1PTW = 0
[ 20.377115] Data abort info:
[ 20.380017] ISV = 0, ISS = 0x00000004
[ 20.383866] CM = 0, WnR = 0
[ 20.386851] [f7ff800011691300] address between user and kernel address ranges
[ 20.394024] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[ 20.399597] Modules linked in:
[ 20.402657] CPU: 2 PID: 260 Comm: systemd-udevd Not tainted 5.10.52+g348eab8cebc6 #1
[ 20.410397] Hardware name: EMB-3512-V11 (DT)
[ 20.414667] pstate: 40000005 (nZcv daif -PAN -UAO -TCO BTYPE=--)
[ 20.420679] pc : __pi_strcmp+0x20/0x158
[ 20.424519] lr : kernfs_dop_revalidate+0x90/0xe0
[ 20.429135] sp : ffff80001279ba40
[ 20.432450] x29: ffff80001279ba40 x28: ffff0000049d9020
[ 20.437765] x27: 0000000000000000 x26: 2f2f2f2f2f2f2f2f
[ 20.443080] x25: d0d0d0d0d0d0d0d0 x24: ffff000005ebe3c0
[ 20.448394] x23: ffff80001279bcb8 x22: ffff0000045e8100
[ 20.453708] x21: ffff0000045e8f00 x20: ffff800011bc1db0
[ 20.459022] x19: ffff0000067c0cc0 x18: 0000000000000000
[ 20.464339] x17: 0000000000000000 x16: 0000000000000000
[ 20.469654] x15: 0000000000000000 x14: 0000000000000000
[ 20.474970] x13: 0000000000000000 x12: fefefefefefefeff
[ 20.480285] x11: 0000000000000018 x10: 0101010101010101
[ 20.485601] x9 : 00000000e6872885 x8 : 7f7f7f7f7f7f7f7f
[ 20.490917] x7 : 0000000000000000 x6 : ffff00000675fd80
[ 20.496229] x5 : 0000000000000007 x4 : 0000000000000000
[ 20.501540] x3 : ffff800011bc1db0 x2 : 0073726576697264
[ 20.506854] x1 : f7ff800011691300 x0 : ffff0000067c0d00
[ 20.512169] Call trace:
[ 20.514621] __pi_strcmp+0x20/0x158
[ 20.518113] lookup_fast+0xe8/0x18c
[ 20.521603] walk_component+0x40/0x1e0
[ 20.525354] link_path_walk.part.0+0x240/0x360
[ 20.529799] path_openat+0xa4/0xe20
[ 20.533289] do_filp_open+0x78/0x124
[ 20.536866] do_sys_openat2+0xb0/0x160
[ 20.540618] __arm64_sys_openat+0x68/0xb0
[ 20.544632] el0_svc_common.constprop.0+0x78/0x1a0
[ 20.549422] do_el0_svc+0x24/0x90
[ 20.552740] el0_svc+0x14/0x20
[ 20.555795] el0_sync_handler+0x1a4/0x1b0
[ 20.559806] el0_sync+0x180/0x1c0
[ 20.563125] Code: 540002e1 f2400807 54000141 f8408402 (f8408423)
[ 20.569221] ---[ end trace e21180f969557d5b ]---
[ 50.142564] VSD_3V3: disabling

Labels (2)
Tags (1)
0 Kudos
Reply
1 Solution
3,458 Views
liyun1
Contributor II

已解决

参考:

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/1866MHz-LPDDR4-Porting-Guide/ta-p/145983...

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/iMX-8M-Mini-Register-Programming-Aid-DRA...

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX-8M-Family-DDR-Tool-Release/ta-p/110...

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX-8MPlus-m865S-DDR-Register-Programmi...


得出总结:

如果是2GB内存, LPDDR4-4266或LPDDR4-3733则不需要关注以下。

8mp 校准2GB LPDDR4-3200 时, 时钟设置为2000MHz,校准和压力测试都OK,但是运行应用程序发生:

CPU: 2 PID: 260 Comm: systemd-udevd Not tainted 5.10.52+g348eab8cebc6 #1

systemd-udevd相应用bin移除后,另一个bin执行也是报类似错误,个人怀疑原因可能是超频使用DDR所至。

 

步骤:

使用mscale_ddr_tool_v3.31  MX8M_Plus_LPDDR4_RPA_v9.xlsx进行校准

1、 MX8M_Plus_LPDDR4_RPA_v9.xlsx 中对着DDR参数配置好(注意2000MHz不用改),保存一个DS文件。

2、编辑ds文件

编辑DS文件中将0x30360054后面的值改为 0x10B080 (这个值如何算出,参考
https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/iMX-8M-Mini-Register-Programming-Aid-DRA... )

1600Mhz = 0x10B080

 3、mscale_ddr_tool加载ds,校准

4、DDR校准几秒就完成,然后压力测试,填上速率开始测试。建议把"Over Night Test" 勾上,测一晚OK更放心。

5、生成 lpddr4_timing.c 

6、最关键的地方,参考下面链接的第3点:

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/iMX-8M-Mini-Register-Programming-Aid-DRA...

生成的 lpddr4_timing.c 中,将 ddr_dram_fsp_msg 数组中的4000改为 32000即可。

View solution in original post

5 Replies
3,459 Views
liyun1
Contributor II

已解决

参考:

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/1866MHz-LPDDR4-Porting-Guide/ta-p/145983...

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/iMX-8M-Mini-Register-Programming-Aid-DRA...

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX-8M-Family-DDR-Tool-Release/ta-p/110...

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX-8MPlus-m865S-DDR-Register-Programmi...


得出总结:

如果是2GB内存, LPDDR4-4266或LPDDR4-3733则不需要关注以下。

8mp 校准2GB LPDDR4-3200 时, 时钟设置为2000MHz,校准和压力测试都OK,但是运行应用程序发生:

CPU: 2 PID: 260 Comm: systemd-udevd Not tainted 5.10.52+g348eab8cebc6 #1

systemd-udevd相应用bin移除后,另一个bin执行也是报类似错误,个人怀疑原因可能是超频使用DDR所至。

 

步骤:

使用mscale_ddr_tool_v3.31  MX8M_Plus_LPDDR4_RPA_v9.xlsx进行校准

1、 MX8M_Plus_LPDDR4_RPA_v9.xlsx 中对着DDR参数配置好(注意2000MHz不用改),保存一个DS文件。

2、编辑ds文件

编辑DS文件中将0x30360054后面的值改为 0x10B080 (这个值如何算出,参考
https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/iMX-8M-Mini-Register-Programming-Aid-DRA... )

1600Mhz = 0x10B080

 3、mscale_ddr_tool加载ds,校准

4、DDR校准几秒就完成,然后压力测试,填上速率开始测试。建议把"Over Night Test" 勾上,测一晚OK更放心。

5、生成 lpddr4_timing.c 

6、最关键的地方,参考下面链接的第3点:

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/iMX-8M-Mini-Register-Programming-Aid-DRA...

生成的 lpddr4_timing.c 中,将 ddr_dram_fsp_msg 数组中的4000改为 32000即可。

3,538 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @liyun1,

I hope you are doing well
 
Please try to add the reserved memory region(for 2G LPDDR4) for the GPU as shown in the below device tree file and share your observations.
 
Thanks & Regards,
Dhruvit Vasavada
0 Kudos
Reply
3,518 Views
liyun1
Contributor II

Hi Dhruvit,


已尝试:

diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index 6eb08e51f560..a085f710f6cc 100755
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -191,6 +191,11 @@
linux,cma-default;
};

+ gpu_reserved: gpu_reserved@100000000 {
+ no-map;
+ reg = <0x1 0x00000000 0 0x10000000>;
+ };
+
dsp_reserved: dsp@92400000 {
reg = <0 0x92400000 0 0x1000000>;
no-map;
@@ -2316,6 +2321,7 @@
cores = <&gpu_3d>, <&ml_vipsi>, <&gpu_2d>;
reg = <0x0 0x40000000 0x0 0xC0000000>, <0x0 0x0 0x0 0x10000000>;
reg-names = "phys_baseaddr", "contiguous_mem";
+ memory-region=<&gpu_reserved>;
status = "disabled";
};

问题依然存在,具体运行情况见附件: Linux_5.10.52_2Glpddr4_20231030.log

0 Kudos
Reply
3,491 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @liyun1,

I hope you are doing well
 
The value of the reg property is by default will access memory above 3 GB(which will overflow the available dram range).
 
Kindly change the value within the range of 2GB LPDDR4 as below and try.
reg = <0x0 0x80000000 0 0x10000000>;
 
Thanks & Regards,
Dhruvit Vasavada

0 Kudos
Reply
3,481 Views
liyun1
Contributor II

Hi Dhruvit,

感谢支持。

已尝试:reg = <0x0 0x80000000 0 0x10000000>;

diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index 6eb08e51f560..b7d282e9159e 100755
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -191,6 +191,12 @@
linux,cma-default;
};

+ gpu_reserved: gpu_reserved@100000000 {
+ no-map;
+ //reg = <0x1 0x00000000 0 0x10000000>;
+ reg = <0x0 0x80000000 0 0x10000000>;
+ };
+
dsp_reserved: dsp@92400000 {
reg = <0 0x92400000 0 0x1000000>;
no-map;
@@ -2316,6 +2322,7 @@
cores = <&gpu_3d>, <&ml_vipsi>, <&gpu_2d>;
reg = <0x0 0x40000000 0x0 0xC0000000>, <0x0 0x0 0x0 0x10000000>;
reg-names = "phys_baseaddr", "contiguous_mem";
+ memory-region=<&gpu_reserved>;
status = "disabled";
};
仍没有改进,详细log见附件: Linux_5.10.52_2Glpddr4_20231101.log

 

另外我注意到:LPDDR4颗料最大速率为1600MHz,页8mp固定设置为2000MHz,是否与此有关?

liyun1_1-1698848896502.png

 

D-00246 FORESEE_LPDDR_FLXC2002G-N2_200ball_10x14.5x1.00_3200Mbps.pdf 第7页:

liyun1_0-1698848687475.png

 

 

 

0 Kudos
Reply