Should i modify source code when using different QSPI flash

Hi, I am using Jacinto 6, GLSDK 7.04.03.

If we replace eMMC to "N25Q064A13E12H0F" on DRA742-EVM 577G-02-21-00 board, should i modify any code?

As i see in dra7-evm.dts file, there are description about QSPI like below

&qspi {           

status = "okay";

 spi-max-frequency = <64000000>;
 m25p80@0 {
  compatible = "s25fl256s1";
  spi-max-frequency = <64000000>;

the value of compatible is the original QSPI flash, so i think i should modify here, am i right?

besides, is there any place should i modify too?

  • In reply to shawn lin:

    Shawn,

    Do you have custom board with N25Q128 flash that is able to boot fine from QSPI or every custom board fail to boot from QSPI? Can you provide me the latest boot up log? Can you confirm that the same MLO/SPL is booting fine from SD card?

    Check also DRA74x Silicon Errata, there are some advisories regarding QSPI



    Do you use QSPI_1 or QSPI_4 mode? What is your sysboot[5:0] configuration?

    Make sure you are aligned with DRA74x TRM, section:

    32.2.4.5 Boot Peripheral Pin Multiplexing

    32.3.7.5 SPI/QSPI Flash Devices

    Note:  If this answer solves your question please click the "Verify Answer" button.


  • In reply to Pavel Botev:

    Hi Pavel,

    Currently, no custom board with N25Q128 can boot up success through QSPI.

    The same MLO & u-boot.img can boot up success through SD card.

    The latest log=>8053.qspi_boot_log.txt 

    I use QSPI_1 mode. And my sysboot[5:0] is 110110

    p.s. the flash at our custom board should be "MT25QL128ABA8E12-0AAT", but it have the same EDID, so the system recognize it as N25Q128 

  • In reply to shawn lin:

    shawn lin
    Currently, no custom board with N25Q128 can boot up success through QSPI.

    It might be also HW issue than. You can double check your HW design.

    shawn lin
    The same MLO & u-boot.img can boot up success through SD card.

    How do you build MLO/u-boot.img for SD card boot? How do you build MLO/u-boot.img for DRA7x TI EVM QSPI boot? Do you use dra7xx_evm_qspiboot_config or dra7xx_evm_defconfig or dra7xx_evm_config or else?

    shawn lin
    I use QSPI_1 mode. And my sysboot[5:0] is 110110

    Do you also use QSPI_1 mode with sysboot[5:0] = 110110 for DRA7x TI EVM QSPI boot?

    shawn lin
    The latest log=>(Please visit the site to view this file) 

    From this log it seems to me that MLO is loaded. Can you provide me the log with SD card boot and with DRA7x TI EVM QSPI boot?

    Regards,
    Pavel

    Note:  If this answer solves your question please click the "Verify Answer" button.


  • In reply to Pavel Botev:

    Hi Pavel,

    If i try to make QSPI boot image(MLO, u-boot.img), i will modify our board-support/u-boot/boards.cfg, and change config parameter from "ENV_IS_IN_MMC" to "QSPI_BOOT".

    No, i didn't try sysboot[5:0] = 110110 for DRA7xx TI EVM QSPI boot. But after i try, it fail ,too. The log is provide below. But i try QSPI boot at our custom board with the same QSPI flash as EVM, it works.

    The way i build the MLO & u-boot.img for TI EVM is that i modify configs/dra7xx file setting, i change DEFAULT_UBOOT_CONFIG from "dra7xx_evm_usbboot_config" to "dra7xx_evm_qspiboot_config"

    Log for SD boot at custom board=> custom_board_SD.log  

    Log for DRA7xx TI EVM QSPI boot=>TI_EVM_board_QSPI.log  

  • In reply to shawn lin:

    shawn lin
    If i try to make QSPI boot image(MLO, u-boot.img), i will modify our board-support/u-boot/boards.cfg, and change config parameter from "ENV_IS_IN_MMC" to "QSPI_BOOT".

    Why you are doing this? From where you get instructions that you should modify board.cfg file? If you build your MLO/u-boot for QSPI (not for SD), the environment would be set up in QSPI flash (not in SD card) (dra7xx_evm_qspiboot_config)

    shawn lin
    No, i didn't try sysboot[5:0] = 110110 for DRA7xx TI EVM QSPI boot. But after i try, it fail ,too. The log is provide below. But i try QSPI boot at our custom board with the same QSPI flash as EVM, it works.

    So you can not boot DRA7x TI EVM from QSPI also. You can only boot your custom board with S25FL256 flash successful, is that correct? How do you build MLO/u-boot.img for custom board with S25FL256 flash for QSPI boot? Do you use dra7xx_evm_qspiboot_config or dra7xx_evm_defconfig or dra7xx_evm_config or else?

    Do you also use QSPI_1 mode with sysboot[5:0] = 110110 for custom S25FL256 board QSPI boot? Can you provide me the log with QSPI boot for the custom S25FL256 board?

    Regards,
    Pavel

    Note:  If this answer solves your question please click the "Verify Answer" button.


  • In reply to Pavel Botev:

    Hi Pavel,

    I already can boot from QSPI at DRA7x TI EVM. I modify DEFAULT_UBOOT_CONFIG as "dra7xx_evm_qspiboot_config" to build MLO & u-boot.img. Besides, i modify flash parameter according QSPI memory layout descripted in DRA7xx_GLSDK_Software_Developers_Guide.

    The guide says i should use command "sf write 0x83000000 0x40000 0x60000" to flash u-boot.img. But according memory layout, the space of u-boot.img is 0x100000, so if i replace size 0x60000 with 0x100000, then i can boot from QSPI at EVM. Is there something wrong with this command?

    As you say, i should use "dra7xx_evm_qspiboot_config" to create MLO & u-boot.img for our custom board?

    I already try it, but still fail to boot up, the log is=>qspi_boot_log (custom_board-B).txt  

    Because our custom board-B use 256MB memory size, could it be the reason for boot fail? or is because we use different QSPI flash(STMicro MT25QL128)

    And yes, i use QSPI_1 mode with sysboot[5:0] = 110110 for custom S25FL256 board QSPI boot. The log is =>qspi_boot_log(custom_board-A).txt  

    In board.cfg, we create new config for our custom board. Most of parameter just like dra7xx_evm. Because there is no config could build image for QSPI boot, so i use the way i told before(modify parameter from "ENV_IS_IN_MMC" to "QSPI_BOOT" in board.cfg) to build MLO & u-boot.img for QSPI boot. With this way, i can boot from QSPI in out custom board-A(with 1GB memory size).

    So, currently, i only can boot from qspi in our custom board-A(with 1GB memory, S25FL256 QSPI flash), but fail in custom board-B(with 256MB memory, STMicro MT25QL128)

    Regards,

    Shawn

  • In reply to shawn lin:

    Hi Pavel,

    Do you have any suggestion?

    Regards,

    Shawn

  • In reply to shawn lin:

    Hi Pavel,

    Is "dra7xx_evm_qspiboot" a file? If it is, can you tell me where is it? Because i can find other config in /board_support/u-boot/include/configs/, such as dra7xx_evm.h or dra7xx_evm_android.h, but i can't find dra7xx_evm_qspiboot.h.

    And i can't use dra7xx_evm_qspiboot to build MLO & u-boot.img, because memory setting in our custom board is different than TI EVM board.

    Regards,

    Shawn

  • In reply to shawn lin:

    Shawn,

    shawn lin

    I already try it, but still fail to boot up, the log is=>(Please visit the site to view this file)  

    Because our custom board-B use 256MB memory size, could it be the reason for boot fail? or is because we use different QSPI flash(STMicro MT25QL128)

    shawn lin
    So, currently, i only can boot from qspi in our custom board-A(with 1GB memory, S25FL256 QSPI flash), but fail in custom board-B(with 256MB memory, STMicro MT25QL128)

    From the log you sent, it seems to me that issue is in 256MB DDR3, not in QSPI flash. Are you able to boot this 256MB board from SD card (or any other boot source)? What changes you have applied in u-boot source code to apply this 256MB DDR3?

    Regards,
    Pavel

    Note:  If this answer solves your question please click the "Verify Answer" button.


  • In reply to shawn lin:

    shawn lin
    The guide says i should use command "sf write 0x83000000 0x40000 0x60000" to flash u-boot.img. But according memory layout, the space of u-boot.img is 0x100000, so if i replace size 0x60000 with 0x100000, then i can boot from QSPI at EVM. Is there something wrong with this command?

    No, the command is correct, but it is for GLSDK pre-built u-boot.img, which size is around 0.37MB. The default layout is 0x040000 to 0x140000, which means u-boot.img start from 0x40000 and max size can be 1MByte (0x100000). 0x60000 match the size of the pre-built u-boot.img, if you have bigger size of your own u-boot.img you should update this 0x60000 parameter.

    # sf write <memory address> <offset> <len>
     where,
       memory-address - source data to read from
       offset - qspi offset location to write
       len    - length of the data to be written

    Note:  If this answer solves your question please click the "Verify Answer" button.