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.

TUSB1210 as USB Device PHY for AM3703 and Linux

Other Parts Discussed in Thread: AM3703, TUSB1210, AM3505

I have a custom AM3703 design that uses the TUSB1210 PHY on the HSUSB0 (otg/host/device) USB port. The TUSB1210 PHY is set up as the ULPI clock source and has a proper 3.3V 26MHz reference clock oscillator connected to its REFCLK pin.

I'm using a 2.6.39 Linux Kernel from a TI released SDK (modified somewhat to support my board). 

In the software, I'm using the "usb_nop_xceiv" transceiver object, just like the omap3evm (which has an ISP1504 transceiver). Should I be using anything else?

Currently, I can load the "g_ether" kernel module and do a lot of pinging, but lose connections when I try to move a lot of data. dmesg prints out a whole mess of messages, more-or-less cycling among: 

[ 684.263000] g_ether gadget: suspend
[ 684.692932] g_ether gadget: reset config
[ 684.692962] g_ether gadget: ecm deactivated
[ 684.692993] usb0: gether_disconnect
[ 684.859405] musb_g_ep0_irq 709: SetupEnd came in a wrong ep0stage idle
[ 684.866638] musb_g_ep0_irq 709: SetupEnd came in a wrong ep0stage setup
[ 684.873687] musb_g_ep0_irq 709: SetupEnd came in a wrong ep0stage out/status
[ 684.881103] musb_g_ep0_irq 801: SETUP packet len 0 != 8 ?
[ 684.886871] musb_g_ep0_irq 709: SetupEnd came in a wrong ep0stage out/status
[ 684.895477] g_ether gadget: high speed config #1: CDC Ethernet (ECM)
[ 684.895507] musb-hdrc periph: enabled ep2in for int IN, dma, maxpacket 16
[ 684.895538] g_ether gadget: init ecm
[ 684.895568] g_ether gadget: notify connect true
[ 684.896301] g_ether gadget: activate ecm
[ 684.896331] musb-hdrc periph: enabled ep1in for bulk IN, dma, maxpacket 512
[ 684.896362] musb-hdrc periph: enabled ep1out for bulk OUT, dma, maxpacket 512
[ 684.896392] usb0: qlen 10
[ 684.896423] g_ether gadget: ecm_open
[ 684.896453] usb0: eth_start
[ 684.896728] musb_g_ep0_irq 709: SetupEnd came in a wrong ep0stage idle

I'm wondering if I'm on the completely wrong track here. Things seem to mostly work, because I can get the g_ether device to turn on and enumerate on the host, and setup as an Ethernet device driver. I can get pings across. So what might be wrong? 

Ideas: 

  • I need to setup the platform_data somehow to indicate that the PHY is the ULPI clock source instead of the AM3703.
  • The 2.6.39 USB device code isn't stable. 
  • I need to use a different "otg_transceiver" object.
  • No one has ever used the TUSB1210 (or similar) for the OTG/Device port (HSUSB0) on an AM3703 before and I should change my hardware.

  • Hi Olivier,

    According to your description of the problem it seems to be hardware problem with ULPI on the board. We have previous experience with bad layout of the board and observe similar problem.

    BR

    Tsvetolin Shulev

  • Is there any way you could elaborate on or otherwise clarify your response? 

    IE, are you fairly confident that I'm doing the right things in software, and that leads you to expect hardware? 

    What sorts of layout issues have you witnessed on the ULPI bus? I thought issues would be more likely on the USB D+/D- lines than the ULPI. 

  • Hi Olivier,

    I only could to guess what is the problem, but I was observe similar problems when the lines of USB D+ and D- are with different lengths. The other reason could be some inductors places near to the USB data lines.

  • Hi,

    Question about using TUSB1210 with AM3505. Seems that the device has been detected all right,

    [ 0.165344] musb-hdrc: version 6.0, host, debug=0
    [ 0.165679] musb-hdrc musb-hdrc.0: degrade from otg to host-only mode
    [ 0.165740] musb-hdrc musb-hdrc.0: dma type: dma-cppi41
    [ 0.166809] <6>Waiting for PHY clock good...
    [ 0.177276] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    [ 0.178009] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
    [ 0.178649] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [ 0.178649] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 0.178680] usb usb1: Product: MUSB HDRC host driver
    [ 0.178680] usb usb1: Manufacturer: Linux 2.6.37 musb-hcd
    [ 0.178710] usb usb1: SerialNumber: musb-hdrc.0
    [ 0.182281] hub 1-0:1.0: USB hub found
    [ 0.182464] hub 1-0:1.0: 1 port detected
    [ 0.185089] musb-hdrc musb-hdrc.0: USB Host mode controller at c8810000 using DMA, IRQ 71

    My problem is there is no powering of the USB-M connector when I plug in something.

    I have got data about reg 0x0A bits 5,6 must be '1' and reg 0x85 bit 4 must be '0'. 

    Not sure what is the transceiver driver used for this IC? Where can I access/read there regs from?

    Could you please suggest what to check and where?

    Regards

    Yakir