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.

Can we use USB0_DRVVBUS as a GPIO when USB0 is active

Other Parts Discussed in Thread: AM3359

Hello,

I need lot of GPIO, so I used USBn_DRVVBUS as GPIO and configure the MUX.

Now the 2 USB host controllers don't work anymore. If I remove the MUX configuration, USB are OK.

Is it possible to use USBn_DRVVBUS as GPIO in the same time than USB host controllers ?

Regards

AM3359 processor, U-boot, GPIO OK, USBn_ID tri-state but configure by the S/W option describe in the TRM.

 

  • Yes, by disabling the VBUS detection in the usb_ctrl0 & usb_ctrl1 registers (bit#19 to 0)

    That is:

    writel(0x3c006004, 0x44E10620);
    writel(0x3c006004, 0x44E10628);

     

  • That is not correct.

    There has been some confusion related to this topic, but the USB OTG controller in monitoring the VBUS pin while operating in host mode and it expects the VBUS to be controlled by DRVVBUS.  If it detects a valid VBUS before DRVVBUS goes high it will never go into host mode because it things it is connected to another host.  If VBUS is not valid while DRVVBUS is high it will assume a over-current condition.

    Regards,
    Paul

  • Hi, don't forget I force the host mode by software.

    Below are my logs (from France):

    U-Boot 2011.09 (Aug 09 2012 - 19:24:38)

    I2C:   ready
    DRAM:  256 MiB
    NAND:  HW ECC Hamming Code selected
    512 MiB
    MMC:   OMAP SD/MMC: 0
    *** Warning - readenv() failed, using default environment

    Version of APB board is 4
    Net:   cpsw
    Hit any key to stop autoboot:  0
    U-Boot# usb start
    (Re)start USB...
    USB:   scanning bus for devices... 1 USB Device(s) found
           scanning bus for storage devices... 0 Storage Device(s) found
    U-Boot# usb info
    1: ,  USB Revision 1.10
     - Gemplus USB SmartCard Reader
     - Class: (from Interface)
     - PacketSize: 8  Configurations: 1
     - Vendor: 0x08e6  Product 0x3437 Version 1.0
       Configuration: 1
       - Interfaces: 1 Bus Powered Remote Wakeup 100mA
         Interface: 0
         - Alternate Setting 0, Endpoints: 3
         - Class

    U-Boot#