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.

AM3354: USB serial gadget

Part Number: AM3354


Hi,

     Main chip: am3354.

     Use USB0 on the hardware.

     SDK: ti-processor-sdk-linux-rt-am335x-evm-03.03.00.04-Linux-x86-Install.bin 

      Compile the card to am335x-boneblack.dtb

     USB0 device tree configuration is as follows(am335x-boneblack.dts):     

&usb {
status = "okay";
};

&usb_ctrl_mod {
status = "okay";
};

&usb0 {
status = "okay";
dr_mode = "peripheral";
};

&usb1 {
status = "okay";
dr_mode = "peripheral";
};

    After the am3354 is powered on :

root@am335x-evm:~# modprobe g_serial
[ 52.009994] g_serial gadget: Gadget Serial v2.4
[ 52.014586] g_serial gadget: g_serial ready

root@am335x-evm:~# ls -l /dev/ttyGS
ttyGS0 ttyGS1

    When connecting USB0 to my win7 system, win7 system does not show Gadget Seria driver.

    The same hardware and device tree configuration, the SDK into ti-processor-sdk-linux-am335x-evm-03.03.00.04-Linux-x86-Install.bin,  win7 system shows Gadget Seria driver, as shown below.

      For some reason, I need to use the RT3.3 SDK.

      Will RT 3.3 SDK in win7 how to identify Gadget Seria driver  ? 

      Why 3.3 SDK can, RT3.3 SDK can not ?

BR

  • The software team have been notified. They will respond here.
  • The -RT and non-RT kernels should have no difference in functions of the USB subsystem. I don't have a WIN7 system to test with, but what happens if you connect the USB0 port of AM335x with the -RT kernel to a Linux PC USB host port?

  • Hi,
    Thank you for your reply.
    Connect Linux PC Ubuntu 14.04, PC does not respond.
    Is the configuration of my device tree and the method of loading the drive right? Are there any other operations?

    BR
  • Does 'dmesg' log on the Linux PC tell any information about the numeration? If not, before we start any debugging, please set usb1 dr_mode to host in your DTS file, to ensure the gadget driver is loaded to usb0 controller, and let me know if the Linux host still doesn't detect the AM335x USB serial gadget.
  • Hi,
    Thank you for your reply.

    The device tree is configured as follows:
    &usb0 {
    status = "okay";
    dr_mode = "peripheral";
    };

    &usb1 {
    status = "okay";
    dr_mode = "host";
    };
    win7 system no response, ubuntu 14.04 no response.

    When the device tree is set to
    &usb0 {
    status = "okay";
    dr_mode = "peripheral";
    };

    &usb1 {
    status = "okay";
    dr_mode = "peripheral";
    };

    modprobe g_serial
    usb1 received win7 can display Gadget Seria driver. usb0 received win7 unable to display Gadget Seria driver.
    How to identify usb0 or usb1 when loading g_serial.ko ?
    After loading the driver, USB0 and USB1 can be used ?
    Do I need to specify USB0 or USB1 when loading the driver?

    BR
  • Please post the usb portion of your schematics. Since you use both usb ports in peripheral mode, will you connect both ports to different USB host ports?

    andre feng said:
    How to identify usb0 or usb1 when loading g_serial.ko ?

    There is no way to identify the usb controller when loading a gadget driver. Using both USB ports in peripheral mode is not a common use case, I didn't check the kernel code for how the usb controller is selected to bind the gadget driver, but I would imagine it is a simple search, so typically usb0 will be picked first.

    andre feng said:
    After loading the driver, USB0 and USB1 can be used ?

    No, you cannot switch between USB0 and USB1 after loaded the gadget driver, the binding of USB controller and the gadget driver happens while loading the gadget driver.

  • Hi,

    am3354 connects usb0 and usb1:

    usb0  connect  MICROUSB_B:

    usb1 connect CON_USB2.0TypeB_H :

    For TS3USB221ARSER chip, configured for 1DN and 1DP mode, used to connect the am3354.

    The phenomenon is  RT 3.3 SDK only recognizes USB1,  non-RT 3.3 SDK only recognizes usb0.

    RT3.3 how to identify usb0  ? 

    Hope to get your help. 

    BR

  • Hi,
    Do you have any suggestions?

    BR
  • Andre,

    - Where USB0_VBUS pin connects to?

    - the USBVDD pin on USB0 and USB1 connectors both connect to USB_DC, they should be separate.

    - R84,85 on USB0 connector D+/D- and R75,76 on USB1 connector D+/D- should be removed.

    - USB1 has two muxers U17 and U4, which makes Ron too high.

    - USB0 has only one mux U22, but I need to check with our USB HW expert if its Ron is still out of the range which AM335x USB supports.

  • Our hw expert confirmed my comments above.
    Also the USB0_ID pin should not connect to the ID pin of the USB0 connector, otherwise the USB will not function correctly if the USB cable grounds the ID line. The USB micro-B receptacle does not have a ID pin anyway, do you use micro-AB receptacle? You should use the correct part on the board.
  • Andre, please let us know if your issue is solved yet so that we can close this ticket. Thanks.