public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Nikita Kiryanov <nikita@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 12/18] arm: mx6: add support for Compulab cm-fx6 CoM
Date: Wed, 06 Aug 2014 20:29:35 +0300	[thread overview]
Message-ID: <53E265FF.9030901@compulab.co.il> (raw)
In-Reply-To: <53DF8C68.6080703@compulab.co.il>



On 04/08/14 16:36, Nikita Kiryanov wrote:
>
>
> On 04/08/14 07:45, Tim Harvey wrote:
>> On Sun, Aug 3, 2014 at 12:34 AM, Nikita Kiryanov
>> <nikita@compulab.co.il> wrote:
>>> Add initial support for Compulab CM-FX6 CoM.
>>> Support includes MMC, SPI flash, and SPL with dynamic DRAM detection.
>>>
>> <snip>
>>> +
>>> +static void spl_mx6s_dram_init(enum ddr_config dram_config, int reset)
>>> +{
>>> +       struct mx6_mmdc_calibration calib;
>>> +       struct mx6_ddr_sysinfo sysinfo;
>>> +       struct mx6_ddr3_cfg ddr3_cfg;
>>> +
>>> +       if (reset)
>>> +               ((struct mmdc_p_regs *)MX6_MMDC_P0_MDCTL)->mdmisc = 2;
>>> +
>>> +       calib.p0_mpwldectrl0    = 0x005B0061;
>>> +       calib.p0_mpwldectrl1    = 0x004F0055;
>>> +       calib.p0_mpdgctrl0      = 0x0314030C;
>>> +       calib.p0_mpdgctrl1      = 0x025C0268;
>>> +       calib.p0_mprddlctl      = 0x42464646;
>>> +       calib.p0_mpwrdlctl      = 0x36322C34;
>>> +       ddr3_cfg.mem_speed      = 800;
>>> +       ddr3_cfg.density        = 4;
>>> +       ddr3_cfg.rowaddr        = 14;
>>> +       ddr3_cfg.coladdr        = 10;
>>> +       ddr3_cfg.pagesz         = 2;
>>> +       ddr3_cfg.trcd           = 1800;
>>> +       ddr3_cfg.trcmin         = 5200;
>>> +       ddr3_cfg.trasmin        = 3600;
>>> +       ddr3_cfg.SRT            = 0;
>>> +       sysinfo.cs1_mirror      = 1;
>>> +       sysinfo.cs_density      = 16;
>>> +       sysinfo.bi_on           = 1;
>>> +       sysinfo.rtt_nom         = 1;
>>> +       sysinfo.rtt_wr          = 0;
>>> +       sysinfo.ralat           = 5;
>>> +       sysinfo.walat           = 1;
>>> +       sysinfo.mif3_mode       = 3;
>>> +       sysinfo.rst_to_cke      = 0x23;
>>> +       sysinfo.sde_to_rst      = 0x10;
>>> +       switch (dram_config) {
>>> +       case DDR_16BIT_256MB:
>>> +               sysinfo.dsize = 0;
>>> +               sysinfo.ncs = 1;
>>> +               break;
>>> +       case DDR_32BIT_512MB:
>>> +               sysinfo.dsize = 1;
>>> +               sysinfo.ncs = 1;
>>> +               break;
>>> +       case DDR_32BIT_1GB:
>>> +               sysinfo.dsize = 1;
>>> +               sysinfo.ncs = 2;
>>> +               break;
>>> +       default:
>>> +               puts("Tried to setup invalid DDR configuration\n");
>>> +               hang();
>>> +       }
>>> +
>>> +       mx6_dram_cfg(&sysinfo, &calib, &ddr3_cfg);
>>> +       udelay(100);
>>> +}
>>
>> Nikita,
>>
>> I'm curious why you add an extra udelay(100) here? There is an
>> mdelay(1) before the return of mx6_dram_cfg() to wait for auto-ZQ
>> calibration to complete (I never found a way to determine when it was
>> complete via registers).
>
> Yes you're right. This udelay can probably be removed (unless I catch
> the board misbehaving during multiple resets).

Caught the DRAM config failing during multiple resets when udelay(100)
is removed, so I guess they stay..

>
>>
>> Regards,
>>
>> Tim
>>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

  reply	other threads:[~2014-08-06 17:29 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-03  7:34 [U-Boot] [PATCH 00/18] Introduce cm-fx6 board Nikita Kiryanov
2014-08-03  7:34 ` [U-Boot] [PATCH 01/18] spl: improve spi configuration Nikita Kiryanov
2014-08-03 13:44   ` Marek Vasut
2014-08-05 13:28     ` Nikita Kiryanov
2014-08-05 14:11       ` Marek Vasut
2014-08-06 10:53         ` Nikita Kiryanov
2014-08-06 11:32           ` Marek Vasut
2014-08-03  7:34 ` [U-Boot] [PATCH 02/18] mx6: add clock enabling functions Nikita Kiryanov
2014-08-03  7:34 ` [U-Boot] [PATCH 03/18] sf: fix sf probe Nikita Kiryanov
2014-08-03 13:46   ` Marek Vasut
2014-08-04 12:48     ` Nikita Kiryanov
2014-08-04 13:10       ` Marek Vasut
2014-08-04 13:45         ` Nikita Kiryanov
2014-08-04 13:51           ` Marek Vasut
2014-08-04 14:11             ` Nikita Kiryanov
2014-08-04 14:20               ` Marek Vasut
2014-08-04 14:02           ` Tom Rini
2014-08-04 14:09             ` Marek Vasut
2014-08-04 14:19             ` Nikita Kiryanov
2014-08-04 14:58               ` Tom Rini
2014-08-03  7:34 ` [U-Boot] [PATCH 04/18] mtd: spi: add support for M25PE16 and M25PX16 Nikita Kiryanov
2014-08-03 13:47   ` Marek Vasut
2014-08-03  7:34 ` [U-Boot] [PATCH 05/18] compulab: eeprom: add support for defining eeprom i2c bus Nikita Kiryanov
2014-08-03 13:48   ` Marek Vasut
2014-08-04 12:49     ` Nikita Kiryanov
2014-08-03  7:34 ` [U-Boot] [PATCH 06/18] sata: dwc_ahsata: implement sata_port_status Nikita Kiryanov
2014-08-03 13:49   ` Marek Vasut
2014-08-04 12:49     ` Nikita Kiryanov
2014-08-04 13:10       ` Marek Vasut
2014-08-03  7:34 ` [U-Boot] [PATCH 07/18] i2c: imx: add macros to setup pads for multiple SoC types Nikita Kiryanov
2014-08-04  4:28   ` Tim Harvey
2014-08-03  7:34 ` [U-Boot] [PATCH 08/18] arm: mx6: ddr: cleanup Nikita Kiryanov
2014-08-04  5:26   ` Tim Harvey
2014-08-03  7:34 ` [U-Boot] [PATCH 09/18] arm: mx6: ddr: do not write into reserved bit Nikita Kiryanov
2014-08-04  5:43   ` Tim Harvey
2014-08-04 12:49     ` Nikita Kiryanov
2014-08-06  8:18       ` Tim Harvey
2014-08-06  8:31         ` Stefano Babic
2014-08-03  7:34 ` [U-Boot] [PATCH 10/18] arm: mx6: ddr: configure MMDC for slow_pd Nikita Kiryanov
2014-08-04  5:42   ` Tim Harvey
2014-08-04 12:49     ` Nikita Kiryanov
2014-08-03  7:34 ` [U-Boot] [PATCH 11/18] arm: mx6: ddr: fix cs0_end calculation Nikita Kiryanov
2014-08-03  7:34 ` [U-Boot] [PATCH 12/18] arm: mx6: add support for Compulab cm-fx6 CoM Nikita Kiryanov
2014-08-03 14:09   ` Marek Vasut
2014-08-04 14:41     ` Nikita Kiryanov
2014-08-04 15:12       ` Marek Vasut
2014-08-05  7:36         ` Nikita Kiryanov
2014-08-05  7:58           ` Marek Vasut
2014-08-04  4:45   ` Tim Harvey
2014-08-04 13:36     ` Nikita Kiryanov
2014-08-06 17:29       ` Nikita Kiryanov [this message]
2014-08-08  7:19         ` Tim Harvey
2014-08-10 16:20           ` Nikita Kiryanov
2014-08-04  6:02   ` Tim Harvey
2014-08-04 14:24     ` Nikita Kiryanov
2014-08-07 11:27       ` Nikita Kiryanov
2014-08-03  7:34 ` [U-Boot] [PATCH 13/18] arm: mx6: cm_fx6: add nand support Nikita Kiryanov
2014-08-03  7:34 ` [U-Boot] [PATCH 14/18] arm: mx6: cm_fx6: add ethernet support Nikita Kiryanov
2014-08-03  7:34 ` [U-Boot] [PATCH 15/18] arm: mx6: cm_fx6: add usb support Nikita Kiryanov
2014-08-03  7:34 ` [U-Boot] [PATCH 16/18] arm: mx6: cm_fx6: add i2c support Nikita Kiryanov
2014-08-03  7:34 ` [U-Boot] [PATCH 17/18] arm: mx6: cm_fx6: use eeprom Nikita Kiryanov
2014-08-03  7:34 ` [U-Boot] [PATCH 18/18] arm: mx6: cm_fx6: add sata support Nikita Kiryanov
2014-08-03 14:10   ` Marek Vasut
2014-08-04  7:23     ` Igor Grinberg
2014-08-04  8:27       ` Marek Vasut
2014-08-04 10:47         ` Igor Grinberg
2014-08-04 10:53           ` Marek Vasut

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=53E265FF.9030901@compulab.co.il \
    --to=nikita@compulab.co.il \
    --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