All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] sunxi: lower the DDR frequency of Orange Pi Prime
@ 2017-10-31  7:56 Icenowy Zheng
  2017-10-31  8:09 ` Maxime Ripard
  2017-10-31  8:59 ` Jagan Teki
  0 siblings, 2 replies; 10+ messages in thread
From: Icenowy Zheng @ 2017-10-31  7:56 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 configs/orangepi_prime_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/orangepi_prime_defconfig b/configs/orangepi_prime_defconfig
index 3d87374002..88eaf12741 100644
--- a/configs/orangepi_prime_defconfig
+++ b/configs/orangepi_prime_defconfig
@@ -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
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] sunxi: lower the DDR frequency of Orange Pi Prime
  2017-10-31  7:56 [U-Boot] [PATCH] sunxi: lower the DDR frequency of Orange Pi Prime Icenowy Zheng
@ 2017-10-31  8:09 ` Maxime Ripard
  2017-10-31  8:17   ` [U-Boot] [linux-sunxi] " icenowy at aosc.io
  2018-10-27 16:26   ` [U-Boot] " Icenowy Zheng
  2017-10-31  8:59 ` Jagan Teki
  1 sibling, 2 replies; 10+ messages in thread
From: Maxime Ripard @ 2017-10-31  8:09 UTC (permalink / raw)
  To: u-boot

On Tue, Oct 31, 2017 at 03:56:08PM +0800, Icenowy Zheng wrote:
> 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.
> 
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>

What is the value used in the fex file?

Maxime

-- 
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>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [linux-sunxi] Re: [PATCH] sunxi: lower the DDR frequency of Orange Pi Prime
  2017-10-31  8:09 ` Maxime Ripard
@ 2017-10-31  8:17   ` icenowy at aosc.io
  2017-10-31 10:21     ` Maxime Ripard
  2018-10-27 16:26   ` [U-Boot] " Icenowy Zheng
  1 sibling, 1 reply; 10+ messages in thread
From: icenowy at aosc.io @ 2017-10-31  8:17 UTC (permalink / raw)
  To: u-boot

在 2017-10-31 16:09,Maxime Ripard 写道:
> On Tue, Oct 31, 2017 at 03:56:08PM +0800, Icenowy Zheng wrote:
>> 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.
>> 
>> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> 
> 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

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] sunxi: lower the DDR frequency of Orange Pi Prime
  2017-10-31  7:56 [U-Boot] [PATCH] sunxi: lower the DDR frequency of Orange Pi Prime Icenowy Zheng
  2017-10-31  8:09 ` Maxime Ripard
@ 2017-10-31  8:59 ` Jagan Teki
  2017-10-31  9:08   ` [U-Boot] [linux-sunxi] " icenowy at aosc.io
  1 sibling, 1 reply; 10+ messages in thread
From: Jagan Teki @ 2017-10-31  8:59 UTC (permalink / raw)
  To: u-boot

On Tue, Oct 31, 2017 at 1:26 PM, Icenowy Zheng <icenowy@aosc.io> wrote:
> 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!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [linux-sunxi] Re: [PATCH] sunxi: lower the DDR frequency of Orange Pi Prime
  2017-10-31  8:59 ` Jagan Teki
@ 2017-10-31  9:08   ` icenowy at aosc.io
  0 siblings, 0 replies; 10+ messages in thread
From: icenowy at aosc.io @ 2017-10-31  9:08 UTC (permalink / raw)
  To: u-boot


于 2017年10月31日 GMT+08:00 下午4:59:34, Jagan Teki <jagannadh.teki@gmail.com> 
写到:
> On Tue, Oct 31, 2017 at 1:26 PM, Icenowy Zheng <icenowy@aosc.io> wrote:
>> 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?

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.

> 
> thanks!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [linux-sunxi] Re: [PATCH] sunxi: lower the DDR frequency of Orange Pi Prime
  2017-10-31  8:17   ` [U-Boot] [linux-sunxi] " icenowy at aosc.io
@ 2017-10-31 10:21     ` Maxime Ripard
  2017-10-31 10:22       ` Icenowy Zheng
  0 siblings, 1 reply; 10+ messages in thread
From: Maxime Ripard @ 2017-10-31 10:21 UTC (permalink / raw)
  To: u-boot

On Tue, Oct 31, 2017 at 04:17:06PM +0800, icenowy at aosc.io wrote:
> 在 2017-10-31 16:09,Maxime Ripard 写道:
> > On Tue, Oct 31, 2017 at 03:56:08PM +0800, Icenowy Zheng wrote:
> > > 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.
> > > 
> > > Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> > 
> > 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

-- 
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>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [linux-sunxi] Re: [PATCH] sunxi: lower the DDR frequency of Orange Pi Prime
  2017-10-31 10:21     ` Maxime Ripard
@ 2017-10-31 10:22       ` Icenowy Zheng
  2017-10-31 13:44         ` Maxime Ripard
  0 siblings, 1 reply; 10+ messages in thread
From: Icenowy Zheng @ 2017-10-31 10:22 UTC (permalink / raw)
  To: u-boot

在 2017-10-31 18:21,Maxime Ripard 写道:
> On Tue, Oct 31, 2017 at 04:17:06PM +0800, icenowy at aosc.io wrote:
>> 在 2017-10-31 16:09,Maxime Ripard 写道:
>> > On Tue, Oct 31, 2017 at 03:56:08PM +0800, Icenowy Zheng wrote:
>> > > 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.
>> > >
>> > > Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
>> >
>> > 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.

> 
> Maxime

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [linux-sunxi] Re: [PATCH] sunxi: lower the DDR frequency of Orange Pi Prime
  2017-10-31 10:22       ` Icenowy Zheng
@ 2017-10-31 13:44         ` Maxime Ripard
  0 siblings, 0 replies; 10+ messages in thread
From: Maxime Ripard @ 2017-10-31 13:44 UTC (permalink / raw)
  To: u-boot

On Tue, Oct 31, 2017 at 06:22:51PM +0800, Icenowy Zheng wrote:
> 在 2017-10-31 18:21,Maxime Ripard 写道:
> > On Tue, Oct 31, 2017 at 04:17:06PM +0800, icenowy at aosc.io wrote:
> > > 在 2017-10-31 16:09,Maxime Ripard 写道:
> > > > On Tue, Oct 31, 2017 at 03:56:08PM +0800, Icenowy Zheng wrote:
> > > > > 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.
> > > > >
> > > > > Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> > > >
> > > > 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.

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

-- 
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>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] sunxi: lower the DDR frequency of Orange Pi Prime
  2017-10-31  8:09 ` Maxime Ripard
  2017-10-31  8:17   ` [U-Boot] [linux-sunxi] " icenowy at aosc.io
@ 2018-10-27 16:26   ` Icenowy Zheng
  2018-10-29  8:12     ` Maxime Ripard
  1 sibling, 1 reply; 10+ messages in thread
From: Icenowy Zheng @ 2018-10-27 16:26 UTC (permalink / raw)
  To: u-boot

在 2017-10-31二的 09:09 +0100,Maxime Ripard写道:
> On Tue, Oct 31, 2017 at 03:56:08PM +0800, Icenowy Zheng wrote:
> > 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.
> > 
> > Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> 
> 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.

> 
> Maxime
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] sunxi: lower the DDR frequency of Orange Pi Prime
  2018-10-27 16:26   ` [U-Boot] " Icenowy Zheng
@ 2018-10-29  8:12     ` Maxime Ripard
  0 siblings, 0 replies; 10+ messages in thread
From: Maxime Ripard @ 2018-10-29  8:12 UTC (permalink / raw)
  To: u-boot

On Sun, Oct 28, 2018 at 12:26:18AM +0800, Icenowy Zheng wrote:
> 在 2017-10-31二的 09:09 +0100,Maxime Ripard写道:
> > On Tue, Oct 31, 2017 at 03:56:08PM +0800, Icenowy Zheng wrote:
> > > 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.
> > > 
> > > Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> > 
> > 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

-- 
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>

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-10-29  8:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-31  7:56 [U-Boot] [PATCH] sunxi: lower the DDR frequency of Orange Pi Prime Icenowy Zheng
2017-10-31  8:09 ` Maxime Ripard
2017-10-31  8:17   ` [U-Boot] [linux-sunxi] " icenowy at aosc.io
2017-10-31 10:21     ` Maxime Ripard
2017-10-31 10:22       ` Icenowy Zheng
2017-10-31 13:44         ` Maxime Ripard
2018-10-27 16:26   ` [U-Boot] " Icenowy Zheng
2018-10-29  8:12     ` Maxime Ripard
2017-10-31  8:59 ` Jagan Teki
2017-10-31  9:08   ` [U-Boot] [linux-sunxi] " icenowy at aosc.io

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.