[PATCH 2/2] arm: mvebu: clearfog: Add defconfig for SPI booting
mibodhi at gmail.com
Sun Feb 26 05:56:10 CET 2023
On Sat, Feb 25, 2023 at 6:17 PM Martin Rowe <martin.p.rowe at gmail.com> wrote:
> > > > I'm not sure how to run proper timing tests on the process, but
> > > > stopwatch timing just between seeing "Trying to boot" and "U-Boot
> > > > 2023.04-rc2" showed the return to BootROM under 1 second, and the
> > > > direct from SPI around 4 seconds. I thought the goal of loading from
> > > > SPI directly was speed, but returning to BootROM is significantly
> > > > faster on this board.
> > >
> > > You should check SPI speed in DTS file and also in the defconfig.
> > I think we have probably seen this slowdown before. There is a TODO in
> > the way the DTS nodes are parsed by DM uclass. So this config must be
> > set in defconfig to get around that bug:
> > CONFIG_SF_DEFAULT_SPEED=50000000
> That works and is much faster now. I'll submit it in a V2 for these
> two patches once Pali's mvebu changes are accepted. Only question I
> have is: should the faster speed be applied to all three defconfigs?
> CONFIG_SF_DEFAULT_SPEED=1000000 (50x less) is implicitly added to the
> MMC and SATA configs at the moment.
This is only a workaround to get the SPI probe to work correctly. The
real fix should be in spi_flash_probe()
flash = spi_flash_probe(sf_bus, sf_cs,
If spi_flash_probe() failed to get SPI max_hz from the DTS, the
fallback is CONFIG_SF_DEFAULT_SPEED.
IMO, perhaps we could add CONFIG_SF_DEFAULT_SPEED and
CONFIG_SF_DEFAULT_MODE selection to arch/arm/mach-mvebu/Kconfig or
some other common place. And when we will have fixed the DTS parsing
problem, they can be removed.
I'd like to hear from Stefan and Pali if this approach sounds good.
All the best,
More information about the U-Boot