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/PROCESSOR-SDK-AM335X: Using USB0 as USB serial device in AM335x-EVM board

Part Number: PROCESSOR-SDK-AM335X
Other Parts Discussed in Thread: TPS65910, DA8XX, TMP275

Tool/software: Linux

Hi,

I have went through the AM335x_USB_Driver's_Guide and configured it as mentioned there. When I connect my device to the PC I cannot see any USB serial device in the device manager. When I use the command lsusb , I get the response as 

Bus 001 Device 001: ID 1d6b:0002 , but I cannot see the serial device in device manager.

Here is the log : 


U-Boot SPL 2013.01.01 (Jun 25 2013 - 16:42:52)
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
OMAP SD/MMC: 0
reading u-boot.img
reading u-boot.img


U-Boot 2013.01.01 (Jun 25 2013 - 16:42:52)

I2C: ready
DRAM: 1 GiB
WARNING: Caches not enabled
NAND: 256 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - bad CRC, using default environment

musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
Net: <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot: 1
0
mmc0 is current device
SD/MMC found on device 0
reading uEnv.txt
153 bytes read in 2 ms (74.2 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc ...
Running uenvcmd ...
reading uImage
3205496 bytes read in 320 ms (9.6 MiB/s)
## Booting kernel from Legacy Image at 82000000 ...
Image Name: Linux-3.2.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3205432 Bytes = 3.1 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[ 0.000000] Linux version 3.2.0 (ali@ali) (gcc version 4.9.2 20140904 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09) ) #5 Thu May 18 16:09:19 IST 2017
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: am335xevm
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] AM335X ES2.1 (sgx neon )
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
[ 0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 mem=128M rootwait
[ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Memory: 128MB = 128MB total
[ 0.000000] Memory: 123204k/123204k available, 7868k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xc8800000 - 0xff000000 ( 872 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[ 0.000000] .text : 0xc0008000 - 0xc05b7000 (5820 kB)
[ 0.000000] .init : 0xc05b7000 - 0xc05f2000 ( 236 kB)
[ 0.000000] .data : 0xc05f2000 - 0xc065c270 ( 425 kB)
[ 0.000000] .bss : 0xc065c294 - 0xc068b524 ( 189 kB)
[ 0.000000] NR_IRQS:396
[ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[ 0.000000] Total of 128 interrupts on 1 active controller
[ 0.000000] OMAP clockevent source: GPTIMER2 at 24000000 Hz
[ 0.000000] OMAP clocksource: GPTIMER1 at 32768 Hz
[ 0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
[ 0.000000] Console: colour dummy device 80x30
[ 0.000091] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
[ 0.088867] pid_max: default: 32768 minimum: 301
[ 0.088958] Security Framework initialized
[ 0.089019] Mount-cache hash table entries: 512
[ 0.089355] CPU: Testing write buffer coherency: ok
[ 0.108428] omap_hwmod: pruss: failed to hardreset
[ 0.109405] print_constraints: dummy:
[ 0.109710] NET: Registered protocol family 16
[ 0.111480] OMAP GPIO hardware version 0.1
[ 0.113494] omap_mux_init: Add partition: #1: core, flags: 0
[ 0.115020] omap_i2c.1: alias fck already exists
[ 0.115722] omap2_mcspi.1: alias fck already exists
[ 0.115905] omap2_mcspi.2: alias fck already exists
[ 0.116638] edma.0: alias fck already exists
[ 0.116668] edma.0: alias fck already exists
[ 0.116668] edma.0: alias fck already exists
[ 0.136718] bio: create slab <bio-0> at 0
[ 0.138458] SCSI subsystem initialized
[ 0.139831] usbcore: registered new interface driver usbfs
[ 0.140075] usbcore: registered new interface driver hub
[ 0.140228] usbcore: registered new device driver usb
[ 0.140502] registerd cppi-dma Intr @ IRQ 17
[ 0.140502] Cppi41 Init Done Qmgr-base(c887a000) dma-base(c8878000)
[ 0.140533] Cppi41 Init Done
[ 0.140533] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3
[ 0.140777] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1
[ 0.158874] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
[ 0.160430] tps65910 1-002d: JTAGREVNUM 0x0
[ 0.162750] print_constraints: VRTC:
[ 0.164154] print_constraints: VIO: at 1500 mV
[ 0.166442] print_constraints: VDD1: 600 <--> 1500 mV at 1325 mV normal
[ 0.168670] print_constraints: VDD2: 600 <--> 1500 mV at 1137 mV normal
[ 0.169647] print_constraints: VDD3: 5000 mV
[ 0.171051] print_constraints: VDIG1: at 1800 mV
[ 0.172424] print_constraints: VDIG2: at 1800 mV
[ 0.173797] print_constraints: VPLL: at 1800 mV
[ 0.175201] print_constraints: VDAC: at 1800 mV
[ 0.176574] print_constraints: VAUX1: at 1800 mV
[ 0.177947] print_constraints: VAUX2: at 3300 mV
[ 0.179351] print_constraints: VAUX33: at 3300 mV
[ 0.180725] print_constraints: VMMC: at 3300 mV
[ 0.181121] tps65910 1-002d: No interrupt support, no core IRQ
[ 0.182220] Advanced Linux Sound Architecture Driver Version 1.0.24.
[ 0.183166] Switching to clocksource gp timer
[ 0.194671] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[ 0.194854] musb-hdrc musb-hdrc.0: dma type: dma-cppi41
[ 0.195129] MUSB0 controller's USBSS revision = 4ea20800
[ 0.195159] musb0: Enabled SW babble control
[ 0.195892] musb-hdrc musb-hdrc.0: USB OTG mode controller at c883c000 using DMA, IRQ 18
[ 0.196044] musb-hdrc musb-hdrc.1: dma type: dma-cppi41
[ 0.196289] MUSB1 controller's USBSS revision = 4ea20800
[ 0.196319] musb1: Enabled SW babble control
[ 0.196685] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[ 0.196777] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
[ 0.196868] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 0.196899] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.196899] usb usb1: Product: MUSB HDRC host driver
[ 0.196899] usb usb1: Manufacturer: Linux 3.2.0 musb-hcd
[ 0.196929] usb usb1: SerialNumber: musb-hdrc.1
[ 0.197570] hub 1-0:1.0: USB hub found
[ 0.197570] hub 1-0:1.0: 1 port detected
[ 0.198028] musb-hdrc musb-hdrc.1: USB Host mode controller at c883e800 using DMA, IRQ 19
[ 0.198394] NET: Registered protocol family 2
[ 0.198547] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.198791] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.198852] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.198883] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.198913] TCP reno registered
[ 0.198913] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.198944] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.199066] NET: Registered protocol family 1
[ 0.199310] RPC: Registered named UNIX socket transport module.
[ 0.199310] RPC: Registered udp transport module.
[ 0.199310] RPC: Registered tcp transport module.
[ 0.199340] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.199554] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.206054] VFS: Disk quotas dquot_6.5.2
[ 0.206115] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.206542] msgmni has been set to 240
[ 0.209136] alg: No test for stdrng (krng)
[ 0.209716] io scheduler noop registered
[ 0.209716] io scheduler deadline registered
[ 0.209777] io scheduler cfq registered (default)
[ 0.210754] Could not set LED4 to fully on
[ 0.244079] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
[ 0.892303] console [ttyO0] enabled
[ 0.896484] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
[ 0.904235] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
[ 0.911926] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
[ 0.919647] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
[ 0.927368] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
[ 0.935485] omap4_rng omap4_rng: OMAP4 Random Number Generator ver. 2.00
[ 0.949645] brd: module loaded
[ 0.956634] loop: module loaded
[ 0.960052] i2c-core: driver [tsl2550] using legacy suspend method
[ 0.966552] i2c-core: driver [tsl2550] using legacy resume method
[ 0.972961] at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[ 0.987060] Detected a daughter card on AM335x EVM..
[ 0.992065] CPLD version: CPLD1.0G
[ 0.995910] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[ 1.011260] Board name: A33515BB
[ 1.014648] Board version: 1.6A
[ 1.017944] SKU: SKU#01
[ 1.021026] The board is general purpose EVM in profile 1
[ 1.027557] da8xx_lcdc.0: alias fck already exists
[ 1.033020] da8xx_lcdc da8xx_lcdc.0: GLCD: Found TFC_S9700RTWV35TR_01B panel
[ 1.055175] Console: switching to colour frame buffer device 100x30
[ 1.070465] omap-gpmc omap-gpmc: GPMC revision 6.0
[ 1.075531] Registering NAND on CS0
[ 1.079772] omap_i2c.2: alias fck already exists
[ 1.103820] omap_i2c omap_i2c.2: bus 2 rev2.4.0 at 100 kHz
[ 1.110168] tsl2550 2-0039: standard operating mode
[ 1.115966] tsl2550 2-0039: support ver. 1.2 enabled
[ 1.121673] omap_hsmmc.0: alias fck already exists
[ 1.127105] d_can.1: alias fck already exists
[ 1.134429] registered am33xx_sr device
[ 1.138641] _regulator_get: 2-0018 supply Vdd not found, using dummy regulator
[ 1.146270] _regulator_get: 2-0018 supply Vdd_IO not found, using dummy regulator
[ 1.174652] lis3lv02d: 8 bits 3DLH sensor found
[ 1.264129] input: ST LIS3LV02DL Accelerometer as /devices/platform/lis3lv02d/input/input0
[ 1.275451] mtdoops: mtd device (mtddev=name/number) must be supplied
[ 1.282623] omap2-nand driver initializing
[ 1.287261] ONFI flash detected
[ 1.290679] ONFI param page 0 valid
[ 1.294342] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08ABAEAWP)
[ 1.302886] Creating 8 MTD partitions on "omap2-nand.0":
[ 1.308471] 0x000000000000-0x000000020000 : "SPL"
[ 1.314605] 0x000000020000-0x000000040000 : "SPL.backup1"
[ 1.321228] 0x000000040000-0x000000060000 : "SPL.backup2"
[ 1.327880] 0x000000060000-0x000000080000 : "SPL.backup3"
[ 1.334533] 0x000000080000-0x000000260000 : "U-Boot"
[ 1.341491] 0x000000260000-0x000000280000 : "U-Boot Env"
[ 1.348083] 0x000000280000-0x000000780000 : "Kernel"
[ 1.356323] 0x000000780000-0x000010000000 : "File System"
[ 1.465057] OneNAND driver initializing
[ 1.470214] CAN device driver interface
[ 1.474273] CAN bus driver for Bosch D_CAN controller 1.0
[ 1.480651] d_can d_can.1: device registered (irq=55, irq_obj=56)
[ 1.533813] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
[ 1.540283] davinci_mdio davinci_mdio.0: detected phy mask fffffffe
[ 1.547637] davinci_mdio.0: probed
[ 1.551177] davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver unknown
[ 1.558837] usbcore: registered new interface driver zd1201
[ 1.564849] usbcore: registered new interface driver cdc_ether
[ 1.571044] usbcore: registered new interface driver cdc_eem
[ 1.577087] usbcore: registered new interface driver dm9601
[ 1.582977] cdc_ncm: 04-Aug-2011
[ 1.586456] usbcore: registered new interface driver cdc_ncm
[ 1.592376] Initializing USB Mass Storage driver...
[ 1.597656] usbcore: registered new interface driver usb-storage
[ 1.603973] USB Mass Storage support registered.
[ 1.609069] usbcore: registered new interface driver usbserial
[ 1.615173] usbserial: USB Serial Driver core
[ 1.620086] mousedev: PS/2 mouse device common for all mice
[ 1.626922] input: ti-tsc as /devices/platform/omap/ti_tscadc/tsc/input/input1
[ 1.635345] omap_rtc am33xx-rtc: rtc core: registered am33xx-rtc as rtc0
[ 1.642395] am33xx-rtc: already running
[ 1.646636] i2c /dev entries driver
[ 1.650756] Linux video capture interface: v2.00
[ 1.655883] usbcore: registered new interface driver uvcvideo
[ 1.661895] USB Video Class driver (1.1.1)
[ 1.667022] lm75 2-0048: hwmon0: sensor 'tmp275'
[ 1.944641] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[ 1.953033] cpuidle: using governor ladder
[ 1.957733] cpuidle: using governor menu
[ 1.964080] omap4_aes_mod_init: loading AM33X AES driver
[ 1.969757] omap4-aes omap4-aes: AM33X AES hw accel rev: 3.02
[ 1.976440] omap4_aes_probe: probe() done
[ 1.980834] omap4_sham_mod_init: loading AM33X SHA/MD5 driver
[ 1.986968] omap4-sham omap4-sham: AM33X SHA/MD5 hw accel rev: 4.03
[ 2.001739] omap4_sham_probe: probe() done
[ 2.010070] usbcore: registered new interface driver usbhid
[ 2.015930] usbhid: USB HID core driver
[ 2.020477] tiadc tiadc: attached adc driver
[ 2.025604] usbcore: registered new interface driver snd-usb-audio
[ 2.033477] ALSA device list:
[ 2.036621] No soundcards found.
[ 2.040191] oprofile: hardware counters not available
[ 2.045471] oprofile: using timer interrupt.
[ 2.049957] nf_conntrack version 0.5.0 (1925 buckets, 7700 max)
[ 2.056579] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 2.062225] TCP cubic registered
[ 2.065643] NET: Registered protocol family 17
[ 2.070281] can: controller area network core (rev 20090105 abi 8)
[ 2.076812] NET: Registered protocol family 29
[ 2.081512] can: raw protocol (rev 20090105)
[ 2.085968] can: broadcast manager protocol (rev 20090105 t)
[ 2.091918] Registering the dns_resolver key type
[ 2.096923] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 2.104919] ThumbEE CPU extension supported.
[ 2.109466] mux: Failed to setup hwmod io irq -22
[ 2.114990] Power Management for AM33XX family
[ 2.119842] Trying to load am335x-pm-firmware.bin (60 secs timeout)
[ 2.126525] Copied the M3 firmware to UMEM
[ 2.130889] Cortex M3 Firmware Version = 0x181
[ 2.137298] create_regulator: VDD1: Failed to create debugfs directory
[ 2.145660] smartreflex smartreflex: am33xx_sr_probe: Driver initialized
[ 2.160217] clock: disabling unused clocks to save power
[ 2.175964] Detected MACID=d0:39:72:29:f2:7a
[ 2.181274] mmc0: new high speed SDHC card at address aaaa
[ 2.187561] cpsw: Detected MACID = d0:39:72:29:f2:7c
[ 2.193420] mmcblk0: mmc0:aaaa SU04G 3.69 GiB
[ 2.199523] omap_rtc am33xx-rtc: setting system clock to 2000-01-01 00:00:17 UTC (946684817)
[ 2.208862] mmcblk0: p1 p2
[ 2.246429] kjournald starting. Commit interval 5 seconds
[ 2.253631] EXT3-fs (mmcblk0p2): using internal journal
[ 2.259124] EXT3-fs (mmcblk0p2): recovery complete
[ 2.265533] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
[ 2.272796] VFS: Mounted root (ext3 filesystem) on device 179:2.
[ 2.279418] Freeing init memory: 236K

Please press Enter to activate this console.
/ #
/ #
/ #lsusb

Bus 001 Device 001: ID 1d6b:0002

Are there any other configurations which I need to do before using USB0 as USB serial device?

Regards

Mohasin Ali

  • Hi Mohasinali,

    I would suggest you to enable only one Gadget driver.

    Looks like you have enabled
    1. USB CDC/NCM
    2. USB UVC
    3. USB HID

    Just configure for USB CDC/NCM

    Until you enable g_multi, which will configure USB device as composite device, it will not be possible to have more than one USB gadget driver.
  • Mohasin,

    Kernel v3.2 is very old and no longer supported. Please migrated to the latest Processor SDK.
    When reporting such type of issues, please attach your kernel config - /proc/config.gz, and provide details how the usb gadget is configured following the user's guide.
    You need to run command 'lsusb' on the host PC, not the am335x board.
  • Hi Bin,
    Thank you.
    We will migrate to the latest Processor SDK. I want my device (Sitara AM335x EVM) to be detected by host PC and I want the device to be seen as a simple communication port. What are the necessary things to be configured to see our device as a serial com port?


    Regards
    Mohasinali
  • Mohasinali,

    With the latest Processor SDK kernel, you build the kernel using tisdk_am335x-evm_defconfig as the defconfig, which has all the usb related modules enabled. Then after Linux is booted on the board, run command 'modprobe g_serial' on the board to load the USB serial gadget driver. Now connect the AM335x USB peripheral port to a USB host port, the host should enumerate the AM335x board as a serial com port.