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/AM5728: USB enumeration issue

Part Number: AM5728
Other Parts Discussed in Thread: TUSB8041,

Tool/software: Linux

Hi,

we have tested  our custom board having sd card with usbboot(dfu) for bringing up new board without sd card slot in the future.

we don't receive usb ennumeration(vendor id(0x0451) product id(0xD013)  in PC(ubuntu)  from our custom board after Power on.

<test status>

USB1/USB 3.0 of our curstom board attached 4 port usb hub(TUSB8041). 

our custom board(USB1/3.0) is connected to PC(USB 2.0 or 3.0) with USB cable.  

now, our custom board having sd card  as follwing  for viewing CTRL_CORE_BOOTSTRAP.

devmem2 0x4A0026C4                                                                                                                                                                    
/dev/mem opened.
Memory mapped at address 0xb6f83000.
Read at address  0x4A0026C4 (0xb6f836c4): 0x00008102

00 0010 meas that Booting Devices Order is usb -> sd > emmc .

usbboot from downing at TI site don't working and then git clone git://git.omapzoom.org/repo/omapboot.git and compie it. result is ./out/panda/usbboot .

we add printf at omapboot\omapboot\tools\usbboot.c

int match_omap4_bootloader(usb_ifc_info *ifc)
{
 //printf("DBG11 : dev_vendor(%#x) dev_product(%#x) at %s\n", ifc->dev_vendor, ifc->dev_product, __PRETTY_FUNCTION__);
 
 if (ifc->dev_vendor != 0x0451)
  return -1;
 
 printf("DBG22 : dev_vendor(%#x) dev_product(%#x) at %s\n", ifc->dev_vendor, ifc->dev_product, __PRETTY_FUNCTION__);
 
 if ((ifc->dev_product != 0xd010) && (ifc->dev_product != 0xd00f))
  return -1;
 return 0;
}

we dont' receive printf at above source when usbboot is running after our custom board Power on.

we want  empty eMMC will be flahsed with usbboot.

Thanks a lot.

  • Joonhu,

    Before debugging the dfu problem, we need to ensure the usb design on your custom board doesn't have any hardware design issue.
    - Is the USB1 module designed as device-only or DRD mode on your board?
    - If you boot the board into Linux using the SD card, and load a usb gadget driver, does a usb host can enumerate the gadget and communicate to it? Basically does USB1 work in Linux?
  • Hi.

    1. Is the USB1 module designed as device-only or DRD mode on your board?

     -> USB1 of our custome board with sdcard designed same with AM5728 EVM USB1.

     -> echo device > /sys/kernel/debug/48890000.usb/mode

     root@am57xx-evm:~# cat /sys/kernel/debug/48890000.usb/mode         
     device
     root@am57xx-evm:~# cat /sys/kernel/debug/48890000.usb/link_state
     SS.Disabled

    2. If you boot the board into Linux using the SD card, and load a usb gadget driver, does a usb host can enumerate the gadget and communicate to it? Basically does USB1 work in Linux?

    -> insmod gadgetfs.ko

    -> mkdir /mnt/ramdrive

    -> mount -t tmpfs tmpfs /mnt/ramdrive -o size=600M

    -> dd if=/dev/zero of=/mnt/ramdrive/vfat-file bs=1M count=600

    -> mkfs.ext2 -F /mnt/ramdrive/vfat-file

    -> modprobe g_mass_storage file=/mnt/ramdrive/vfat-file

    -> modinfo g_mass_storage

    filename:       /lib/modules/4.9.28-geed43d1050/kernel/drivers/usb/gadget/legacy/g_mass_storage.ko
    license:        GPL
    author:         Michal Nazarewicz
    description:    Mass Storage Gadget
    srcversion:     AE3B2002CBA12397B1B85D9
    depends:        usb_f_mass_storage,libcomposite
    intree:         Y
    vermagic:       4.9.28-geed43d1050 SMP preempt mod_unload modversions ARMv7 p2v8
    parm:           idVendor:USB Vendor ID (ushort)
    parm:           idProduct:USB Product ID (ushort)
    parm:           bcdDevice:USB Device version (BCD) (ushort)
    parm:           iSerialNumber:SerialNumber string (charp)
    parm:           iManufacturer:USB Manufacturer string (charp)
    parm:           iProduct:USB Product string (charp)
    parm:           file:names of backing files or devices (array of charp)
    parm:           ro:true to force read-only (array of bool)
    parm:           removable:true to simulate removable media (array of bool)
    parm:           cdrom:true to simulate CD-ROM instead of disk (array of bool)
    parm:           nofua:true to ignore SCSI WRITE(10,12) FUA bit (array of bool)
    parm:           luns:number of LUNs (uint)
    parm:           stall:false to prevent bulk stalls (bool)

    -> our host(PC) don't see usb device(AM5728) through lsusb.

    Is it our H/W problem ?

    we just find processors.wiki.ti.com/.../AM57xx_Schematic_Checklist

    -> we must follow " For USB Device operation, USB VBUS decoupling capacitance should be < 10uF." ?

    -> we must follow " USBx_DP and USBx_DM are connected directly to the USB connector" ?

    -> we must follow "Connector ID pin can be left unconnected" ?

    -> we must follow "USBx_DRVVBUS is not used and can be left unconnected" ?

    Thanks a lot.

  • JOONHO LEE said:
     -> USB1 of our custome board with sdcard designed same with AM5728 EVM USB1.

    You didn't use a correct design reference - the AM5728 EVM USB1 is in host-only mode, but you need device-only mode. Please follow the USB2 design on AM5728 GP EVM.

    JOONHO LEE said:

     -> echo device > /sys/kernel/debug/48890000.usb/mode

    Generally kernel debugfs is for debug purpose, but not recommended for normal functions.

    In your case, you cannot do this to switch usb operation mode on a host-only design. This debugfs entry is for DRD mode.