[PATCH 4/5] board: nxp: imx9{4,5}_evk: Add qb save option in SPL
Simona Toaca
simona.toaca at oss.nxp.com
Wed Mar 11 15:58:09 CET 2026
Hi Francesco,
On Wed, Mar 11, 2026 at 10:14:19AM +0100, Francesco Dolcini wrote:
> On Tue, Mar 10, 2026 at 05:27:45PM +0200, Simona Toaca wrote:
> > On Tue, Mar 10, 2026 at 04:04:19PM +0100, Emanuele Ghidoli wrote:
> > > On 3/10/26 12:54, Simona Toaca (OSS) wrote:
> > > > From: Simona Toaca <simona.toaca at nxp.com>
> > > >
> > > > Call qb save automatically in the board-specific
> > > > spl_board_init(), if SPL_QB option is enabled. This
> > > > makes sure qb_save is called before any image loading
> > > > is done by the SPL.
> > > >
> > > > Signed-off-by: Simona Toaca <simona.toaca at nxp.com>
>
> ...
>
> > > > diff --git a/board/nxp/imx94_evk/spl.c b/board/nxp/imx94_evk/spl.c
> > > > index cc5b7f9ef0f..1d25795eb17 100644
> > > > --- a/board/nxp/imx94_evk/spl.c
> > > > +++ b/board/nxp/imx94_evk/spl.c
> > > > @@ -44,6 +45,9 @@ void spl_board_init(void)
> > > > ret = ele_start_rng();
> > > > if (ret)
> > > > printf("Fail to start RNG: %d\n", ret);
> > > > +
> > > > + if (IS_ENABLED(CONFIG_SPL_IMX_QB))
> > > > + spl_qb_save();
> > > Does it write to MMC/NOR/SD at every boot? Is that necessary if a quick boot
> > > was performed and the data has not changed?
> > > > }
> > No, the qb() method calls qb_check, which returns true only if OEI
> > saved valid data to volatile memory (meaning it has run Training flow).
> > So, if Quickboot flow is run, the data in volatile memory is not valid,
> > qb_check fails -> qb returns and does not write anything to the NVM.
> >
> > Also, another thing to keep in mind is that after a successfull
> > qb save, the data in volatile memory is invalidated -> qb check will
> > fail as well even if OEI doesn't run (so on a warm reboot).
>
> Do you think that this is something that should be generally enabled on
> any i.MX95 boards? Emanuele?
>
> Francesco
>
I think it depends on the usecase.
Enabling QB in SPL is useful for:
- automating the save
- being able to skip U-Boot proper
Enabling CMD_IMX_QB:
- lets the user save the data during flashing
- lets the user save the data to a different
boot device.
If SPL QB is enabled, the qb save command is only
useful in the uuu script.
I will add these comments to the documentation as well.
Another thing is that if SPL_IMX_QB is enabled, other config
options also have to be enabled depending on the boot device
(for example, as I have also written in the documentation,
SPL_MMC_WRITE for MMC boot devices).
I should mention that this functionality is tested
on latest iMX95 rev: B0 (if talking about 95) and
has to be in sync with OEI.
Best regards,
Simona
More information about the U-Boot
mailing list