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.

PROCESSOR-SDK-AM65X: OSPI flash partitions

Part Number: PROCESSOR-SDK-AM65X

Hi,

I am trying to change the offset address of the OSPI flash and i am not sure how to achieve. I tried few things and didn't get any expected results.

Things I have tried :- (In u-boot level)

The snapshot below is the default partition for the OSPI.

1. I tried to change the CONFIG_MTDPARTS_DEFAULT variable in u-boot and it didn't make any change.

2. I tried to change the dtsi files present in the u-boot by adding the partition related information and still i did not find any difference.

3. I was walking through the u-boot source code to see if any partitions get created but i was unsuccessful in that.

4. I haven't tried this but If i directly provide custom offset address while flashing, will the u-boot able to detect the custom offsets and keep on fetching files for a successful boot?

Example :-

This is the default address for tispl.bin (0x80000).

=> tftp ${loadaddr} tispl.bin
=> sf update $loadaddr 0x80000 $filesize

If i load the tispl.bin in the new location, will u-boot detect it ?If yes then how the u-boot will fetch it ?

=> tftp ${loadaddr} tispl.bin
=> sf update $loadaddr 0x40000 $filesize

Can you suggest , what is the right approach to solve this ?

  • What exactly are you trying to relocate and where?

    As for the U-Boot and related boot artifacts their location is dictated by ROM (in case of tiboot3.bin). Others (tispl.bin, u-boot.img, sysfw.itb) are hard-coded using CONFIG variables in U-Boot and/or U-Boot header files.

    Regards, Andreas

  • As you can see for the tiboot3.bin, the memory allocated is 512Kb but the actual size is around 120Kb-130Kb.

    So i am trying to optimize the flash memory by placing all the binaries in different location.

    Andreas Dannenberg said:

    Others (tispl.bin, u-boot.img, sysfw.itb) are hard-coded using CONFIG variables in U-Boot and/or U-Boot header files.

    There is one place where these configurations present ( include/environment/ti/am65x_dfu.h ).

    Is it the only change that required or any other places i need to configure ?

    Can you help me where i can find these config files ?

  • Hi Venkatesh,

    the offsets for A53 U-Boot SPL and A53 U-Boot proper are defined in the below files as follows:

    include/configs/am65x_evm.h:#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x280000
    include/configs/am65x_evm.h:#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x80000

    The offset for system firmware is actually a Kconfig option that you can configure via 'make menuconfig'. It is defined here (including its default):

    arch/arm/mach-k3/Kconfig:config K3_SYSFW_IMAGE_SPI_OFFS

    Regards, Andreas

  • Thank You Andreas for the response.

    Andreas Dannenberg said:

    include/configs/am65x_evm.h:#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x280000

    include/configs/am65x_evm.h:#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x80000

    arch/arm/mach-k3/Kconfig:config K3_SYSFW_IMAGE_SPI_OFFS

    I found these things but i was not sure. Thank you for the confirmation.

    Just to confirm things, for the environment the below is the definition.

    include/configs/am65x_evm.h:#define CONFIG_ENV_OFFSET        0x680000