On Thursday 04 August 2022 16:06:30 Tony Dinh wrote: > Hi Pali, > > Follow up on the topic of slow/fast SPL SPI loading. > > common/spl/spl_spi.c > /* > * Load U-Boot image from SPI flash into RAM > * In DM mode: defaults speed and mode will be > * taken from DT when available > */ > flash = spi_flash_probe(sf_bus, sf_cs, > CONFIG_SF_DEFAULT_SPEED, > CONFIG_SF_DEFAULT_MODE); > if (!flash) { > puts("SPI probe failed.\n"); > return -ENODEV; > } > > So that spi-max-frequency = <50000000> in the DTS is not used in the probe.
Based on that comment, spi_flash_probe() function should read spi-max-frequency from device tree when DM mode is enabled. And fallback to CONFIG_SF_DEFAULT_SPEED value. Probably there is a bug in DM spi_flash_probe() function implementation...