All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] Booting i.MX6UL via SPL?
@ 2018-11-07 20:46 Martyn Welch
  2018-11-08 10:07 ` Heiko Schocher
  2018-11-08 10:25 ` Stefano Babic
  0 siblings, 2 replies; 4+ messages in thread
From: Martyn Welch @ 2018-11-07 20:46 UTC (permalink / raw)
  To: u-boot

Hi All,

I've been trying to boot a i.MX6UL based device I have here using SPL.
It doesn't seem to want to work for me.

I see there's a number of i.MX6UL ports in U-Boot already, some use a
custom DCD to configure the board, others seem to provide both options
(DCD and SPL). Interestingly the Freescale i.MX 6UltraLite Evaluation
Kit port (via mx6ul_14x14_evk_defconfig) appears to be using the SPL
mechanism exclusively.

Can someone confirm that the above device boots using this config from
SD card?

I seem to be able to boot from SD card using a custom DCD (which copies
U-Boot into RAM), I'm also able to get the SPL to boot via USB (which
copies the SPL to OCRAM). However when I try to boot the SPL from SD
card it doesn't boot. If I boot the SPL via USB, insert an SD card and
reset the device, it seems to boot from the SPL previously loaded from
USB (as in it's still in the OCRAM) but carries on like it's booted
from the SD card (looking on the SD card rather than USB for the main
U-Boot image). The reason I think it's doing this is that if I rebuild
U-Boot and flash a copy with an updated build time to the SD card, when
I perform a reset I still see the old build time in the U-Boot banner.
It looks to me like for some reason it's unable to copy the SPL to
OCRAM, but carries on thinking it has.

Anyone got any pointers?

Thanks in advance,

Martyn

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

* [U-Boot] Booting i.MX6UL via SPL?
  2018-11-07 20:46 [U-Boot] Booting i.MX6UL via SPL? Martyn Welch
@ 2018-11-08 10:07 ` Heiko Schocher
  2018-11-08 10:25 ` Stefano Babic
  1 sibling, 0 replies; 4+ messages in thread
From: Heiko Schocher @ 2018-11-08 10:07 UTC (permalink / raw)
  To: u-boot

Hello Martyn,

Am 07.11.2018 um 21:46 schrieb Martyn Welch:
> Hi All,
> 
> I've been trying to boot a i.MX6UL based device I have here using SPL.
> It doesn't seem to want to work for me.
> 
> I see there's a number of i.MX6UL ports in U-Boot already, some use a
> custom DCD to configure the board, others seem to provide both options
> (DCD and SPL). Interestingly the Freescale i.MX 6UltraLite Evaluation
> Kit port (via mx6ul_14x14_evk_defconfig) appears to be using the SPL
> mechanism exclusively.
> 
> Can someone confirm that the above device boots using this config from
> SD card?
> 
> I seem to be able to boot from SD card using a custom DCD (which copies
> U-Boot into RAM), I'm also able to get the SPL to boot via USB (which
> copies the SPL to OCRAM). However when I try to boot the SPL from SD
> card it doesn't boot. If I boot the SPL via USB, insert an SD card and
> reset the device, it seems to boot from the SPL previously loaded from
> USB (as in it's still in the OCRAM) but carries on like it's booted
> from the SD card (looking on the SD card rather than USB for the main
> U-Boot image). The reason I think it's doing this is that if I rebuild
> U-Boot and flash a copy with an updated build time to the SD card, when
> I perform a reset I still see the old build time in the U-Boot banner.
> It looks to me like for some reason it's unable to copy the SPL to
> OCRAM, but carries on thinking it has.
> 
> Anyone got any pointers?

Hard to say...

I have running U-Boot wit SPL on a imx6ull based board, booting from
SPI NOR.

If you have a setup with DCD, also SPL should work, but be sure to
setup correct RAM config. But you say, SPL works when loading through
USB

I added for imx6ull:

#undef CONFIG_SPL_STACK
#define CONFIG_SPL_STACK               0x00918000

You use
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"

?

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

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

* [U-Boot] Booting i.MX6UL via SPL?
  2018-11-07 20:46 [U-Boot] Booting i.MX6UL via SPL? Martyn Welch
  2018-11-08 10:07 ` Heiko Schocher
@ 2018-11-08 10:25 ` Stefano Babic
  2018-11-08 10:37   ` Martyn Welch
  1 sibling, 1 reply; 4+ messages in thread
From: Stefano Babic @ 2018-11-08 10:25 UTC (permalink / raw)
  To: u-boot

Hi Martyn,

On 07/11/18 21:46, Martyn Welch wrote:
> Hi All,
> 
> I've been trying to boot a i.MX6UL based device I have here using SPL.
> It doesn't seem to want to work for me.
> 
> I see there's a number of i.MX6UL ports in U-Boot already, some use a
> custom DCD to configure the board, others seem to provide both options
> (DCD and SPL). Interestingly the Freescale i.MX 6UltraLite Evaluation
> Kit port (via mx6ul_14x14_evk_defconfig) appears to be using the SPL
> mechanism exclusively.
> 
> Can someone confirm that the above device boots using this config from
> SD card?
> 
> I seem to be able to boot from SD card using a custom DCD (which copies
> U-Boot into RAM), I'm also able to get the SPL to boot via USB (which
> copies the SPL to OCRAM). However when I try to boot the SPL from SD
> card it doesn't boot. If I boot the SPL via USB, insert an SD card and
> reset the device, it seems to boot from the SPL previously loaded from
> USB (as in it's still in the OCRAM) but carries on like it's booted
> from the SD card (looking on the SD card rather than USB for the main
> U-Boot image). The reason I think it's doing this is that if I rebuild
> U-Boot and flash a copy with an updated build time to the SD card, when
> I perform a reset I still see the old build time in the U-Boot banner.
> It looks to me like for some reason it's unable to copy the SPL to
> OCRAM, but carries on thinking it has.
> 
> Anyone got any pointers?
> 

I confirm that SPL works for a MX6UL, but I had this issue, too. It
could depend on the Hardware Revision of your processor.

There is a bug in revision 1.2 of the processor that makes the first
part of the OCRAM not available and SPL cannot be copied. This bug
affects just some production charges, and NXP solved this later without
changing the revision of the processor. That means there are some boards
where everything is fine, some other boards with just a newer processor
that do not boot. I do not know if this is your use case, but it makes
sense to give a try.

I had just moved CONFIG_SPL_TEXT_BASE to a later offset:

define CONFIG_SPL_TEXT_BASE            0x00909000

However, there is no chance to know at runtime if a board is affected by
this issue because the revision does not change, and I do not think it
is a good idea to force all MX6UL to restrict their OCRAM due to a buggy
and time constrained production by the manufacturer.

I hope this helps,
Stefano

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

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

* [U-Boot] Booting i.MX6UL via SPL?
  2018-11-08 10:25 ` Stefano Babic
@ 2018-11-08 10:37   ` Martyn Welch
  0 siblings, 0 replies; 4+ messages in thread
From: Martyn Welch @ 2018-11-08 10:37 UTC (permalink / raw)
  To: u-boot

On Thu, 2018-11-08 at 11:25 +0100, Stefano Babic wrote:
> Hi Martyn,
> 
> On 07/11/18 21:46, Martyn Welch wrote:
> > Hi All,
> > 
> > I've been trying to boot a i.MX6UL based device I have here using
> > SPL.
> > It doesn't seem to want to work for me.
> > 
> > I see there's a number of i.MX6UL ports in U-Boot already, some use
> > a
> > custom DCD to configure the board, others seem to provide both
> > options
> > (DCD and SPL). Interestingly the Freescale i.MX 6UltraLite
> > Evaluation
> > Kit port (via mx6ul_14x14_evk_defconfig) appears to be using the
> > SPL
> > mechanism exclusively.
> > 
> > Can someone confirm that the above device boots using this config
> > from
> > SD card?
> > 
> > I seem to be able to boot from SD card using a custom DCD (which
> > copies
> > U-Boot into RAM), I'm also able to get the SPL to boot via USB
> > (which
> > copies the SPL to OCRAM). However when I try to boot the SPL from
> > SD
> > card it doesn't boot. If I boot the SPL via USB, insert an SD card
> > and
> > reset the device, it seems to boot from the SPL previously loaded
> > from
> > USB (as in it's still in the OCRAM) but carries on like it's booted
> > from the SD card (looking on the SD card rather than USB for the
> > main
> > U-Boot image). The reason I think it's doing this is that if I
> > rebuild
> > U-Boot and flash a copy with an updated build time to the SD card,
> > when
> > I perform a reset I still see the old build time in the U-Boot
> > banner.
> > It looks to me like for some reason it's unable to copy the SPL to
> > OCRAM, but carries on thinking it has.
> > 
> > Anyone got any pointers?
> > 
> 
> I confirm that SPL works for a MX6UL, but I had this issue, too. It
> could depend on the Hardware Revision of your processor.
> 
> There is a bug in revision 1.2 of the processor that makes the first
> part of the OCRAM not available and SPL cannot be copied. This bug
> affects just some production charges, and NXP solved this later
> without
> changing the revision of the processor. That means there are some
> boards
> where everything is fine, some other boards with just a newer
> processor
> that do not boot. I do not know if this is your use case, but it
> makes
> sense to give a try.
> 
> I had just moved CONFIG_SPL_TEXT_BASE to a later offset:
> 
> define CONFIG_SPL_TEXT_BASE            0x00909000
> 

Thanks Stefano, this was exactly the issue that I was hitting!

Martyn

> However, there is no chance to know at runtime if a board is affected
> by
> this issue because the revision does not change, and I do not think
> it
> is a good idea to force all MX6UL to restrict their OCRAM due to a
> buggy
> and time constrained production by the manufacturer.
> 
> I hope this helps,
> Stefano
> 

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

end of thread, other threads:[~2018-11-08 10:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-07 20:46 [U-Boot] Booting i.MX6UL via SPL? Martyn Welch
2018-11-08 10:07 ` Heiko Schocher
2018-11-08 10:25 ` Stefano Babic
2018-11-08 10:37   ` Martyn Welch

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.