public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Eric Nelson <eric@nelint.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] arm: imx6: Enable DDR calibration on Novena
Date: Sun, 20 Dec 2015 12:46:37 -0700	[thread overview]
Message-ID: <5677059D.5020907@nelint.com> (raw)
In-Reply-To: <1450276807-8960-2-git-send-email-marex@denx.de>

Hi Marek,

On 12/16/2015 07:40 AM, Marek Vasut wrote:
> Enable the DDR calibration functionality on Novena to deal with the
> memory SoDIMM on this board.

Shouldn't this be in two patches?

> Moreover, tweak the initial DDR DRAM parameters so the
> calibration works properly.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> ---
>  board/kosagi/novena/novena_spl.c | 23 ++++++++++++++---------
>  1 file changed, 14 insertions(+), 9 deletions(-)
>
> diff --git a/board/kosagi/novena/novena_spl.c
b/board/kosagi/novena/novena_spl.c
> index eb46265..f779bb4 100644
> --- a/board/kosagi/novena/novena_spl.c
> +++ b/board/kosagi/novena/novena_spl.c
> @@ -434,8 +434,8 @@ static struct mx6dq_iomux_ddr_regs
novena_ddr_ioregs = {
>  	.dram_ras		= 0x00000038,
>  	.dram_reset		= 0x00000038,
>  	/* SDCKE[0:1]: 100k pull-up */
> -	.dram_sdcke0		= 0x00003000,
> -	.dram_sdcke1		= 0x00003000,
> +	.dram_sdcke0		= 0x00000038,
> +	.dram_sdcke1		= 0x00000038,
>  	/* SDBA2: pull-up disabled */
>  	.dram_sdba2		= 0x00000000,
>  	/* SDODT[0:1]: 100k pull-up, 40 ohm */
> @@ -512,10 +512,10 @@ static struct mx6_ddr_sysinfo novena_ddr_info = {
>  	/* Single chip select */
>  	.ncs		= 1,
>  	.cs1_mirror	= 0,
> -	.rtt_wr		= 1,	/* RTT_Wr = RZQ/4 */
> -	.rtt_nom	= 2,	/* RTT_Nom = RZQ/2 */
> -	.walat		= 3,	/* Write additional latency */
> -	.ralat		= 7,	/* Read additional latency */
> +	.rtt_wr		= 0,	/* RTT_Wr = RZQ/4 */
> +	.rtt_nom	= 1,	/* RTT_Nom = RZQ/2 */
> +	.walat		= 0,	/* Write additional latency */
> +	.ralat		= 5,	/* Read additional latency */
>  	.mif3_mode	= 3,	/* Command prediction working mode */
>  	.bi_on		= 1,	/* Bank interleaving enabled */
>  	.sde_to_rst	= 0x10,	/* 14 cycles, 200us (JEDEC default) */
> @@ -530,9 +530,9 @@ static struct mx6_ddr3_cfg elpida_4gib_1600 = {
>  	.rowaddr	= 16,
>  	.coladdr	= 10,
>  	.pagesz		= 2,
> -	.trcd		= 1300,
> -	.trcmin		= 4900,
> -	.trasmin	= 3590,
> +	.trcd		= 1375,
> +	.trcmin		= 4875,
> +	.trasmin	= 3500,
>  };
>
>  static void ccgr_init(void)
> @@ -601,6 +601,11 @@ void board_init_f(ulong dummy)
>  	mx6dq_dram_iocfg(64, &novena_ddr_ioregs, &novena_grp_ioregs);
>  	mx6_dram_cfg(&novena_ddr_info, &novena_mmdc_calib, &elpida_4gib_1600);
>
> +	/* Perform DDR DRAM calibration */
> +	udelay(100);

Shouldn't the return values be tested?

> +	mmdc_do_write_level_calibration();
> +	mmdc_do_dqs_calibration();
> +
>  	/* Clear the BSS. */
>  	memset(__bss_start, 0, __bss_end - __bss_start);
>
>

  reply	other threads:[~2015-12-20 19:46 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-16 14:40 [U-Boot] [PATCH 1/2] arm: imx6: Add DDR3 calibration code for MX6 Q/D/DL Marek Vasut
2015-12-16 14:40 ` [U-Boot] [PATCH 2/2] arm: imx6: Enable DDR calibration on Novena Marek Vasut
2015-12-20 19:46   ` Eric Nelson [this message]
     [not found]   ` <567702A6.9070107@cox.net>
2015-12-22  1:26     ` Marek Vasut
2015-12-22  8:30       ` Nikolay Dimitrov
2015-12-22 14:56         ` Marek Vasut
2015-12-16 15:00 ` [U-Boot] [PATCH 1/2] arm: imx6: Add DDR3 calibration code for MX6 Q/D/DL Eric Nelson
2015-12-16 15:33   ` Marek Vasut
2015-12-16 16:28     ` Eric Nelson
2015-12-16 16:50       ` Marek Vasut
2015-12-16 17:07         ` Eric Nelson
2015-12-16 17:11           ` Marek Vasut
2015-12-17 15:39   ` Tim Harvey
2015-12-17 15:48     ` Eric Nelson
2015-12-17 15:36 ` Tim Harvey
2015-12-17 15:40   ` Marek Vasut
2015-12-17 16:15     ` Tim Harvey
2015-12-17 16:17       ` Marek Vasut
2015-12-17 21:32 ` Nikolay Dimitrov
2015-12-17 22:11   ` Marek Vasut
2015-12-20 19:31 ` Eric Nelson
2015-12-22  1:52   ` Marek Vasut
2015-12-22 15:37     ` Eric Nelson
2016-01-14  2:10       ` Marek Vasut
2016-01-14  2:37         ` Eric Nelson
2016-01-14  2:50           ` Marek Vasut
2016-01-14  2:52             ` Eric Nelson
2016-01-14  3:06               ` Marek Vasut
2016-01-14 14:25                 ` Tim Harvey
2016-01-24 10:47                   ` Stefano Babic
2016-01-24 16:01                     ` Marek Vasut
2016-01-24 17:03                       ` Stefano Babic
2016-01-24 17:11                         ` Marek Vasut
2016-01-24 17:18                           ` Stefano Babic
2016-01-24 17:22                             ` Marek Vasut
2016-01-24 19:33                               ` Tom Rini
2016-01-24 22:07                                 ` Marek Vasut
2016-01-24 22:21                                   ` Tom Rini
2016-01-24 23:00                                     ` Marek Vasut
2016-01-24 23:30                                       ` Tom Rini
2016-01-24 23:55                                         ` Marek Vasut
2016-01-31 17:25                                         ` Marek Vasut
2016-06-02 13:20                                           ` Tim Harvey
2016-06-02 14:23                                             ` Stefano Babic
2016-06-02 15:25                                               ` Tim Harvey
2015-12-22  4:13   ` Tim Harvey
2015-12-22 14:47     ` Eric Nelson

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=5677059D.5020907@nelint.com \
    --to=eric@nelint.com \
    --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