Part Number: AM5716
Other Parts Discussed in Thread: AM5728
We are making a custom board using AM5716 processor. The board has QSPI NOR memory we are going to boot from.
We build a firmware including U-Boot using Yocto system with the official "meta-ti" layer. u-boot recipe uses repository "git://git.ti.com/ti-u-boot/ti-u-boot.git" and branch "ti-u-boot-2019.01". Using it, we can successfully boot the board from SD card. But there are issues booting from QSPI.
SPL is loaded by ROM code and shows a banner, but it hangs trying to load u-boot.img. Checking the data it loads from QSPI flash, we found that it loads some garbage. At the same time the U-Boot loaded from SD card can access QSPI flash memory using sf command (sf probe, sf read, sf write). The SPL was written to QSPI with it, and ROM loader boots it.
The file "/doc/SPI/README.ti_qspi_dra_test" in the u-boot repository mentions that QSPI memory is mapped at 5c000000 ("SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB, mapped at 5c000000"). But the code in this branch has nothing common with that example (the source does not have code to print "mapped at", and flash data structure also does not have such field). Trying to dump memory at address 5c000000 using U-Boot md command shows us the same garbage which SPL loads instead of u-boot.img payload. The assumption is that SPL tries to load data from mapped memory which, in fact, was not mapped at all. In contrary, the sf command uses driver to access SPI flash, and it works.
At the same time the U-Boot branch used in TI processor SDK is "ti-u-boot-2018.01", but it has significally changed flash code, and it includes QSPI memory mapping.
So my questions are:
1) How it is possible, that (presumably) latest u-boot branch has README which promises memory mapped QSPI, but the code does not map it?
2) Why the officially supported "meta-ti" layer in Yocto repository has non-actual u-boot code which has issues booting from QSPI?
3) What u-boot version should we actually use? What branch is the latest: 2018.01 which maps memory or 2019.01 which is in "meta-ti" layer?
4) Any reason that there are two unrelated u-boot branches which have different features?
5) Any possible reasons why SPL may be unable to load code from QSPI flash while the main U-Boot code built at the same time has no issues accessing the same flash with sf command?
PS. Answering in advance: we do not use tisdk repository because we need gcc 8.3 for our applications (some C++17 features). Attempt to update the tisdk compiler requires too many changes, while the Yocto project with meta-ti layer has no issues building gcc 8.3 for the whole system. Besides, instead of removing lots from tisdk repo, we prefer to add only required features to a minimal Yocto image. Finally, it was said that "meta-ti" layer is officially supported by TI. So why not?