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.

66AK2G02: U-Boot support for QSPI

Part Number: 66AK2G02


Does TI U-Boot support the QSPI flash on the K2G EVM? When I try spi probe it doesn't find the QSPI flash on the K2G EVM using the version of U-Boot that is installed (U-Boot 2015.07 (Mar 21 2016 - 10:02:12 -0400)). 

When I get TI U-Boot tag ti2016.07, there is no sign of QSPI in the k2g_evm_defconfig file. If I configure U-Boot for TI_QSPI support, the build fails.

CC drivers/spi/ti_qspi.o
../drivers/spi/ti_qspi.c:11:27: fatal error: asm/arch/omap.h: No such file or directory

The Kconfig file says "Enable the TI Quad-SPI (QSPI) driver for DRA7xx and AM43xx evms." so it's not clear that the K2G EVM is supported.  Is the TI_QSPI driver the correct one to use?

By the way, I chose the ti2016.07 commit because it was just two up from the head of U-Boot as described in  http://processors.wiki.ti.com/index.php/Processor_SDK_Linux_U-Boot_Release_Notes  when I began this work yesterday morning; I see that the repository and the release notes have been updated since then. I'll try again with ti2017.01.

Regards,

Debora

  • I just rebuilt U-Boot using ti2017.1 and the k2g_evm-defconfig and ran it.

    Result: U-Boot detects the flash on the QSPI bus. So that problem is solved. There was no need to change the config.

    => sf probe 4:0
    SF: Detected s25fl512s_256k with page size 512 Bytes, erase size 256 KiB, total 64 MiB

    However the EVM doesn't finish booting as it used to so there must be something I need to copy to the SD card other than MLO and uboot.img. Can you tell me what is missing?

    U-Boot 2017.01-00318-g9fd6070 (Jun 27 2017 - 12:02:30 -0700)

    CPU: 66AK2Gx SR1.0
    Model: Texas Instruments Keystone 2 Galileo EVM
    I2C: ready
    DRAM:
    Clear entire DDR3 memory to enable ECC
    2 GiB
    NAND: 256 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    reading uboot.env

    ** Unable to read "uboot.env" from mmc0:1 **
    Using default environment

    Net:
    Warning: netcp@4000000 using MAC address from ROM
    eth0: netcp@4000000
    Hit any key to stop autoboot: 0
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    reading boot.scr
    ** Unable to read file boot.scr **
    reading uEnv.txt
    729 bytes read in 4 ms (177.7 KiB/s)
    Loaded env from uEnv.txt
    Importing environment from mmc0 ...
    Running uenvcmd ...
    45056 bytes read in 29 ms (1.5 MiB/s)
    ## Please update monitor image
    131136 bytes read in 24 ms (5.2 MiB/s)
    0 - Name:'pmmc@2900000' type:'internal memory mapped' supports: load start
    Load Remote Processor 0 with data@addr=0x82000000 131136 bytes: Success!
    4228928 bytes read in 220 ms (18.3 MiB/s)
    52285 bytes read in 18 ms (2.8 MiB/s)
    ** File not found /boot/keystone-k2g-evm.dtb **
    ERROR: Did not find a cmdline Flattened Device Tree
    Could not find a valid device tree
    =>
  • Looks like the problem is that some of the environment variables have changed from what was shipped with the K2G EVM.
  • Hi, Debora,

    Did you program the QSPI flash with the image? In our test, we tftp the image to ${loadaddr}, and write to QSPI flash

    => tftp ${loadaddr} 192.168.0.1:vatf_k2g-evm/31bb5d0dec74b656a3965814fa63f643
    Using netcp@4000000 device
    TFTP from server 192.168.0.1; our IP address is 192.168.0.246
    Filename 'vatf_k2g-evm/31bb5d0dec74b656a3965814fa63f643'.
    Load address: 0x82000000
    Loading: *##################################
    6 MiB/s
    done
    Bytes transferred = 497724 (7983c hex)
    => sf probe 4:0
    SF: Detected s25fl512s_256k with page size 512 Bytes, erase size 256 KiB, total 64 MiB
    => sf erase 0 80000
    SF: 524288 bytes @ 0x0 Erased: OK
    => sf write ${loadaddr} 0 7983c
    device 0 offset 0x0, size 0x7983c
    SF: 497724 bytes @ 0x0 Written: OK

    Then the dip switch needs to be set to "QSPI 96 Boot" according to K2G GP EVM Hardware Setup Guide.

    Rex
  • Hi, Debora,

    Does it work for you? If it does, could you click "verify answer" button? Otherwise, the thread will be closed in a day.

    Rex
  • Hi Rex,

    Ultimately my confusion was that I had done some testing with the U-Boot that shipped with the EVM , which was a much older version. (I don't have it set up right now to check the actual version.) With that version "sf probe" did not find the flash on the QSPI bus.

    U-Boot# sf probe 4:0
    Failed to initialize SPI flash at 4:0

    So I assumed that QSPI support needed to be added. But by experiment I find that QSPI support doesn't actually need to be configured for the QSPI flash to be found. U-Boot version 2017.1 finds the flash OK when built with the default configuration.

    => sf probe 4:0
    SF: Detected s25fl512s_256k with page size 512 Bytes, erase size 256 KiB, total 64 MiB

    So the problem was really that the old version of U-Boot that came with the EVM didn't find the SPI flash, but the current one does.

    Regards,
    Debora
  • For the record, the version of U-Boot that didn't find the flash was
    U-Boot 2015.07 (Mar 21 2016 - 10:02:12 -0400)

    This was what had been installed on my EVM's SD card after I followed whatever the quick start procedure said. Looking at sprw292, it doesn't say to copy files to the SD card, so the EVM must have shipped with this old U-Boot already on the card.

  • Debora,

    That explains it. The QSPI for K2G was implemented in 2016.05 (ProcSDK 3.0.x). For u-boot 2015.07 is for ProcSDK 2.0.x. Please get the latest K2G release from its download page at www.ti.com/.../PROCESSOR-SDK-K2G, or any archived releases at the bottom of each SDK page.

    Rex