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: USB 3.0 port on EVMK2H Rev 3.0 does not work stable

Other Parts Discussed in Thread: UCD9244

Tool/software: Linux

Hello

I'm have a problem with USB 3.0 port using on EVMK2H Rev 3.0 board. My final target is to use USB sound card to capture audio stream. I'am using the last version of Arago, that included in TI Processor SDK (kernel version Linux k2hk-evm 4.9.28). The execution result of lsmod and dmesg command shows, that all necessary kernel modules such as usb_core, usb_common, xhci_hcd was succesfully launched. But every time, when i try to connect any USB device (usb flash drive, usb sound card, usb modem, etc), power LED on device is not active, and lsusb show only root hub's in the device list. Besides, there was only one time, when USB port was power on, and LED was active. I'd suppose, that it seems to be a random event. In any other time there is no power on USB port. Previously, when i've prepared my workstation, i had tried to use boot USB drive, and the USB port was active only one time on approx 20 tries. I think, it seems as software problem, maybe it's not unusual and you could recommend me some ways to solve it?

Best regards,

Nikolay

  • Today i found in dmesg output following message: "usb-phy supply vcc not found"
  • I've forwarded your query to the software experts. Their feedback should be posted here.

    BR
    Tsvetolin Shulev
  • Hi, Nikolai,

    Allow me to spend some time to bring up the system and USB first, and see what issues I may encounter. I may have some questions on your setup after that.

    Rex
  • Hi, Nikolai,

    I tried on 2 different revisions of the EVM. I couldn't find a Rev 3.0 around , but using Rev 2.0 to get the issue reproduced. The USB drive isn't detected. However with a Rev 4.0 EVM, the USB device is detected. Please refer to the EVM known issue at
    wfcache.advantech.com/.../EVMK2HX_Rev4_0_Known_Issues.pdf

    You may need to apply the mod according to the document.

    The logs from Rev 4.0 are attached below:

    k2hk-evm login: root
    root@k2hk-evm:~# dmesg | grep usb
    [ 9.939822] keystone-usbphy 2620738.usb_phy: GPIO lookup for consumer reset
    [ 9.939836] keystone-usbphy 2620738.usb_phy: using device tree for GPIO lookup
    [ 9.939843] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/soc/usb_phy@2620738[0]'
    [ 9.939849] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/soc/usb_phy@2620738[0]'
    [ 9.939854] keystone-usbphy 2620738.usb_phy: using lookup tables for GPIO lookup
    [ 9.939860] keystone-usbphy 2620738.usb_phy: lookup for GPIO reset failed
    [ 9.939865] keystone-usbphy 2620738.usb_phy: GPIO lookup for consumer vbus-detect
    [ 9.939870] keystone-usbphy 2620738.usb_phy: using device tree for GPIO lookup
    [ 9.939875] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpios' property of node '/soc/usb_phy@2620738[0]'
    [ 9.939880] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpio' property of node '/soc/usb_phy@2620738[0]'
    [ 9.939885] keystone-usbphy 2620738.usb_phy: using lookup tables for GPIO lookup
    [ 9.939890] keystone-usbphy 2620738.usb_phy: lookup for GPIO vbus-detect failed
    [ 9.939904] 2620738.usb_phy supply vcc not found, using dummy regulator
    [ 10.865326] usbcore: registered new interface driver usbfs
    [ 10.870884] usbcore: registered new interface driver hub
    [ 10.876558] usbcore: registered new device driver usb
    [ 10.951517] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
    root@k2hk-evm:~#

    /**** Below is when I plugged in the USB drive to the connector *****/

    [ 50.334881] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
    [ 50.441094] SCSI subsystem initialized
    [ 50.459403] usb-storage 2-1:1.0: USB Mass Storage device detected
    [ 50.466419] scsi host0: usb-storage 2-1:1.0
    [ 50.471056] usbcore: registered new interface driver usb-storage
    [ 51.579972] scsi 0:0:0:0: Direct-Access Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6
    [ 52.462941] sd 0:0:0:0: [sda] 30720000 512-byte logical blocks: (15.7 GB/14.6 GiB)
    [ 52.472484] sd 0:0:0:0: [sda] Write Protect is off
    [ 52.482263] sd 0:0:0:0: [sda] No Caching mode page found
    [ 52.489950] sd 0:0:0:0: [sda] Assuming drive cache: write through
    [ 52.540461] sda: sda1 sda2
    [ 52.549297] sd 0:0:0:0: [sda] Attached SCSI removable disk
    [ 52.764932] usb 2-1: reset SuperSpeed USB device number 2 using xhci-hcd
    [ 54.261764] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    [ 54.302352] EXT4-fs (sda2): recovery complete
    [ 54.311723] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)

    root@k2hk-evm:~# lsusb
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 002: ID 0951:1666 Kingston Technology DataTraveler G4
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    root@k2hk-evm:~# lsmod | grep usb
    usb_storage 47445 2
    scsi_mod 133717 2 sd_mod,usb_storage
    usbcore 200038 3 usb_storage,xhci_plat_hcd,xhci_hcd
    usb_common 4737 3 udc_core,usbcore,dwc3

    root@k2hk-evm:~# ls /mnt
    nfsshare securedbv0 securedbv1
    root@k2hk-evm:~# cd /mnt
    root@k2hk-evm:/mnt# mkdir boot
    root@k2hk-evm:/mnt# mkdir rootfs
    root@k2hk-evm:/mnt# ls /dev/sda*
    /dev/sda /dev/sda1 /dev/sda2

    root@k2hk-evm:/mnt# mount -t vfat /dev/sda1 boot
    root@k2hk-evm:/mnt# ls boot
    k2-fw-initrd.cpio.gz u-boot-k2e-evm.img zImage-k2e-evm.bin
    keystone-k2e-evm.dtb u-boot-spi-k2e-evm.gph
    skern-k2e.bin zImage

    root@k2hk-evm:/mnt# mount -t ext4 /dev/sda2 rootfs
    root@k2hk-evm:/mnt# ls rootfs
    bin etc init media proc srv usr
    boot home lib mnt run sys var
    dev include lost+found opt sbin tmp www

    root@k2hk-evm:/mnt# cd rootfs/
    root@k2hk-evm:/mnt/rootfs# cd home/root
    root@k2hk-evm:/mnt/rootfs/home/root# ls
    root@k2hk-evm:/mnt/rootfs/home/root# head -c 10m /dev/urandom > ./10m_file
    root@k2hk-evm:/mnt/rootfs/home/root# ls -l 10m_file
    -rw-r--r-- 1 root root 10485760 Jun 28 20:37 10m_file
    root@k2hk-evm:/mnt/rootfs/home/root# head -c 100m /dev/urandom > ./100m_file
    root@k2hk-evm:/mnt/rootfs/home/root# ls -l
    -rw-r--r-- 1 root root 104857600 Jun 28 20:37 100m_file
    -rw-r--r-- 1 root root 10485760 Jun 28 20:37 10m_file

    root@k2hk-evm:/mnt/rootfs/home/root# uname -a
    Linux k2hk-evm 4.9.28-geed43d1050 #1 SMP PREEMPT Wed Jun 28 17:32:18 EDT 2017 armv7l GNU/Linux


    Rex
  • Hello Rex

    Thank you for the answers. Today i've tried to fix that bug with BMC Tool according instructions from BMC Tool UCD Update guide. My host OS is WIndows 7. I've successfully installed pyserial, and then launched BMC update tool. Communication with EVM is ok. But when i attempt to update EVM with any UCD configuration text file, i get the messages: "An error has occurred with the BMC, please power cycle the device and try again" and "Could not send command i2c 1.4E F4 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C5". However, part of I2C commands successfully applied. The full output of script:

    Opened file C:/Projects/Python/BMC_EVMK2K_1_0_2_6-20160330/UCD_Configuration_Standard_Release/UCD9244_78_A04.txt

    Finished parsing and adding commands

    Sending command: hwdbg cmd i2c

    Sending command: shutdown pwr

    Delaying 2000 ms...

    Sending command: i2c 1.4E D2 04 01 04 10 40 32

    I2C command success

    Sending command: i2c 1.4E 00 00 53

    I2C command success

    Sending command: i2c 1.4E 33 EF 02 6C

    I2C command success

    Sending command: i2c 1.4E 00 01 54

    I2C command success

    Sending command: i2c 1.4E 33 EF 02 6C

    I2C command success

    Sending command: i2c 1.4E 00 02 5D

    I2C command success

    Sending command: i2c 1.4E 33 EF 02 6C

    I2C command success

    Sending command: i2c 1.4E 00 03 5A

    I2C command success

    Sending command: i2c 1.4E 33 EF 02 6C

    I2C command success

    Sending command: i2c 1.4E 11 6A

    I2C command success

    Delaying 1000 ms...

    Sending command: i2c 1.4E DB 12

    I2C command success

    Delaying 2000 ms...

    Sending command: i2c 1.4E 00 00 53

    I2C command success

    Sending command: i2c 1.4E BB 09 00 00 00 00 00 00 00 00 00 5F

    I2C command success

    Sending command: i2c 1.4E 00 01 54

    I2C command success

    Sending command: i2c 1.4E BB 09 00 00 00 00 00 00 00 00 00 5F

    I2C command success

    Sending command: i2c 1.4E 00 02 5D

    I2C command success

    Sending command: i2c 1.4E BB 09 00 00 00 00 00 00 00 00 00 5F

    I2C command success

    Sending command: i2c 1.4E 00 03 5A

    I2C command success

    Sending command: i2c 1.4E BB 09 00 00 00 00 00 00 00 00 00 5F

    I2C command success

    Sending command: i2c 1.4E 9D 06 31 33 30 35 30 36 9F

    I2C command success

    Sending command: i2c 1.4E 99 06 4D 46 52 5F 49 44 E5

    I2C command success

    Sending command: i2c 1.4E 9C 06 54 41 49 57 41 4E 49

    I2C command success

    Sending command: i2c 1.4E 9A 0A 44 53 50 4D 2D 38 33 30 35 45 CC

    I2C command success

    Sending command: i2c 1.4E 9B 06 37 38 5F 41 30 34 F9

    I2C command success

    Sending command: i2c 1.4E 9E 06 30 30 30 30 30 30 F7

    I2C command success

    Sending command: i2c 1.4E F4 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C5

  • Hi, Nikolai,

    There shouldn't be any error for a successful programming. Be sure no console ports are used. I recalled once a while you may fail to program, just redo it. Also, the python and pyserial needs to be the exact versions. Python needs to be 2.7.x, and pyserial 2.6. The document says that the BMC port is the greater value of the 2 com ports. I've seen the opposite, so be sure that is the case by opening a TeraTerm which shows BMC prompt. But remember to close the window before programming. Let me know if you still have issue.

    Rex
  • Hello Rex

    Unsuccessfully, i still have same error. My launch conditions seems to be correct. As be confirmed with putty, COM15 is Linux terminal and COM16 is BMC. I have new versions of needed packages: Python 2.7.12 and pyserial 2.6, BMC 1.0.2.5. Before launching i closed all terminal windows. But results are still same, as in previous output log of the script. Looks like part of commands by I2C works ok, but the definely command fails.

    ALso, i would like to ask you about hardware way of the problem solving. Is the install of the 510 ohm load to be alternative for the UCD registers fixing?

  • Nikolai,

    Could you issue "ver" in BMC console to see what the bmc version is? The UCD update User's Guide indicates it won't work for BMC 1.0.1.3a as shown below:

    "NOTE: BMC versions 1.0.1.3a and earlier have a bug which cause this feature to fail. Please upgrade to the latest BMC or do not use this feature with earlier versions."

    Either workaround should be sufficient.

    Rex
  • Rex,

    As i wrote above, i have BMC 1.0.2.5 (full output you can see on the attacheed screenshot, sorry for the quality, unfortunately, i could not use Print Screen).

    Also today we made needed hardware modification: installation of 510 ohm load instead the capacitor C403.  However, it did not any effect for the problem solving.

  • Hi, Nikolai,

    Are you able to confirm that the 5V supply was shutting down? If not, the workaround may not work for this case.

    For the UCD update issue, I found some info from a field feedback that one of the customers had similar issue and failed on reprogramming. He was able to get over the issue by using a USB 3.0 port. I am not sure if this would help in your case.

    If it still not working, I am afraid using the latest Rev 4.0 EVM may be the last resort.

    Rex
  • Finally i've solved that problem. I've updated BMC to version 1.0.2.6, and the script for UCD was successfully perfomed. However, only using of 9090_104_A04 configuration file fixed USB power problem.