[EXT] [PATCH] ARM: imx: romapi: Repair FlexSPI NOR boot offset

Ye Li ye.li at nxp.com
Tue Mar 29 11:56:51 CEST 2022


On Tue, 2022-03-29 at 11:01 +0200, Marek Vasut wrote:
> Caution: EXT Email
> 
> On 3/29/22 04:49, Ye Li wrote:
> 
> Hi,
> 
> > 
> > > 
> > > > 
> > > > If you change the ROM API driver, that will break our design.
> > > > You
> > > > can
> > > > try to overwrite spl_romapi_get_uboot_base for your board only.
> > > Since there are no users which boot from flexspi upstream, this
> > > design
> > > can still be fixed such that it does not require different
> > > flash.bin
> > > for
> > > different boot media, but rather one flash.bin works on all boot
> > > media.
> > > I think that is much better.
> > Your flash.bin can work on flexspi because you manually program the
> > flexspi configurations header.
> Sure, the header content is described in the MX8MP RM Rev. 1 06/2021
> "6.1.5.3.1 FlexSPI Configuration Block", this has nothing to do with
> this patch.
> 
> > 
> > But once you want to upgrade the
> > flash.bin, flexspi configurations will also be erased due to the
> > block
> > size. Then you have to reprogram the configurations with flash.bin.
> > So most of our customers add the flexspi configurations to
> > flash.bin
> > head. They don't use so called one image for both SD and flexspi.
> There are no upstream users of flexspi right now, see above.
> 
> > 
> > As the spl_romapi_get_uboot_base is defined to weak. It is better
> > to
> > overwrite this function for your particular usage.
> I would much rather prefer to have one flash.bin which works on both
> SD
> card and FlexSPI, on all iMX8M, that is far less confusing. And since
> there are no upstream users of flexspi boot so far, this is how it
> can
> still be implemented, consistently.

I can think out 3 drawbacks using this one flash.bin for flexspi:

1. The flexspi configuration header will be erased when you update the
flash.bin to flexspi device. In a common usage, this header will
combine with flash.bin to a final boot image which is not same with SD.
 
2. How can users update u-boot.itb only if using this one flash.bin?
With the same offset of SD, it causes the u-boot.itb locates at a
offset not block aligned.

3. Not all iMX8M can support this one flash.bin.  8MM and 8MQ have
different IVT. Their flexspi IVT can't work for SD/eMMC.

Best regards,
Ye Li
> 
> If downstream wants to have multiple flash.bin, one for each boot
> media,
> that's up to downstream.
> 
> [...]


More information about the U-Boot mailing list