On 8/22/21 4:47 PM, Oskari Lemmelä wrote:
On 22.8.2021 14.50, Marek Vasut wrote:
On 8/22/21 9:41 AM, Oskari Lemmelä wrote:
Hi Marek,
I was bisecting SPI flash boot problem in rockpro64 board and commit
e2e95e5e25421fb seems to broke it.
It seems that after speed and mode change SPL is unable to load BL31
anymore from SPI flash device.
There is no errors it just hangs forever.
If I change default mode to 0 (CONFIG_SF_DEFAULT_MODE=0), loading
BL31 seems to work. In that case spi_set_speed_mode is also called
but only speed is changed from 1Mhz to 10Mhz.
So changing mode from 0 to 3 in SPL stage seems to be the problem.
Any idea what could be the problem?
See 8c6d8c3219 ("configs: libretech: set SPI mode to 0")
Rockchip SPI supports both SCLK polarity and phase config and mode 3 is
working fine if uboot is booted from MMC.
However RK3399 documentation says SPI should be disabled while modifying
master settings (speed, mode and so on).
So this could be rk_spi.c driver issue.
Hmm, I don't have any rockchip device, so I cannot help you with that part.
Are you sure the SPI mode 3 (default) is the correct mode in the first
place ?