public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Hector Palacios <hector.palacios@digi.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] problem to boot i.MX28 custom platform
Date: Wed, 27 Feb 2013 13:55:15 +0100	[thread overview]
Message-ID: <512E0233.1030004@digi.com> (raw)
In-Reply-To: <512CA836.4070709@digi.com>

On 02/26/2013 01:19 PM, Hector Palacios wrote:
> Greetings,
>
> I'm porting a custom platform based on mx28evk to latest U-Boot.
> I modified the iomux.c for my platform (different DUART pins) and made some changes to
> mxs_adjust_memory_params() to accommodate to my DRAM chip.
>
> I built the u-boot.sb. The platform however does not boot either from USB or from MMC.
> When loaded through USB, sb_loader complains with the messages at [1].
> I fear the CPU resets before even executing the SPL code, but how could I tell? Is
> there a way to check if the CPU reaches this code at all?
> I don't see any ROM error codes either and the CPU seems to reset (when the USB
> recovery mode fails, the target defaults to boot from flash my old v2009 U-Boot).
> Is there any other init stuff (linker scripts or something) I should take care of
> that's preventing sb_loader to fully load the image?
>
> Thank you.
>
>
> [1] sb_loader output
>
> 'Freescale,Inc.' 'ROM Recovery' device at USB path 0002:0034:00
> Downloading 415504 bytes...
> hid_write report id 01 len 0x1f
>
> hid_write report id 02 len 0x400
> .
> hid_write report id 02 len 0x400
> .
> hid_write report id 02 len 0x400
> .
> hid_write report id 02 len 0x400
> .
> hid_write report id 02 len 0x400
> .
> hid_write report id 02 len 0x400
> .
> hid_write report id 02 len 0x400
> .
> hid_write report id 02 len 0x400
> .
> hid_write report id 02 len 0x400
> .
> hid_write report id 02 len 0x400
> .
> hid_write report id 02 len 0x400
> .
> hid_write report id 02 len 0x400
> .
> hid_write report id 02 len 0x400
> .
> hid_write report id 02 len 0x400
> ERROR: hid_write() returned -1 (error (null))
>

Apparently the problem was due to my platform suffering a hardware specific VDDD 
brownout during the initialization.

Just in case it helps anybody, the reason why I was not able to see anything on the 
DUART port during SPL initialization, despite having enabled CONFIG_SPL_SERIAL_SUPPORT 
and having serial_puts() on the SPL code, was that my platform uses alternate pins for 
the DUART than the default used by the BOOT ROM and the EVK, so apart from configuring 
the correct IOMUX, I needed to unconfigure the pins used by BOOT ROM for the DUART (on 
board/<vendor>/iomux.c):

@@ -33,8 +33,12 @@

  const iomux_cfg_t iomux_setup[] = {
         /* DUART */
-       MX28_PAD_PWM0__DUART_RX,
-       MX28_PAD_PWM1__DUART_TX,
+       /* Unconfigure BOOT ROM default DUART */
+       MX28_PAD_PWM0__GPIO_3_16,
+       MX28_PAD_PWM1__GPIO_3_17,
+       /* Configure DUART on alternate pins */
+       MX28_PAD_I2C0_SCL__DUART_RX,
+       MX28_PAD_I2C0_SDA__DUART_TX,

         /* MMC0 */
         MX28_PAD_SSP0_DATA0__SSP0_D0 | MUX_CONFIG_SSP0,
@@ -159,9 +163,6 @@ const iomux_cfg_t iomux_setup[] = {
         MX28_PAD_SSP2_MISO__SSP2_D0 | MUX_CONFIG_SSP2,
         MX28_PAD_SSP2_SS0__SSP2_D3 |
                 (MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP),
-       /* I2C */
-       MX28_PAD_I2C0_SCL__I2C0_SCL,
-       MX28_PAD_I2C0_SDA__I2C0_SDA,
  };

  #define HW_DRAM_CTL29  (0x74 >> 2)

-- 
H?ctor Palacios

  parent reply	other threads:[~2013-02-27 12:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-26 12:19 [U-Boot] problem to boot i.MX28 custom platform Hector Palacios
2013-02-26 22:26 ` Fabio Estevam
2013-02-27 12:55 ` Hector Palacios [this message]
2013-02-28 14:39   ` Fabio Estevam

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=512E0233.1030004@digi.com \
    --to=hector.palacios@digi.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