This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/PROCESSOR-SDK-AM335X: LAN9514 not enumerating

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

Tool/software: Linux

Hey Team !

I am trying to interface lan9514 with am335x but it is not getting enumerated .Can you give some light to move forward. I am attaching the log of my boot process. The device tree entity which i have used is like

&usb0 {
        status = "okay";
        dr_mode = "host";
};

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.4.91-g9d9bc78b62 (dell@dell-Inspiron-3543) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.18
[    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] Machine model: TI AM335x EVM
[    0.000000] cma: Reserved 48 MiB at 0x9d000000
[    0.000000] Memory policy: Data cache writeback
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM335X ES2.1 (sgx neon )
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129920
[    0.000000] Kernel command line: console=tty0 console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait
[    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: 459300K/524288K available (7231K kernel code, 291K rwdata, 2416K rodata, 276K init, 275K bss, 15836K reserved, 49152K c)
[    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 - 0xc0974034   (9649 kB)
[    0.000000]       .init : 0xc0975000 - 0xc09ba000   ( 276 kB)
[    0.000000]       .data : 0xc09ba000 - 0xc0a02d40   ( 292 kB)
[    0.000000]        .bss : 0xc0a02d40 - 0xc0a47be0   ( 276 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 25000000 Hz
[    0.000014] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
[    0.000031] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.000040] OMAP clocksource: timer1 at 25000000 Hz
[    0.000185] clocksource_probe: no matching clocksources found
[    0.000357] Console: colour dummy device 80x30
[    0.001098] console [tty0] enabled
[    0.001133] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
[    0.001159] This ensures that you still see kernel messages. Please
[    0.001185] update your kernel commandline.
[    0.001220] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
[    0.089241] pid_max: default: 32768 minimum: 301
[    0.089369] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.089403] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090049] Initializing cgroup subsys io
[    0.090107] Initializing cgroup subsys memory
[    0.090159] Initializing cgroup subsys devices
[    0.090191] Initializing cgroup subsys freezer
[    0.090223] Initializing cgroup subsys perf_event
[    0.090252] Initializing cgroup subsys pids
[    0.090296] CPU: Testing write buffer coherency: ok
[    0.090692] Setting up static identity map for 0x80008200 - 0x80008260
[    0.092554] devtmpfs: initialized
[    0.102867] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.116141] omap_hwmod: debugss: _wait_target_disable failed
[    0.170898] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.170981] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.174471] pinctrl core: initialized pinctrl subsystem
[    0.175687] NET: Registered protocol family 16
[    0.177697] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.199219] cpuidle: using governor ladder
[    0.229207] cpuidle: using governor menu
[    0.233183] OMAP GPIO hardware version 0.1
[    0.242832] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.286384] edma 49000000.edma: TI EDMA DMA engine driver
[    0.289797] SCSI subsystem initialized
[    0.290113] usbcore: registered new interface driver usbfs
[    0.290209] usbcore: registered new interface driver hub
[    0.290343] usbcore: registered new device driver usb
[    0.290760] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring e
[    0.290857] omap_i2c 4802a000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c1_pins, deferring e
[    0.291012] media: Linux media interface: v0.10
[    0.291082] Linux video capture interface: v2.00
[    0.291147] pps_core: LinuxPPS API ver. 1 registered
[    0.291172] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.291232] PTP clock support registered
[    0.291296] EDAC MC: Ver: 3.0.0
[    0.292325] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[    0.292674] Advanced Linux Sound Architecture Driver Initialized.
[    0.294332] clocksource: Switched to clocksource timer1
[    0.303685] NET: Registered protocol family 2
[    0.304510] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.304587] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.304645] TCP: Hash tables configured (established 4096 bind 4096)
[    0.304747] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.304785] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.304940] NET: Registered protocol family 1
[    0.305324] RPC: Registered named UNIX socket transport module.
[    0.305367] RPC: Registered udp transport module.
[    0.305390] RPC: Registered tcp transport module.
[    0.305414] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.306342] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[    0.315113] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.315886] NFS: Registering the id_resolver key type
[    0.315981] Key type id_resolver registered
[    0.316005] Key type id_legacy registered
[    0.316095] ntfs: driver 2.1.32 [Flags: R/O].
[    0.320820] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    0.320900] io scheduler noop registered
[    0.320931] io scheduler deadline registered
[    0.321086] io scheduler cfq registered (default)
[    0.322282] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[    0.325066] backlight supply power not found, using dummy regulator
[    0.377083] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
[    0.380709] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
[    1.022879] console [ttyS0] enabled
[    1.027582] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 159, base_baud = 3000000) is a 8250
[    1.037478] [drm] Initialized drm 1.1.0 20060810
[    1.042997] panel panel: pins are not configured
[    1.049050] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.055848] [drm] No driver support for vblank timestamp query.
[    1.085108] Console: switching to colour frame buffer device 100x30
[    1.095705] tilcdc 4830e000.lcdc: fb0:  frame buffer device
[    1.124504] [drm] Initialized tilcdc 1.0.0 20121205 on minor 0
[    1.137926] loop: module loaded
[    1.144664] pinctrl-single 44e10800.pinmux: pin 44e10954.0 already requested by 44e10800.pinmux; cannot claim for 48030000.spi
[    1.159599] pinctrl-single 44e10800.pinmux: pin-85 (48030000.spi) status -22
[    1.168413] pinctrl-single 44e10800.pinmux: could not request pin 85 (44e10954.0) from group myspi0_pins_default  on device pinctrl-single
[    1.184274] omap2_mcspi 48030000.spi: Error applying setting, reverse things back
[    1.196736] libphy: Fixed MDIO Bus: probed
[    1.264352] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[    1.272357] davinci_mdio 4a101000.mdio: detected phy mask ffffffef
[    1.281116] libphy: 4a101000.mdio: probed
[    1.287016] davinci_mdio 4a101000.mdio: phy[4]: device 4a101000.mdio:04, driver SMSC LAN8710/LAN8720
[    1.300540] cpsw 4a100000.ethernet: Detected MACID = 98:5d:ad:30:cf:76
[    1.309344] cpsw 4a100000.ethernet: cpts: overflow check period 850
[    1.318544] usbcore: registered new interface driver rndis_wlan
[    1.326607] usbcore: registered new interface driver cdc_ether
[    1.334385] usbcore: registered new interface driver smsc95xx
[    1.341997] usbcore: registered new interface driver rndis_host
[    1.350085] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.358485] ehci-pci: EHCI PCI platform driver
[    1.364749] ehci-platform: EHCI generic platform driver
[    1.371865] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.380108] usbcore: registered new interface driver usb-storage
[    1.389837] 47401300.usb-phy supply vcc not found, using dummy regulator
[    1.400735] musb-hdrc musb-hdrc.0.auto: Failed to request rx1.
[    1.408587] musb-hdrc musb-hdrc.0.auto: musb_init_controller failed with status -517
[    1.419227] 47401b00.usb-phy supply vcc not found, using dummy regulator
[    1.430066] musb-hdrc musb-hdrc.1.auto: Failed to request rx1.
[    1.437942] musb-hdrc musb-hdrc.1.auto: musb_init_controller failed with status -517
[    1.453454] mousedev: PS/2 mouse device common for all mice
[    1.461714] i2c /dev entries driver
[    1.468116] cpuidle: enable-method property 'ti,am3352' found operations
[    1.554995] ledtrig-cpu: registered to indicate activity on CPUs
[    1.565619] NET: Registered protocol family 10
[    1.573084] sit: IPv6 over IPv4 tunneling driver
[    1.580228] NET: Registered protocol family 17
[    1.586818] Key type dns_resolver registered
[    1.592912] omap_voltage_late_init: Voltage driver support not added
[    1.609677] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.623524] mmc0: new high speed SDHC card at address aaaa
[    1.630872] tps65910 0-002d: No interrupt support, no core IRQ
[    1.638929] mmcblk0: mmc0:aaaa SU04G 3.69 GiB
[    1.645823] tps65910 0-002d: Error in configuring external control EN1
[    1.654807] tps65910 0-002d: Failed to initialise ext control config
[    1.662902]  mmcblk0: p1 p2
[    1.667716] tps65910 0-002d: Error in configuring external control EN1
[    1.676815] tps65910 0-002d: Failed to initialise ext control config
[    1.686415] vio: failed to enable
[    1.693511] tps65910 0-002d: failed to register tps65910-pmic regulator
[    1.702116] tps65910-pmic: probe of tps65910-pmic failed with error -121
[    1.712826] rtc-ds1307 0-006f: rtc core: registered mcp7940x as rtc0
[    1.721125] rtc-ds1307 0-006f: 64 bytes nvram
[    1.730578] pinctrl-single 44e10800.pinmux: pin 44e10954.0 already requested by 44e10800.pinmux; cannot claim for 0-0070
[    1.744964] pinctrl-single 44e10800.pinmux: pin-85 (0-0070) status -22
[    1.753260] pinctrl-single 44e10800.pinmux: could not request pin 85 (44e10954.0) from group gpio_pins  on device pinctrl-single
[    1.768332] pca954x 0-0070: Error applying setting, reverse things back
[    1.777010] pca954x 0-0070: probe failed
[    1.783463] input: ft5x06_ts as /devices/platform/ocp/44e0b000.i2c/i2c-0/0-0038/input/input0
[    1.794472] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    1.803238] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
[    1.810817] mmc1: MAN_BKOPS_EN bit is not set
[    1.817281] backlight supply power not found, using dummy regulator
[    1.827541] mmc1: new high speed MMC card at address 0001
[    1.839521] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
[    1.847854] mmcblk1: mmc1:0001 004G60 3.69 GiB
[    1.854476] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 1
[    1.864397] mmcblk1boot0: mmc1:0001 004G60 partition 1 2.00 MiB
[    1.872377] mmcblk1boot1: mmc1:0001 004G60 partition 2 2.00 MiB
[    1.881028]
[    1.881028] ++++++++++++++hub_probe++++++++++++++
[    1.891572] hub 1-0:1.0: USB hub found
[    1.897263]  mmcblk1: p1 p2
[    1.902030] hub 1-0:1.0: 1 port detected
[    1.915891] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.923498] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 2
[    1.933951]
[    1.933951] ++++++++++++++hub_probe++++++++++++++
[    1.943761] hub 2-0:1.0: USB hub found
[    1.949207] hub 2-0:1.0: 1 port detected
[    1.955733] backlight supply power not found, using dummy regulator
[    1.965122] rtc-ds1307 0-006f: setting system clock to 2018-08-28 12:53:06 UTC (1535460786)
[    1.978457] lis3_reg: disabling
[    1.983407] ALSA device list:
[    1.988136]   No soundcards found.
[    2.139319] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    2.148888] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    2.161174] devtmpfs: mounted
[    2.165867] Freeing unused kernel memory: 276K
[    2.171784] This architecture does not have kernel memory protection.

with regards

pranav




 

  • Hi Pranav,

    Is that only lan9514 not enumerate, or the host port doesn't enumerate any other  device at all?

    Please run the following script on your board after booted Linux, and provide the output.

    #!/bin/bash
    #
    # Util to check USB subsystem for Linux kernel 3.12+ on TI Sitara devices
    #
    # Copyright (C) 2018 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.7
    
    
    ### 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"
            elif [ "${_hw#*AM18x}" != "$_hw" ]; then
                PLATFORM="omapl1"
            else
                PLATFORM=$_hw
            fi
        }
    
        DBG_PRINT $PLATFORM
        case $PLATFORM in
            "am335x")
                USB0='/ocp/usb@47400000/usb@47401000'
                USB1='/ocp/usb@47400000/usb@47401800'
                return 0;;
            "am437x")
                USB0='/ocp/omap_dwc3@48380000/usb@48390000'
                USB1='/ocp/omap_dwc3@483c0000/usb@483d0000'
                return 0;;
            "am57x")
                USB0='/ocp/omap_dwc3_1@48880000/usb@48890000'
                USB1='/ocp/omap_dwc3_2@488c0000/usb@488d0000'
                return 0;;
            "keystone")
                USB0='/ocp/omap_dwc3_1@48880000/usb@48890000'
                USB1='/ocp/omap_dwc3_2@488c0000/usb@488d0000'
                return 0;;
            "omapl1")
                USB0='/soc@1c00000/usb@200000'
                USB1=''
                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."
    
        case $PLATFORM in
            am335x)
                check_kernel_config CONFIG_USB_MUSB_DSPS
                [ $? != 1 ] || {
                    check_module 'usb/musb/musb_dsps'
                    check_module 'usb/musb/musb_am335x'
                }
                ;;
            omapl1)
                check_kernel_config CONFIG_USB_MUSB_DA8XX
                [ $? != 1 ] || check_module 'usb/musb/da8xx'
                ;;
        esac
    
        case $PLATFORM in
            am335x)
                check_kernel_config CONFIG_AM335X_PHY_USB
                [ $? != 1 ] || {
                    check_module 'usb/phy/phy-am335x'
                    check_module 'usb/phy/phy-am335x-control'
                }
                ;;
            omapl1)
                check_kernel_config CONFIG_NOP_USB_XCEIV
                [ $? != 1 ] || check_module 'usb/phy/phy-generic'
                ;;
        esac
    
        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
        local _ent
        local _sts
    
        case $PLATFORM in
        am335x)
            _dt_dir='/proc/device-tree/ocp/usb@47400000'
            _ent='. control@44e10620 usb-phy@47401300 usb-phy@47401b00 dma-controller@47402000'
            ;;
        omapl1)
            _dt_dir='/proc/device-tree/soc@1c00000'
            _ent='usb@200000 chip-controller@1417c/usb-phy usb@200000/dma-controller@201000'
            ;;
        *)
            return ;;
        esac
    
        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"
    fi
    
    # check kernel configs
    
    if [ -f /proc/config.gz ]; then
        case $PLATFORM in
            am335x | omapl1) check_musb_drivers;;
            am437x | am57x | keystone) check_dwc3_drivers;;
            *)
                echo "Error: unsupported platform $PLATFORM"
                exit 5;;
        esac
    else
        echo "Error: /proc/config.gz not found"
    fi
    
    case $PLATFORM in
        am335x | omapl1)
            _debugfs=`sed -ne 's/^debugfs \(.*\) debugfs.*/\1/p' /proc/mounts`
            [ -z "$_debugfs" ] ||
                grep -i 'power\|devctl\|testmode' ${_debugfs}/musb-hdrc*/regdump
            ;;
    esac
    
    # 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
        [ -n "$_usb" ] || continue
    
        _usb_dir="/proc/device-tree/${_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 | omapl1) 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
    

  • Hai ,

    Thank you for your response.
    Lan9514 is only not getting enumerated ,so the usb device and ethernet which which is there corresponding to the chip is not comming up.

    Below is the output from the script.
    --------------------------------------------
    USB is initialized
    Warning: CONFIG_USB_MUSB_DUAL_ROLE undefined.
    /sys/kernel/debug/musb-hdrc.0.auto/regdump:Power : e0
    /sys/kernel/debug/musb-hdrc.0.auto/regdump:Testmode : 00
    /sys/kernel/debug/musb-hdrc.0.auto/regdump:DevCtl : 19
    /sys/kernel/debug/musb-hdrc.1.auto/regdump:Power : e0
    /sys/kernel/debug/musb-hdrc.1.auto/regdump:Testmode : 00
    /sys/kernel/debug/musb-hdrc.1.auto/regdump:DevCtl : 19
    usb@47401000: host, okay
    usb@47401800: host, okay

    The gadget driver is built-in
    Gadget Kernel Config: g_ether is enabled
    gadget driver loaded: (none)
  • Pranav,

    The log shows the USB controller seems to be in the correct state to enumerate any device attached.
    Other than the lan9514 device, have you tried to attach any other usb device to see if it get enumerated?

    By the way, the kernel boot log you provided shows EHCI driver is loaded. You shouldn't enable EHCI driver, as AM335x doesn't have an EHCI controller.
  • Hi,

    I haven’t heard back from you, I’m assuming you were able to resolve your issue. If not, just post a reply below (or create a new thread if the thread has locked due to time-out). thanks.
  • Thanks for the response and sorry for being late . The issue got resolved ,in my hardware USBRBIAS pin was floating that was the mistake.
  • Hi Pranav,

    Thanks for the update, I am glad to hear the issue is solved.
    Please kindly click the "This resolved my issue" button. Thanks.