This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM4377: AM4377 spi0 nor flash boot issue

Part Number: AM4377

hello!

When trying to boot from AM4377 spi norflash (ISSI's 32MB flash.boot code:ti_uboot_201605sdk3205)
First use 'uart' or 'emmc' to boot to my BSP stage, flash can be read and write normally.
Then write the MLO.byteswap and u-boot.img to the 0 and 0x20000 addresses of the flash.


Then select sysboot pin to boot from spi, Spl can go to spl_spi_load_image(#define CONFIG_SPL_SPI_SUPPORT when compiling MLO)
But flash probe failed, and spi_xfer is in 'ti_qspi.c' branch, because CONFIG_TI_QSPI=y in my.deconfig
Should it go this branch? Or it should be in 'cf_spi.c'?


Now Cf_spi.c is not currently compiled, when adding CONFIG_CF_SPI definition,
other compilation errors occured(#include <asm/immap.h> not found)
I wonder whether spi nor flash startup should go ti_qspi.c or cf_spi.c or something else?
Or how to configure to probe SPI flash successfully?

thank you!

U-Boot SPL 2018.12-00304-g4d20f09-dirty (Dec 20 2018 - 16:30:07)
Trying to boot from (10)SPI
ti_spi_set_speed: hz: 48000000, clock divider 3                                    --【1】in ti_qspi
spi_claim_bus: bus:0 cs:0
spi_xfer: bus:0 cs:0 bitlen:8 flags:1                                                        --【2】spi_flash_read_write in ti_qspi.c
tx cmd 003a0fff dc 00000005
tx done, status 00010002
spi_xfer: bus:0 cs:0 bitlen:40 flags:2
rx cmd 00390fff dc 00000005
rx done, status 00020002, read 00
rx cmd 00390fff dc 00000005
rx done, status 00030002, read 00
rx cmd 00390fff dc 00000005
rx done, status 00040002, read 00
rx cmd 00390fff dc 00000005
rx done, status 00050002, read 00
rx cmd 00390fff dc 00000005
rx done, status 00060002, read 00                                                      --【3】in my bsp send 9F cmd,recv id=0x9d6019
SF: Unsupported flash IDs: manuf 00, jedec 0000, ext_jedec 0000
spi_release_bus: bus:0 cs:0
SPI probe failed.                                                                                  --【err】
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

  • The problem has been solved, modified uboot code to use OMAP3 spi and added my flash model in the flash list,
    uboot started normally, thank you!

    U-Boot SPL 2018.12-00304-g4d20f09-dirty (Dec 21 2018 - 16:06:58)
    Trying to boot from (10)SPI
    SF bus0,cs0,spd48000000,mode3.
    SF: Lock ops not supported for 9d flash
    Found FIT
    fit read sector 20000, sectors=860, dst=807ffc80, count=860
    data_offset=0, data_size=67b98
    U-Boot size 67b98, data 80800000
    ...
  • Hi mrxiao2017,

    Thanks for updating the thread with the solution.

    Regards,
    Pavel