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/AM3359: Custom board will not enumerate as serial gadget

Part Number: AM3359
Other Parts Discussed in Thread: AM3358,

Tool/software: Linux

I am working with a custom board that is based upon the BeagleBone Black (BBB); however, the custom board has the AM3359 processor rather than the AM3358 found on the BBB. I am having an issue with the USB OTG interface enumerating as a serial gadget with a host. I load the kernel modules in te following order: musb_am335x, g_serial.

When I do this with a BBB, the BBB will enumerate as a serial gadget on both a Windows host and a Linux Host. When I do this with the custom board, neither Windows nor Linux recognizes the device.  When I look at the output of 'dmesg' from the custom board, I see the following message: "g_serial gadget: suspend".

Snooping the USB when these devices are connected shows a valid product and vendor ID for the BBB, but zeros when the custom board is connected. These boards are running identical software: MLO, U-Boot, Kernel, device tree, root file system (I'm booting via TFTP/NFS).

Any suggestions on how to troubleshoot this issue would be greatly appreciated.

  • Hi User4544632,

    USB module is the same between AM3358 and AM3359 devices.

    This seems to me like HW issue. Do you have any hardware design differences between AM3358 BBB and your AM3359 custom board regarding USB?

    Regards,
    Pavel

  • The differences I'm aware of:

    • Nothing is connected to USB 1 on our custom board. I have disabled this in the device tree source.
      • USB1 is the host interface in the BBB
    • The ID signal for USB0 is floating on our custom board.
      • The ID pin for USB0 on the BBB goes to the USB PC connector (mini USB)
    • PCB Layout

    Also, just recently, we swapped out the AM3359 for the AM3358 on a couple of boards, but the issue persists. Since, as you stated Pavel, the USB module is the same between the two devices. Also, as you stated, everything else I've read also points to a hardware issue. I'm the software guy, so I wanted to get some additional confirmation.

    So, since we're only talking about four (4) wires here, what could be the issue?

  • user4544632 said:
    So, since we're only talking about four (4) wires here, what could be the issue?

    Yes, there are many many protocols defined in the thousands pages USB Specs and the controllers manual behind the 4 wires, so anything wrong could cause the issue.

    First of all, when loading the g-serial gadget driver, you only need to run 

    # modprobe g_serial

    If you have to do anything extra, you didn't get the kernel image/modules built or installed correctly.

    Please look at the e2e thread https://e2e.ti.com/support/embedded/linux/f/354/t/601618, to see my instructions of debugging this type of usb issues.

    Please also post your USB portion of the schematics for review.

  • Well, our hardware team discovered that the D+ and D- signals were incorrect going to the connector. Not sure if these signals were swapped or not connected to the correct pins. Either way, I guess it did boil down to those four (4) simple wires. Our custom board enumerates properly as a serial gadget device.

    Thank you all for the support and guidance.

    PS: I mentioned in my original post that I am loading kernel modules musb_am335x and g_serial. This is necessary for the Timesys Linux distribution that I was using originally. The TI Linux SDK  automatically loads musb_am335x, so it does not need to be loaded manually.

  • Glad you solved the issue. Thanks for the update.