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.

AM3358: USB configuration

Part Number: AM3358

Hello team,

Does the AM335x support configuring USB0 in “gadget” mode, while simultaneously configuring USB1 in “host” mode? 

USB0 needs to allow RNDIS (similar to the AM335x boot ROM), while USB1 needs to support the cellular module on our custom board.

The plan is to use USB0 with an NFS root filesystem. Because of this, USB0 cannot use on loadable modules, but instead be use built-in modules.

So far, I can only get either “gadget” mode or “host” mode for both ports.

The custom board defconfig has the following:

CONFIG_USB_USBNET=y

CONFIG_USB_NET_CDC_NCM=m

CONFIG_USB_NET_CDC_SUBSET=m

CONFIG_USB_MUSB_HDRC=y

CONFIG_USB_MUSB_GADGET=y

CONFIG_USB_MUSB_DSPS=y

CONFIG_USB_TI_CPPI41_DMA=y

CONFIG_USB_OTG=y

CONFIG_USB_GADGET=y

CONFIG_USB_CONFIGFS=y

CONFIG_USB_CONFIGFS_ECM=y

CONFIG_USB_CONFIGFS_ECM_SUBSET=y

CONFIG_USB_CONFIGFS_RNDIS=y

CONFIG_USB_CONFIGFS_EEM=y

CONFIG_USB_CONFIGFS_F_LB_SS=y

CONFIG_USB_CONFIGFS_F_FS=y

CONFIG_USB_CONFIGFS_F_HID=y

CONFIG_USB_ETH=y

CONFIG_USB_ROLE_SWITCH=m

Thanks in advance for any information you can provide!

Errol

  • Hi Errol,

    Errol Leon6 said:
    Does the AM335x support configuring USB0 in “gadget” mode, while simultaneously configuring USB1 in “host” mode? 

    Yes, this is how the AM335x GP EVM is configured.

    Errol Leon6 said:
    CONFIG_USB_MUSB_GADGET=y

    This is not correct. This option configures the MUSB controller to be "gadget" only mode, then you lost "host" mode. The correct configure is

    # CONFIG_USB_MUSB_HOST is not set
    # CONFIG_USB_MUSB_GADGET is not set
    CONFIG_USB_MUSB_DUAL_ROLE=y
    

    Then

    - Leave USB0_ID pin float on your custom board, don't connect it to anywhere.

    - Set USB0 dr_mode to "otg" and USB1 dr_mode to "host" in your board dts file. Please refer to the AM335x GP EVM dts file.