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.

J722SXH01EVM: Booting using USB-MSC mode

Part Number: J722SXH01EVM

Hi,

We are trying to boot the EVM using USB-MSC mode.  We understand that this functionality does not yet exist in the SDK (as of v9.2), but the processor ROM code should support at least loading tiboot3.bin, correct?.

We have not been able to get this far.  Can you confirm that this works?.

thanks

  • Thank you Praneeth. Your suggestion will help us booting via USB-MSC after getting the EVM to boot the first stage bootloader from USB-MSC but we haven't been able to do that yet. What I have tried:

    1. Prepared a USB flash drive with the same files and partitioning present in a working sd-card.
    2. Connected the USB flash drive to USB0 on the EVM using an USB-C to USB type A cable.
    3. Selected USB boot mode using SW3.
    4. Selected MSC config using SW3/SW4 (tried with "lane swap" set to 0 and 1).
    5. Set USB port direction to dual role using SW2 (also tried to setting it to downstream/upstream).

    Powering up the EVM does not show any activity on any of the UARTs. Have we missed anything?

    Thank you.

  • Hello Praneeth. We found out about errata i2328 (see below for the description I found on E2E). Is J722 affected? Is there any workaround or a more detailed description of what USB-MSC timing is violated so we can look for devices that tolerate said timing violation?

    Boot: USB MSC boots intermittently
    Details: USB MSC Host boot may fail due to a protocol timing violation present in the ROM USB device enumeration process. USB DFU boot is unaffected.

    Workaround(s): No workaround is available. Some USB MSC devices may tolerate this protocol violation and function as expected. Due to the internal component variability of broad-market MSC devices, a list of tolerant devices cannot be provided

  • Hello Delio,

    We have checked with our dev team, and the USB MSC boot has been verified to work, though it is not documented boot mode for the SDK 9.2 release.

    Please note that not all USB flash drivers may work, and I suggest you use a USB 2.0 flash drive for a better chance of working.

    We do not have data to confirm if the above errata applies to J722S, so this will take some time.

    Thanks.

  • Until TI can support this boot mode, I'd suggest you remove it from all datasheets and TRMs and SDK docs.  thanks

  • Thanks for the suggestion, but no thanks.

    The USB MSC boot is supported by the J722S, But as previously mentioned, the SDK has not documented it as a supported boot mode.

    Regards.

  • Hello Praveen,

    The USB MSC boot is supported by the J722S

    That's great and we want to boot a "first stage" bootloader using USB MSC via boot ROM as described by the TRM; please help us achieve that. We do not need directions on how to configure, modify and compile u-boot at this stage.

    In order to check for successful boot I would like to observe something being output on any UART, the easy solution is to use the pre-built ti-boot3.bin that comes with the SDK and boots from SD-card.

    Copy `ti-boot3.bin` onto a properly formatted USB 2.0 thumb drive and connect it to USB0, configure bootmode and USB port switches on the EVM and it should boot, but it does not (for me).

    Has MSC boot been tried the EVM? If so and it is confirmed working we would like how to configure the EVM and which USB MSC device was used for testing so we can reproduce.

    FYI we do not intend to use MSC boot for development, but we are prorotyping PCBs and need to make design decisions related to boot modes and configurations.

    Thank you.

  • Hi Delio,

    That's great and we want to boot a "first stage" bootloader using USB MSC via boot ROM as described by the TRM; please help us achieve that

    We are checking with the team on the steps to verify this. We will share once we have this.

    We do not need directions on how to configure, modify and compile u-boot at this stage.

    As noted, SDK 9.2 does not support the documentation on this. Therefore, it will be included in the subsequent SDK release documentation.

    In the Interim, we suggest you look at the below links for some guidance:

    https://software-dl.ti.com/processor-sdk-linux/esd/AM62PX/09_02_01_09/exports/docs/linux/Foundational_Components/U-Boot/UG-Memory.html#booting-to-u-boot-prompt-from-usb-storage

    Also note that a separate devconfig—j722s_evm_r5_usbmsc needs to be used. The default bootloader images use the default “j722s_evm_r5_usbdfu_defconfig” and “j722s_evm_a53_defconfig” config files.

    Thanks.

  • We are checking with the team on the steps to verify this. We will share once we have this.

    Thank you Praveen. We are looking forward to the team's response.

    In the Interim, we suggest you look at the below links for some guidance:

    Ack, we will look at these too.

  • We are looking forward to the team's response.

    Sure, the team is based in India, and it is a holiday due to the general elections. We will get back as soon as we get the instructions.

    Thanks.

  • Hi Praveen,

    Do you have updates on this?

    thanks!

  • Hello Delio, Stephen,

    First update, the default bootloader binaries that release on ti.com (that include tiboot3.bin) will not work when using USB MSC boot, since it used the default USB DFU devconfig for its build.

    We need to be using j722s_evm_r5_usbmsc.config for R5 SPL

    To build with config fragments

    make ARCH=arm O=/r5 j722s_evm_r5_defconfig j722s_evm_r5_usbmsc.config

    Follow: https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-j722s/09_02_00_05/exports/docs/linux/Foundational_Components/U-Boot/UG-General-Info.html#build-u-boot 

    The dip switch settings are

    SW3.1 = 1, SW3.2 = 1, SW3.5 = 1, SW3.7 = 1, rest are 0

    SW4.1 = 1, Rest are 0

    SW2.2 = 0, SW2.3 = 0

    For USB MSC, we  connected the USB stick to Type-C port using an adpater.

    Thanks,.

  • For USB MSC, we  connected the USB stick to Type-C port using an adpater.

    Thank you Praveen. Could you please tell us the make and model of the USB stick that was used for testing? We want to try reproducing a working setup as a starting point.

  • Hi Delio,

    Our team mentioned that they has verified 3 different brands (Kingston, Sandisk & Lexar), but they do not have "model" info. So suggest trying on of these brand.

    Thanks.

  • Hi Praveen,

    We have tried using your information on two different EVMs using various USB sticks including a Sandisk.  If we set the backup boot mode to UART/XMODEM then we get activity on the UART indicating the ROM was not able to execute USB-MSC and proceeded to backup boot.

    Can you show us what is output on the serial port/console when tiboot3.bin is successfully loaded by the USB-MSC method?

    Any other ideas?

    thanks

  • Hello Stephen,

    The console output shared is from one of our internal tests.

    U-Boot SPL 2023.04-00910-gd261222337-dirty (Mar 20 2024 - 11:12:50 +0530)    
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.6--w2023.01-j722s (Kool Koa')       
    SPL initial stack usage: 17080 bytes                                         
    Trying to boot from USB                                                      
    Bus usb@31000000: Register 1000840 NbrPorts 1
    Starting the controller                 
    USB XHCI 1.10                           
    scanning bus usb@31000000 for devices... 2 USB Device(s) found
           scanning usb for storage devices... 1 Storage Device(s) found
    Authentication passed                   
    Authentication passed
    Authentication passed
    init_env from device 42 not supported!
    Authentication passed
    Authentication passed
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.10.0(release):v2.10.0-367-g00f1ec6b87-dirty
    NOTICE:  BL31: Built : 16:09:05, Feb  9 2024
    NOTICE:  Upgrade Firmwares for Power off functionality
    ERROR:   Failed to get response (-19)
    ERROR:   Transfer send failed (-19)
    ERROR:   Unable to query firmware capabilities (-19)
    
    U-Boot SPL 2023.04-00910-gd261222337-dirty (Mar 20 2024 - 11:14:59 +0530)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.6--w2023.01-j722s (Kool Koa')
    Trying to boot from USB
    Bus usb@31000000: Register 1000840 NbrPorts 1
    Starting the controller
    USB XHCI 1.10
    scanning bus usb@31000000 for devices... 2 USB Device(s) found
           scanning usb for storage devices... 1 Storage Device(s) found
    Authentication passed
    Authentication passed
    
    
    U-Boot 2023.04-00910-gd261222337-dirty (Mar 20 2024 - 11:14:59 +0530)
    
    SoC:   J722S SR1.0 HS-FS
    Model: Texas Instruments J722S EVM
    Board: J722SX-EVM rev E1
    DRAM:  2 GiB (effective 8 GiB)
    Core:  70 devices, 27 uclasses, devicetree: separate
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from nowhere... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Net:   
    Warning: ethernet@8000000port@1 (eth0) using random MAC address - 82:f5:1e:c4:4e:ce
    eth0: ethernet@8000000port@1
    Hit any key to stop autoboot:  0 

    Thanks,

  • FYI when I try MSC boot using the sip switches settings you suggested (which I believe are correct) and configure UART boot as backup bootmode I see the following on UART3:

    02000000011a00006a3761656e0000000000000048534653000001000000010002a6000000000000b2bfda979263f596a504e3185d5c3cccae17e93b0d9d4c306fc72c91f83855bcfc8d768c07e271667f391027b4043808d7d87784dfe19f89556c5845449b85faad0bc40b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000049c091b314a52eae8e3c326f60b377f42f1e15537920cb7bb41ad008c89a0e48CCCCCCC

    Assuming this a boot ROM trace output and ignoring the trailing `C`s which indicate the boot ROM is ready to receive the bootloader this is what they look like when breaking it up as a sequence of 32 bit hexadecimals:


    02000000
    011a0000
    6a376165
    6e000000
    00000000
    48534653
    00000100
    00000100
    02a60000
    00000000
    b2bfda97
    9263f596
    a504e318
    5d5c3ccc
    ae17e93b
    0d9d4c30
    6fc72c91
    f83855bc
    fc8d768c
    07e27166
    7f391027
    b4043808
    d7d87784
    dfe19f89
    556c5845
    449b85fa
    ad0bc40b
    00000000
    00000000
    00000000
    00000000
    00000000
    00000000
    00000000
    00000000
    00000000
    00000000
    00000000
    00000000
    00000000
    00000000
    00000000
    49c091b3
    14a52eae
    8e3c326f
    60b377f4
    2f1e1553
    7920cb7b
    b41ad008
    c89a0e48
  • Hi,

    Can you share you sysboot setting? Also, please confirm the steps you followed to build the tiboot3.bin.

    What you are seeing above is the the UART boot SOC ID boot sequence, so tells 2 things:

    - The primary boot has failed and the bootrom is trying the secondary boot.

    - Since you are not seeing 'CCCCC' sequence (seen on GP board) and instead seeing alphanumeric values, which is actually the SOCID+otherInfo string, it seems that you are having a HS-FS board.

    Thanks.

  • it seems that you are having a HS-FS board.

    Yes, our board is an HS-FS board. Does that make any difference in relation to USB MSC boot?

    Also, please confirm the steps you followed to build the tiboot3.bin.

    I updated the `UBOOT_MACHINE_R5` variable in `Rules.make` to `UBOOT_MACHINE_R5=j722s_evm_r5_config j722s_evm_r5_usbmsc.config` and re-built u-boot and then copy `board-support/ti-u-boot-2023.04+gitAUTOINC+f9b966c674/build/r5/tiboot3-j722s-hs-fs-evm.bin to tiboot3.bin` onto the USB stick. I also tried booting with `board-support/ti-u-boot-2023.04+gitAUTOINC+f9b966c674/build/r5/tiboot3-j722s-hs-evm.bin` but that doesn't work either.

    Can you share you sysboot setting?

    If sys boot setting is the bootmode/bootconfig dip switch settings see below, if not please let me know what information I need to provide.

    SW3 and SW4 are setup as follows:

    11001010 | 1011000

    SW2.2 and SW2.3 are set to OFF, OFF

  • Does that make any difference in relation to USB MSC boot?

    Ideally, no. But as you noted, for HS_FS device, the tiboot3.bin must include the right tifs.bin binary needed for HS-FS.

    We will share the details you provided with the developer who verified this feature and share the feedback once we get it.

    Thanks.

  • Hi Delio,

    Can you please confirm if you have made the below changes and compiled the boot binaries?

    diff --git a/arch/arm/dts/k3-j722s-evm-u-boot.dtsi b/arch/arm/dts/k3-j722s-evm-u-boot.dtsi
    index 55f70ef969..5a40cbfe70 100644
    --- a/arch/arm/dts/k3-j722s-evm-u-boot.dtsi
    +++ b/arch/arm/dts/k3-j722s-evm-u-boot.dtsi
    @@ -39,7 +39,7 @@
    };

    &usb0 {
    - dr_mode = "peripheral";
    + dr_mode = "host";
    bootph-pre-ram;
    };

  • Hello Ravi,

    Can you please confirm if you have made the below changes and compiled the boot binaries?

    Yes, I did. However, I have been asking myself a question about these bootloader USB MSC configuration changes sice they were proposed: while these changes are necessary to successfully boot linux, I would not expect them to be necessary to get some sort of initial output from tiboot3 via UART. I would have thought copying the pre-built tiboot3.bin from the SDK onto a USB stick would allow us to check if the ROM bootloader is successfully loading and executing tiboot3.bin by looking at UART and expecting to see u-boot's version banner.

    Right now we do not yet see tiboot3's version banner on UART (see this comment from      2 days ago    ), so I am expecting that configuration changes related to bootloading the following stage via USB MSC will have no effect.

    Thank you.

  • HI Delio,

    Yes, we do agree with this statement. Will inform our expert  to comment on what could be possibly missing on your setup and respond.

    Thanks.

  • Hi Delio,

    Can you share a photo on how you are connecting the USB flash driver to the USB-C port on the EVM? So that our Ravi can share his feedback.

    Thanks.

  • Hi Delio,

    It is necessary to build the tiboot3.bin with changes in arch/arm/dts/k3-j722s-evm-u-boot.dtsi and also the defconfig. Based on the boot mode pins, the ROM bootloader would look for the tiboot3.bin and other boot binaries from the appropriate boot source - USB mass storage in this case. In the pre-built tiboot3.bin in the SDK, the USB related modules are not enabled and hence not built. 

    I may have found the issue you are facing. When creating a boot partition in the pen drive, the bootable flag needs to be enabled.
    If the bootable flag is disabled, EVM was not booting up. You can enable the bootable flag using any Partition Manager such GParted

    Pen Drive used : San Disk Ultra Fair USB 3.0 - 64GB
    The pen drive is connected to the Type C port on the EVM via a USB C to USB A converter

    I will list the steps 
    (1) Create a FAT16 partition with boot flag enabled on the USB storage device.

    (2) Change the dr_mode from "peripheral" to "host" as per this

    (3) Build the boot binaries using j722s_evm_r5_config j722s_evm_r5_usbmsc.config  and also dip switches as per this

    (4) Copy the bootloader images(tiboot3.bin, tispl.bin, u-boot.img) into the boot partition of the pen drive created in (1)

    (5) Connect the Pen Drive via the converter and boot up the EVM

     

  • Hi Delio,

    We were able to verify 's step mentioned above and we able to boot using the USB flash drive. We are sharing the ti-boot.bin for your quick testing at your end.

    j722s_usbmsc_tiboot3.zip

    Thanks.

  • Can you share a photo on how you are connecting the USB flash driver to the USB-C port on the EVM?

    I can use this cable to connect the USB flash drive to an USB-C port on a PC and it works fine.

    We are sharing the ti-boot.bin for your quick testing at your end.

    Thank you very much. I tried this .bin file on a FAT16 partition set as bootable (using an MBR partition table) and the USB flash drive I have, and it didn't work. I ordered a "San Disk Ultra Fair USB 3.0 - 64GB" so I should be able to reproduce your setup soon.

    Thank you.

  • Hi Delio,

    Sure, please let us know.

    FYi, we are using the adapter that we purchase from Amazon https://www.amazon.com/dp/B07CVX3516?_encoding=UTF8&psc=1&ref_=cm_sw_r_cp_ud_dp_HKDS08RZ8CC7N0G965MX&skipTwisterOG=1

    Thanks.

  •  , 

    I am reporting success with "San Disk Ultra Fair USB 3.0 - 64GB". It immediately worked.

    U-Boot SPL 2023.04-00911-gc0ee12291d-dirty (May 10 2024 - 13:42:20 +0530)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.6--w2023.01-j722s (Kool Koa')
    SPL initial stack usage: 17080 bytes
    Trying to boot from USB
    Bus usb@31000000: Register 1000840 NbrPorts 1
    Starting the controller
    USB XHCI 1.10
    scanning bus usb@31000000 for devices... 2 USB Device(s) found
           scanning usb for storage devices... 1 Storage Device(s) found

    After setting `dr_mode` to `host` in `board-support/ti-u-boot-2023.04+gitAUTOINC+f9b966c674/arch/arm/dts/k3-j722s-evm.dts` too (for A53 boot loaders) `tispl.bin` is able to load u-boot.img.

    U-Boot SPL 2023.04-dirty (May 13 2024 - 18:23:03 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.6--w2023.01-j722s (Kool Koa')
    SPL initial stack usage: 17064 bytes
    Trying to boot from USB
    Bus usb@31000000: Register 1000840 NbrPorts 1
    Starting the controller
    USB XHCI 1.10
    scanning bus usb@31000000 for devices... 2 USB Device(s) found
           scanning usb for storage devices... 1 Storage Device(s) found
    Authentication passed
    Authentication passed
    Authentication passed
    init_env from device 42 not supported!
    Authentication passed
    Authentication passed
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.10.0(release):v2.10.0-367-g00f1ec6b87-dirty
    NOTICE:  BL31: Built : 16:09:05, Feb  9 2024
    NOTICE:  Upgrade Firmwares for Power off functionality
    ERROR:   Failed to get response (-19)
    ERROR:   Transfer send failed (-19)
    ERROR:   Unable to query firmware capabilities (-19)
    
    U-Boot SPL 2023.04-dirty (May 13 2024 - 18:23:19 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.6--w2023.01-j722s (Kool Koa')
    Trying to boot from USB
    Bus usb@31000000: Register 1000840 NbrPorts 1
    Starting the controller
    USB XHCI 1.10
    scanning bus usb@31000000 for devices... 2 USB Device(s) found
           scanning usb for storage devices... 1 Storage Device(s) found
    Authentication passed
    Authentication passed
    
    
    U-Boot 2023.04-dirty (May 13 2024 - 18:23:19 +0000)
    
    SoC:   J722S SR1.0 HS-FS
    Model: Texas Instruments J722S EVM
    Board: J722SX-EVM rev E3
    DRAM:  2 GiB (effective 8 GiB)
    Core:  70 devices, 27 uclasses, devicetree: separate
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from nowhere... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Net:
    Warning: ethernet@8000000port@1 (eth0) using random MAC address - 4a:02:73:04:fb:ef
    eth0: ethernet@8000000port@1
    Hit any key to stop autoboot:  0

    Thank you for aiding us in getting USB MSC going on the EVM.

  • Hi Delio,

    Thanks for confirming the it is working at your end. Will go ahead and close this thread.

    Thanks.