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.

USB3 in Device Mode

Other Parts Discussed in Thread: 66AK2E05

Hi,


We have a custom 66AK2E05 board, and are attempting to get USB0 working as a USB3.0 device under linux. However we are unable to get it to recognise VBUS as valid, therefore the pull-up on D+ is never enabled and the link state remains as SS.Disabled. USB_PHY_CTL0 always reads as 0x00000000, i.e. UTMI_VBAUSVLDEXT =0.

We are using the v3.13/keystone-drivers branch of your linux git repository, and have the kernel configured for USB3 gadget mode only.

We have verified that 5V is present on USB0VBUS, and have tried varying this voltage between about 4.8V and 5.1v.

Can you suggesting anything we could try to help solve this problem please?

Thanks

  • Hi Craigmcf,
    You mean, the USB host is not detecting the USB gadget device or VBUS in invalid.
    Thank you.
  • Raja said:
    You mean, the USB host is not detecting the USB gadget device or VBUS in invalid.

    A bit of both.

    It appears the Keystone is never detecting VBUS as valid, i.e.  UTMI_VBAUSVLDEXT in the USB_PHY_CTL0 register is never set. This means the pull-up resistor on D+ is never enabled, so the host PC never detects the presence of of our board as a USB gadget. We have attached a 'scope to D+ and it remains low throughout.

    As far as we can tell, the registers indicate the DWC3 is properly configured in 'device' mode, e.g. PRTCAPDIR in GCTL = 2 etc.

    We have verified that 5V is present on USB0VBUS. Is there anything else we need to do to allow VBUS to be detected as valid?

    Thanks

  • Please try following combinations:

    1. USB_PHY_CTL4[16] = 1  (the phy_otg_vbusvldextsel bit)   <Using external VBUS comparator>
        USB_PHY_CTL0[2]   = 1  (the utmi_vbusvldext)                  <Provide a fake external VBUS comparator's result>

    2. USB_PHY_CTL4[16] = 0  (the phy_otg_vbusvldextsel bit)   <Using the internal VBUS comparator>
        USB_PHY_CTL0[2]   = x  (the utmi_vbusvldext)                   <Don't care since using the internal VBUS comparator>

    Regards!
    Wen

  • hello craigmcf ;

    i already had the same problem ; actually the keystone 2 supports Host , Device and OTG modes , but it doesn't mean that all EVMK2.. boards support those modes . for your case ( 66AK2E05 ) you have to check the Advantech documentation for EVMK2E in order to know the type of the usb connector that you have in your board :
    if it is type A : it supports Host only.
    if it is type B : it supports Device only.
    if it is type AB : it support the both . in this case go and follow the DRD configuration under linux (with menuconfig) in order to switch from Host to device mode .

    Regards!
    capitaine.
  • Hi craigmcf,

    In the actual K2E05 EVM from advantech, we looked into the schematics, it supports just the USB host mode though the processor supports both the Host and device mode.

    You have mentioned that it is a custom board. So please look into the schematics of your custom board and confirm that the USB device connections are provided.

    Regards,

    Shankari

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------