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/AM3358: U-boot USB error

Part Number: AM3358
Other Parts Discussed in Thread: TPD4S012, TPD3S014, TPD2E2U06, TPD4E1U06

Tool/software: Linux

I'm getting this error on usb start from u-boot. Do you know would could cause it?

=> usb start

starting USB...

USB0:   scanning bus 0 for devices... usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x40

unable to get device descriptor (error=-71)

failed, error -71

=>

  • I have turned on more debugging in u-boot:

    => usb start
    starting USB...
    USB0: musb-hdrc:ConfigData=0xde (UTMI-8, dyn FIFOs, 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
    musb-hdrc: hw_ep 0shared, max 64
    musb-hdrc: hw_ep 1tx, max 512
    musb-hdrc: hw_ep 1rx, max 512
    musb-hdrc: hw_ep 2tx, max 512
    musb-hdrc: hw_ep 2rx, max 512
    musb-hdrc: hw_ep 3tx, max 512
    musb-hdrc: hw_ep 3rx, max 512
    musb-hdrc: hw_ep 4tx, max 512
    musb-hdrc: hw_ep 4rx, max 512
    musb-hdrc: hw_ep 5tx, max 512
    musb-hdrc: hw_ep 5rx, max 512
    musb-hdrc: hw_ep 6tx, max 512
    musb-hdrc: hw_ep 6rx, max 512
    musb-hdrc: hw_ep 7tx, max 512
    musb-hdrc: hw_ep 7rx, max 512
    musb-hdrc: hw_ep 8tx, max 512
    musb-hdrc: hw_ep 8rx, max 512
    musb-hdrc: hw_ep 9tx, max 512
    musb-hdrc: hw_ep 9rx, max 512
    musb-hdrc: hw_ep 10tx, max 256
    musb-hdrc: hw_ep 10rx, max 64
    musb-hdrc: hw_ep 11tx, max 256
    musb-hdrc: hw_ep 11rx, max 64
    musb-hdrc: hw_ep 12tx, max 256
    musb-hdrc: hw_ep 12rx, max 64
    musb-hdrc: hw_ep 13shared, max 4096
    musb-hdrc: hw_ep 14shared, max 1024
    musb-hdrc: hw_ep 15shared, max 1024
    USB Host mode controller at 47401000 using PIO, IRQ 0
    <== devctl 98
    0
    usbintr (110) epintr(0)
    ** IRQ host usb0010 tx0000 rx0000
    <== Power=f0, DevCtl=5d, int_usb=0x10
    scanning bus 0 for devices...
    Calling usb_setup_device(), portnr=0
    usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x40
    0
    0
    qh 9df82500 urb 9df814e4 dev0 ep0out, hw_ep 0, 9df34e00/8
    --> hw0 urb 9df814e4 spd3 dev0 ep0out h_addr00 h_port00 bytes 8
    TX ep0 fifo 47401420 count 8 buf 9df34e00
    Start TX0 pio
    0
    usbintr (0) epintr(1)
    ** IRQ host usb0000 tx0001 rx0000
    <== csr0 0010, qh 9df82500, count 0, urb 9df814e4, stage 1
    no response, csr0 0010
    aborting
    complete 9df814e4 9ff829f1 (-71), dev0 ep0in, 0/64
    unable to get device descriptor (error=-71)
    read_descriptor for 'usb@47401000': ret=-71
    failed, error -71
    scan end
    =>

  • Bill,

    Please provide the usb portion of the schematics.
    What Processor SDK version do you use?
    Does this usb port work in Linux kernel?
    Do you have a USB bus analyzer to capture the bus trace?
  • Bin Liu said:
    Bill,

    Please provide the usb portion of the schematics.

    Bin Liu said:

    What Processor SDK version do you use?

    I don't know, but we're using the Morty branch of meta-ti: git://git.yoctoproject.org/meta-ti

    commit d6f38aac2460bd82b7c91ef7b647e23cd2db9c4c
    Author: Gaurav Mitra <gaurav@ti.com>
    Date: Thu Dec 21 23:09:32 2017 +0000

    Bin Liu said:

    Does this usb port work in Linux kernel?

    Not yet.

    Bin Liu said:

    Do you have a USB bus analyzer to capture the bus trace?

    No. But I have a scope.

  • Bill,

    This might be a signal integrity issue. It would be difficult to debug USB functions in uboot. Can you please boot to kernel and check if the USB port works in host mode in kernel instead?

    In kernel 'uname -a' command will tell the kernel version.
  • Bin Liu said:
    Bill,

    This might be a signal integrity issue. It would be difficult to debug USB functions in uboot. Can you please boot to kernel and check if the USB port works in host mode in kernel instead?

    what command do you want me to use from the kernel?

    Bin Liu said:


    In kernel 'uname -a' command will tell the kernel version.

    Linux  4.9.69-g89d085d1a4 #2 PREEMPT Fri Jan 12 16:32:09 CST 2018 armv7l GNU/Linux

    fyi: I just found that we have a Teledyne Lecroy USB analyzer I can use.

  • Bill Morgan said:
    what command do you want me to use from the kernel?

    Just as what do on a Linux PC, plug in a USB device, for example a thumb drive, into your board, and exam if the device is enumerated on your board, and if you can access the USB device, this will basically tell if your usb host port on your board works or not.

    Bill Morgan said:
    Linux  4.9.69-g89d085d1a4 #2 PREEMPT Fri Jan 12 16:32:09 CST 2018 armv7l GNU/Linux

    This seems to be the latest kernel supported by TI.

    Bill Morgan said:
    fyi: I just found that we have a Teledyne Lecroy USB analyzer I can use.

    Great, I will let you know when we need it.

  • Bin Liu said:
    Bill Morgan
    what command do you want me to use from the kernel?

    Sorry, but I'm new to Linux not sure what command to use.

    I have a thumb drive connected to the port.

    How do I examine if the device is enumerated? 

    I tried this command and get nothing:

    ~# cat /sys/kernel/debug/usb/devices
    #

    Is there any other command to use to verify that the port is working?

    update: 

    I also tried this command: lsusb

    unable to initialize libusb: -99

  • Bill Morgan said:

    I also tried this command: lsusb

    unable to initialize libusb: -99

    This means the usb drivers are not loaded properly. Please run the script below on your board and post the output log, it should give more details.

    chkusb.sh[3].txt
    #!/bin/bash
    #
    # Util to check USB subsystem for Linux kernel 3.12+ on TI Sitara devices
    #
    # Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
    #
    #
    #  Redistribution and use in source and binary forms, with or without
    #  modification, are permitted provided that the following conditions
    #  are met:
    #
    #    Redistributions of source code must retain the above copyright
    #    notice, this list of conditions and the following disclaimer.
    #
    #    Redistributions in binary form must reproduce the above copyright
    #    notice, this list of conditions and the following disclaimer in the
    #    documentation and/or other materials provided with the
    #    distribution.
    #
    #    Neither the name of Texas Instruments Incorporated nor the names of
    #    its contributors may be used to endorse or promote products derived
    #    from this software without specific prior written permission.
    #
    #  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    #  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    #  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    #  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    #  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    #  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    #  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    #  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    #  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    #  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    #  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    
    VERSION=0.2.4
    
    
    ### functions ###
    
    # $1 command to be checked
    check_command() {
        local _cmd=$1
    
        which $_cmd > /dev/null || {
            echo "Error: $_cmd command not found"
            exit 1
        }
    }
    
    # check if the kernel is supported
    # this tool only runs on v3.12+ kernel
    # return 0 - if kernel version >= 3.12
    #        1 - if kernel version < 3.12
    has_supported_kernel() {
    	local _ver
    	local _t
    
        check_command uname
        uname -a
    	_ver=`uname -r`
        _t=${_ver%%.*}
        # 2.x.x, unsupported
        [ $_t -ge 3 ] || return 1
        # 4.x.x, supported
        [ $_t -lt 4 ] || return 0
    
        _ver=${_ver#*.}
        _t=${_ver%%.*}
        # < 3.12.x, unsupported
        [ $_t -ge 12 ] || return 1
        return 0
    }
    
    # check if the platform is supported
    #    $PLATFORM - global variable
    # return 0 - if platform is supported
    #        1 - if platform is not supported
    check_platform () {
    	local _hw
    
        check_command grep
        [ "$PLATFORM" != "" ] || {
    	    _hw=`grep '^Hardware' /proc/cpuinfo`
    	    DBG_PRINT $_hw
    
            if [ "${_hw#*AM33XX}" != "$_hw" ]; then
                PLATFORM="am335x"
            elif [ "${_hw#*AM43}" != "$_hw" ]; then
                PLATFORM="am437x"
            elif [ "${_hw#*DRA7}" != "$_hw" ]; then
                PLATFORM="am57x"
            elif [ "${_hw#*Keystone}" != "$_hw" ]; then
                PLATFORM="keystone"
            else
                PLATFORM="unknown"
            fi
        }
    
        DBG_PRINT $PLATFORM
        case $PLATFORM in
            "am335x")
                USB0='usb@47400000/usb@47401000'
                USB1='usb@47400000/usb@47401800'
                return 0;;
            "am437x")
                USB0='omap_dwc3@48380000/usb@48390000'
                USB1='omap_dwc3@483c0000/usb@483d0000'
                return 0;;
            "am57x")
                USB0='omap_dwc3_1@48880000/usb@48890000'
                USB1='omap_dwc3_2@488c0000/usb@488d0000'
                return 0;;
            "keystone")
                USB0='omap_dwc3_1@48880000/usb@48890000'
                USB1='omap_dwc3_2@488c0000/usb@488d0000'
                return 0;;
            *)
                echo "Unsupported $PLATFORM"
                return 1;;
        esac
    }
    
    # check a kernel CONFIG option
    # params $1 - the config option
    #        $2 = '-q', quiet output
    # return 0 - undefined
    #        1 - defined as 'm', kernel module
    #        2 - defined as 'y', kernel builtin
    check_kernel_config() {
        local _cfg
    
        [ -n "$1" ] || return 0
        check_command zcat
        _cfg=`zcat /proc/config.gz | grep "^$1\>"`
    
        case ${_cfg#*=} in
            "y") return 2;;
            "m") return 1;;
              *) [ "$2" = "-q" ] ||
                  echo "Error: $1 is undefined in kernel config"
              return 0;;
        esac
    }
    
    # check a kernel module
    # $1 - module name, relative path from drivers/, with .ko surfix
    # return 0 - found
    #        1 - error
    check_module() {
        local _modname
        local _moddep
    
        [ -n "$1" ] || return 1
    
        _modname="/lib/modules/`uname -r`/kernel/drivers/${1}.ko"
        _moddep="/lib/modules/`uname -r`/modules.dep"
    
        DBG_PRINT 1
        [ -f $_modname ] || {
            echo "Error: $_modname not found."
            echo "       Please ensure 'make module_install' is done properly."
            return 1
        }
    
        DBG_PRINT 2
        [ -f $_moddep ] || $moddep_checked || {
            echo "Error: $_moddep not found."
            echo "       Please ensure 'make module_install' is done properly."
            moddep_checked=true
        }
    
        DBG_PRINT 3
        check_command lsmod
        check_command basename
        check_command tr
    
        lsmod | grep `basename $1 | tr '-' '_'` > /dev/null || {
            DBG_PRINT ">>>> ${1}.ko:"
            if grep "${1}.ko:" $_moddep > /dev/null; then
                DBG_PRINT 5
                echo "Error: $_moddep seems to be valid,"
                echo "       but `basename $1`.ko is not loaded."
                echo "       Please provide /proc/config.gz and /lib/module/`uname -r`/*"
                echo "       for further investigation."
            else
                DBG_PRINT 6
                echo "Error: `basename $1`: $_moddep is invalid."
                echo "       Please run command 'depmod' on the target to re-generate it,"
                echo "       then reboot the target. If the issue still exists, please"
                echo "       ensure 'make module_install' is done properly."
            fi
    
            DBG_PRINT 7
            return 1
        }
        DBG_PRINT 8
        return 0
    }
    
    # check kernel config, and modules (if CONFIG_*=M) for musb
    check_musb_drivers() {
        check_kernel_config CONFIG_USB_MUSB_HDRC
        [ $? != 1 ] || check_module 'usb/musb/musb_hdrc'
    
        check_kernel_config CONFIG_USB_MUSB_DUAL_ROLE -q
        [ $? != 0 ] || echo "Warning: CONFIG_USB_MUSB_DUAL_ROLE undefined."
    
        check_kernel_config CONFIG_USB_MUSB_DSPS
        [ $? != 1 ] || {
            check_module 'usb/musb/musb_dsps'
            check_module 'usb/musb/musb_am335x'
        }
    
        check_kernel_config CONFIG_AM335X_PHY_USB
        [ $? != 1 ] || {
            check_module 'usb/phy/phy-am335x'
            check_module 'usb/phy/phy-am335x-control'
        }
    
        check_kernel_config CONFIG_MUSB_PIO_ONLY -q
        [ $? != 0 ] || {
           if check_kernel_config CONFIG_TI_CPPI41 -q; then
               echo "Error: MUSB CPPI DMA mode is enabled, but CPPI moudle is not enabled in DMA Engine."
               echo "       Please enable CONFIG_TI_CPPI41 under DMA Engine Support in kernel config."
           fi
        }
    }
    
    # check kernel config, and modules (if CONFIG_*=M) for dwc3
    check_dwc3_drivers() {
        check_kernel_config CONFIG_USB_DWC3
        [ $? != 1 ] || check_module 'usb/dwc3/dwc3'
    
        check_kernel_config CONFIG_USB_DWC3_DUAL_ROLE -q
        [ $? != 0 ] || echo "Warning: CONFIG_USB_DWC3_DUAL_ROLE undefined."
    
        check_kernel_config CONFIG_USB_OTG -q
        [ $? != 0 ] || echo "Warning: CONFIG_USB_OTG undefined, which is required for DRD mode."
    
        check_kernel_config CONFIG_USB_DWC3_OMAP
        [ $? != 1 ] || check_module 'usb/dwc3/dwc3-omap'
    
        check_kernel_config CONFIG_USB_XHCI_HCD
        [ $? != 1 ] || {
            check_module 'usb/host/xhci-plat-hcd'
            check_module 'usb/host/xhci-hcd'
        }
    
        check_kernel_config CONFIG_OMAP_CONTROL_PHY
        [ $? != 1 ] || check_module 'phy/phy-omap-control'
    
        if [ $PLATFORM = am437x ]; then
            check_kernel_config CONFIG_OMAP_USB2
            [ $? != 1 ] || check_module 'phy/phy-omap-usb2'
        else
            check_kernel_config CONFIG_TI_PIPE3
            [ $? != 1 ] || check_module 'phy/phy-ti-pipe3'
        fi
    }
    
    ### debug ###
    
    g_log_file=/tmp/chkusb.log
    
    DBG_ENABLE() { g_dbg_enabled=true; }
    DBG_DISABLE() { g_dbg_enabled=false; }
    DBG_LOG_RESET() { ! $g_dbg_enabled || echo > $g_log_file; }
    DBG_PRINT() { ! $g_dbg_enabled || echo "$(date +%H:%M:%S) [$(basename $0)]: $*"; }
    DBG_LOG() { DBG_PRINT $* >> $g_log_file; }
    DBG_LOG_MARK() { DBG_PRINT "----------------" >> $g_log_file; }
    
    
    ### main ####
    
    moddep_checked=false
    
    echo "chkusb.sh Version $VERSION"
    
    [ "$V" = "1" ] && DBG_ENABLE && DBG_LOG_RESET || DBG_DISABLE
    
    has_supported_kernel ||
        { echo "Unsupported kernel version: `uname -r`"; exit 1; }
    check_platform || exit 2
    DBG_PRINT device: $PLATFORM
    
    check_command lsusb
    if lsusb > /dev/null 2>&1; then
        echo "USB is initialized"
    else
        echo "USB initialization failed"
    
        # failed, continue checking
        [ -f /proc/config.gz ] ||
            { echo "Error: /proc/config.gz not found"; exit 4; }
    
        case $PLATFORM in
            am335x) check_musb_drivers;;
            am437x | am57x | keystone) check_dwc3_drivers;;
            *)
                echo "Error: unsupported platform $PLATFORM"
                exit 5;;
        esac
    fi
    
    # check dr_mode & gadget drivers
    
    [ -d /proc/device-tree ] || {
        echo "Warning: /proc/device-tree/ not found"
        if [ -d "/lib/modules/`uname -r`/" ]; then
            echo "The list of USB gadget drivers installed:"
            ls -1Rp "/lib/modules/`uname -r`/kernel/drivers/usb/gadget/"
        fi
        exit 0
    }
    
    check_command basename
    for _usb in "${USB0}" "${USB1}"; do
        _usb_dir="/proc/device-tree/ocp/${_usb}"
        _status=`cat $_usb_dir/status 2> /dev/null`
        _dr_mode=`cat $_usb_dir/dr_mode`
        echo `basename $_usb`: $_dr_mode, $_status
    
        [ "$_status" = "disabled" -o "$_dr_mode" = "host" ] || gadget_mode=true
    done
    
    DBG_PRINT $gadget_mode
    $gadget_mode || exit 0
    
    echo
    
    check_kernel_config CONFIG_USB_LIBCOMPOSITE
    case $? in
        0) echo "Error: no any gadget driver enabled"
           exit 6;;
        1) is_gadget_builtin=false;;
        2) echo "The gadget driver is built-in"
           is_gadget_builtin=true;;
    esac
    
    check_kernel_config CONFIG_USB_ZERO -q ||
        echo "Gadget Kernel Config: g_zero is enabled"
    check_kernel_config CONFIG_USB_AUDIO -q ||
        echo "Gadget Kernel Config: g_audio is enabled"
    check_kernel_config CONFIG_USB_ETH -q ||
        echo "Gadget Kernel Config: g_ether is enabled"
    check_kernel_config CONFIG_USB_G_NCM -q ||
        echo "Gadget Kernel Config: g_ncm is enabled"
    check_kernel_config CONFIG_USB_MASS_STORAGE -q ||
        echo "Gadget Kernel Config: g_mass_storage is enabled"
    check_kernel_config CONFIG_USB_G_SERIAL -q ||
        echo "Gadget Kernel Config: g_serial is enabled"
    check_kernel_config CONFIG_USB_G_PRINTER -q ||
        echo "Gadget Kernel Config: g_printer is enabled"
    
    g_driver=`grep '^DRIVER=' /sys/class/udc/*/uevent 2>/dev/null`
    echo "gadget driver loaded: ${g_driver:-(none)}"
    
    echo
    
    if ! $is_gadget_builtin; then
        if [ -d "/lib/modules/`uname -r`/" ]; then
            echo "The list of USB gadget drivers installed:"
            ls -1Rp "/lib/modules/`uname -r`/kernel/drivers/usb/gadget/"
        else
            echo "Error: /lib/modules/`uname -r`/ not found"
            echo "       Please ensure 'make modules_install' is done properly."
            exit 7
        fi
    fi
    
    # vim: ft=sh:ts=4:sw=4:et
    

  • Bin Liu said:
    Bill Morgan

    I also tried this command: lsusb

    unable to initialize libusb: -99

    This means the usb drivers are not loaded properly. Please run the script below on your board and post the output log, it should give more details.

    (Please visit the site to view this file)

    chkusb.sh Version 0.2.4
    Linux 4.9.69-g89d085d1a4 #2 PREEMPT Fri Jan 12 16:32:09 CST 2018 armv7l GNU/Linux
    USB initialization failed
    usb@47401000: host, okay
    usb@47401800: otg, disabled

    Gadget Kernel Config: g_zero is enabled
    Gadget Kernel Config: g_audio is enabled
    Gadget Kernel Config: g_ether is enabled
    Gadget Kernel Config: g_ncm is enabled
    Gadget Kernel Config: g_mass_storage is enabled
    Gadget Kernel Config: g_serial is enabled
    Gadget Kernel Config: g_printer is enabled
    gadget driver loaded: (none)

    The list of USB gadget drivers installed:
    /lib/modules/4.9.69-g89d085d1a4/kernel/drivers/usb/gadget/:
    function/
    legacy/
    libcomposite.ko
    udc/

    /lib/modules/4.9.69-g89d085d1a4/kernel/drivers/usb/gadget/function:
    u_ether.ko
    u_serial.ko
    usb_f_acm.ko
    usb_f_ecm.ko
    usb_f_ecm_subset.ko
    usb_f_eem.ko
    usb_f_fs.ko
    usb_f_hid.ko
    usb_f_mass_storage.ko
    usb_f_midi.ko
    usb_f_ncm.ko
    usb_f_obex.ko
    usb_f_printer.ko
    usb_f_rndis.ko
    usb_f_serial.ko
    usb_f_ss_lb.ko
    usb_f_uac1.ko
    usb_f_uac2.ko
    usb_f_uvc.ko

    /lib/modules/4.9.69-g89d085d1a4/kernel/drivers/usb/gadget/legacy:
    g_acm_ms.ko
    g_audio.ko
    g_cdc.ko
    g_dbgp.ko
    g_ether.ko
    g_ffs.ko
    g_hid.ko
    g_mass_storage.ko
    g_midi.ko
    g_multi.ko
    g_ncm.ko
    g_printer.ko
    g_serial.ko
    g_webcam.ko
    g_zero.ko
    gadgetfs.ko

    /lib/modules/4.9.69-g89d085d1a4/kernel/drivers/usb/gadget/udc:
    udc-core.ko

  • The script doesn't tell why usb failed. I guess this is something new I am not aware of which the script doesn't cover.

    Please provide the kernel boot log. Run command 'dmesg' on the uart console and capture all the logs, and attach it to here.
  • Bin Liu said:
    The script doesn't tell why usb failed. I guess this is something new I am not aware of which the script doesn't cover.

    Please provide the kernel boot log. Run command 'dmesg' on the uart console and capture all the logs, and attach it to here.

    dmesg.txt attached
    5710.dmesg.txt
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.9.69-g89d085d1a4 (gcc version 6.2.0 (GCC) ) #2 PREEMPT Fri Jan 12 16:32:09 CST 2018
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] OF: fdt:Machine model:
    [    0.000000] efi: Getting EFI parameters from FDT:
    [    0.000000] efi: UEFI not found.
    [    0.000000] cma: Reserved 48 MiB at 0x9d000000
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] On node 0 totalpages: 131072
    [    0.000000] free_area_init_node: node 0, pgdat c0c43dc4, node_mem_map dcb61000
    [    0.000000]   Normal zone: 1152 pages used for memmap
    [    0.000000]   Normal zone: 0 pages reserved
    [    0.000000]   Normal zone: 131072 pages, LIFO batch:31
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM335X ES2.1 (sgx neon)
    [    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
    [    0.000000] pcpu-alloc: [0] 0
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129920
    [    0.000000] Kernel command line: console=ttyS1,115200 ramdisk_size=262144 root=/dev/ram0 rw rootfstype=ext2
    [    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Memory: 420752K/524288K available (7168K kernel code, 281K rwdata, 2412K rodata, 1024K init, 280K bss, 54384K reserved, 49152K cma-reserved, 0K highmem)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    [    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc0800000   (8160 kB)
    [    0.000000]       .init : 0xc0b00000 - 0xc0c00000   (1024 kB)
    [    0.000000]       .data : 0xc0c00000 - 0xc0c465b0   ( 282 kB)
    [    0.000000]        .bss : 0xc0c465b0 - 0xc0c8c814   ( 281 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] Preemptible hierarchical RCU implementation.
    [    0.000000]  Build-time adjustment of leaf fanout to 32.
    [    0.000000] NR_IRQS:16 nr_irqs:16 16
    [    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [    0.000000] OMAP clockevent source: timer2 at 26000000 Hz
    [    0.000017] sched_clock: 32 bits at 26MHz, resolution 38ns, wraps every 82595524588ns
    [    0.000037] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 73510017198 ns
    [    0.000048] OMAP clocksource: timer1 at 26000000 Hz
    [    0.000204] clocksource_probe: no matching clocksources found
    [    0.000376] Console: colour dummy device 80x30
    [    0.000415] Calibrating delay loop... 795.44 BogoMIPS (lpj=3977216)
    [    0.089159] pid_max: default: 32768 minimum: 301
    [    0.089297] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.089309] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.090128] CPU: Testing write buffer coherency: ok
    [    0.090500] Setting up static identity map for 0x80100000 - 0x80100060
    [    0.091346] EFI services will not be available.
    [    0.092743] devtmpfs: initialized
    [    0.103971] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    0.104351] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.104377] futex hash table entries: 256 (order: -1, 3072 bytes)
    [    0.108056] pinctrl core: initialized pinctrl subsystem
    [    0.109502] NET: Registered protocol family 16
    [    0.111481] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.126069] omap_hwmod: debugss: _wait_target_disable failed
    [    0.219155] cpuidle: using governor ladder
    [    0.249143] cpuidle: using governor menu
    [    0.253581] gpio gpiochip0: (gpio): added GPIO chardev (254:0)
    [    0.253956] gpiochip_setup_dev: registered GPIOs 0 to 31 on device: gpiochip0 (gpio)
    [    0.255431] OMAP GPIO hardware version 0.1
    [    0.256263] gpio gpiochip1: (gpio): added GPIO chardev (254:1)
    [    0.256588] gpiochip_setup_dev: registered GPIOs 32 to 63 on device: gpiochip1 (gpio)
    [    0.258721] gpio gpiochip2: (gpio): added GPIO chardev (254:2)
    [    0.259199] gpiochip_setup_dev: registered GPIOs 64 to 95 on device: gpiochip2 (gpio)
    [    0.261257] gpio gpiochip3: (gpio): added GPIO chardev (254:3)
    [    0.261569] gpiochip_setup_dev: registered GPIOs 96 to 127 on device: gpiochip3 (gpio)
    [    0.270218] No ATAGs?
    [    0.270245] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.307511] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.307831] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/fixedregulator@0[0]'
    [    0.308189] of_get_named_gpiod_flags: parsed 'gpio' property of node '/fixedregulator@1[0]' - status (0)
    [    0.311247] media: Linux media interface: v0.10
    [    0.311315] Linux video capture interface: v2.00
    [    0.311365] pps_core: LinuxPPS API ver. 1 registered
    [    0.311373] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.311398] PTP clock support registered
    [    0.311437] EDAC MC: Ver: 3.0.0
    [    0.312555] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.312899] Advanced Linux Sound Architecture Driver Initialized.
    [    0.314179] clocksource: Switched to clocksource timer1
    [    0.324910] NET: Registered protocol family 2
    [    0.325714] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.325766] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.325813] TCP: Hash tables configured (established 4096 bind 4096)
    [    0.325885] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.325916] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.326059] NET: Registered protocol family 1
    [    0.326492] RPC: Registered named UNIX socket transport module.
    [    0.326507] RPC: Registered udp transport module.
    [    0.326514] RPC: Registered tcp transport module.
    [    0.326521] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.326534] PCI: CLS 0 bytes, default 64
    [    0.327051] Trying to unpack rootfs image as initramfs...
    [    0.327865] rootfs image is not initramfs (no cpio magic); looks like an initrd
    [    0.537727] Freeing initrd memory: 37228K
    [    0.538242] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [    0.540851] workingset: timestamp_bits=14 max_order=17 bucket_order=3
    [    0.548861] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.549807] NFS: Registering the id_resolver key type
    [    0.549849] Key type id_resolver registered
    [    0.549857] Key type id_legacy registered
    [    0.549907] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.551809] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
    [    0.551830] io scheduler noop registered
    [    0.551838] io scheduler deadline registered
    [    0.551988] io scheduler cfq registered (default)
    [    0.553200] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [    0.617919] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [    0.621721] console [ttyS1] disabled
    [    0.621817] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 158, base_baud = 3000000) is a 8250
    [    1.190233] console [ttyS1] enabled
    [    1.195526] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
    [    1.202301] [drm] Initialized
    [    1.219322] brd: module loaded
    [    1.229176] loop: module loaded
    [    1.235106] m25p80 spi1.0: unrecognized JEDEC id bytes: c2, 25, 38
    [    1.241349] m25p80: probe of spi1.0 failed with error -2
    [    1.247686] libphy: Fixed MDIO Bus: probed
    [    1.266972] of_get_named_gpiod_flags: can't parse 'link-gpios' property of node '/ocp/ethernet@4a100000/slave@4a100200/fixed-link[0]'
    [    1.267743] cpsw 4a100000.ethernet: Detected MACID = 50:f1:4a:15:36:38
    [    1.274592] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
    [    1.283642] mousedev: PS/2 mouse device common for all mice
    [    1.289745] i2c /dev entries driver
    [    1.295924] cpuidle: enable-method property 'ti,am3352' found operations
    [    1.303559] omap_hsmmc 48060000.mmc: GPIO lookup for consumer cd
    [    1.303570] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
    [    1.303582] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc@48060000[0]'
    [    1.303590] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc@48060000[0]'
    [    1.303596] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
    [    1.303604] omap_hsmmc 48060000.mmc: lookup for GPIO cd failed
    [    1.303614] omap_hsmmc 48060000.mmc: GPIO lookup for consumer wp
    [    1.303620] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
    [    1.303626] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@48060000[0]'
    [    1.303632] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@48060000[0]'
    [    1.303638] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
    [    1.303644] omap_hsmmc 48060000.mmc: lookup for GPIO wp failed
    [    1.454718] omap_hsmmc 481d8000.mmc: GPIO lookup for consumer cd
    [    1.454732] omap_hsmmc 481d8000.mmc: using device tree for GPIO lookup
    [    1.454746] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc@481d8000[0]'
    [    1.454756] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc@481d8000[0]'
    [    1.454763] omap_hsmmc 481d8000.mmc: using lookup tables for GPIO lookup
    [    1.454772] omap_hsmmc 481d8000.mmc: lookup for GPIO cd failed
    [    1.454783] omap_hsmmc 481d8000.mmc: GPIO lookup for consumer wp
    [    1.454790] omap_hsmmc 481d8000.mmc: using device tree for GPIO lookup
    [    1.454798] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@481d8000[0]'
    [    1.454806] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@481d8000[0]'
    [    1.454813] omap_hsmmc 481d8000.mmc: using lookup tables for GPIO lookup
    [    1.454821] omap_hsmmc 481d8000.mmc: lookup for GPIO wp failed
    [    1.459032] omap_hsmmc 48060000.mmc: card claims to support voltages below defined range
    [    1.478658] random: fast init done
    [    1.482445] mmc0: new high speed SDIO card at address 0001
    [    1.514851] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.526986] NET: Registered protocol family 10
    [    1.533339] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    1.540769] NET: Registered protocol family 17
    [    1.546767] Key type dns_resolver registered
    [    1.553295] omap_voltage_late_init: Voltage driver support not added
    [    1.566794] hctosys: unable to open rtc device (rtc0)
    [    1.572409] wlan-1-en-regulator: disabling
    [    1.576696] ALSA device list:
    [    1.579685]   No soundcards found.
    [    1.583889] RAMDISK: gzip image found at block 0
    [    1.605057] mmc1: new high speed MMC card at address 0001
    [    1.624751] mmcblk1: mmc1:0001 Q2J55L 7.09 GiB
    [    1.629733] mmcblk1boot0: mmc1:0001 Q2J55L partition 1 16.0 MiB
    [    1.644886] mmcblk1boot1: mmc1:0001 Q2J55L partition 2 16.0 MiB
    [    1.652619]  mmcblk1: p1 p2
    [    5.399620] EXT4-fs (ram0): mounting ext2 file system using the ext4 subsystem
    [    5.408501] EXT4-fs (ram0): mounted filesystem without journal. Opts: (null)
    [    5.415846] VFS: Mounted root (ext2 filesystem) on device 1:0.
    [    5.422346] devtmpfs: mounted
    [    5.426960] Freeing unused kernel memory: 1024K
    [    5.471926] systemd[1]: System time before build time, advancing clock.
    [    5.501607] systemd[1]: systemd 230 running in system mode. (-PAM -AUDIT -SELINUX -IMA -APPARMOR -SMACK +SYSVINIT -UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL -XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN)
    [    5.520547] systemd[1]: Detected architecture arm.
    [    5.554624] systemd[1]: Set hostname
    [    5.559640] systemd[1]: Initializing machine ID from random generator.
    [    5.754861] systemd[1]: Listening on Journal Socket (/dev/log).
    [    5.784852] systemd[1]: Listening on Journal Socket.
    [    5.814905] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
    [    5.854748] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
    [    5.894479] systemd[1]: Reached target Paths.
    [    5.936832] systemd[1]: Reached target Remote File Systems.
    [    6.281091] EXT4-fs (ram0): re-mounted. Opts: (null)
    [    7.195637] systemd-journald[82]: Received request to flush runtime journal from PID 1
    [   10.528003] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [   10.561917] omap_rtc 44e3e000.rtc: already running
    [   10.590456] rtc rtc0: 44e3e000.rtc: dev (253:0)
    [   10.590496] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
    [   10.940559] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
    [   11.065673] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
    [   11.076496] remoteproc remoteproc0: wkup_m3 is available
    [   11.112821] omap-aes 53500000.aes: will run requests pump with realtime priority
    [   11.132932] remoteproc remoteproc0: powering up wkup_m3
    [   11.136245] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 224244
    [   11.136512] remoteproc remoteproc0: remote processor wkup_m3 is now up
    [   11.136542] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x192
    [   11.206193] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null)
    [   11.366801] PM: bootloader does not support rtc-only!
    [   11.457175] EXT4-fs (mmcblk1p1): mounted filesystem with ordered data mode. Opts: (null)
    [   12.707058] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer reset
    [   12.707076] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
    [   12.707090] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [   12.707098] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [   12.707105] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
    [   12.707113] am335x-phy-driver 47401300.usb-phy: lookup for GPIO reset failed
    [   12.707122] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer vbus-detect
    [   12.707127] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
    [   12.707134] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [   12.707140] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [   12.707146] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
    [   12.707152] am335x-phy-driver 47401300.usb-phy: lookup for GPIO vbus-detect failed
    [   12.707223] 47401300.usb-phy supply vcc not found, using dummy regulator
    [   12.733269] usbcore: registered new interface driver usbfs
    [   12.783141] usbcore: registered new interface driver hub
    [   12.809204] usbcore: registered new device driver usb
    [   13.725547] wl18xx_driver wl18xx.0.auto: Direct firmware load for ti-connectivity/wl1271-nvs.bin failed with error -2
    [   14.185423] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
    [   14.319185] wlcore: loaded
    [   14.508314] net eth0: initializing cpsw version 1.12 (0)
    [   14.513682] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
    [   14.580756] cpsw 4a100000.ethernet: ALE Table size 1024
    [   14.601543] Generic PHY fixed-0:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=fixed-0:00, irq=-1)
    [   14.643603] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [   15.176971] wlcore: PHY firmware version: Rev 8.2.0.0.241
    [   15.300503] wlcore: firmware booted (Rev 8.9.0.0.77)
    [   15.330263] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
    [   15.684616] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
    [   15.692993] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [  141.524487] random: crng init done
    
  • The kernel log shows musb related kernel modules are not loaded, but it doesn't give any reason.

    After kernel booted, please run command 'lsmod' and post the log.

    Then run command 'modprobe musb_am335x', and post the console log.

  • Bin Liu said:

    The kernel log shows musb related kernel modules are not loaded, but it doesn't give any reason.

    After kernel booted, please run command 'lsmod' and post the log.

    Then run command 'modprobe musb_am335x', and post the console log.

    modprobe musb_am335x output is blank.

    lsmod:

    Module                  Size  Used by

    arc4                    1822  2

    wl18xx                 86831  0

    wlcore                184073  1 wl18xx

    mac80211              381231  2 wl18xx,wlcore

    cfg80211              254253  3 wl18xx,wlcore,mac80211

    musb_dsps               9734  0

    musb_hdrc              88063  1 musb_dsps

    udc_core               19450  1 musb_hdrc

    phy_am335x              2372  4

    usbcore               202244  1 musb_hdrc

    phy_am335x_control      2937  1 phy_am335x

    phy_generic             5372  1 phy_am335x

    usb_common              4737  5 phy_am335x,udc_core,musb_hdrc,musb_dsps,usbcore

    pm33xx                  6433  0

    wkup_m3_ipc             8240  1 pm33xx

    wkup_m3_rproc           3670  1

    remoteproc             28581  2 wkup_m3_rproc,wkup_m3_ipc

    ti_emif_sram            5663  1 pm33xx

    omap_aes_driver        19334  0

    crypto_engine           7098  1 omap_aes_driver

    omap_sham              21950  0

    wlcore_sdio             6897  0

    rtc_omap                9662  1

    musb_am335x             1426  0

    omap_wdt                4634  0

    sch_fq_codel            9115  6

  • The lsmod log you posted above was captured before running 'modprobe musb_am335x' command?

    Please attach /proc/config.gz file on your board.

  • Bin Liu said:

    The lsmod log you posted above was captured before running 'modprobe musb_am335x' command?

    yes. I ran lsmod first, then modprobe musb_am335x second.

    Bin Liu said:

    Please attach /proc/config.gz file on your board.

    7065.config.gz

  • Bill,

    This would be our last weapon to tackle the problem.
    Please enable kernel verbose probe debug option and rebuild the kernel, then attach the dmesg kernel boot log. This would tell why musb drivers probe failed.

    In kernel menuconfig, enable

    Device Drivers --->
            Generic Driver Options --->
                    [*] Driver Core verbose debug messages
  • Bin Liu said:

    Bill,

    This would be our last weapon to tackle the problem.
    Please enable kernel verbose probe debug option and rebuild the kernel, then attach the dmesg kernel boot log. This would tell why musb drivers probe failed.

    In kernel menuconfig, enable

    Device Drivers --->
            Generic Driver Options --->
                    [*] Driver Core verbose debug messages

    4606.dmesg.txt

  • Bill,

    It seems like you didn't enable cppi41dma node in DTS (kernel boot log used to print a message to indirectly indicate it, but kernel apparently is no longer doing so).

    The following wiki has details about it.
    processors.wiki.ti.com/.../MUSB_Linux_Porting_Guide

    You can also provide the usb related dts change you did for your board, I can double check for you.
  • Bill,

    I updated my diagnosis script to check for device tree nodes, attached below. You can run it on your board and give me the output log.

    0777.chkusb-0.2.5.sh.txt
    #!/bin/bash
    #
    # Util to check USB subsystem for Linux kernel 3.12+ on TI Sitara devices
    #
    # Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
    #
    #
    #  Redistribution and use in source and binary forms, with or without
    #  modification, are permitted provided that the following conditions
    #  are met:
    #
    #    Redistributions of source code must retain the above copyright
    #    notice, this list of conditions and the following disclaimer.
    #
    #    Redistributions in binary form must reproduce the above copyright
    #    notice, this list of conditions and the following disclaimer in the
    #    documentation and/or other materials provided with the
    #    distribution.
    #
    #    Neither the name of Texas Instruments Incorporated nor the names of
    #    its contributors may be used to endorse or promote products derived
    #    from this software without specific prior written permission.
    #
    #  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    #  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    #  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    #  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    #  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    #  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    #  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    #  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    #  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    #  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    #  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    
    VERSION=0.2.5
    
    
    ### functions ###
    
    # $1 command to be checked
    check_command() {
        local _cmd=$1
    
        which $_cmd > /dev/null || {
            echo "Error: $_cmd command not found"
            exit 1
        }
    }
    
    # check if the kernel is supported
    # this tool only runs on v3.12+ kernel
    # return 0 - if kernel version >= 3.12
    #        1 - if kernel version < 3.12
    has_supported_kernel() {
    	local _ver
    	local _t
    
        check_command uname
        uname -a
    	_ver=`uname -r`
        _t=${_ver%%.*}
        # 2.x.x, unsupported
        [ $_t -ge 3 ] || return 1
        # 4.x.x, supported
        [ $_t -lt 4 ] || return 0
    
        _ver=${_ver#*.}
        _t=${_ver%%.*}
        # < 3.12.x, unsupported
        [ $_t -ge 12 ] || return 1
        return 0
    }
    
    # check if the platform is supported
    #    $PLATFORM - global variable
    # return 0 - if platform is supported
    #        1 - if platform is not supported
    check_platform () {
    	local _hw
    
        check_command grep
        [ "$PLATFORM" != "" ] || {
    	    _hw=`grep '^Hardware' /proc/cpuinfo`
    	    DBG_PRINT $_hw
    
            if [ "${_hw#*AM33XX}" != "$_hw" ]; then
                PLATFORM="am335x"
            elif [ "${_hw#*AM43}" != "$_hw" ]; then
                PLATFORM="am437x"
            elif [ "${_hw#*DRA7}" != "$_hw" ]; then
                PLATFORM="am57x"
            elif [ "${_hw#*Keystone}" != "$_hw" ]; then
                PLATFORM="keystone"
            else
                PLATFORM="unknown"
            fi
        }
    
        DBG_PRINT $PLATFORM
        case $PLATFORM in
            "am335x")
                USB0='usb@47400000/usb@47401000'
                USB1='usb@47400000/usb@47401800'
                return 0;;
            "am437x")
                USB0='omap_dwc3@48380000/usb@48390000'
                USB1='omap_dwc3@483c0000/usb@483d0000'
                return 0;;
            "am57x")
                USB0='omap_dwc3_1@48880000/usb@48890000'
                USB1='omap_dwc3_2@488c0000/usb@488d0000'
                return 0;;
            "keystone")
                USB0='omap_dwc3_1@48880000/usb@48890000'
                USB1='omap_dwc3_2@488c0000/usb@488d0000'
                return 0;;
            *)
                echo "Unsupported $PLATFORM"
                return 1;;
        esac
    }
    
    # check a kernel CONFIG option
    # params $1 - the config option
    #        $2 = '-q', quiet output
    # return 0 - undefined
    #        1 - defined as 'm', kernel module
    #        2 - defined as 'y', kernel builtin
    check_kernel_config() {
        local _cfg
    
        [ -n "$1" ] || return 0
        check_command zcat
        _cfg=`zcat /proc/config.gz | grep "^$1\>"`
    
        case ${_cfg#*=} in
            "y") return 2;;
            "m") return 1;;
              *) [ "$2" = "-q" ] ||
                  echo "Error: $1 is undefined in kernel config"
              return 0;;
        esac
    }
    
    # check a kernel module
    # $1 - module name, relative path from drivers/, with .ko surfix
    # return 0 - found
    #        1 - error
    check_module() {
        local _modname
        local _moddep
    
        [ -n "$1" ] || return 1
    
        _modname="/lib/modules/`uname -r`/kernel/drivers/${1}.ko"
        _moddep="/lib/modules/`uname -r`/modules.dep"
    
        DBG_PRINT 1
        [ -f $_modname ] || {
            echo "Error: $_modname not found."
            echo "       Please ensure 'make module_install' is done properly."
            return 1
        }
    
        DBG_PRINT 2
        [ -f $_moddep ] || $moddep_checked || {
            echo "Error: $_moddep not found."
            echo "       Please ensure 'make module_install' is done properly."
            moddep_checked=true
        }
    
        DBG_PRINT 3
        check_command lsmod
        check_command basename
        check_command tr
    
        lsmod | grep `basename $1 | tr '-' '_'` > /dev/null || {
            DBG_PRINT ">>>> ${1}.ko:"
            if grep "${1}.ko:" $_moddep > /dev/null; then
                DBG_PRINT 5
                echo "Error: $_moddep seems to be valid,"
                echo "       but `basename $1`.ko is not loaded."
                echo "       Please provide /proc/config.gz and /lib/module/`uname -r`/*"
                echo "       for further investigation."
            else
                DBG_PRINT 6
                echo "Error: `basename $1`: $_moddep is invalid."
                echo "       Please run command 'depmod' on the target to re-generate it,"
                echo "       then reboot the target. If the issue still exists, please"
                echo "       ensure 'make module_install' is done properly."
            fi
    
            DBG_PRINT 7
            return 1
        }
        DBG_PRINT 8
        return 0
    }
    
    # check kernel config, and modules (if CONFIG_*=M) for musb
    check_musb_drivers() {
        check_kernel_config CONFIG_USB_MUSB_HDRC
        [ $? != 1 ] || check_module 'usb/musb/musb_hdrc'
    
        check_kernel_config CONFIG_USB_MUSB_DUAL_ROLE -q
        [ $? != 0 ] || echo "Warning: CONFIG_USB_MUSB_DUAL_ROLE undefined."
    
        check_kernel_config CONFIG_USB_MUSB_DSPS
        [ $? != 1 ] || {
            check_module 'usb/musb/musb_dsps'
            check_module 'usb/musb/musb_am335x'
        }
    
        check_kernel_config CONFIG_AM335X_PHY_USB
        [ $? != 1 ] || {
            check_module 'usb/phy/phy-am335x'
            check_module 'usb/phy/phy-am335x-control'
        }
    
        check_kernel_config CONFIG_MUSB_PIO_ONLY -q
        [ $? != 0 ] || {
           if check_kernel_config CONFIG_TI_CPPI41 -q; then
               echo "Error: MUSB CPPI DMA mode is enabled, but CPPI moudle is not enabled in DMA Engine."
               echo "       Please enable CONFIG_TI_CPPI41 under DMA Engine Support in kernel config."
           fi
        }
    }
    
    # check kernel config, and modules (if CONFIG_*=M) for dwc3
    check_dwc3_drivers() {
        check_kernel_config CONFIG_USB_DWC3
        [ $? != 1 ] || check_module 'usb/dwc3/dwc3'
    
        check_kernel_config CONFIG_USB_DWC3_DUAL_ROLE -q
        [ $? != 0 ] || echo "Warning: CONFIG_USB_DWC3_DUAL_ROLE undefined."
    
        check_kernel_config CONFIG_USB_OTG -q
        [ $? != 0 ] || echo "Warning: CONFIG_USB_OTG undefined, which is required for DRD mode."
    
        check_kernel_config CONFIG_USB_DWC3_OMAP
        [ $? != 1 ] || check_module 'usb/dwc3/dwc3-omap'
    
        check_kernel_config CONFIG_USB_XHCI_HCD
        [ $? != 1 ] || {
            check_module 'usb/host/xhci-plat-hcd'
            check_module 'usb/host/xhci-hcd'
        }
    
        check_kernel_config CONFIG_OMAP_CONTROL_PHY
        [ $? != 1 ] || check_module 'phy/phy-omap-control'
    
        if [ $PLATFORM = am437x ]; then
            check_kernel_config CONFIG_OMAP_USB2
            [ $? != 1 ] || check_module 'phy/phy-omap-usb2'
        else
            check_kernel_config CONFIG_TI_PIPE3
            [ $? != 1 ] || check_module 'phy/phy-ti-pipe3'
        fi
    }
    
    check_musb_dt() {
        local _dt_dir='/proc/device-tree/ocp/usb@47400000'
        local _ent='. control@44e10620 usb-phy@47401300 usb-phy@47401b00 dma-controller@47402000'
        local _sts
    
        for _t in $_ent; do
            _sts=$(cat ${_dt_dir}/${_t}/status)
            [ "$_sts" != "disabled" ] ||
                echo $_t: $(cat ${_dt_dir}/${_t}/status)
        done
    }
    
    ### debug ###
    
    g_log_file=/tmp/chkusb.log
    
    DBG_ENABLE() { g_dbg_enabled=true; }
    DBG_DISABLE() { g_dbg_enabled=false; }
    DBG_LOG_RESET() { ! $g_dbg_enabled || echo > $g_log_file; }
    DBG_PRINT() { ! $g_dbg_enabled || echo "$(date +%H:%M:%S) [$(basename $0)]: $*"; }
    DBG_LOG() { DBG_PRINT $* >> $g_log_file; }
    DBG_LOG_MARK() { DBG_PRINT "----------------" >> $g_log_file; }
    
    
    ### main ####
    
    moddep_checked=false
    
    echo "chkusb.sh Version $VERSION"
    
    [ "$V" = "1" ] && DBG_ENABLE && DBG_LOG_RESET || DBG_DISABLE
    
    has_supported_kernel ||
        { echo "Unsupported kernel version: `uname -r`"; exit 1; }
    check_platform || exit 2
    DBG_PRINT device: $PLATFORM
    
    check_command lsusb
    if lsusb > /dev/null 2>&1; then
        echo "USB is initialized"
    else
        echo "USB initialization failed"
    
        # failed, continue checking
        [ -f /proc/config.gz ] ||
            { echo "Error: /proc/config.gz not found"; exit 4; }
    
        case $PLATFORM in
            am335x) check_musb_drivers;;
            am437x | am57x | keystone) check_dwc3_drivers;;
            *)
                echo "Error: unsupported platform $PLATFORM"
                exit 5;;
        esac
    fi
    
    # check dr_mode & gadget drivers
    
    [ -d /proc/device-tree ] || {
        echo "Warning: /proc/device-tree/ not found"
        if [ -d "/lib/modules/`uname -r`/" ]; then
            echo "The list of USB gadget drivers installed:"
            ls -1Rp "/lib/modules/`uname -r`/kernel/drivers/usb/gadget/"
        fi
        exit 0
    }
    
    check_command basename
    for _usb in "${USB0}" "${USB1}"; do
        _usb_dir="/proc/device-tree/ocp/${_usb}"
        _status=`cat $_usb_dir/status 2> /dev/null`
        _dr_mode=`cat $_usb_dir/dr_mode`
        echo `basename $_usb`: $_dr_mode, $_status
    
        [ "$_status" = "disabled" -o "$_dr_mode" = "host" ] || gadget_mode=true
    done
    
    case $PLATFORM in
        am335x) check_musb_dt;;
        *) ;;
    esac
    
    DBG_PRINT $gadget_mode
    $gadget_mode || exit 0
    
    echo
    
    check_kernel_config CONFIG_USB_LIBCOMPOSITE
    case $? in
        0) echo "Error: no any gadget driver enabled"
           exit 6;;
        1) is_gadget_builtin=false;;
        2) echo "The gadget driver is built-in"
           is_gadget_builtin=true;;
    esac
    
    check_kernel_config CONFIG_USB_ZERO -q ||
        echo "Gadget Kernel Config: g_zero is enabled"
    check_kernel_config CONFIG_USB_AUDIO -q ||
        echo "Gadget Kernel Config: g_audio is enabled"
    check_kernel_config CONFIG_USB_ETH -q ||
        echo "Gadget Kernel Config: g_ether is enabled"
    check_kernel_config CONFIG_USB_G_NCM -q ||
        echo "Gadget Kernel Config: g_ncm is enabled"
    check_kernel_config CONFIG_USB_MASS_STORAGE -q ||
        echo "Gadget Kernel Config: g_mass_storage is enabled"
    check_kernel_config CONFIG_USB_G_SERIAL -q ||
        echo "Gadget Kernel Config: g_serial is enabled"
    check_kernel_config CONFIG_USB_G_PRINTER -q ||
        echo "Gadget Kernel Config: g_printer is enabled"
    
    g_driver=`grep '^DRIVER=' /sys/class/udc/*/uevent 2>/dev/null`
    echo "gadget driver loaded: ${g_driver:-(none)}"
    
    echo
    
    if ! $is_gadget_builtin; then
        if [ -d "/lib/modules/`uname -r`/" ]; then
            echo "The list of USB gadget drivers installed:"
            ls -1Rp "/lib/modules/`uname -r`/kernel/drivers/usb/gadget/"
        else
            echo "Error: /lib/modules/`uname -r`/ not found"
            echo "       Please ensure 'make modules_install' is done properly."
            exit 7
        fi
    fi
    
    # vim: ft=sh:ts=4:sw=4:et
    

  • Bin Liu said:
    Bill,

    It seems like you didn't enable cppi41dma node in DTS (kernel boot log used to print a message to indirectly indicate it, but kernel apparently is no longer doing so).

    The following wiki has details about it.
    processors.wiki.ti.com/.../MUSB_Linux_Porting_Guide

    You can also provide the usb related dts change you did for your board, I can double check for you.

    I have added cppi41dma to the device tree.
    &usb {
        status = "okay";
    };
    
    &usb_ctrl_mod {
        status = "okay";
    };
    
    &usb0_phy {
        status = "okay";
    };
    
    &usb0 {
        status = "okay";
        dr_mode = "host";
    };
    // new
    &cppi41dma {
        status = "okay";
        };
    

    now when I run lsusb, I get this:

    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

  • Bill Morgan said:

    now when I run lsusb, I get this:

    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    Great! now please plug in the thumb drive to see if uart console has any enumeration log.

  • Bin Liu said:

    Bill,

    I updated my diagnosis script to check for device tree nodes, attached below. You can run it on your board and give me the output log.

    (Please visit the site to view this file)

    -sh: ./chkusb-0.2.5.sh: line 264: syntax error: unexpected "(" (expecting "}")

  • Bin Liu said:
    Bill Morgan

    now when I run lsusb, I get this:

    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    Great! now please plug in the thumb drive to see if uart console has any enumeration log.

    [  922.784522] usb 1-1: new high-speed USB device number 6 using musb-hdrc
    [  922.924507] usb 1-1: device descriptor read/64, error -71
    [  923.184515] usb 1-1: device descriptor read/64, error -71
    [  923.444524] usb 1-1: new high-speed USB device number 7 using musb-hdrc
    [  923.584515] usb 1-1: device descriptor read/64, error -71
    [  923.844515] usb 1-1: device descriptor read/64, error -71
    [  923.964646] usb usb1-port1: attempt power cycle
    [  924.444522] usb 1-1: new high-speed USB device number 8 using musb-hdrc
    [  925.024526] usb 1-1: new high-speed USB device number 9 using musb-hdrc
    
    /mnt/storage# lsusb
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    /mnt/storage#

  • Bill Morgan said:
    -sh: ./chkusb-0.2.5.sh: line 264: syntax error: unexpected "(" (expecting "}")

    hmm, it seems like the bash on your board doesn't recognize the following line, but I am not sure how to solve it. Never mind, don't need the script anymore, since the usb host port is up and running.

    264     local _ent=('.' 'control@44e10620' 'usb-phy@47401300' 'usb-phy@47401b00' \
    265                 'dma-controller@47402000')
    
  • Bill Morgan said:
    [ 922.784522] usb 1-1: new high-speed USB device number 6 using musb-hdrc [ 922.924507] usb 1-1: device descriptor read/64, error -71

    This does seem like a signal integrity issue.

    Please capture the usb bus trace using your analyzer. Please attach the raw .usb capture file, not just a screenshot.

    You might need to consider a hardware checking to ensure the usb layout is done properly.

  • Bin Liu said:

    This does seem like a signal integrity issue.

    Please capture the usb bus trace using your analyzer. Please attach the raw .usb capture file, not just a screenshot.

    You might need to consider a hardware checking to ensure the usb layout is done properly.

    20180117.usb

  • Bin Liu said:

    You might need to consider a hardware checking to ensure the usb layout is done properly.

    what happens if USB0_DRVVBUS is floating?

  • The bus trace shows barely any legal USB packet, even any valid high-speed SOF. You need to check the USB signal integrity.

  • Bill Morgan said:
    what happens if USB0_DRVVBUS is floating?

    This is fine, as long as

    1. The VBUS line of the receptacle is directly connected to a 5V power rail;

    2. The VBUS line of the receptacle is connected USB0_VBUS pin;

    3. and VBUS line has a 120uF capacitor next to the receptacle.

  • Bill,

    Do you use a crystal which is not 24MHz? Can you please use a scope to check if the usb bus is indeed 480MHz?
  • Bin Liu said:
    Bill,

    Do you use a crystal which is not 24MHz? 

    we use 26MHz on OSC_IN V10.

  • Please ensure the uboot code has been modified to work with this 26MHz crystal, it is in include/configs/am335x_evm.h. Otherwise, the USB bus clock is not correct.
  • Do you have omapconf to run "omapconf export ctt > ctt.rd1"? If so, please attach the rd1 file here.

    Alternatively you can get me clock tree dump using the CCS or Lauterbach script included with clock tree tool:

    www.ti.com/.../CLOCKTREETOOL
  • Bin Liu said:
    Please ensure the uboot code has been modified to work with this 26MHz crystal, it is in include/configs/am335x_evm.h. Otherwise, the USB bus clock is not correct.

    we do not use am335x_evm.h, but our board specific header has this:
    /* Clock Defines */
    #define V_OSCK                          26000000  /* Clock output from T2 */
    #define V_SCLK                          (V_OSCK)
    

  • So you already have the clock setting correct, but USB still doesn't send proper packets. Can you please use a scope to check if USB bus clock is 480MHz?
  • CTT-AM335x_SR2.x_SR1.0.rd1.txt
    DeviceName AM335x_SR2.x_SR1.0
    0x44e00000 0x00000102
    0x44e00004 0x0000000A
    0x44e00008 0x00000102
    0x44e0000c 0x00000012
    0x44e00010 0x00070000
    0x44e00014 0x00070000
    0x44e00018 0x00070000
    0x44e0001c 0x00030000
    0x44e00020 0x00070000
    0x44e00024 0x00030000
    0x44e00028 0x00030000
    0x44e0002c 0x00000002
    0x44e00030 0x00000002
    0x44e00034 0x00030000
    0x44e00038 0x00030000
    0x44e0003c 0x00030000
    0x44e00040 0x00030000
    0x44e00044 0x00030000
    0x44e00048 0x00030000
    0x44e0004c 0x00030000
    0x44e00050 0x00030000
    0x44e00054 0x00030000
    0x44e00058 0x00030000
    0x44e00060 0x00000002
    0x44e00064 0x00000002
    0x44e00068 0x00030000
    0x44e0006c 0x00030000
    0x44e00070 0x00030000
    0x44e00074 0x00030000
    0x44e00078 0x00030000
    0x44e0007c 0x00030000
    0x44e00080 0x00030000
    0x44e00084 0x00030000
    0x44e00088 0x00030000
    0x44e0008c 0x00030000
    0x44e00090 0x00030000
    0x44e00094 0x00030000
    0x44e00098 0x00030000
    0x44e0009c 0x00030000
    0x44e000a0 0x00030000
    0x44e000a4 0x00030000
    0x44e000a8 0x00030000
    0x44e000ac 0x00030000
    0x44e000b0 0x00030000
    0x44e000b4 0x00030000
    0x44e000b8 0x00030000
    0x44e000bc 0x00030000
    0x44e000c0 0x00030000
    0x44e000c4 0x00030000
    0x44e000c8 0x00030000
    0x44e000cc 0x00030000
    0x44e000d0 0x00000002
    0x44e000d4 0x00030000
    0x44e000d8 0x00030000
    0x44e000dc 0x00000002
    0x44e000e0 0x00000002
    0x44e000e4 0x00040002
    0x44e000e8 0x00070000
    0x44e000ec 0x00030000
    0x44e000f0 0x00030000
    0x44e000f4 0x00030000
    0x44e000f8 0x00030000
    0x44e000fc 0x00030000
    0x44e00100 0x00030000
    0x44e00104 0x00030000
    0x44e0010c 0x00030000
    0x44e00110 0x00030000
    0x44e0011c 0x0000000A
    0x44e00120 0x00000002
    0x44e00124 0x00070000
    0x44e00128 0x00030000
    0x44e0012c 0x00000012
    0x44e00130 0x00040002
    0x44e00134 0x00030000
    0x44e00138 0x00030000
    0x44e0013c 0x00030000
    0x44e00140 0x00000002
    0x44e00144 0x00000002
    0x44e00148 0x00000002
    0x44e0014c 0x00030000
    0x44e00150 0x00000002
    0x44e00400 0x00000616
    0x44e00404 0x00000002
    0x44e00408 0x00030000
    0x44e0040c 0x00000002
    0x44e00410 0x00000002
    0x44e00414 0x52580002
    0x44e00418 0x0000001E
    0x44e0041c 0x00000000
    0x44e00420 0x00000100
    0x44e00424 0x00000000
    0x44e00428 0x00000000
    0x44e0042c 0x00000000
    0x44e00430 0x00000000
    0x44e00434 0x00000100
    0x44e00438 0x00000000
    0x44e0043c 0x00000000
    0x44e00440 0x00000000
    0x44e00444 0x00000000
    0x44e00448 0x00000100
    0x44e0044c 0x00000000
    0x44e00450 0x00000000
    0x44e00454 0x00000000
    0x44e00458 0x00000000
    0x44e0045c 0x00000100
    0x44e00460 0x00000000
    0x44e00464 0x00000000
    0x44e00468 0x00000000
    0x44e0046c 0x00000000
    0x44e00470 0x00000100
    0x44e00474 0x00000000
    0x44e00478 0x00000000
    0x44e0047c 0x00000000
    0x44e00480 0x00000204
    0x44e00484 0x00000004
    0x44e00488 0x00000004
    0x44e0048c 0x00000004
    0x44e00490 0x00000004
    0x44e00494 0x00000004
    0x44e00498 0x00000004
    0x44e0049c 0x00000000
    0x44e004a0 0x00000001
    0x44e004a4 0x00000001
    0x44e004a8 0x00000201
    0x44e004ac 0x00000081
    0x44e004b0 0x00040002
    0x44e004b4 0x00030000
    0x44e004b8 0x00030000
    0x44e004bc 0x00030000
    0x44e004c0 0x00030000
    0x44e004c4 0x00030000
    0x44e004c8 0x00030000
    0x44e004cc 0x00000006
    0x44e004d0 0x00000002
    0x44e004d4 0x00000002
    0x44e004d8 0x00000004
    0x44e00504 0x00000001
    0x44e00508 0x00000001
    0x44e0050c 0x00000000
    0x44e00510 0x00000001
    0x44e00514 0x00000004
    0x44e00518 0x00000001
    0x44e0051c 0x00000000
    0x44e00520 0x00000000
    0x44e00528 0x00000000
    0x44e0052c 0x00000000
    0x44e00530 0x00000000
    0x44e00534 0x00000000
    0x44e00538 0x00000000
    0x44e0053c 0x00000000
    0x44e00600 0x00000006
    0x44e00604 0x00000002
    0x44e00700 0x00000000
    0x44e00800 0x00000002
    0x44e00804 0x00000302
    0x44e00900 0x00000002
    0x44e00904 0x00070000
    0x44e00908 0x00070000
    0x44e0090c 0x00000002
    0x44e00910 0x00030000
    0x44e00914 0x00030000
    0x44e00a00 0x00000002
    0x44e00a20 0x00030000
    0x44e00b00 0x00000000
    0x44e00b04 0x00000500
    0x44e00b08 0x00000000
    0x44e00b0c 0x00000100
    0x44e00b10 0x00000000
    0x44e00c00 0x00000003
    0x44e00c04 0x00000000
    0x44e00c08 0x01E60007
    0x44e00c0c 0xEE0000EB
    0x44e00d00 0x00000008
    0x44e00d04 0x00000008
    0x44e00d08 0x00000000
    0x44e00d0c 0x00000020
    0x44e00e00 0x01FF0007
    0x44e00e04 0x000003F7
    0x44e00e08 0x00000000
    0x44e00f00 0x00000000
    0x44e00f04 0x00001006
    0x44e00f08 0x00000203
    0x44e00f0c 0x78000017
    0x44e00f10 0x00000003
    0x44e00f14 0x00000000
    0x44e00f18 0x00000003
    0x44e00f1c 0x00000000
    0x44e01000 0x00000004
    0x44e01004 0x00000000
    0x44e01100 0x00060044
    0x44e01104 0x00000001
    0x44e01110 0x00000037
    0x44e01114 0x00000000
    0x44e01200 0x00000000
    0x44e01204 0x00000007
    0x44e10040 0x00C00318
    

  • That rd1 file doesn't look right to me.... It looks like the chip was reset prior to pulling that data (e.g. all the PLL's are in bypass, most of the peripherals are disabled, etc.). Can you try collecting it again?
  • Brad Griffis said:
    That rd1 file doesn't look right to me.... It looks like the chip was reset prior to pulling that data (e.g. all the PLL's are in bypass, most of the peripherals are disabled, etc.). Can you try collecting it again?

    the first one was right after end of SPL before U-Boot.

    this one is after U-Boot, before Kernel.

    1033.CTT-AM335x_SR2.x_SR1.0.rd1.txt
    DeviceName AM335x_SR2.x_SR1.0
    0x44e00000 0x02004102
    0x44e00004 0x0000000A
    0x44e00008 0x00000102
    0x44e0000c 0x00000012
    0x44e00010 0x00070000
    0x44e00014 0x00070000
    0x44e00018 0x00070000
    0x44e0001c 0x00030000
    0x44e00020 0x00070000
    0x44e00024 0x00030000
    0x44e00028 0x00030000
    0x44e0002c 0x00000002
    0x44e00030 0x00000002
    0x44e00034 0x00030000
    0x44e00038 0x00030000
    0x44e0003c 0x00030000
    0x44e00040 0x00030000
    0x44e00044 0x00030000
    0x44e00048 0x00030000
    0x44e0004c 0x00000002
    0x44e00050 0x00030000
    0x44e00054 0x00030000
    0x44e00058 0x00030000
    0x44e00060 0x00000002
    0x44e00064 0x00000002
    0x44e00068 0x00030000
    0x44e0006c 0x00030000
    0x44e00070 0x00030000
    0x44e00074 0x00030000
    0x44e00078 0x00030000
    0x44e0007c 0x00030000
    0x44e00080 0x00000002
    0x44e00084 0x00030000
    0x44e00088 0x00030000
    0x44e0008c 0x00030000
    0x44e00090 0x00030000
    0x44e00094 0x00030000
    0x44e00098 0x00030000
    0x44e0009c 0x00030000
    0x44e000a0 0x00030000
    0x44e000a4 0x00030000
    0x44e000a8 0x00030000
    0x44e000ac 0x00030000
    0x44e000b0 0x00030000
    0x44e000b4 0x00030000
    0x44e000b8 0x00030000
    0x44e000bc 0x00030000
    0x44e000c0 0x00030000
    0x44e000c4 0x00030000
    0x44e000c8 0x00030000
    0x44e000cc 0x00030000
    0x44e000d0 0x00000002
    0x44e000d4 0x00030000
    0x44e000d8 0x00030000
    0x44e000dc 0x00000002
    0x44e000e0 0x00000002
    0x44e000e4 0x00040002
    0x44e000e8 0x00070000
    0x44e000ec 0x00030000
    0x44e000f0 0x00030000
    0x44e000f4 0x00030000
    0x44e000f8 0x00030000
    0x44e000fc 0x00030000
    0x44e00100 0x00030000
    0x44e00104 0x00030000
    0x44e0010c 0x00030000
    0x44e00110 0x00030000
    0x44e0011c 0x0000000A
    0x44e00120 0x00000002
    0x44e00124 0x00070000
    0x44e00128 0x00030000
    0x44e0012c 0x00000012
    0x44e00130 0x00040002
    0x44e00134 0x00030000
    0x44e00138 0x00030000
    0x44e0013c 0x00030000
    0x44e00140 0x00000002
    0x44e00144 0x00000002
    0x44e00148 0x00000002
    0x44e0014c 0x00000002
    0x44e00150 0x00000012
    0x44e00400 0x00000616
    0x44e00404 0x00000002
    0x44e00408 0x00030000
    0x44e0040c 0x00000002
    0x44e00410 0x00000002
    0x44e00414 0x52580002
    0x44e00418 0x0000001E
    0x44e0041c 0x00000000
    0x44e00420 0x00000001
    0x44e00424 0x00000000
    0x44e00428 0x00000000
    0x44e0042c 0x0003E819
    0x44e00430 0x00000000
    0x44e00434 0x00000100
    0x44e00438 0x00000000
    0x44e0043c 0x00000000
    0x44e00440 0x00000000
    0x44e00444 0x00000000
    0x44e00448 0x00000100
    0x44e0044c 0x00000000
    0x44e00450 0x00000000
    0x44e00454 0x00000000
    0x44e00458 0x00000000
    0x44e0045c 0x00000001
    0x44e00460 0x00000000
    0x44e00464 0x00000000
    0x44e00468 0x0003E819
    0x44e0046c 0x00000000
    0x44e00470 0x00000001
    0x44e00474 0x00000000
    0x44e00478 0x00000000
    0x44e0047c 0x00000000
    0x44e00480 0x0000022A
    0x44e00484 0x00000028
    0x44e00488 0x00000007
    0x44e0048c 0x00000007
    0x44e00490 0x00000007
    0x44e00494 0x00000004
    0x44e00498 0x00000004
    0x44e0049c 0x0403C019
    0x44e004a0 0x00000001
    0x44e004a4 0x00000001
    0x44e004a8 0x00000222
    0x44e004ac 0x00000205
    0x44e004b0 0x00040002
    0x44e004b4 0x00030000
    0x44e004b8 0x00030000
    0x44e004bc 0x00030000
    0x44e004c0 0x00030000
    0x44e004c4 0x00030000
    0x44e004c8 0x00030000
    0x44e004cc 0x00000006
    0x44e004d0 0x00000002
    0x44e004d4 0x00000002
    0x44e004d8 0x00000004
    0x44e00504 0x00000001
    0x44e00508 0x00000002
    0x44e0050c 0x00000000
    0x44e00510 0x00000001
    0x44e00514 0x00000004
    0x44e00518 0x00000001
    0x44e0051c 0x00000000
    0x44e00520 0x00000000
    0x44e00528 0x00000000
    0x44e0052c 0x00000000
    0x44e00530 0x00000000
    0x44e00534 0x00000000
    0x44e00538 0x00000000
    0x44e0053c 0x00000000
    0x44e00600 0x00000006
    0x44e00604 0x00000002
    0x44e00700 0x00000000
    0x44e00800 0x00000002
    0x44e00804 0x00000302
    0x44e00900 0x00000002
    0x44e00904 0x00070000
    0x44e00908 0x00070000
    0x44e0090c 0x00000002
    0x44e00910 0x00030000
    0x44e00914 0x00030000
    0x44e00a00 0x00000002
    0x44e00a20 0x00030000
    0x44e00b00 0x00000000
    0x44e00b04 0x00000500
    0x44e00b08 0x00000000
    0x44e00b0c 0x00000100
    0x44e00b10 0x00000000
    0x44e00c00 0x00000003
    0x44e00c04 0x00000000
    0x44e00c08 0x01E60007
    0x44e00c0c 0xEE0000EB
    0x44e00d00 0x00000008
    0x44e00d04 0x00000008
    0x44e00d08 0x00000000
    0x44e00d0c 0x00000000
    0x44e00e00 0x01FF0007
    0x44e00e04 0x000003F7
    0x44e00e08 0x00000000
    0x44e00f00 0x00000000
    0x44e00f04 0x00001006
    0x44e00f08 0x00000011
    0x44e00f0c 0x78000017
    0x44e00f10 0x00000003
    0x44e00f14 0x00000000
    0x44e00f18 0x00000003
    0x44e00f1c 0x00000000
    0x44e01000 0x00000004
    0x44e01004 0x00000000
    0x44e01100 0x00060044
    0x44e01104 0x00000001
    0x44e01110 0x00000037
    0x44e01114 0x00000000
    0x44e01200 0x00000000
    0x44e01204 0x00000007
    0x44e10040 0x00C00318
    

  • Brad Griffis said:
    Do you have omapconf to run "omapconf export ctt > ctt.rd1"? If so, please attach the rd1 file here.

    I added omapconf to the rootfs.Here is the output:

    ctt.rd1.txt
    OMAPCONF (rev v1.73-17-g578778b built Thu Jan 18 09:55:50 CST 2018)
    
    HW Platform:
      Generic AM33XX (Flattened Device Tree)
      AM3358 ES2.1 GP Device (UNKNOWN performance ZCZ package (800MHz))
      UNKNOWN POWER IC
      UNKNOWN AUDIO IC
    
    SW Build Details:
      Build:
        Version:
      Kernel:
        Version: 4.9.69-g89d085d1a4
        Toolchain: gcc version 6.2.0 (GCC)
        Type: #2 PREEMPT
        Date: Wed Jan 17 11:22:56 CST 2018
    
    The Clock Tree Tool can import register settings from a *.rd1 file.
    The format of the *.rd1 file is:
    
    DeviceName AM335x1.0
    <register address> <register value>
    <register address> <register value>
    ...
    
    Copy the below output between the begin and end separators into a
    file with the extension *.rd1 and this file can be read by the
    Clock Tree Tool
    
    |--------------------------- ctt dump begin ----------------------|
    DeviceName AM335x1.0
    0x44E00000 0x00004502
    0x44E00004 0x0000000A
    0x44E00008 0x00000101
    0x44E0000C 0x0000005E
    0x44E00010 0x00070000
    0x44E00014 0x00000002
    0x44E00018 0x00070000
    0x44E0001C 0x00070000
    0x44E00020 0x00070000
    0x44E00024 0x00000002
    0x44E00028 0x00000002
    0x44E0002C 0x00000002
    0x44E00030 0x00000002
    0x44E00034 0x00030000
    0x44E00038 0x00030000
    0x44E0003C 0x00030000
    0x44E00040 0x00030000
    0x44E00044 0x00030000
    0x44E00048 0x00030000
    0x44E0004C 0x00030000
    0x44E00050 0x00030000
    0x44E00054 0x00030000
    0x44E00058 0x00030000
    0x44E00060 0x00000002
    0x44E00064 0x00020002
    0x44E00068 0x00030000
    0x44E0006C 0x00000002
    0x44E00070 0x00030000
    0x44E00074 0x00030000
    0x44E00078 0x00030000
    0x44E0007C 0x00030000
    0x44E00080 0x00000002
    0x44E00084 0x00030000
    0x44E00088 0x00030000
    0x44E0008C 0x00030000
    0x44E00090 0x00000002
    0x44E00094 0x00030000
    0x44E00098 0x00030000
    0x44E0009C 0x00030000
    0x44E000A0 0x00030000
    0x44E000A4 0x00030000
    0x44E000A8 0x00030000
    0x44E000AC 0x00000002
    0x44E000B0 0x00030000
    0x44E000B4 0x00030000
    0x44E000B8 0x00030000
    0x44E000BC 0x00000002
    0x44E000C0 0x00030000
    0x44E000C4 0x00030000
    0x44E000C8 0x00030000
    0x44E000CC 0x00030000
    0x44E000D0 0x00020002
    0x44E000D4 0x00030000
    0x44E000D8 0x00030000
    0x44E000DC 0x00000002
    0x44E000E0 0x00000002
    0x44E000E4 0x00070000
    0x44E000E8 0x00070000
    0x44E000EC 0x00030000
    0x44E000F0 0x00030000
    0x44E000F4 0x00000002
    0x44E000F8 0x00030000
    0x44E000FC 0x00000002
    0x44E00100 0x00000002
    0x44E00104 0x00030000
    0x44E0010C 0x00030000
    0x44E00110 0x00000002
    0x44E0011C 0x0000007A
    0x44E00120 0x00000002
    0x44E00124 0x00070000
    0x44E00128 0x00030000
    0x44E0012C 0x00000001
    0x44E00130 0x00060002
    0x44E00134 0x00030000
    0x44E00138 0x00030000
    0x44E0013C 0x00030000
    0x44E00140 0x00000001
    0x44E00144 0x00000012
    0x44E00148 0x00000001
    0x44E0014C 0x00000002
    0x44E00150 0x00000012
    0x44E00400 0x00002606
    0x44E00404 0x00000002
    0x44E00408 0x00030000
    0x44E0040C 0x00000002
    0x44E00410 0x00000002
    0x44E00414 0x12510000
    0x44E00418 0x00000009
    0x44E0041C 0x00000000
    0x44E00420 0x00000001
    0x44E00424 0x00000000
    0x44E00428 0x00000000
    0x44E0042C 0x0000960C
    0x44E00430 0x00000000
    0x44E00434 0x00000001
    0x44E00438 0x00000000
    0x44E0043C 0x00000000
    0x44E00440 0x00019019
    0x44E00444 0x00000000
    0x44E00448 0x00000100
    0x44E0044C 0x00000000
    0x44E00450 0x00000000
    0x44E00454 0x00000000
    0x44E00458 0x00000000
    0x44E0045C 0x00000001
    0x44E00460 0x00000000
    0x44E00464 0x00000000
    0x44E00468 0x0001F40C
    0x44E0046C 0x00000000
    0x44E00470 0x00000001
    0x44E00474 0x00000000
    0x44E00478 0x00000000
    0x44E0047C 0x00000000
    0x44E00480 0x0000022A
    0x44E00484 0x00000228
    0x44E00488 0x00000007
    0x44E0048C 0x00000007
    0x44E00490 0x00000007
    0x44E00494 0x00000007
    0x44E00498 0x00000004
    0x44E0049C 0x0401E00C
    0x44E004A0 0x00000201
    0x44E004A4 0x00000001
    0x44E004A8 0x00000201
    0x44E004AC 0x00000285
    0x44E004B0 0x00040002
    0x44E004B4 0x00030000
    0x44E004B8 0x00030000
    0x44E004BC 0x00030000
    0x44E004C0 0x00030000
    0x44E004C4 0x00000002
    0x44E004C8 0x00030000
    0x44E004CC 0x00000006
    0x44E004D0 0x00000002
    0x44E004D4 0x00030000
    0x44E00504 0x00000001
    0x44E00508 0x00000001
    0x44E0050C 0x00000001
    0x44E00510 0x00000001
    0x44E00514 0x00000004
    0x44E00518 0x00000001
    0x44E0051C 0x00000001
    0x44E00520 0x00000000
    0x44E00528 0x00000000
    0x44E0052C 0x00000000
    0x44E00530 0x00000000
    0x44E00534 0x00000000
    0x44E00538 0x00000001
    0x44E0053C 0x00000000
    0x44E00600 0x00000006
    0x44E00604 0x00000002
    0x44E00700 0x00000080
    0x44E00800 0x00000002
    0x44E00804 0x00000302
    0x44E00900 0x00000001
    0x44E00904 0x00070000
    0x44E00908 0x00070000
    0x44E0090C 0x00000001
    0x44E00910 0x00030000
    0x44E00914 0x00030000
    0x44E00A00 0x00000001
    0x44E00A20 0x00030000
    0x44E00B00 0x00000000
    0x44E00B04 0x00000500
    0x44E00B08 0x00000000
    0x44E00B0C 0x00000100
    0x44E00B10 0x00000000
    0x44E00C00 0x00000003
    0x44E00C04 0x00000000
    0x44E00C08 0x01E60007
    0x44E00C0C 0xEE0000EB
    0x44E00D00 0x00000000
    0x44E00D04 0x00000008
    0x44E00D08 0x00000000
    0x44E00D0C 0x00000020
    0x44E00E00 0x01FF0007
    0x44E00E04 0x000003F7
    0x44E00E08 0x00000000
    0x44E00F00 0x00000000
    0x44E00F04 0x00001006
    0x44E00F08 0x00000001
    0x44E00F0C 0x78000017
    0x44E00F10 0x00000003
    0x44E00F14 0x00000000
    0x44E00F18 0x00000003
    0x44E00F1C 0x00000000
    0x44E01000 0x00000004
    0x44E01004 0x00000000
    0x44E01100 0x00060047
    0x44E01104 0x00000001
    0x44E01110 0x00000037
    0x44E01114 0x00000000
    0x44E01200 0x00000000
    0x44E01204 0x00000000
    0x44E10040 0x00C00318
    |---------------------------- ctt dump end -----------------------|
    
    

  • I looked at your clocks and they appear to be correct. It looks like you have a hardware issue.
  • Brad Griffis said:
    I looked at your clocks and they appear to be correct. It looks like you have a hardware issue.

    We had one of these ESD devices on D+ and D-: octopart.com/uclamp0501p.tct-semtech-1326764
    I removed them, and can see a USB device from U-Boot and the Kernel now, but I'm not sure if things are working correctly just yet.
    I am getting a flood of these messages to the dmesg log:
    [  447.414072] scsi host0: usb-storage 1-1:1.0
    [  448.487238] scsi 0:0:0:0: Direct-Access     Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6
    [  448.501181] sd 0:0:0:0: [sda] 60622848 512-byte logical blocks: (31.0 GB/28.9 GiB)
    [  448.534494] sd 0:0:0:0: [sda] Write Protect is off
    [  448.554554] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
    [  448.744548] usb 1-1: reset high-speed USB device number 16 using musb-hdrc
    [  449.094441] usb 1-1: reset high-speed USB device number 16 using musb-hdrc
    [  449.444544] usb 1-1: reset high-speed USB device number 16 using musb-hdrc
    [  449.794545] usb 1-1: reset high-speed USB device number 16 using musb-hdrc
    [  450.144546] usb 1-1: reset high-speed USB device number 16 using musb-hdrc
    [  450.494545] usb 1-1: reset high-speed USB device number 16 using musb-hdrc
    [  450.665813] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
    [  450.674103] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 00 00 00 08 00
    [  450.681814] blk_update_request: I/O error, dev sda, sector 0
    [  450.687567] Buffer I/O error on dev sda, logical block 0, async page read
    [  450.854549] usb 1-1: reset high-speed USB device number 16 using musb-hdrc
    [  451.025141] usb 1-1: unable to get BOS descriptor set
    [  451.030283] usb 1-1: device firmware changed
    [  451.042475] usb 1-1: USB disconnect, device number 16
    [  451.084645] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
    [  451.092939] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 00 00 00 08 00
    [  451.100664] blk_update_request: I/O error, dev sda, sector 0
    [  451.106416] Buffer I/O error on dev sda, logical block 0, async page read
    [  451.113996]  sda: unable to read partition table
    [  451.175316] sd 0:0:0:0: [sda] Read Capacity(10) failed: Result: hostbyte=0x01 driverbyte=0x00
    [  451.183946] sd 0:0:0:0: [sda] Sense not available.
    [  451.201849] sd 0:0:0:0: [sda] Attached SCSI removable disk
    [  451.594430] usb 1-1: new high-speed USB device number 17 using musb-hdrc
    [  451.773653] usb-storage 1-1:1.0: USB Mass Storage device detected
    [  451.791359] scsi host0: usb-storage 1-1:1.0
    [  452.887235] scsi 0:0:0:0: Direct-Access     Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6
    [  452.901133] sd 0:0:0:0: [sda] 60622848 512-byte logical blocks: (31.0 GB/28.9 GiB)
    [  452.934102] sd 0:0:0:0: [sda] Write Protect is off
    [  452.955353] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
    [  453.144546] usb 1-1: reset high-speed USB device number 17 using musb-hdrc
    [  453.494440] usb 1-1: reset high-speed USB device number 17 using musb-hdrc
    [  453.844543] usb 1-1: reset high-speed USB device number 17 using musb-hdrc
    [  454.194548] usb 1-1: reset high-speed USB device number 17 using musb-hdrc
    [  454.544545] usb 1-1: reset high-speed USB device number 17 using musb-hdrc
    [  454.894547] usb 1-1: reset high-speed USB device number 17 using musb-hdrc
    [  455.066183] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
    [  455.074524] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 00 00 00 08 00
    [  455.082153] blk_update_request: I/O error, dev sda, sector 0
    [  455.087929] Buffer I/O error on dev sda, logical block 0, async page read
    [  455.244547] usb 1-1: reset high-speed USB device number 17 using musb-hdrc
    [  455.594471] usb 1-1: reset high-speed USB device number 17 using musb-hdrc
    [  455.964416] usb 1-1: reset high-speed USB device number 17 using musb-hdrc
    [  456.314544] usb 1-1: reset high-speed USB device number 17 using musb-hdrc
    [  456.664601] usb 1-1: reset high-speed USB device number 17 using musb-hdrc
    [  457.014545] usb 1-1: reset high-speed USB device number 17 using musb-hdrc
    [  457.185812] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
    [  457.194103] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 00 00 00 08 00
    [  457.201813] blk_update_request: I/O error, dev sda, sector 0
    [  457.207564] Buffer I/O error on dev sda, logical block 0, async page read
    [  457.221922]  sda: unable to read partition table
    [  457.256558] sd 0:0:0:0: [sda] Attached SCSI removable disk
    [  457.434547] usb 1-1: reset high-speed USB device number 17 using musb-hdrc
    [  457.784545] usb 1-1: reset high-speed USB device number 17 using musb-hdrc
    [  457.955096] usb 1-1: unable to get BOS descriptor set
    [  457.960241] usb 1-1: device firmware changed
    [  457.972293] usb 1-1: USB disconnect, device number 17
    [  458.014469] scsi 0:0:0:0: rejecting I/O to offline device
    [  458.019971] scsi 0:0:0:0: [sda] killing request
    [  458.024778] scsi 0:0:0:0: [sda] UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
    [  458.032689] scsi 0:0:0:0: [sda] CDB: opcode=0x28 28 00 03 9d 07 80 00 00 08 00
    [  458.040026] blk_update_request: I/O error, dev sda, sector 60622720
    [  458.047328] Buffer I/O error on dev sda, logical block 7577840, async page read
    [  458.464427] usb 1-1: new high-speed USB device number 18 using musb-hdrc
    [  458.644789] usb-storage 1-1:1.0: USB Mass Storage device detected
    [  458.669391] scsi host0: usb-storage 1-1:1.0
    [  459.824547] usb 1-1: reset high-speed USB device number 18 using musb-hdrc
    [  460.036445] scsi 0:0:0:0: Direct-Access     Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6
    [  460.050347] sd 0:0:0:0: [sda] 60622848 512-byte logical blocks: (31.0 GB/28.9 GiB)
    [  460.082901] sd 0:0:0:0: [sda] Write Protect is off
    [  460.099175] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
    [  460.294548] usb 1-1: reset high-speed USB device number 18 using musb-hdrc
    [  460.644546] usb 1-1: reset high-speed USB device number 18 using musb-hdrc
    [  460.994545] usb 1-1: reset high-speed USB device number 18 using musb-hdrc
    [  461.344544] usb 1-1: reset high-speed USB device number 18 using musb-hdrc
    [  461.694546] usb 1-1: reset high-speed USB device number 18 using musb-hdrc
    [  462.044544] usb 1-1: reset high-speed USB device number 18 using musb-hdrc
    [  462.216184] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
    [  462.224528] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 00 00 00 08 00
    [  462.232155] blk_update_request: I/O error, dev sda, sector 0
    [  462.237934] Buffer I/O error on dev sda, logical block 0, async page read
    [  462.394547] usb 1-1: reset high-speed USB device number 18 using musb-hdrc
    [  462.744545] usb 1-1: reset high-speed USB device number 18 using musb-hdrc
    [  463.094545] usb 1-1: reset high-speed USB device number 18 using musb-hdrc
    [  463.444546] usb 1-1: reset high-speed USB device number 18 using musb-hdrc
    [  463.794545] usb 1-1: reset high-speed USB device number 18 using musb-hdrc
    [  464.144544] usb 1-1: reset high-speed USB device number 18 using musb-hdrc
    [  464.315138] usb 1-1: unable to get BOS descriptor set
    [  464.320281] usb 1-1: device firmware changed
    [  464.332179] usb 1-1: USB disconnect, device number 18
    [  464.337874] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
    [  464.337910] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 00 00 00 08 00
    [  464.337927] blk_update_request: I/O error, dev sda, sector 0
    [  464.337948] Buffer I/O error on dev sda, logical block 0, async page read
    [  464.338082]  sda: unable to read partition table
    [  464.435044] sd 0:0:0:0: [sda] Attached SCSI removable disk
    [  464.814427] usb 1-1: new high-speed USB device number 19 using musb-hdrc
    [  464.994770] usb-storage 1-1:1.0: USB Mass Storage device detected
    [  465.018894] scsi host0: usb-storage 1-1:1.0
    [  466.087324] scsi 0:0:0:0: Direct-Access     Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6
    [  466.101337] sd 0:0:0:0: [sda] 60622848 512-byte logical blocks: (31.0 GB/28.9 GiB)
    [  466.133221] sd 0:0:0:0: [sda] Write Protect is off
    [  466.149888] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
    [  466.314425] usb 1-1: reset high-speed USB device number 19 using musb-hdrc
    [  466.664546] usb 1-1: reset high-speed USB device number 19 using musb-hdrc
    [  466.835082] usb 1-1: unable to get BOS descriptor set
    [  466.840226] usb 1-1: device firmware changed
    [  466.852094] usb 1-1: USB disconnect, device number 19
    [  466.894642] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
    [  466.902938] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 00 00 00 08 00
    [  466.910665] blk_update_request: I/O error, dev sda, sector 0
    [  466.916416] Buffer I/O error on dev sda, logical block 0, async page read
    [  466.924333]  sda: unable to read partition table
    [  466.985375] sd 0:0:0:0: [sda] Read Capacity(10) failed: Result: hostbyte=0x01 driverbyte=0x00
    [  466.994006] sd 0:0:0:0: [sda] Sense not available.
    [  467.026061] sd 0:0:0:0: [sda] Write Protect is on
    [  467.039248] sd 0:0:0:0: [sda] Attached SCSI removable disk
    [  467.424548] usb 1-1: new high-speed USB device number 20 using musb-hdrc
    [  467.605242] usb-storage 1-1:1.0: USB Mass Storage device detected
    [  467.629902] scsi host0: usb-storage 1-1:1.0
    [  468.647293] scsi 0:0:0:0: Direct-Access     Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6
    [  468.661208] sd 0:0:0:0: [sda] 60622848 512-byte logical blocks: (31.0 GB/28.9 GiB)
    [  468.694512] sd 0:0:0:0: [sda] Write Protect is off
    [  468.714554] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
    [  468.914442] usb 1-1: reset high-speed USB device number 20 using musb-hdrc
    [  469.264546] usb 1-1: reset high-speed USB device number 20 using musb-hdrc
    [  469.614529] usb 1-1: reset high-speed USB device number 20 using musb-hdrc
    [  469.964545] usb 1-1: reset high-speed USB device number 20 using musb-hdrc
    [  470.314545] usb 1-1: reset high-speed USB device number 20 using musb-hdrc
    [  470.664544] usb 1-1: reset high-speed USB device number 20 using musb-hdrc
    [  470.835812] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
    [  470.844103] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 00 00 00 08 00
    [  470.851816] blk_update_request: I/O error, dev sda, sector 0
    [  470.857567] Buffer I/O error on dev sda, logical block 0, async page read
    [  471.014548] usb 1-1: reset high-speed USB device number 20 using musb-hdrc
    [  471.364545] usb 1-1: reset high-speed USB device number 20 using musb-hdrc
    [  471.714544] usb 1-1: reset high-speed USB device number 20 using musb-hdrc
    [  472.064546] usb 1-1: reset high-speed USB device number 20 using musb-hdrc
    [  472.414546] usb 1-1: reset high-speed USB device number 20 using musb-hdrc
    [  472.764545] usb 1-1: reset high-speed USB device number 20 using musb-hdrc
    [  472.935787] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
    [  472.944076] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 00 00 00 08 00
    [  472.951789] blk_update_request: I/O error, dev sda, sector 0
    [  472.957543] Buffer I/O error on dev sda, logical block 0, async page read
    [  472.971891]  sda: unable to read partition table
    [  473.006428] sd 0:0:0:0: [sda] Attached SCSI removable disk
    [  473.184546] usb 1-1: reset high-speed USB device number 20 using musb-hdrc
    [  473.534444] usb 1-1: reset high-speed USB device number 20 using musb-hdrc
    [  473.884332] usb 1-1: reset high-speed USB device number 20 using musb-hdrc
    [  474.234545] usb 1-1: reset high-speed USB device number 20 using musb-hdrc
    [  474.405473] usb 1-1: unable to get BOS descriptor set

  • Good progress, but it still has packet corruption problem, the SCSI driver is unable to communicate to the thumb drive. Still looks like signal integrity issue there.
  • Bin Liu said:
    Good progress, but it still has packet corruption problem, the SCSI driver is unable to communicate to the thumb drive. Still looks like signal integrity issue there.

    I removed a long USB cable from between the host and slave and I'm no longer seeing the the error.

    I can successfully transfer files on and off the thumb drive now.

    Is there a recommended ESD part to use?

  • I am a sw guy, but I see the AM335x GP EVM uses TPD4S012.
  • The TPD4S012 is recommended for OTG applications.  For USB 2.0 host-only operation I recommend the  TPD2E2U06 (single USB port) or the TPD4E1U06 (dual USB port).  You might also consider the TPD3S014 which has both the TVS diodes for the D+/D- lines, plus it has a current limiting switch for VBUS.

  • Brad Griffis said:

    The TPD4S012 is recommended for OTG applications.  For USB 2.0 host-only operation I recommend the  TPD2E2U06 (single USB port) or the TPD4E1U06 (dual USB port).  You might also consider the TPD3S014 which has both the TVS diodes for the D+/D- lines, plus it has a current limiting switch for VBUS.

    Thanks Brad and Bin!

  • I'd like to add to the excellent support provided by Bin and Brad here: If simply removing the ESD protection device fixes the issue, I'd suggest you review your USB layout. It sounds like it may be marginal with regard to signal integrity and the removal of the ESD protection device is freeing up needed margin.

    SPRAAR7 on TI.COM is great place to start.