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/AM3351: Enabling USB ACM mass storage in kernel

Part Number: AM3351


Tool/software: Linux

hi, i am using linux-4.9.41,

i enabled CONFIG_USB_G_ACM_MS=y for mas storage, acm but i dint get any entries in /dev 

please let me know how can i enable.

  • Hi,

    Our USB expert is out for a few days and will reply to this upon his return next week. I'm sorry for the delay.
  • please find attachment for defconfig, log file

    5074.tisdk_am335x-evm_defconfig.txt

    root@am335x-evm:/lib/modules/4.9.41-ge3a80a1c5c/kernel/drivers/usb/gadget/legacy# insmod g_acm_ms.ko file=/dev/mmcblk0p2
    [  864.125382] udc-core: couldn't find an available UDC - added [g_acm_ms] to list of pending drivers
    
    
    root@am335x-evm:/lib/modules/4.9.41-ge3a80a1c5c/kernel/drivers/usb/gadget/legacy# dmesg
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.9.41-ge3a80a1c5c (root@sridhar-ThinkCentre-M73) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #2 PREEM8
    [    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: TI AM335x BeagleBone Black
    [    0.000000] efi: Getting EFI parameters from FDT:
    [    0.000000] efi: UEFI not found.
    [    0.000000] cma: Reserved 48 MiB at 0x8a800000
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] On node 0 totalpages: 65536
    [    0.000000] free_area_init_node: node 0, pgdat c0c43ee4, node_mem_map cfda1000
    [    0.000000]   Normal zone: 576 pages used for memmap
    [    0.000000]   Normal zone: 0 pages reserved
    [    0.000000]   Normal zone: 65536 pages, LIFO batch:15
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM335X ES2.1 (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: 64960
    [    0.000000] Kernel command line: console=ttyO4,115200n8 root=PARTUUID=0001a6c8-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: 198320K/262144K available (7168K kernel code, 281K rwdata, 2356K rodata, 1024K init, 280K bss, 14672K reserved, 49152K )
    [    0.000000] Virtual kernel memory layout:
                       vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                       fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                       vmalloc : 0xd0800000 - 0xff800000   ( 752 MB)
                       lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
                       pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
                       modules : 0xbf000000 - 0xbfe00000   (  14 MB)
                         .text : 0xc0008000 - 0xc0800000   (8160 kB)
                         .init : 0xc0b00000 - 0xc0c00000   (1024 kB)
                         .data : 0xc0c00000 - 0xc0c46410   ( 282 kB)
                          .bss : 0xc0c46410 - 0xc0c8c674   ( 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 19200000 Hz
    [    0.000025] sched_clock: 32 bits at 19MHz, resolution 52ns, wraps every 111848106981ns
    [    0.000060] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 99544814920 ns
    [    0.000079] OMAP clocksource: timer1 at 19200000 Hz
    [    0.000397] clocksource_probe: no matching clocksources found
    [    0.000662] Console: colour dummy device 80x30
    [    0.000704] WARNING: Your 'console=ttyO4' has been replaced by 'ttyS4'
    [    0.000717] This ensures that you still see kernel messages. Please
    [    0.000728] update your kernel commandline.
    [    0.000763] Calibrating delay loop... 403.04 BogoMIPS (lpj=2015232)
    [    0.048353] pid_max: default: 32768 minimum: 301
    [    0.048575] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.048596] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.049896] CPU: Testing write buffer coherency: ok
    [    0.050432] Setting up static identity map for 0x80100000 - 0x80100060
    [    0.051926] EFI services will not be available.
    [    0.054453] devtmpfs: initialized
    [    0.078746] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    0.079337] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.079380] futex hash table entries: 256 (order: -1, 3072 bytes)
    [    0.084935] pinctrl core: initialized pinctrl subsystem
    [    0.086968] NET: Registered protocol family 16
    [    0.090638] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.116903] omap_hwmod: debugss: _wait_target_disable failed
    [    0.121098] omap_hwmod: d_can0: _wait_target_ready failed: -16
    [    0.121119] omap_hwmod: d_can0: cannot be enabled for reset (3)
    [    0.124374] omap_hwmod: d_can1: _wait_target_ready failed: -16
    [    0.124389] omap_hwmod: d_can1: cannot be enabled for reset (3)
    [    0.208340] cpuidle: using governor ladder
    [    0.238327] cpuidle: using governor menu
    [    0.246508] gpio gpiochip0: (gpio): added GPIO chardev (254:0)
    [    0.247145] gpiochip_setup_dev: registered GPIOs 0 to 31 on device: gpiochip0 (gpio)
    [    0.250179] OMAP GPIO hardware version 0.1
    [    0.251485] gpio gpiochip1: (gpio): added GPIO chardev (254:1)
    [    0.252071] gpiochip_setup_dev: registered GPIOs 32 to 63 on device: gpiochip1 (gpio)
    [    0.255449] omap_gpio 481ac000.gpio: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_gpio2_pins, deferrie
    [    0.256120] omap_gpio 481ae000.gpio: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_gpio3_pins, deferrie
    [    0.267350] omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/nandflash_pins_s0, deferrie
    [    0.273089] No ATAGs?
    [    0.273123] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.324602] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.325169] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/fixedregulator0[0]'
    [    0.331001] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring e
    [    0.331106] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring e
    [    0.331335] media: Linux media interface: v0.10
    [    0.331438] Linux video capture interface: v2.00
    [    0.331518] pps_core: LinuxPPS API ver. 1 registered
    [    0.331533] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.331578] PTP clock support registered
    [    0.331649] EDAC MC: Ver: 3.0.0
    [    0.333516] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.334094] Advanced Linux Sound Architecture Driver Initialized.
    [    0.336183] clocksource: Switched to clocksource timer1
    [    0.356546] NET: Registered protocol family 2
    [    0.357853] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.357921] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.357975] TCP: Hash tables configured (established 2048 bind 2048)
    [    0.358092] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.358128] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.358371] NET: Registered protocol family 1
    [    0.359032] RPC: Registered named UNIX socket transport module.
    [    0.359055] RPC: Registered udp transport module.
    [    0.359068] RPC: Registered tcp transport module.
    [    0.359080] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.359103] PCI: CLS 0 bytes, default 64
    [    0.360544] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [    0.364840] workingset: timestamp_bits=14 max_order=16 bucket_order=2
    [    0.380926] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.382594] NFS: Registering the id_resolver key type
    [    0.382652] Key type id_resolver registered
    [    0.382667] Key type id_legacy registered
    [    0.382747] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.386030] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
    [    0.386060] io scheduler noop registered
    [    0.386075] io scheduler deadline registered
    [    0.386553] io scheduler cfq registered (default)
    [    0.388889] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [    0.394146] pwm-backlight backlight: GPIO lookup for consumer enable
    [    0.394169] pwm-backlight backlight: using device tree for GPIO lookup
    [    0.394189] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [    0.394202] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [    0.394214] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    0.394228] pwm-backlight backlight: lookup for GPIO enable failed
    [    0.394260] backlight supply power not found, using dummy regulator
    [    0.396044] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/clk_mcasp0[0]' - status (0)
    [    0.517213] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [    0.524170] 44e09000.serial: ttyS1 at MMIO 0x44e09000 (irq = 94, base_baud = 3000000) is a 8250
    [    0.525982] 48022000.serial: ttyS2 at MMIO 0x48022000 (irq = 95, base_baud = 3000000) is a 8250
    [    0.527825] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 96, base_baud = 3000000) is a 8250
    [    1.211203] console [ttyS4] enabled
    [    1.217755] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
    [    1.224664] [drm] Initialized
    [    1.229647] panel panel: found backlight
    [    1.233614] panel panel: GPIO lookup for consumer enable
    [    1.233625] panel panel: using device tree for GPIO lookup
    [    1.233644] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/panel[0]'
    [    1.233657] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/panel[0]'
    [    1.233669] panel panel: using lookup tables for GPIO lookup
    [    1.233684] panel panel: lookup for GPIO enable failed
    [    1.235038] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    1.241802] [drm] No driver support for vblank timestamp query.
    [    1.269712] tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000104): Sync lost
    [    1.302046] Console: switching to colour frame buffer device 160x50
    [    1.346811] tilcdc 4830e000.lcdc: fb0:  frame buffer device
    [    1.402132] brd: module loaded
    [    1.417933] loop: module loaded
    [    1.425661] libphy: Fixed MDIO Bus: probed
    [    1.434357] mousedev: PS/2 mouse device common for all mice
    [    1.440714] i2c /dev entries driver
    [    1.447642] cpuidle: enable-method property 'ti,am3352' found operations
    [    1.455949] omap_hsmmc 48060000.mmc: GPIO lookup for consumer cd
    [    1.455965] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
    [    1.456010] of_get_named_gpiod_flags: parsed 'cd-gpios' property of node '/ocp/mmc@48060000[0]' - status (0)
    [    1.456116] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    1.460946] omap_hsmmc 48060000.mmc: GPIO lookup for consumer wp
    [    1.460959] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
    [    1.460976] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@48060000[0]'
    [    1.460990] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@48060000[0]'
    [    1.461001] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
    [    1.461015] omap_hsmmc 48060000.mmc: lookup for GPIO wp failed
    [    1.518762] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/led2[0]' - status (0)
    [    1.519112] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/led4[0]' - status (0)
    [    1.519355] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/led5[0]' - status (0)
    [    1.520136] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.537224] NET: Registered protocol family 10
    [    1.543783] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    1.551580] NET: Registered protocol family 17
    [    1.556622] Key type dns_resolver registered
    [    1.561309] omap_voltage_late_init: Voltage driver support not added
    [    1.577902] gpio gpiochip2: (gpio): added GPIO chardev (254:2)
    [    1.578557] gpiochip_setup_dev: registered GPIOs 64 to 95 on device: gpiochip2 (gpio)
    [    1.582049] gpio gpiochip3: (gpio): added GPIO chardev (254:3)
    [    1.582637] gpiochip_setup_dev: registered GPIOs 96 to 127 on device: gpiochip3 (gpio)
    [    1.585929] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [    1.591331] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [    1.597656] gpiochip_find_base: found new base at 510
    [    1.597726] gpio gpiochip4: (omap-gpmc): added GPIO chardev (254:4)
    [    1.598507] gpiochip_setup_dev: registered GPIOs 510 to 511 on device: gpiochip4 (omap-gpmc)
    [    1.600231] omap2-nand 8000000.nand: GPIO lookup for consumer rb
    [    1.600251] omap2-nand 8000000.nand: using device tree for GPIO lookup
    [    1.600308] of_get_named_gpiod_flags: parsed 'rb-gpios' property of node '/ocp/gpmc@50000000/nand@0,0[0]' - status (0)
    [    1.600601] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xdc
    [    1.607109] nand: Unknown W29N04GV
    [    1.610540] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
    [    1.618335] nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
    [    1.623841] 10 ofpart partitions found on MTD device omap2-nand.0
    [    1.630071] Creating 10 MTD partitions on "omap2-nand.0":
    [    1.635602] 0x000000000000-0x000000020000 : "NAND.SPL"
    [    1.643857] 0x000000020000-0x000000040000 : "NAND.SPL.backup1"
    [    1.652736] 0x000000040000-0x000000060000 : "NAND.SPL.backup2"
    [    1.658752] mmc0: host does not support reading read-only switch, assuming write-enable
    [    1.667119] mmc0: new high speed SDHC card at address aaaa
    [    1.668182] mmcblk0: mmc0:aaaa SS08G 7.40 GiB 
    [    1.675183]  mmcblk0: p1 p2
    [    1.686850] 0x000000060000-0x000000080000 : "NAND.SPL.backup3"
    [    1.694910] 0x000000080000-0x0000000c0000 : "NAND.u-boot-spl-os"
    [    1.703375] 0x0000000c0000-0x0000004c0000 : "NAND.u-boot"
    [    1.711870] 0x0000004c0000-0x0000004e0000 : "NAND.u-boot-env"
    [    1.719989] 0x0000004e0000-0x000000500000 : "NAND.u-boot-env.backup1"
    [    1.728802] 0x000000500000-0x000000d00000 : "NAND.kernel"
    [    1.738142] 0x000000d00000-0x000020300000 : "NAND.file-system"
    [    1.744023] mtd: partition "NAND.file-system" extends beyond the end of device "omap2-nand.0" -- size truncated to 0x1f300000
    [    1.883499] random: fast init done
    [    1.899155] tps65217 0-0024: TPS65217 ID 0xe version 1.2
    [    1.905043] i2c i2c-0: Failed to register i2c client tps65217 at 0x24 (-16)
    [    1.912127] i2c i2c-0: of_i2c: Failure registering /ocp/i2c@44e0b000/tps65217@24
    [    1.919658] i2c i2c-0: Failed to create I2C device for /ocp/i2c@44e0b000/tps65217@24
    [    1.927525] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [    1.935810] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 40 kHz
    [    1.943082] cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 404210 KHz
    [    1.950696] cpu cpu0: dev_pm_opp_set_rate: failed to find current OPP for freq 404210526 (-34)
    [    1.961827] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed to: 300000 KHz
    [    1.971990] hctosys: unable to open rtc device (rtc0)
    [    1.978297] ALSA device list:
    [    1.981308]   No soundcards found.
    [    2.664043] EXT4-fs (mmcblk0p2): recovery complete
    [    2.670268] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [    2.678683] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [    2.697972] devtmpfs: mounted
    [    2.706011] Freeing unused kernel memory: 1024K (c0b00000 - c0c00000)
    [    2.987323] systemd[1]: System time before build time, advancing clock.
    [    3.112514] systemd[1]: systemd 230 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCR)
    [    3.132349] systemd[1]: Detected architecture arm.
    [    3.181029] systemd[1]: Set hostname to <am335x-evm>.
    [    3.666833] systemd[1]: [/lib/systemd/system/gadget-init.service:15] Unknown lvalue 'ExecStopPre' in section 'Service'
    [    4.216705] systemd[1]: sysinit.target: Found ordering cycle on sysinit.target/start
    [    4.224597] systemd[1]: sysinit.target: Found dependency on alignment.service/start
    [    4.232647] systemd[1]: sysinit.target: Found dependency on basic.target/start
    [    4.240017] systemd[1]: sysinit.target: Found dependency on sysinit.target/start
    [    4.247641] systemd[1]: sysinit.target: Breaking ordering cycle by deleting job alignment.service/start
    [    4.257262] systemd[1]: alignment.service: Job alignment.service/start deleted to break ordering cycle starting with sysinit.target/start
    [    5.253319] cryptodev: loading out-of-tree module taints kernel.
    [    5.305318] cryptodev: driver 1.8 loaded.
    [    5.449352] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
    [    6.362233] systemd-journald[96]: Received request to flush runtime journal from PID 1
    [   10.940534] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [   11.036793] rtc rtc0: 44e3e000.rtc: dev (253:0)
    [   11.036877] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
    [   13.477494] omap_hwmod: pruss: _wait_target_ready failed: -16
    [   13.601665] pruss-soc-bus 4a326000.pruss-soc-bus: use pm_runtime_put_sync_suspend() in driver?
    [   13.684676] pruss-soc-bus 4a326000.pruss-soc-bus: couldn't enable module
    [   13.735824] pruss-soc-bus: probe of 4a326000.pruss-soc-bus failed with error -16
    [   13.961513] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
    [   14.203673] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
    [   14.294731] omap-aes 53500000.aes: will run requests pump with realtime priority
    [   14.475301] omap_hwmod: gfx: failed to hardreset
    [   14.746777] pvrsrvkm 56000000.sgx: Unable to reset SGX!
    [   14.883052] omap_hwmod: gfx: _wait_target_ready failed: -16
    [   15.026445] pvrsrvkm 56000000.sgx: use pm_runtime_put_sync_suspend() in driver?
    [   15.148779] PVR_K:(Error): EnableSGXClocks: pm_runtime_get_sync failed (16)
    [   15.155839] PVR_K:(Error): SysInitialise: Failed to Enable system clocks (175)
    [   16.940089] remoteproc remoteproc0: wkup_m3 is available
    [   18.017771] remoteproc remoteproc0: powering up wkup_m3
    [   18.047333] Bluetooth: Core ver 2.22
    [   18.134895] NET: Registered protocol family 31
    [   18.196911] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 224344
    [   18.197270] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x192
    [   18.197955] remoteproc remoteproc0: remote processor wkup_m3 is now up
    [   18.278429] PM: bootloader does not support rtc-only!
    [   18.742537] Bluetooth: HCI device and connection manager initialized
    [   18.742585] Bluetooth: HCI socket layer initialized
    [   18.742610] Bluetooth: L2CAP socket layer initialized
    [   18.742724] Bluetooth: SCO socket layer initialized
    [   18.813280] asoc-simple-card sound: asoc_simple_card_dai_link_of: Can't find simple-audio-card,codec DT node
    [   18.813311] asoc-simple-card sound: parse error -22
    [   18.813374] asoc-simple-card: probe of sound failed with error -22
    [   21.446634] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    [   25.522162] random: crng init done
    [   26.082557] NET: Registered protocol family 15
    [   28.859158] Initializing XFRM netlink socket
    [   29.577382] udc-core: couldn't find an available UDC - added [g_multi] to list of pending drivers
    [  864.125382] udc-core: couldn't find an available UDC - added [g_acm_ms] to list of pending drivers
    [  940.852871] g_multi: Unknown symbol rndis_borrow_net (err 0)
    [  955.990770] udc-core: couldn't find an available UDC - added [g_serial] to list of pending drivers
    
    

  • Hi,

    The kernel log shows the USB drivers are not loaded.
    After booted your board, please run the following script and provide its output log.

    #!/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
    

  • 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.
  • hi Bin liu,
    in my device tree (am335x-bone-common.dtsi) usb setting and in my customized file system gadget_init service file are missed.
    i added those files, now it's emulating /dev/ttyACM0 and boot partition as a mas storage in linux.

    i have below problems.
    1. i am not able to copy files into boot(mas storage) partition,it is giving error(read only file system)
    2. i want to mount boot partition in rootfs to copy data from other mechine using mas storage (boot)partition . is it possible?
    3. how to enable acm, mas storage with nand falsh.
    4. acm, mas storage devices are not emulating in windows 10, please let me know what could be the issue.

    thankyou.

  • Glad the reported issue is solved, thanks for the update.

    Please mark this thread as resolved, and create new threads for your new questions. Please create one thread for each of the questions.
    There is a orange "+ Ask for related question" button on the top-right of this page to help you create a new thread.
  • Part Number: AM3351

    Tool/software: Linux

    hi, i enabled cdc mas storage but  not able to copy files into boot(mas storage) partition,it is giving error(read only file system).

  • Part Number: AM3351

    Tool/software: Linux

    hi, in linux(ubuntu 14.04) cdc acm, mas storage devices are emulating,

    but in windows 10 its not emulating, please let me know what could be the issue.

  • issue fixed.

    modified script file in /usr/bin/gadget_init.sh

    #!/bin/sh
    
    # Based off:
    # https://github.com/RobertCNelson/boot-scripts/blob/master/boot/am335x_evm.sh
    
    # Assume some defaults
    SERIAL_NUMBER="1234BBBK5678"
    PRODUCT="am335x_evm"
    manufacturer="ti.com"
    
    # Read serial numberfrom the eerpom
    eeprom="/sys/bus/i2c/devices/0-0050/eeprom"
    if [ -f ${eeprom} ] ; then
        SERIAL_NUMBER=$(hexdump -e '8/1 "%c"' ${eeprom} -n 28 | cut -b 17-28)
        PRODUCT="BeagleBoneBlack"
        manufacturer="BeagleBoard.org"
    fi
    
    echo "SERIAL_NUMBER = ${SERIAL_NUMBER}"
    echo "PRODUCT = ${PRODUCT}"
    
    
    #mac_address="/proc/device-tree/ocp/ethernet@4a100000/slave@4a100300/mac-address"
    #[ -r "$mac_address" ] || exit 0
    
    #host_addr=$(/usr/bin/hexdump -v -e '5/1 "%02X:" 1/1 "%02X"' "$mac_address")
    #echo "host_addr = ${host_addr}"
    
    # Set the g_multi parameters
    #g_defaults="cdrom=0 ro=1 stall=0 removable=1 nofua=1"
    g_defaults="cdrom=0 stall=0 removable=1 nofua=1"
    
    
    g_product="iSerialNumber=${SERIAL_NUMBER} iManufacturer=${manufacturer} iProduct=${PRODUCT}"
    
    #g_network="host_addr=${host_addr}"
    
    g_storage="file=/dev/mmcblk0p1"
    
    #modprobe g_multi ${g_storage} ${g_defaults} ${g_product} ${g_network}
    modprobe g_acm_ms ${g_storage} ${g_defaults} ${g_product} 
    
    
    # Bring up the USB network interface
    #ifup usb0
    

  • issue fixed.

    modified script file in /usr/bin/gadget_init.sh

    # Set the g_multi parameters
    #g_defaults="cdrom=0 ro=1 stall=0 removable=1 nofua=1"
    g_defaults="cdrom=0 stall=0 removable=1 nofua=1"