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.

The AM335X(beaglebone black) usb0 as otg driver

Hi,

Recently,our team  use the beaglebone black 's otg(miniAB) port to be the host or slave device,I use the Linux kernel is Linux-3.2.0-psp04.06.00.11 ,And my configure is below:

And i insert the g_file_storage.ko or g_mass_storage.ko like usb wiki.

But when I insert my otg device(My otg device is the ID port connect the GND),My beaglebone black will print the error log:

"ti81xx_interrupt 1146: VBUS error workaround (delay coming)".

I don't change the board-am335xevm.c file,so I want to ask whether I must change the board-am335xevm.c file,and how to change it to realize the otg function.

                                                                                                                                                                      Thanks!

  • Hi,

    The Beaglebone Black USB0 port does not have the necessary hardware for functioning as an OTG port. Most importantly the USB power switch controlled by USB0_DRVVBUS is missing.

  • Hi,

    Thank you very much Biser,

    Beaglebone black don't support OTG in hardware, but linux-3.2.0-psp04.06.00.11 seem to support OTG mode,because i use a line to connect 5V to OTG port VBUS port,and it can find my OTG device ,and print log below:

    ti81xx_interrupt 1146: VBUS error workaround (delay coming)
    [ 20.444732] ti81xx_interrupt 1146: VBUS error workaround (delay coming)
    [ 22.442291] ti81xx_interrupt 1146: VBUS error workaround (delay coming)
    [ 22.594726] ti81xx_interrupt 1146: VBUS error workaround (delay coming)
    [ 24.592315] ti81xx_interrupt 1146: VBUS error workaround (delay coming)
    [ 24.744720] ti81xx_interrupt 1146: VBUS error workaround (delay coming)
    [ 26.742309] ti81xx_interrupt 1146: VBUS error workaround (delay coming)
    [ 26.894714] ti81xx_interrupt 1146: VBUS error workaround (delay coming)
    [ 29.332275] usb 1-1: new high-speed USB device number 2 using musb-hdrc
    [ 29.472717] usb 1-1: device v0204 p6025 is not supported
    [ 29.478271] usb 1-1: New USB device found, idVendor=0204, idProduct=6025
    [ 29.485290] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 29.492767] usb 1-1: Product: Flash Disk
    [ 29.497406] usb 1-1: Manufacturer: ChipsBnk
    [ 29.501770] usb 1-1: SerialNumber: 119772507960
    [ 29.512573] scsi0 : usb-storage 1-1:1.0
    [ 30.513031] scsi 0:0:0:0: Direct-Access ChipsBnk Flash Disk 4.00 PQ: 0 ANSI: 2
    [ 30.525115] sd 0:0:0:0: [sda] 511487 2048-byte logical blocks: (1.04 GB/998 MiB)
    [ 30.538238] sd 0:0:0:0: [sda] Write Protect is off
    [ 30.549926] sd 0:0:0:0: [sda] Asking for cache data failed
    [ 30.555725] sd 0:0:0:0: [sda] Assuming drive cache: write through
    [ 30.564056] sd 0:0:0:0: [sda] 511487 2048-byte logical blocks: (1.04 GB/998 MiB)
    [ 30.572113] sd 0:0:0:0: [sda] Asking for cache data failed
    [ 30.577880] sd 0:0:0:0: [sda] Assuming drive cache: write through
    [ 30.585113] sda: sda1
    [ 30.590423] sd 0:0:0:0: [sda] 511487 2048-byte logical blocks: (1.04 GB/998 MiB)
    [ 30.609588] sd 0:0:0:0: [sda] Asking for cache data failed
    [ 30.615386] sd 0:0:0:0: [sda] Assuming drive cache: write through
    [ 30.621765] sd 0:0:0:0: [sda] Attached SCSI removable disk

    As you see,beaglebone balck can recognize OTG device,but how can I change the beaglebone black's hardware to auto to recognize OTG device and supply the 5V source.

                                                                                                                                                       Thank you very much! 

     

  • I don't think the BB Black can be reworked to make USB0 an OTG port. This will require the USB0_DRVVBUS signal, and this signal is not routed out from the processor on the PCB.

  • Thank you very much!

  • Hi,

             I need to configure USB0(OTG) mini USB as master(HOST device) in BBB board so how can i change  hardware circuitry. here i am doing VBUS pin is connected high through TPS65217C power IC , is it correct please help me i need to change BBB board to master mode  

  • This is not possible. USB1 is configured in Host mode on BBB. See the differences between the two in the BBB schematics: http://elinux.org/Beagleboard:BeagleBoneBlack#Hardware_Files

  • Hi,

         In TI processor  Data sheet , page no2453 and index no 16.3.7 in that page saying we need USB0 controller configured as host and device by making USBx_ID pin(hard ware option), IDDIG(BIT7 field)

      Ex:1.  USB0_ID pin connected to ground and configured as Host  mode.(Hardware option) 2.In software IDDIG mode register bit field with 0 , i want USB0 used as host then i need to connect another device which is hot plug able.  

  • There is also another requirement for Host mode - USB_VBUS pin needs to sense the USB +5V, which is controlled by a power switch driven by USB_DRVVBUS.

  • Hi,

         Thank u for reply,  The host responsible for to supply a +5v power source to attached device through its VBUS line. here my requirement is BBB board configured as host and slave can we use either hardware or software option. i.e OTG is implemented in BBB board , then it is synchronize with PC as well as it can act as host

  • Hi JH,

      I am also looking for same project i.e OTG controller configure as Host and slave and  make it as hot pluggable devices. Did you get solution for that? if you get how can i do for that?