public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Marek Behún" <marek.behun@nic.cz>
To: "Chris Packham" <judge.packham@gmail.com>,
	"Chris Packham" <chris.packham@alliedtelesis.co.nz>,
	"Stefan Roese" <sr@denx.de>, "Baruch Siach" <baruch@tkos.co.il>,
	"Pavol Rohár" <pali@kernel.org>,
	u-boot@lists.denx.de, "Dirk Eibach" <dirk.eibach@gdsys.cc>,
	"Mario Six" <mario.six@gdsys.cc>,
	"Dennis Gilmore" <dgilmore@redhat.com>,
	"Kostya Porotchkin" <kostap@marvell.com>
Subject: Re: [PATCH u-boot-marvell] ddr: marvell: a38x: Fix Synchronous vs Asynchronous mode determination
Date: Tue, 4 Jan 2022 16:28:31 +0100	[thread overview]
Message-ID: <20220104162831.63647587@thinkpad> (raw)
In-Reply-To: <20220104145749.18626-1-kabel@kernel.org>

On Tue,  4 Jan 2022 15:57:49 +0100
Marek Behún <kabel@kernel.org> wrote:

> From: Marek Behún <marek.behun@nic.cz>
> 
> Before commit 4c289425752f ("mv_ddr: a38x: add support for ddr async
> mode"), Asynchornous Mode was only used when the CPU Subsystem Clock
> Options[4:0] field in the SAR1 register was set to value 0x13: CPU at
> 2 GHz and DDR at 933 MHz.
> 
> Then commit 4c289425752f ("mv_ddr: a38x: add support for ddr async
> mode") added support for Asynchornous Modes with frequencies other than
> 933 MHz (but at least 467 MHz), but the code it added to check for
> whether Asynchornous Mode should be used is wrong: it checks whether the
> frequency setting in board DDR topology map is set to value other than
> MV_DDR_FREQ_SAR.
> 
> Thus boards which define a specific value, greater than 400 MHz, for DDR
> frequency in their board topology (e.g. Turris Omnia defines
> MV_DDR_FREQ_800), are incorrectly put into Asynchornous Mode after that
> commit.
> 
> The A38x Functional Specification, section 10.12 DRAM Clocking, says:
>   In Synchornous mode, the DRAM and CPU clocks are edge aligned and run
>   in 1:2 or 1:3 CPU to DRAM frequency ratios.
> 
> Change the check for whether Asynchornous Mode should be used according
> to this explanation in Functional Specification.
> 
> Signed-off-by: Marek Behún <marek.behun@nic.cz>

I forgot to mention that we discovered this on Turris Omnia by comparing
DDR speed with the
  time mtest 10000000 10100000 0 1
command.

In Asynchornous Mode this takes ~27 seconds, in Synchronous mode ~22
seconds.

Marek

  reply	other threads:[~2022-01-04 15:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-04 14:57 [PATCH u-boot-marvell] ddr: marvell: a38x: Fix Synchronous vs Asynchronous mode determination Marek Behún
2022-01-04 15:28 ` Marek Behún [this message]
2022-01-04 22:13 ` Chris Packham
2022-01-05  8:48 ` Stefan Roese
2022-01-14 15:37 ` Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220104162831.63647587@thinkpad \
    --to=marek.behun@nic.cz \
    --cc=baruch@tkos.co.il \
    --cc=chris.packham@alliedtelesis.co.nz \
    --cc=dgilmore@redhat.com \
    --cc=dirk.eibach@gdsys.cc \
    --cc=judge.packham@gmail.com \
    --cc=kostap@marvell.com \
    --cc=mario.six@gdsys.cc \
    --cc=pali@kernel.org \
    --cc=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox