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.

USB to Serial Converter on AM335x Starter Kit

how do i get a USB to serial adapter working on the AM335x Starter kit

when i plug it in J5 it says:

[ 9370.619415] usb 1-1: USB disconnect, device number 5

[ 9374.266479] usb 1-1: new full-speed USB device number 6 using musb-hdrc

[ 9374.407073] usb 1-1: New USB device found, idVendor=067b, idProduct=2303

[ 9374.414062] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0

[ 9374.421508] usb 1-1: Product: USB-Serial Controller

[ 9374.426605] usb 1-1: Manufacturer: Prolific Technology Inc.

But it doesn't load the driver and create a /dev/ttyUSB0 node.

  • Hi Jurgen,
     
    I don't know about the environment you are using, but these serial converters usually require a vendor-provided driver when you use them on a PC system.
  • We use the linux provided on a micro sd card. it says 

    cat /etc/release

    Arago 2011.09

    uname -a

    Linux am335x-evm 3.2.0 #1 Thu Jul 26 17:16:27 CDT 2012 armv7l unknown

    on different embedded linuxes the serial to usb  converter is working.

  • The driver for the serial-to-usb is not built in. Please rebuild the kernel with the following options enabled:

    CONFIG_USB_SERIAL=y
    CONFIG_USB_SERIAL_PL2303=y

  • I have rebuilt the kernel with these options (both as built-in and as installable modules) but cannot get the device node entries /dev/ttyUSBx.

    The usb serial devices I have currently tried are the PL2303 and CP210x, however the CP210x is what I wish to get working. The following output is based on the CP210x inserted.

    Results of dmesg:

    root@am335x-evm:~# dmesg | grep usb                                                        
    [    0.270573] usbcore: registered new interface driver usbfs
    [    0.270755] usbcore: registered new interface driver hub
    [    0.270958] usbcore: registered new device driver usb
    [    1.158756] usbcore: registered new interface driver asix
    [    1.164689] usbcore: registered new interface driver ax88179_178a
    [    1.171326] usbcore: registered new interface driver cdc_ether
    [    1.177680] usbcore: registered new interface driver r815x
    [    1.183685] usbcore: registered new interface driver smsc95xx
    [    1.189913] usbcore: registered new interface driver net1080
    [    1.196069] usbcore: registered new interface driver cdc_subset
    [    1.202507] usbcore: registered new interface driver zaurus
    [    1.208616] usbcore: registered new interface driver cdc_ncm
    [    1.233361] usbcore: registered new interface driver cdc_wdm
    [    1.239595] usbcore: registered new interface driver usb-storage
    [    1.382940] usbcore: registered new interface driver usbhid
    [    1.388876] usbhid: USB HID core driver
    [    3.499627] of_get_named_gpio_flags: can't parse gpios property of node '/ocp/usb@47400000/usb-phy@4'
    [    3.500688] of_get_named_gpio_flags: can't parse gpios property of node '/ocp/usb@47400000/usb-phy@4'
    [    6.077203] musb-hdrc musb-hdrc.0.auto: Enabled SW babble control
    [    6.176135] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-I)
    [    6.176161] musb-hdrc: MHDRC RTL version 2.0
    [    6.176172] musb-hdrc: setup fifo_mode 4
    [    6.176194] musb-hdrc: 28/31 max ep, 16384/16384 memory
    [    6.176329] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
    [    6.208591] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 1
    [    6.276810] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [    6.284010] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    6.291704] usb usb1: Product: MUSB HDRC host driver
    [    6.296965] usb usb1: Manufacturer: Linux 3.12.10-ti2013.12.01 musb-hcd
    [    6.303959] usb usb1: SerialNumber: musb-hdrc.0.auto
    [    6.475189] musb-hdrc musb-hdrc.1.auto: Enabled SW babble control
    [    6.503974] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-I)
    [    6.504001] musb-hdrc: MHDRC RTL version 2.0
    [    6.504011] musb-hdrc: setup fifo_mode 4
    [    6.504033] musb-hdrc: 28/31 max ep, 16384/16384 memory
    [    6.504168] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
    [    6.519291] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 2
    [    6.554215] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    [    6.561513] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    6.569193] usb usb2: Product: MUSB HDRC host driver
    [    6.574442] usb usb2: Manufacturer: Linux 3.12.10-ti2013.12.01 musb-hcd
    [    6.581451] usb usb2: SerialNumber: musb-hdrc.1.auto
    [    6.995640] usb 2-1: new full-speed USB device number 2 using musb-hdrc
    [    7.147000] usb 2-1: New USB device found, idVendor=10c4, idProduct=ea60
    [    7.154118] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [    7.161721] usb 2-1: Product: CP2102 USB to UART Bridge Controller
    [    7.168271] usb 2-1: Manufacturer: Silicon Labs
    [    7.173058] usb 2-1: SerialNumber: 0001
    [   13.387426] udc musb-hdrc.0.auto: registering UDC driver [g_mass_storage]
    [   13.779618] g_mass_storage gadget: usb_composite_setup_continue
    [   13.779633] g_mass_storage gadget: usb_composite_setup_continue: Completing delayed status

    Results of lsusb:

    root@am335x-evm:~# lsusb
    Bus 002 Device 002: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSBt
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    root@am335x-evm:~# lsusb -t
    /:  Bus 02.Port 1: Dev 1, class="root_hub", Driver=musb-hdrc/1p, 480M
        |__ Port 1: Dev 2, If 0, class="Vendor" Specific Class, Driver=, 12M
    /:  Bus 01.Port 1: Dev 1, class="root_hub", Driver=musb-hdrc/1p, 480M


    Drivers:

    root@am335x-evm:~# cat /proc/tty/drivers
    /dev/tty             /dev/tty        5       0 system:/dev/tty
    /dev/console         /dev/console    5       1 system:console
    /dev/ptmx            /dev/ptmx       5       2 system
    /dev/vc/0            /dev/vc/0       4       0 system:vtmaster
    sdio_uart            /dev/ttySDIO  247 0-7 serial
    OMAP-SERIAL          /dev/ttyO     249 0-5 serial
    serial               /dev/ttyS       4 64-95 serial
    pty_slave            /dev/pts      136 0-1048575 pty:slave
    pty_master           /dev/ptm      128 0-1048575 pty:master
    unknown              /dev/tty        4 1-63 console

    Device nodes:

    [alan@localhost ~]$ ls /dev/tty*
    /dev/tty    /dev/tty19  /dev/tty3   /dev/tty40  /dev/tty51  /dev/tty62
    /dev/tty0   /dev/tty2   /dev/tty30  /dev/tty41  /dev/tty52  /dev/tty63
    /dev/tty1   /dev/tty20  /dev/tty31  /dev/tty42  /dev/tty53  /dev/tty7
    /dev/tty10  /dev/tty21  /dev/tty32  /dev/tty43  /dev/tty54  /dev/tty8
    /dev/tty11  /dev/tty22  /dev/tty33  /dev/tty44  /dev/tty55  /dev/tty9
    /dev/tty12  /dev/tty23  /dev/tty34  /dev/tty45  /dev/tty56  /dev/ttyS0
    /dev/tty13  /dev/tty24  /dev/tty35  /dev/tty46  /dev/tty57  /dev/ttyS1
    /dev/tty14  /dev/tty25  /dev/tty36  /dev/tty47  /dev/tty58  /dev/ttyS2
    /dev/tty15  /dev/tty26  /dev/tty37  /dev/tty48  /dev/tty59  /dev/ttyS3
    /dev/tty16  /dev/tty27  /dev/tty38  /dev/tty49  /dev/tty6   /dev/ttyUSB0
    /dev/tty17  /dev/tty28  /dev/tty39  /dev/tty5   /dev/tty60  /dev/ttyUSB1
    /dev/tty18  /dev/tty29  /dev/tty4   /dev/tty50  /dev/tty61

    I have tried to create the node manually but it does not appear to work.

    Any assistance, however small, would be most appreciated in getting the CP210x device node entry as /dev/ttyUSBx.

    - Alan



  • Alan Gillespie71 said:
    root@am335x-evm:~# dmesg | grep usb          

    Please attach the whole dmesg log, the end of the log shows the enumeration details.

    Alan Gillespie71 said:
    /dev/tty16  /dev/tty27  /dev/tty38  /dev/tty49  /dev/tty6   /dev/ttyUSB0
    /dev/tty17  /dev/tty28  /dev/tty39  /dev/tty5   /dev/tty60  /dev/ttyUSB1

    What device generated the nodes /dev/ttyUSB0 and /dev/ttyUSB1? If you don't plug the converter, do those nodes exist?

  • Hi Bin,


    Sorry I don't have the AM335x board at hand now.Once I get hold of it again, I'll post the full dmesg output.

    From memory, the device nodes /tty/USB0 did not exist when using the standard build 7.0.0.0.0. Only when I built the kernel with loadable modules did I get the above dmesg output.

    Are there any differences between using in-built and loadable modules?

    - Alan