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.

Configure USB0 as host and gadget mode

HI

  I am trying to configure the Usb0 (HOST and gadget)

          I have gone through the instructions found at:

          configuring usb0 as host mode that is working fine when i have removed the host driver and registering gadget mode for usb0 its not working at all please help .(USB0 as host mode only in kernel config)

  • Hi Pradeep,

    From what I understand, you need to use USB0 in OTG mode (both host and device/gadget at the same time). This is not possible with DM816x device, as OTG mode is not supported. See the below links for more info:

    http://processors.wiki.ti.com/index.php/Usbgeneralpage#TI81XX.2FTI811X_3

    http://processors.wiki.ti.com/index.php/DM81xx_AM38XX_USB_User_Guide#Hardware_Limitation_.28Not_supported_feature.29_DM816X

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_USB_Driver_User_Guide#OTG_support_.28TI816X.2FTI814X.2FTI813X.29

    Regards,
    Pavel
  • Hi Pavel,

    Thank u very much for reply, I did like configure kernel with usb0 as host mode , is it possible to change it to device mode at any condition without reconfig.
  • Pradeep,

    pradeep TG said:
    configure kernel with usb0 as host mode , is it possible to change it to device mode at any condition without reconfig.

    No, you can not switch from host to device mode without reconfigure the linux kernel, as this is actually the OTG mode - to switch between host and device mode without reconfig.

    BR
    Pavel

  • From the DM816x TRM:

    24.1.3 Features Not Supported
    • USB2.0 extensions for OTG Session Request Protocol (SRP)
    • USB2.0 extensions for OTG Host Request Protocol (HRP)
    NOTE: The USB subsystem is built around two USB OTG controllers. However, OTG functionalities are not supported. What this means is that the USB Modules support mini-host and device capabilities but is not capable of changing roles (device/host) on the fly.

    Regards,
    Pavel
  • Hi Pavel,

    can we use both usb0 and usb1 port in single usb mini adapter , can we use usb id to find host or gadget connected .
  • Pradeep,

    pradeep TG said:
    can we use usb id to find host or gadget connected

    No, you can not. The external USB-ID pin from the USB connector is not pinned out of SoC. The USB-ID pin (or iddig pin) is made software configurable to configure the controller as host mode (iddig = 0) or device mode (iddig = 1). Hence dynamic iddig pin sensing based on external USB cable connector is not possible. The USB0_ID/USB1_ID pin is always configured through software in DM816X silicon revisions. This configuration is done by choosing appropriate configuration through USBx_ID menuconfig selection.

    You can use one port as a host (i.e. USB0) and other port as a device/gadget (i.e. USB1).

    BR
    Pavel