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: USB mass storage in U-boot

Part Number: AM3352

Hello,

We have our design based on am3352 processor.

We have both USB connected in our board, and we can use USB1 as mass storage from u-boot

=> usb start
starting USB...
USB0:   scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

But we also need to use USB0 as mass storage, and according to comment in am335x_evm.h

/*
 * USB configuration.  We enable MUSB support, both for host and for
 * gadget.  We set USB0 as peripheral and USB1 as host, based on the
 * board schematic and physical port wired to each.  Then for host we
 * add mass storage support and for gadget we add both RNDIS ethernet
 * and DFU.
 */

We have changed

#define CONFIG_AM335X_USB0_MODE     MUSB_PERIPHERAL

by
#define CONFIG_AM335X_USB0_MODE    MUSB_HOST

But it is still not working. What else we need to change to "add mass storage" support to USB0 ?

Best regards and thank you

Angel

  • Hello again,

    Finally we got it working. The problem was that it is not working if both USB are set as MUSB_HOST. For us is fine to have only USB0 as host, so this solves our problem.

    Anyway, It would be nice to know how to set both USB as host in case it is needed. I think it must be possible, so if someone can answer please we would appreciate very much.

    Best regards

    Angel

  • Hi Angel,

    Thanks for the update. Glad you found the solution.

    Yes, you are correct. The way U-Boot USB framework is designed doesn't allow more than one USB controller as host. When trying to initialize USB host, the low level code doesn't iterate all USB controllers, rather finds and initializes one host then done. It is not that trivial to modify U-Boot code to enable multiple USB host ports.