Skip to contentSkip to conversation

sunxi: lower the DDR frequency of Orange Pi Prime

PATCH New Icenowy Zheng 4 participants 10 messages Oct 31, 2017 – Oct 29, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sunxi: lower the DDR frequency of Orange Pi Prime

When I use Orange Pi Prime to do some heavy compliation tasks, the gcc compiler sometimes mysteriously segfaults, and memtester catches memory error. As the lima-memtester cannot support H5 (Mali-450 GPU equipped), there's no really reliable way to detect DRAM stability except try and error.

Lower the DDR frequency to 624MHz seems to solved the issue.

Set the default frequency to 624MHz in the defconfig, as 672MHz is observed to be unstable at least on my board.

---
 configs/orangepi_prime_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configs/orangepi_prime_defconfig +1 -1
index 3d87374002..88eaf12741 100644
@@ -1,7 +1,7 @@
 CONFIG_ARM=y
 CONFIG_ARCH_SUNXI=y
 CONFIG_MACH_SUN50I_H5=y
-CONFIG_DRAM_CLK=672
+CONFIG_DRAM_CLK=624
 CONFIG_DRAM_ZQ=3881977
 CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-prime"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
Signature · 1 line
2.13.6
#1 lore raw

PATCH 1/1 sunxi: lower the DDR frequency of Orange Pi Prime

Quoted 6 lines · Icenowy Zheng

When I use Orange Pi Prime to do some heavy compliation tasks, the gcc compiler sometimes mysteriously segfaults, and memtester catches memory error. As the lima-memtester cannot support H5 (Mali-450 GPU equipped), there's no really reliable way to detect DRAM stability except try and error.

Quoted 6 lines

Lower the DDR frequency to 624MHz seems to solved the issue.

Set the default frequency to 624MHz in the defconfig, as 672MHz is observed to be unstable at least on my board.

What is the value used in the fex file?

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171031/467dc785/attachment.sig>
#2 lore raw
Quoted 9 lines · 在 2017-10-31 16:09,Maxime Ripard 写道:
Quoted 8 lines · Icenowy Zheng

When I use Orange Pi Prime to do some heavy compliation tasks, the gcc compiler sometimes mysteriously segfaults, and memtester catches memory
error. As the lima-memtester cannot support H5 (Mali-450 GPU equipped),
there's no really reliable way to detect DRAM stability except try and error.

Quoted 8 lines
Quoted 6 lines

Lower the DDR frequency to 624MHz seems to solved the issue.

Set the default frequency to 624MHz in the defconfig, as 672MHz is observed to be unstable at least on my board.

What is the value used in the fex file?

672MHz. The current frequency and ZQ are both the same with FEX. [1]

[1]
https://github.com/OrangePiLibra/OrangePi_H5SDK/blob/master/external/sys_config.fex

Quoted 7 lines

Maxime

--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

#3 lore raw
Quoted 15 lines · icenowy at aosc.io
Quoted 14 lines · 在 2017-10-31 16:09,Maxime Ripard 写道:
Quoted 13 lines · Icenowy Zheng

When I use Orange Pi Prime to do some heavy compliation tasks, the gcc compiler sometimes mysteriously segfaults, and memtester catches memory
error. As the lima-memtester cannot support H5 (Mali-450 GPU equipped),
there's no really reliable way to detect DRAM stability except try and error.

Lower the DDR frequency to 624MHz seems to solved the issue.

Set the default frequency to 624MHz in the defconfig, as 672MHz is observed to be unstable at least on my board.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

What is the value used in the fex file?

672MHz. The current frequency and ZQ are both the same with FEX. [1]

[1] https://github.com/OrangePiLibra/OrangePi_H5SDK/blob/master/external/sys_config.fex

And it breaks the same way on a legacy kernel?

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171031/9942fb53/attachment.sig>
#4 lore raw
Quoted 18 lines · 在 2017-10-31 18:21,Maxime Ripard 写道:
Quoted 17 lines · icenowy at aosc.io
Quoted 16 lines · 在 2017-10-31 16:09,Maxime Ripard 写道:
Quoted 14 lines · Icenowy Zheng

When I use Orange Pi Prime to do some heavy compliation tasks, the gcc compiler sometimes mysteriously segfaults, and memtester catches memory
error. As the lima-memtester cannot support H5 (Mali-450 GPU equipped),
there's no really reliable way to detect DRAM stability except try and error.

Lower the DDR frequency to 624MHz seems to solved the issue.

Set the default frequency to 624MHz in the defconfig, as 672MHz is observed to be unstable at least on my board.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

What is the value used in the fex file?

672MHz. The current frequency and ZQ are both the same with FEX. [1]

[1]
https://github.com/OrangePiLibra/OrangePi_H5SDK/blob/master/external/sys_config.fex

And it breaks the same way on a legacy kernel?

Sorry but I didn't use any legacy-based solutions on H5.

Quoted 2 lines

Maxime

#5 lore raw
Quoted 21 lines · Icenowy Zheng
Quoted 20 lines · 在 2017-10-31 18:21,Maxime Ripard 写道:
Quoted 19 lines · icenowy at aosc.io
Quoted 17 lines · 在 2017-10-31 16:09,Maxime Ripard 写道:
Quoted 8 lines · Icenowy Zheng

When I use Orange Pi Prime to do some heavy compliation tasks, the gcc compiler sometimes mysteriously segfaults, and memtester catches memory
error. As the lima-memtester cannot support H5 (Mali-450 GPU equipped),
there's no really reliable way to detect DRAM stability except try and error.

Quoted 6 lines

Lower the DDR frequency to 624MHz seems to solved the issue.

Set the default frequency to 624MHz in the defconfig, as 672MHz is observed to be unstable at least on my board.

What is the value used in the fex file?

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

672MHz. The current frequency and ZQ are both the same with FEX. [1]

[1] https://github.com/OrangePiLibra/OrangePi_H5SDK/blob/master/external/sys_config.fex

And it breaks the same way on a legacy kernel?

Sorry but I didn't use any legacy-based solutions on H5.

That should be worth testing then, because if we're using the same RAM settings and we have stability issues, then we have a bug somewhere, and putting a blanket on top of it isn't a solution.

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171031/f8aed8f9/attachment.sig>
#6 lore raw

PATCH 1/1 sunxi: lower the DDR frequency of Orange Pi Prime

In reply to Maxime Ripard
Quoted 11 lines · 在 2017-10-31二的 09:09 +0100,Maxime Ripard写道:
Quoted 10 lines · Icenowy Zheng

When I use Orange Pi Prime to do some heavy compliation tasks, the gcc
compiler sometimes mysteriously segfaults, and memtester catches memory
error. As the lima-memtester cannot support H5 (Mali-450 GPU equipped),
there's no really reliable way to detect DRAM stability except try and
error.

Quoted 8 lines
Quoted 6 lines

Lower the DDR frequency to 624MHz seems to solved the issue.

Set the default frequency to 624MHz in the defconfig, as 672MHz is observed to be unstable at least on my board.

What is the value used in the fex file?

When testing with BSP images made by Orange Pi, I found that in newer images they secretly tweaked the DDR freq of Orange Pi PC2 and Prime to 624MHz.

This is found by checking pll-dram frequency after booting.

Quoted 3 lines

Maxime

#7 lore raw

PATCH 1/1 sunxi: lower the DDR frequency of Orange Pi Prime

Quoted 19 lines · Icenowy Zheng
Quoted 18 lines · 在 2017-10-31二的 09:09 +0100,Maxime Ripard写道:
Quoted 16 lines · Icenowy Zheng

When I use Orange Pi Prime to do some heavy compliation tasks, the gcc
compiler sometimes mysteriously segfaults, and memtester catches memory
error. As the lima-memtester cannot support H5 (Mali-450 GPU equipped),
there's no really reliable way to detect DRAM stability except try and
error.

Lower the DDR frequency to 624MHz seems to solved the issue.

Set the default frequency to 624MHz in the defconfig, as 672MHz is observed to be unstable at least on my board.

Quoted 7 lines
Quoted 1 line

What is the value used in the fex file?

When testing with BSP images made by Orange Pi, I found that in newer images they secretly tweaked the DDR freq of Orange Pi PC2 and Prime to 624MHz.

This is found by checking pll-dram frequency after booting.

Ok then. Can you resend that patch?

Thanks!
Maxime

Signature · 10 lines
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181029/6bd08d7d/attachment.sig>
#8 lore raw

PATCH 1/1 sunxi: lower the DDR frequency of Orange Pi Prime

In reply to Icenowy Zheng
Quoted 7 lines · Icenowy Zheng

When I use Orange Pi Prime to do some heavy compliation tasks, the gcc compiler sometimes mysteriously segfaults, and memtester catches memory error. As the lima-memtester cannot support H5 (Mali-450 GPU equipped), there's no really reliable way to detect DRAM stability except try and error.

Lower the DDR frequency to 624MHz seems to solved the issue.

I'm not sure, since ddr can be keyrole IP during relocation and falcon mode(which I'm trying) but we can make sure the ddr test in uboot atleast?

thanks!

Signature · 4 lines
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
#9 lore raw

于 2017年10月31日 GMT+08:00 下午4:59:34, Jagan Teki <[email protected]> 写到:

Quoted 8 lines · Icenowy Zheng
Quoted 1 line

When I use Orange Pi Prime to do some heavy compliation tasks, the

gcc

Quoted 1 line

compiler sometimes mysteriously segfaults, and memtester catches

memory

Quoted 1 line

error. As the lima-memtester cannot support H5 (Mali-450 GPU

equipped),

Quoted 1 line

there's no really reliable way to detect DRAM stability except try

Quoted 8 lines

and

Quoted 3 lines

error.

Lower the DDR frequency to 624MHz seems to solved the issue.

I'm not sure, since ddr can be keyrole IP during relocation and falcon mode(which I'm trying) but we can make sure the ddr test in uboot atleast?

Some issues will only appear under heavy load, which is difficult to emulate by u-boot.

To expose the issue by memtester I used two background
tasks: one is infinite tinymembench, the other is building a Linux kernel with -j4.

Quoted 2 lines

thanks!