Tool/software: Linux
Hi
I am looking for help in understanding how to enable USB-Ethernet in a kernel running on an am335x.
I am using a board derived from the BeagleBoneBlack presently running ti-processor-sdk-linux-am335x-evm-03.02.00.05-Linux-x86-Install.bin (using the kernel linux-4.4.19+gitAUTOINC+db0b54cdad-gdb0b54cdad)
The main constraints of the board are storage space (so the ROOTFS is minimal and will mostly be read only)
- and that there is no physical ethernet port on the board; which is why I am looking to enable USB-Ethernet
I have been digging about in the Sitara documentation and gleaning what I can about the process.
I have followed the instructions from processors.wiki.ti.com/.../Sitara_Linux_Program_the_eMMC_on_Beaglebone_Black
- to enable what I believe to be the necessary drivers and build them in to the kernel
This changes in menuconfig ended up looking like:
───────────────────────────────────────────────────────────────────────── --- USB Gadget Support [ ] Debugging messages (DEVELOPMENT) [ ] Debugging information files (DEVELOPMENT) [ ] Debugging information files in debugfs (DEVELOPMENT) (2) Maximum VBUS Power usage (2-500 mA) (32) Number of storage pipeline buffers USB Peripheral Controller ---> <*> USB Gadget Drivers (Ethernet Gadget (with CDC Ethernet support)) ---> Ethernet Gadget (with CDC Ethernet support) [*] RNDIS support [ ] Ethernet Emulation Model (EEM) support
and
< > Microtek X6USB scanner support │ │ < > USB/IP support │ │ <*> Inventra Highspeed Dual Role Controller (TI, ADI, AW, ...) │ │ MUSB Mode Selection (Gadget only mode) ---> │ │ *** Platform Glue Layer *** │ │ < > TUSB6010 │ │ < > OMAP2430 and onwards │ │ < > AM35x │ │ <*> TI DSPS platforms │ │ *** MUSB DMA mode *** │ │ [*] Disable DMA (always use PIO) │ │ <M> DesignWare USB3 DRD Core Support │ │ DWC3 Mode Selection (Dual Role mode) --->
After which the kernel boots with the following:
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.19-gdb0b54cdad (richard@richard-ubvm) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) ) #146 PREEMPT Fri May 5 16:36:30 AEST 2017 [ 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: Compumedics Argo [ 0.000000] cma: Reserved 24 MiB at 0x8d000000 [ 0.000000] Memory policy: Data cache writeback [ 0.000000] CPU: All CPU(s) started in SVC mode. [ 0.000000] AM335X ES2.1 (neon ) [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 64960 [ 0.000000] Kernel command line: console=ttyO0,115200n8 root=PARTUUID=b2422e7c-02 rw rootfstype=ext4 rootwait [ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes) [ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes) [ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes) [ 0.000000] Memory: 224924K/262144K available (6619K kernel code, 316K rwdata, 2348K rodata, 268K init, 297K bss, 12644K reserved, 24576K 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 : 0xd0800000 - 0xff800000 ( 752 MB) [ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .text : 0xc0008000 - 0xc08ca01c (8969 kB) [ 0.000000] .init : 0xc08cb000 - 0xc090e000 ( 268 kB) [ 0.000000] .data : 0xc090e000 - 0xc095d3d0 ( 317 kB) [ 0.000000] .bss : 0xc095d3d0 - 0xc09a78d8 ( 298 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.000019] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns [ 0.000044] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns [ 0.000058] OMAP clocksource: timer1 at 25000000 Hz [ 0.000263] clocksource_probe: no matching clocksources found [ 0.000485] Console: colour dummy device 80x30 [ 0.000519] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0' [ 0.000527] This ensures that you still see kernel messages. Please [ 0.000534] update your kernel commandline. [ 0.000555] Calibrating delay loop... 623.41 BogoMIPS (lpj=3117056) [ 0.048855] pid_max: default: 32768 minimum: 301 [ 0.049013] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.049029] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.049906] Initializing cgroup subsys io [ 0.049946] Initializing cgroup subsys memory [ 0.049994] Initializing cgroup subsys devices [ 0.050013] Initializing cgroup subsys freezer [ 0.050031] Initializing cgroup subsys perf_event [ 0.050047] Initializing cgroup subsys pids [ 0.050086] CPU: Testing write buffer coherency: ok [ 0.050586] Setting up static identity map for 0x80008200 - 0x80008258 [ 0.053314] devtmpfs: initialized [ 0.068635] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3 [ 0.087373] omap_hwmod: debugss: _wait_target_disable failed [ 0.145280] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.148028] pinctrl core: initialized pinctrl subsystem [ 0.149870] NET: Registered protocol family 16 [ 0.152553] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.178849] cpuidle: using governor ladder [ 0.208837] cpuidle: using governor menu [ 0.214577] OMAP GPIO hardware version 0.1 [ 0.227796] hw-breakpoint: debug architecture 0x4 unsupported. [ 0.269755] edma 49000000.edma: TI EDMA DMA engine driver [ 0.274825] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe [ 0.275005] media: Linux media interface: v0.10 [ 0.275086] Linux video capture interface: v2.00 [ 0.275158] pps_core: LinuxPPS API ver. 1 registered [ 0.275168] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 0.275213] PTP clock support registered [ 0.275292] EDAC MC: Ver: 3.0.0 [ 0.276764] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400 [ 0.278579] clocksource: Switched to clocksource timer1 [ 0.292684] NET: Registered protocol family 2 [ 0.293671] TCP established hash table entries: 2048 (order: 1, 8192 bytes) [ 0.293720] TCP bind hash table entries: 2048 (order: 1, 8192 bytes) [ 0.293755] TCP: Hash tables configured (established 2048 bind 2048) [ 0.293849] UDP hash table entries: 256 (order: 0, 4096 bytes) [ 0.293873] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) [ 0.294065] NET: Registered protocol family 1 [ 0.294589] RPC: Registered named UNIX socket transport module. [ 0.294607] RPC: Registered udp transport module. [ 0.294616] RPC: Registered tcp transport module. [ 0.294624] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.295815] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available [ 0.298279] futex hash table entries: 256 (order: -1, 3072 bytes) [ 0.309372] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.310595] NFS: Registering the id_resolver key type [ 0.310678] Key type id_resolver registered [ 0.310690] Key type id_legacy registered [ 0.310786] ntfs: driver 2.1.32 [Flags: R/O]. [ 0.311156] jffs2: version 2.2. (NAND) �© 2001-2006 Red Hat, Inc. [ 0.316030] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248) [ 0.316071] io scheduler noop registered [ 0.316089] io scheduler deadline registered [ 0.316143] io scheduler cfq registered (default) [ 0.317892] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568 [ 0.399598] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled [ 0.404952] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250 [ 0.975282] console [ttyS0] enabled [ 0.980348] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 159, base_baud = 3000000) is a 8250 [ 0.990401] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 160, base_baud = 3000000) is a 8250 [ 1.000257] [drm] Initialized drm 1.1.0 20060810 [ 1.014464] loop: module loaded [ 1.023895] libphy: Fixed MDIO Bus: probed [ 1.088669] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6 [ 1.094571] davinci_mdio 4a101000.mdio: no live phy, scanning all [ 1.100814] davinci_mdio: probe of 4a101000.mdio failed with error -5 [ 1.121631] cpsw 4a100000.ethernet: Detected MACID = 98:5d:ad:4e:d2:5e [ 1.145739] 47401300.usb-phy supply vcc not found, using dummy regulator [ 1.182988] 47401b00.usb-phy supply vcc not found, using dummy regulator [ 1.229804] using random self ethernet address [ 1.234123] using random host ethernet address [ 1.239323] usb0: HOST MAC 96:96:f9:53:68:1b [ 1.243592] usb0: MAC be:be:f1:5e:18:f1 [ 1.247341] using random self ethernet address [ 1.251682] using random host ethernet address [ 1.256084] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008 [ 1.262556] g_ether gadget: g_ether ready [ 1.267137] mousedev: PS/2 mouse device common for all mice [ 1.273557] i2c /dev entries driver [ 1.278476] cpuidle: enable-method property 'ti,am3352' found operations [ 1.286363] omap_hsmmc 48060000.mmc: Got CD GPIO [ 1.365962] mmc0: host does not support reading read-only switch, assuming write-enable [ 1.375734] mmc0: new high speed SDHC card at address 59b4 [ 1.382004] mmcblk0: mmc0:59b4 1.84 GiB [ 1.388054] mmcblk0: p1 p2 [ 1.450884] ledtrig-cpu: registered to indicate activity on CPUs [ 1.468847] NET: Registered protocol family 10 [ 1.479845] sit: IPv6 over IPv4 tunneling driver [ 1.485309] NET: Registered protocol family 17 [ 1.509007] Key type dns_resolver registered [ 1.513348] omap_voltage_late_init: Voltage driver support not added [ 1.556366] tps65217 0-0024: TPS65217 ID 0xe version 1.2 [ 1.568955] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write [ 1.575638] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz [ 1.599875] cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 625000 KHz [ 1.606987] cpu cpu0: dev_pm_opp_domain_set_rate: failed to find current OPP for freq 625000000 (-34) [ 1.640050] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed to: 600000 KHz [ 1.649274] hctosys: unable to open rtc device (rtc0) [ 1.694139] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null) [ 1.708676] VFS: Mounted root (ext4 filesystem) on device 179:2. [ 1.729576] devtmpfs: mounted [ 1.732931] Freeing unused kernel memory: 268K (c08cb000 - c090e000) [ 1.748582] This architecture does not have kernel memory protection. init started: BusyBox v1.24.1 (2017-02-09 12:59:11 AEDT) [ 1.926299] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered starting pid 61, tty '': '/etc/init.d/rcS' starting pid 93, tty '/dev/ttyS0': '/sbin/getty 115200 ttyS0'
I get the impression form this that it is almost bringing eveything up correctly
The problem is that the device is not recognised by my windows PC
- not even sufficiently to pass it through to the Virtual Linux box that I am using for development
What i can see:
- from device manager:
Windows has stopped this device because it has reported problems. (Code 43) A request for the USB device descriptor failed.
A subset of the information available from USB Device Tree Viewer:
=========================== USB Port10 =========================== Connection Status : 0x02 (Device failed enumeration) Device Description : Unknown USB Device (Device Descriptor Request Failed) Device Path : \\.\usb#vid_0000&pid_0002#5&33eb7b70&0&10#{a5dcbf10-6530-11d2-901f-00c04fb951ed} Device ID : USB\VID_0000&PID_0002\5&33EB7B70&0&10 Hardware IDs : USB\DEVICE_DESCRIPTOR_FAILURE Driver KeyName : {36fc9e60-c465-11cf-8056-444553540000}\0022 (GUID_DEVCLASS_USB)
For comparison when I run the am335xEVM or beaglebone I can see a HUB attached both to a Composite device and Serial device
It is likely that I have compromised the VID of how the board presents over USB?
I would be grateful for any suggestions for how to go about debugging this further
Thanks for any help.
Best regards,
Richard