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.

Linux/AM3354: USB hub connected to USB0 not detected

Part Number: AM3354


Tool/software: Linux

Dear TI Team,

On our custom board, we are using a usb hub(CY7C65632) connected to our USB0 interface. In order to install sw to our empty board,  we first installed u-boot-spl and u-boot over uart0,  then tried to install remained files over usb hub(on board).  But unfortunately, even if we typed "usb start" command on console, the hub is not detected by SoC. We checked usb0_drvbus first and have seen that it is not driven. To be able to test it we plugged a mouse to one of hub downstream port, then, observe the power light is lightened for a short period of time and then switched off immediately.

Pls. note that we are powering USB Hub as bus powered mode. Can you pls. suggest us what can be wrong about system?

Regards,

Zafer Çalışkan

  • Hi,

    Please check that the hub is connected according to the guidelines given here: processors.wiki.ti.com/.../AM335x_Schematic_Checklist
  • Hi Biser,

    Thanks for the reply. But we have checked the steps and everything seems ok. If it is possible , can you pls. have a look our schematic? BTW, how can i share it with you?

  • You can post the USB portion of the schematic here.
  • Hi Biser,

    You can find the USB related parts in below:

  • What is the VUSB_VBUS0 voltage?
  • Since AM335x_USB0_DRVBUS is driven low, VUSB_VBUS0 is at 0V.
  • Hi,

    Which Processor SDK version do you use?

    I believe (I haven't checked it in recent SDK releases) the U-Boot in Processor SDK configures AM335x USB0 to be in device mode and USB1 to be in host mode, which is the same configuration as the AM335x GP EVM.

    So you would have to check the U-Boot source code to see if it is still the case, and if so you would have to modify Uboot to configure USB0 to be the host for your case.
  • Hi,

    we changed the u-boot as the USB0 port will be in Host mode. But nothing is changed. Because the DRVBUS is not triggering before/after the change. 

    I would like to highlight that ,at initial case, we do not give power to hub, so that Is it possible that the AM3354 cannot detect USB Hub? Normaly my expectation is that AM3354 needs to check first DM, DP ports and if it senses the the HUB it then checks the VBUS, if there is no power, it needs to drive DRVBUS line to enable bus power, Is that true?

    Note: Our Sw is based on ti-processor-sdk-linux-am335x-evm-05.01.00.11

    Regards,

    Zafer Çalışkan

  • Zafer,

    Please provide the patch to change USB0 to host mode, and provide the console log after you did 'usb start'.

    The schematics you provided is not complete. Please ensure
    - AM335x USB0_VBUS pin is connected to the output of the power switch VUSB_VBUS0_P1;
    - 1KOhm on USB0_VBUS pin is probably too much, please remove it;
    - AM335x USB0_ID pin should be directly grounded.

    The sequence you described is not accurate.
    - "usb start" command triggers software to assert USB0_DRVVBUS pin to turn on the power switch for VBUS;
    - USB0_VBUS goes above the valid threshold, the controller goes into host mode;
    - the hub detects VBUS then it turns on D+ pullup;
    - AM335x USB detects the D+ pullup then starts the numeration process.
  • Hi Liu,

    Sorry for my delayed reply. Below you can find the patch and console output.

    Patch:

    diff --git a/arch/arm/dts/am335x-evmsk.dts b/arch/arm/dts/am335x-evmsk.dts
    index fa32e4d..337f70f 100644
    --- a/arch/arm/dts/am335x-evmsk.dts
    +++ b/arch/arm/dts/am335x-evmsk.dts
    @@ -745,6 +745,7 @@
     
     &usb0 {
            status = "okay";
    +       dr_mode = "host";
     };

    Console Output:

    U-Boot 2018.01-00453-g8b59a91-dirty (May 08 2019 - 08:55:59 +0300)

    CPU : AM335X-GP rev 2.1
    Model: TI AM335x EVM-SK
    DRAM: 256 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    ** Bad device mmc 0 **
    Using default environment

    <ethaddr> not set. Validating first E-fuse MAC
    Net: cpsw
    Hit any key to stop autoboot: 0
    =>
    =>
    =>
    =>
    => usb dev
    USB is stopped. Please issue 'usb start' first.
    => usb start
    starting USB...
    USB0: Port not available.
    =>

    Regards,

    Zafer Çalışkan

  • Hi,

    BTW, once device boots normally, it detects USB hub and makes enumeration. So something wrong with only u-boot.

    ////////////////////

    [ 18.577898] am335x-phy-driver 47401300.usb-phy: 47401300.usb-phy supply vcc not found, using dummy regulator
    [ 18.670877] usbcore: registered new interface driver usbfs
    [ 18.670944] usbcore: registered new interface driver hub
    [ 18.706196] usbcore: registered new device driver usb
    [ 18.892065] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    [ 19.009049] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
    [ 19.114249] hub 1-0:1.0: USB hub found
    [ 19.166899] hub 1-0:1.0: 1 port detected
    [ 19.212401] am335x-phy-driver 47401b00.usb-phy: 47401b00.usb-phy supply vcc not found, using dummy regulator
    [ 19.314074] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    [ 19.433579] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
    [ 19.508853] hub 2-0:1.0: USB hub found
    [ 19.552695] hub 2-0:1.0: 1 port detected
    [ 19.695681] usb 1-1: new high-speed USB device number 2 using musb-hdrc
    [ 19.919526] hub 1-1:1.0: USB hub found
    [ 19.948857] hub 1-1:1.0: 4 ports detected
    [ 20.305937] usb 1-1.1: new high-speed USB device number 3 using musb-hdrc

    //////////////////////////////

    Regards,
    Zafer Çalışkan

  • Zafer,

    u-boot in Processor SDK v5.1 doesn't support device tree in USB drivers yet. You can see your u-boot .config file doesn't have CONFIG_DM_USB defined. So you won't be able to switch USB0 to host mode through dr_mode in DT. Please use the following patch instead.

    diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
    index 01f0277ff183..5155d9599e72 100644
    --- a/include/configs/am335x_evm.h
    +++ b/include/configs/am335x_evm.h
    @@ -234,9 +234,9 @@
     #define CONFIG_USB_MUSB_PIO_ONLY
     #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
     #define CONFIG_AM335X_USB0
    -#define CONFIG_AM335X_USB0_MODE        MUSB_PERIPHERAL
    +#define CONFIG_AM335X_USB0_MODE MUSB_HOST
     #define CONFIG_AM335X_USB1
    -#define CONFIG_AM335X_USB1_MODE MUSB_HOST
    +#define CONFIG_AM335X_USB1_MODE        MUSB_PERIPHERAL
     
     /*
      * Disable MMC DM for SPL build and can be re-enabled after addin
    
  • Dear Liu,

    The patch you sent above is solved our problem. Thanks for your valuable support.

    Regards,
    Zafer Çalışkan
  • That is great! Thanks for the update.