[PATCH 1/4] arm64: dts: imx8mn: Fix FSPI booting

Marek Vasut marex at denx.de
Mon Nov 11 11:23:56 CET 2024


On 11/11/24 2:46 AM, Adam Ford wrote:

[...]

>> I am hoping Simon could offer some input here ...
>>
>> Can you try the attached diff on MX8MM (use "git show -w" to view the
>> diff better) ? It will generate two files, flash.bin and flash-fspi.bin
>> , the later should have the fspi header and maybe even correct offsets?
> 
> I reset my branch to to U-Boot master from wedneday a7a96a37cbd8
> "Merge https://source.denx.de/u-boot/custodians/u-boot-riscv")
> 
> I verified the FCFB header is present.  Unfortunately, when I burn the
> FSPI on my 8MM and attempt to boot, nothing happens.
> 
> However, I changed the "nxp,boot-from" parameter to "fspi" and it booted!

Uh oh, look at tools/imx8mimage.c and search for both 'fspi' and 
'CONFIG_FSPI_CONF_HEADER' . I have a feeling that building with the 
CONFIG_FSPI_CONF_HEADER changes mkimage -T imx8mimage behavior, which 
may even interfere with binman.

Can you try and remove all the CONFIG_FSPI_CONF_HEADER stuff from 
imx8mimage.c , so it doesn't accidentally generate FSPI header, but 
keeps the fspi 0x1000 offset ?

> U-Boot SPL 2025.01-rc1-00168-ga7a96a37cbd8-dirty (Nov 10 2024 - 19:27:21 -0600)
> WDT:   Started watchdog at 30280000 with servicing every 1000ms (60s timeout)
> SEC0:  RNG instantiated
> Trying to boot from NOR
> <snip>
> 
> I looked at your patch, and noticed your FIXME. Once we get the code
> working, we'll likely need a way to pass the header offset, because
> it's different between Mini (0x0) and Nano / Plus (0x400).

Try and add offset=<0x400> into fspi_conf_block {} for MX8MN/MP .

> I'd like to suggest we #iifndef the section filename where "flash.bin"
> currently sits, and remove it if we are building for flexspi.  This
> way we get what you originally requested, which is a single binary.

I was hoping we would be able to generate both SD capable and FSPI 
capable boot blob at the same time, maybe we can even do it with one 
binman description.

> I have attached my diff file, so you can see my proposal. I am happy
> to test either Mini or Nano, but I am traveling this week starting
> Wednesday afternoon (US Central time) until Sunday night, so I won't
> be able to test in that window.

No worries

> Let me know how/if you want to proceed.

I suspect a patch to imx8mimage.c to remove the fspi stuff would be 
good, and then DT changes are also fine. I am not sure about the python 
part though.

> Thanks for looking into this.
You're welcome

[...]


More information about the U-Boot mailing list