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.

AM3352: Start u-boot from uSD

Part Number: AM3352

Hello,

We are using am3352 in our design and kernel 4.14.67 from TI SDK.

We were using u-boot 2016.09 and it we were able to start system both from NAND FLASH and uSD.

Recently we moved to u-boot 2019.01 from TI SDK and we are using it to start system from NAND FLASH. Our problem is that we can not start it with this u-boot from uSD.

Could you please help us to find what we are not doing fine?

Best regards and thank you

Angel

  • For your reference, the u-boot configuration <am335x_evm_defconfig> is for building u-boot for booting from SD/NAND etc…on TI AM335x EVMs.

    https://software-dl.ti.com/processor-sdk-linux/esd/docs/06_03_00_106/AM335X/linux/Foundational_Components_U-Boot.html#build-and-boot-flow-on-32-bit-platforms

     

  • Hello,

    Thank you for your response.

    That is the config file I am using. I have changed board specific files to adapt u-boot to our HW, and it is runnig from NAND flash.

    The same changes we did for previous u-boot version and this one works from NAND and SD.

    Are there specific settings for starting from SD?

    Best regards and thank you

    Angel

  • Have you checked the SYSBOOT pin setup to have MMD to be in booting device list?

    Do we have any visibility (i.e. log) to indicate booting progress?

    Will you check u-boot bring-up tips as outlined in the link below:

    https://software-dl.ti.com/processor-sdk-linux/esd/docs/06_03_00_106/AM335X/linux/How_to_Guides/Board_Port/U-Boot.html#u-boot-bringup-debugging-tips

  • Hello,

    SYSBOOT pin setup is correct. As I mentioned, previous u-boot version works fine both from NAND FLASH and from uSD.

    Nothing is shown on the console. Up to now all I can say is that function board_init_f() from ctr0.S is called and executed. After that I do not know what is happening.

    I checked bring-up tips and changes are the same made in previous u-boot version to port it to our HW.

    Best regards

    Angel

  • Hi Angel,

    Is there a JTAG available on your board? If yes, JTAG debugger would be helpful for early boot up issue, where no console output available.

    Best,

    -Hong

  • Hi Hong,

    I am sorry but JTAG is not available. System is not starting from uSD because calling to function boot_from_devices() in board_init_r() (spl.c file) is returning -ENODEV, so start-up process is hang.

    But, up to now, I do not know why this happens only when starting from uSD.

    I am trying to enable console from SPL following instructions from README file, but it is not working. I have set CONFIG_SPL_BOARD_INIT and then preloader_console_init() is called from spl_board_init(), but console is not working.

    I think this could help to debug this issue.

    Best regards

    Angel

  • Hi Angel,

    Will you be able to modify SYSBOOT pin on-board to include UART boot mode into booting device list?

    If yes, can we watch if "cccc...." from serial terminal output from rom code peripheral boot (i.e. UART).

    Also some useful tips on debugging early boot up issues can be referenced 

    https://processors.wiki.ti.com/index.php/AM335x_board_bringup_tips

    Best,

    -Hong

  • Hi Hong,

    Sorry, but HW is stable for a long time and I can not change SYSBOOT pin.

    Now I have removed CONFIG_SPL_BLK and CONFIG_BLK from am335x_evm_defconfig file, I have changed "#if !CONFIG_IS_ENABLED(DM_MMC)" to "#ifndef CONFIG_DM_MMC" and "#if CONFIG_IS_ENABLED(DM_MMC)" to "#ifdef CONFIG_DM_MMC" and it starts up to the u-boot prompt.

    The problem is I can not access the MMC device format:

    => mmc info
    Device: OMAP SD/MMC
    Manufacturer ID: 3
    OEM: 5344
    Name: SC32G
    Bus Speed: 48000000
    Mode : SD High Speed (50MHz)
    Rd Block Len: 512
    SD version 3.0
    High Capacity: Yes
    Capacity: 29.7 GiB
    Bus Width: 4-bit
    Erase Group Size: 512 Bytes
    =>

    => fatload mmc 0 0x82000000 MLO
    ** Unrecognized filesystem type **
    =>

    The problem is that when calling "disk_read(0, 1, buffer)" in fat_set_blk_dev() function, read data is all 0x00.

    Can you help us with this?

    Best regards

    Angel

  • Hi Hong,

    Finally I got a version starting-up fine. This is what I changed:

    1- am335x_evm_defconfig

    # CONFIG_SPL_BLK is not set

    2- am335x_evm.h

    #ifdef CONFIG_SPL_BUILD
    #undef CONFIG_DM_MMC
    #undef CONFIG_TIMER
    #undef CONFIG_SPL_BLK
    #undef CONFIG_BLK
    #endif

    3-Files related to am335x project

    Change "#if !CONFIG_IS_ENABLED(DM_MMC)" to "#ifndef CONFIG_DM_MMC" and "#if CONFIG_IS_ENABLED(DM_MMC)" to "#ifdef CONFIG_DM_MMC"

    4- mmc-uclass.c

    Add #ifdef CONFIG_DM_MMC (previous u-boot version it was #ifdef CONFIG_DM_MMC_OPS)

    This way u-boot starts-up and then it is able to enable and read uSD. I am not sure about the reason but it seems something related to CONFIG_SPL_BLK.

    Maybe there is a more simple way to make it work, but I did not find it.

    I do not understand how the original version can work on other am335x boards.

    Next weeks I will be on holidays, so probably I will make more tests when I am back.

    Best regards

    Angel

  • Hi Angel,

    Thanks for your update, and it is very good to know you had worked out the SD card booting issue on your board.

    Best,

    -Hong