• TI thinks resolved

PROCESSOR-SDK-AM335X: U-boot support for Atmel data flash


Enabling the atmel dataflash option on the latest uboot causes the SPL to hang after transferring about 400Kbytes. This happens with the latest one from TI's git site as well as from DENX.

  • Can you please provide more details on what you are trying to do? Have you tried with the official SDK release: www.ti.com/.../PROCESSOR-SDK-AM335X


    Best Regards
  • In reply to Biser Gatchev-XID:

    I had was using the 2016.05 build from ti's git site which did load OK on the eval board. My understanding is that in order to support the atmel spi dataflash parts, that I need to configure the use of the "driver model" in UBoot, otherwise the atmel dataflash option doesn't appear when you run make menuconfig. The Uboot version I was using, as well as the one you reference doesn't appear to have the DM aware version of atmel_spi.c. I want to be able to initially boot with UBoot via the serial port, then use Uboot to program the spi flash. I got the latest version from both the TI and DENX Uboot sites, and tried to build for the am335x_defconfig target. I was able to load the SPL, and could start to load the uboot.img file, but the latter stopped loading after transferring around 400Kbytes (varies a little from this number).
  • In reply to Dave_88:

    Hello David,

    Try to enable these two options in the menuconfig to a add support for various Atmel AT45xxx and AT25xxx SPI flash chips.
    Device Drivers ---> SPI Flash Support ---> [*] Legacy SPI Flash Interface support
                                                                                    [*] Atmel SPI flash support

    Best regards,

  • In reply to Kemal R. Shakir-XID:

    When I enable these, it doesn't include the dataflash specific files - atmel_dataflash_spi.c for example.

  • In reply to Dave_88:

    Then, can you also define a CONFIG_ATMEL_SPI in the board file.
  • In reply to Kemal R. Shakir-XID:

    building drivers/spi/atmel_dataflash.c depends on CONFIG_ATMEL_DATAFLASH_SPI being set in the configuration (per the Makefile).

    to the include/configs/am335x_evm.h file, tries to compile the atmel-dataflash.c file, however it gives this error:
    CC drivers/spi/atmel_dataflash_spi.o
    ../drivers/spi/atmel_dataflash_spi.c:28:26: fatal error: asm/arch/clk.h: No such file or directory
    compilation terminated.
    ../scripts/Makefile.build:280: recipe for target 'drivers/spi/atmel_dataflash_spi.o' failed
    make[2]: *** [drivers/spi/atmel_dataflash_spi.o] Error 1

    Looking more into this - it looks like the atmel-dataflash.c might only work on AT91F processors - do you know of any general support for the AT45DB type dataflash parts?

    Also - any thoughts as to why the latest TI uboot hangs in the SPL download - this is using the am335x_evm_defconfig that's part of uboot without any additional attempts on adding the atmel dataflash.
  • In reply to Dave_88:

    Correction: The above should have referred to the drivers/mtd/spi/sf_dataflash.c file rather than the above. This depends on the CONFIG_SPI_FLASH_DATAFLASH being set, if I add that to my header file I get the following:

    ../drivers/mtd/spi/sf_dataflash.c: In function 'spi_dataflash_probe':
    ../drivers/mtd/spi/sf_dataflash.c:590:11: error: 'struct spi_flash' has no member named 'dev'
    spi_flash->dev = dev;
    ../scripts/Makefile.build:280: recipe for target 'drivers/mtd/spi/sf_dataflash.o' failed
  • In reply to Dave_88:

    I think that this may need to have a driver model type configuration for the am335x_evm board. Since I want to use the spi flash, this requires setting the profile dip switches to profile 2. I think that this also needs to have a different *.dts file.

    Does anyone have a working configuration for am335x_evm UBOOT driver mode spi?