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.
Hi ,
Our board is booting from OSPI device and kernel loads from UFS device. But r5f application is not running. When board is booted with uboot and rootfs on SD card it works fine.
Do we need to have changes in tiboot3 load r5f application from UFS ?
Thanks,
Shrinath
Hi Shrinath,
Currently the SPL loading the r5f firmware is only supported from SD. There is an e2e
thread to enable r5f loading from u-boot on eMMC:
https://e2e.ti.com/support/processors/f/791/p/886615/3330218#3330218
Can you refer the above and try for UFS?
Regards,
Keerthy
Hi Keerthy,
Is there any plan to support load firmware from u-boot ? As you said In u-boot code /u-boot-ti-staging/2019.01+gitAUTOINC+350f3927b8-r32_psdkla/git/arch/arm/mach-k3/common.c there is no support load firmware from SPI boot device. Is it possible to load firmware from emmc / SD / ufs partition when uboot is boots up from OPSI device?
int load_firmware(char *name_fw, char *name_loadaddr, u32 *loadaddr)
{
..................
*loadaddr = 0;
#ifdef CONFIG_SPL_ENV_SUPPORT
switch (spl_boot_device()) {
case BOOT_DEVICE_MMC2:
name = env_get(name_fw);
*loadaddr = env_get_hex(name_loadaddr, *loadaddr);
break;
default:
printf("Loading rproc fw image from device %u not supported!\n",
Thnaks,
Shrinath
Hi Shrinath,
There is a similar use case OSPI till u-boot and then rest from eMMC."
https://e2e.ti.com/support/processors/f/791/p/937373/3467250#3467250
That should get firmwares loaded from SPL from eMMC.
No support for UFS at the moment.
Best Regards,
Keerthy
Hi Keerthy,
We are able to load the R5F application from OSPI by reading the RAW file system by spi_read calls and only works when we read the flash from spl_spi.c. We tried to load the from tiboot3 common.c its not working. It filed to read from flash. Is it okay to read the R5F application code from spl_spi.c ?
Thanks,
Shrinath
Shrinath,
If i understand your steps correctly. You flashed the firmware at some known offsets in OSPi &
you used to spl_spi.c to read back to RAM? Can you elaborate more so i can understand better.
Best Regards,
Keerthy
Hi Keerthy,
Sorry I did not provided more details on changes. Yes your understanding is correct. we copied the r5f images at fixed offset and we are reading back in spl_spi.c. Please find below code snippet for the same. AS per current design it is good do the read flash from /arch/arm/mach-k3/common.c -> load_firmware(... But we are not able to access OSPI at this place. So doing it from spl_spi.c.
#ifdef CONFIG_SPL_APTIV_OSPI_BOOT
unsigned int offest_mainR5f = 0x800000;
unsigned int offest_mcuR5f = 0x900000;
unsigned int memory_mainR5f = 0x88000000;
unsigned int memory_mcuR5f = 0x89000000;
unsigned int image_len = 0;
unsigned int szie_offest = 4;
unsigned int image_offest = 512;
#endif
#ifdef CONFIG_SPL_APTIV_OSPI_BOOT
loader = memory_mainR5f;
err = spi_flash_read(flash, (offest_mainR5f),
szie_offest,
loader);
image_len = (unsigned int )*loader;
loader = memory_mainR5f;
err = spi_flash_read(flash, (offest_mainR5f+image_offest),
image_len,
loader);
loader = memory_mcuR5f;
err = spi_flash_read(flash, (offest_mcuR5f),
szie_offest,
loader);
image_len = (unsigned int )*loader;
loader = memory_mcuR5f;
err = spi_flash_read(flash, (offest_mcuR5f+image_offest),
image_len,
loader);
#endif
Thanks ,
Shrinath
Hi Shrinath,
Just one question i hope CONFIG_SPL_APTIV_OSPI_BOOT is defined only in one of the defconfigs.
I mean R5 SPL and A72 SPL will share the path in spl_spi.c. I hope that is being taken care of and only R5 SPL
reads the firmware.
Do you have any other questions/concerns?
Best Regards,
Keerthy
Hi Keerthy,
Sorry for late replay. Yes I have done defconfigs correctly and also it reads R5F firmware from flash from R5 SPL.
Please confirm this changes will not impact on current R5 SPL and tiboot3 design.
Thanks,
Shrinath
Hi Shrinath,
As long as you are able to boot the firmware on the remotecore & adhering to the memory map it should be good.
Best Regards,
Keerthy