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.

AM3352: How to turn on/off usb power in linux?

Genius 13655 points
Part Number: AM3352


Hello Champs,

Customer ran below commands and failed to turn on/off usb power in linux.

echo "0" > "/sys/bus/usb/devices/usb1/power/autosuspend_delay_ms"
echo "auto" > "/sys/bus/usb/devices/usb1/power/control"

Processor SDK Linux 06_01_00_08 with linux kernel: 4.19.59;

Log:

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.19.59-g5f8c1c6121 (root@laifuqi-vm) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03)) #103 PREEMPT Tue Oct 13 16:22:23 CST 2020
[ 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 EVM
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 48 MiB at 0x9d000000
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] AM335X ES2.1 (neon)
[ 0.000000] random: get_random_bytes called from start_kernel+0x7c/0x41c with crng_init=0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 129920
[ 0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/ram rw init=linuxrc
[ 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: 449168K/524288K available (9216K kernel code, 331K rwdata, 2904K rodata, 1024K init, 276K bss, 25968K 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 : 0x(ptrval) - 0x(ptrval) (10208 kB)
[ 0.000000] .init : 0x(ptrval) - 0x(ptrval) (1024 kB)
[ 0.000000] .data : 0x(ptrval) - 0x(ptrval) ( 332 kB)
[ 0.000000] .bss : 0x(ptrval) - 0x(ptrval) ( 277 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] IRQ: Found an INTC at 0x(ptrval) (revision 5.0) with 128 interrupts
[ 0.000000] OMAP clockevent source: timer2 at 25000000 Hz
[ 0.000018] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
[ 0.000039] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[ 0.000051] OMAP clocksource: timer1 at 25000000 Hz
[ 0.000495] timer_probe: no matching timers found
[ 0.000706] Console: colour dummy device 80x30
[ 0.000769] Calibrating delay loop... 795.44 BogoMIPS (lpj=3977216)
[ 0.089049] pid_max: default: 32768 minimum: 301
[ 0.089282] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.089297] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.090176] CPU: Testing write buffer coherency: ok
[ 0.091164] Setting up static identity map for 0x80100000 - 0x80100060
[ 0.091326] rcu: Hierarchical SRCU implementation.
[ 0.091716] EFI services will not be available.
[ 0.093219] devtmpfs: initialized
[ 0.101914] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 0.102343] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.102368] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.106120] pinctrl core: initialized pinctrl subsystem
[ 0.106918] DMI not present or invalid.
[ 0.107320] NET: Registered protocol family 16
[ 0.109912] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.130525] l4_wkup_cm:clk:0010:0: failed to disable
[ 0.171716] cpuidle: using governor ladder
[ 0.171756] cpuidle: using governor menu
[ 0.185653] No ATAGs?
[ 0.185672] hw-breakpoint: debug architecture 0x4 unsupported.
[ 0.202952] edma 49000000.edma: TI EDMA DMA engine driver
[ 0.206924] SCSI subsystem initialized
[ 0.207198] usbcore: registered new interface driver usbfs
[ 0.207258] usbcore: registered new interface driver hub
[ 0.207378] usbcore: registered new device driver usb
[ 0.208022] pps_core: LinuxPPS API ver. 1 registered
[ 0.208035] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.208060] PTP clock support registered
[ 0.208084] EDAC MC: Ver: 3.0.0
[ 0.209406] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[ 0.210043] Advanced Linux Sound Architecture Driver Initialized.
[ 0.211391] clocksource: Switched to clocksource timer1
[ 0.220726] NET: Registered protocol family 2
[ 0.221705] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[ 0.221743] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.221791] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.221837] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.221949] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.221973] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.222169] NET: Registered protocol family 1
[ 0.222798] RPC: Registered named UNIX socket transport module.
[ 0.222814] RPC: Registered udp transport module.
[ 0.222821] RPC: Registered tcp transport module.
[ 0.222828] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.223977] Trying to unpack rootfs image as initramfs...
[ 0.224749] rootfs image is not initramfs (no cpio magic); looks like an initrd
[ 0.268383] Freeing initrd memory: 6732K
[ 0.268990] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[ 0.270568] Initialise system trusted keyrings
[ 0.270915] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[ 0.276342] NFS: Registering the id_resolver key type
[ 0.276390] Key type id_resolver registered
[ 0.276399] Key type id_legacy registered
[ 0.276447] ntfs: driver 2.1.32 [Flags: R/O].
[ 0.283224] Key type asymmetric registered
[ 0.283248] Asymmetric key parser 'x509' registered
[ 0.283340] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[ 0.283355] io scheduler noop registered
[ 0.283364] io scheduler deadline registered
[ 0.283629] io scheduler cfq registered (default)
[ 0.283642] io scheduler mq-deadline registered
[ 0.283651] io scheduler kyber registered
[ 0.285706] pinctrl-single 44e10800.pinmux: 142 pins, size 568
[ 0.290318] omap_uart 44e09000.serial: no wakeirq for uart0
[ 0.290544] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a OMAP UART0
[ 0.923850] console [ttyO0] enabled
[ 0.928278] omap_uart 48022000.serial: no wakeirq for uart1
[ 0.934347] 48022000.serial: ttyO1 at MMIO 0x48022000 (irq = 31, base_baud = 3000000) is a OMAP UART1
[ 0.944630] omap_uart 481aa000.serial: no wakeirq for uart5
[ 0.950601] 481aa000.serial: ttyO5 at MMIO 0x481aa000 (irq = 35, base_baud = 3000000) is a OMAP UART5
[ 0.962032] omap_rng 48310000.rng: Random Number Generator ver. 20
[ 0.971630] random: fast init done
[ 0.975454] random: crng init done
[ 0.990854] brd: module loaded
[ 1.001778] loop: module loaded
[ 1.006000] SCSI Media Changer driver v0.25
[ 1.010702] mtdoops: mtd device (mtddev=name/number) must be supplied
[ 1.020184] spidev spi0.0: buggy DT: spidev listed directly in DT
[ 1.026691] ------------[ cut here ]------------
[ 1.031572] WARNING: CPU: 0 PID: 1 at drivers/spi/spidev.c:730 spidev_probe+0x178/0x1b4
[ 1.039951] Modules linked in:
[ 1.043175] CPU: 0 PID: 1 Comm: swapper Not tainted 4.19.59-g5f8c1c6121 #103
[ 1.050552] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 1.056944] Backtrace:
[ 1.059517] [<c010bac4>] (dump_backtrace) from [<c010bd2c>] (show_stack+0x18/0x1c)
[ 1.067461] r6:00000000 r5:c0c3e738 r4:00000000 r3:1235dada
[ 1.073408] [<c010bd14>] (show_stack) from [<c09aa790>] (dump_stack+0x20/0x28)
[ 1.080981] [<c09aa770>] (dump_stack) from [<c0128564>] (__warn+0xf0/0x118)
[ 1.088289] [<c0128474>] (__warn) from [<c01285d8>] (warn_slowpath_null+0x4c/0x54)
[ 1.096231] r8:c0e397f4 r7:c0e8a6f0 r6:000002da r5:c0c3e738 r4:c05be794
[ 1.103265] [<c012858c>] (warn_slowpath_null) from [<c05be794>] (spidev_probe+0x178/0x1b4)
[ 1.111932] r6:c0e397e4 r5:db25ec00 r4:db25ec00
[ 1.116770] [<c05be61c>] (spidev_probe) from [<c05bb4e8>] (spi_drv_probe+0x88/0xa8)
[ 1.124802] r8:c0e397f4 r7:c0e8a6f0 r6:c0e397e4 r5:00000000 r4:db25ec00
[ 1.131837] [<c05bb460>] (spi_drv_probe) from [<c050da18>] (really_probe+0x210/0x2b0)
[ 1.140037] r6:00000000 r5:c0e8a6ec r4:db25ec00 r3:c05bb460
[ 1.145978] [<c050d808>] (really_probe) from [<c050dcb8>] (driver_probe_device+0x64/0x17c)
[ 1.154648] r10:00000000 r9:db25ec00 r8:db25ec00 r7:00000001 r6:c0e397f4 r5:dc061be8
[ 1.162858] r4:c0e397f4 r3:00000000
[ 1.166605] [<c050dc54>] (driver_probe_device) from [<c050df88>] (__device_attach_driver+0x9c/0xb4)
[ 1.176093] r10:00000000 r8:c0e8a6c8 r7:00000001 r6:db25ec00 r5:dc061be8 r4:c0e397f4
[ 1.184317] [<c050deec>] (__device_attach_driver) from [<c050bd4c>] (bus_for_each_drv+0x4c/0x94)
[ 1.193531] r6:c050deec r5:dc061be8 r4:00000000 r3:00000000
[ 1.199461] [<c050bd00>] (bus_for_each_drv) from [<c050dbb0>] (__device_attach+0xa4/0x108)
[ 1.208128] r6:c0e392a0 r5:db25ec34 r4:db25ec00
[ 1.212978] [<c050db0c>] (__device_attach) from [<c050dfb4>] (device_initial_probe+0x14/0x18)
[ 1.221919] r7:db25e800 r6:c0e392a0 r5:db25ec00 r4:db25ec08
[ 1.227850] [<c050dfa0>] (device_initial_probe) from [<c050ccb0>] (bus_probe_device+0x8c/0x94)
[ 1.236886] [<c050cc24>] (bus_probe_device) from [<c050af30>] (device_add+0x3f0/0x5bc)
[ 1.245191] r6:00000000 r5:c0e03048 r4:db25ec08 r3:00000001
[ 1.251120] [<c050ab40>] (device_add) from [<c05bb318>] (spi_add_device+0x90/0x138)
[ 1.259154] r10:dc12c410 r9:00000001 r8:00000000 r7:dc12c410 r6:00000000 r5:db25e800
[ 1.267363] r4:db25ec00
[ 1.270017] [<c05bb288>] (spi_add_device) from [<c05bba3c>] (of_register_spi_device+0x220/0x370)
[ 1.279230] r7:db25e800 r6:00000001 r5:dcb59018 r4:db25ec00
[ 1.285172] [<c05bb81c>] (of_register_spi_device) from [<c05bc0e4>] (spi_register_controller+0x2c4/0x648)
[ 1.295206] r8:db25e800 r7:c0e39324 r6:00000000 r5:dcb59018 r4:db25e800
[ 1.302239] [<c05bbe20>] (spi_register_controller) from [<c05bc4a4>] (devm_spi_register_controller+0x3c/0x78)
[ 1.312638] r10:00000000 r9:db0e8afc r8:db25e800 r7:dc12c410 r6:00000000 r5:db23ba40
[ 1.320834] r4:db25e800
[ 1.323503] [<c05bc468>] (devm_spi_register_controller) from [<c05bff8c>] (omap2_mcspi_probe+0x418/0x4f8)
[ 1.333543] r7:db25eb00 r6:00000000 r5:db25e800 r4:00000000
[ 1.339477] [<c05bfb74>] (omap2_mcspi_probe) from [<c050f7f8>] (platform_drv_probe+0x50/0xa0)
[ 1.348421] r10:00000000 r9:00000000 r8:c0e3984c r7:c0e8a6f0 r6:c0e3984c r5:00000000
[ 1.356631] r4:dc12c410
[ 1.359285] [<c050f7a8>] (platform_drv_probe) from [<c050da18>] (really_probe+0x210/0x2b0)
[ 1.367953] r6:00000000 r5:c0e8a6ec r4:dc12c410 r3:c050f7a8
[ 1.373894] [<c050d808>] (really_probe) from [<c050dcb8>] (driver_probe_device+0x64/0x17c)
[ 1.382564] r10:00000000 r9:c0d3d838 r8:dc12c410 r7:00000000 r6:c0e3984c r5:c0e3984c
[ 1.390761] r4:dc12c410 r3:00000000
[ 1.394518] [<c050dc54>] (driver_probe_device) from [<c050dea8>] (__driver_attach+0xd8/0xdc)
[ 1.403370] r10:00000000 r8:00000000 r7:00000000 r6:dc12c444 r5:c0e3984c r4:dc12c410
[ 1.411585] [<c050ddd0>] (__driver_attach) from [<c050bdf4>] (bus_for_each_dev+0x60/0x84)
[ 1.420149] r6:c050ddd0 r5:c0e3984c r4:dc12c410 r3:00000000
[ 1.426092] [<c050bd94>] (bus_for_each_dev) from [<c050d270>] (driver_attach+0x24/0x28)
[ 1.434486] r6:c0e32778 r5:db23b380 r4:c0e3984c
[ 1.439325] [<c050d24c>] (driver_attach) from [<c050ce90>] (bus_add_driver+0xe8/0x1f4)
[ 1.447632] [<c050cda8>] (bus_add_driver) from [<c050e880>] (driver_register+0x84/0x118)
[ 1.456118] r7:c0d235c0 r6:c0e03048 r5:00000006 r4:c0e3984c
[ 1.462059] [<c050e7fc>] (driver_register) from [<c050f5d8>] (__platform_driver_register+0x48/0x4c)
[ 1.471544] r5:00000006 r4:c0e52f00
[ 1.475297] [<c050f590>] (__platform_driver_register) from [<c0d235d8>] (omap2_mcspi_driver_init+0x18/0x20)
[ 1.485518] [<c0d235c0>] (omap2_mcspi_driver_init) from [<c0102668>] (do_one_initcall+0x50/0x1a0)
[ 1.494834] [<c0102618>] (do_one_initcall) from [<c0d00ea8>] (kernel_init_freeable+0x10c/0x1d0)
[ 1.503960] r10:00000000 r8:c0d3d82c r7:0000011e r6:c0e52f00 r5:00000006 r4:c0d50d1c
[ 1.512184] [<c0d00d9c>] (kernel_init_freeable) from [<c09c1a80>] (kernel_init+0x10/0x124)
[ 1.520842] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c09c1a70
[ 1.529051] r4:00000000
[ 1.531718] [<c09c1a70>] (kernel_init) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[ 1.539643] Exception stack(0xdc061fb0 to 0xdc061ff8)
[ 1.544947] 1fa0: 00000000 00000000 00000000 00000000
[ 1.553526] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.562103] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 1.569027] r4:00000000 r3:ffffffff
[ 1.572790] ---[ end trace 5c70b6188827aeb6 ]---
[ 1.578085] MACsec IEEE 802.1AE
[ 1.581946] libphy: Fixed MDIO Bus: probed
[ 1.587175] e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPI
[ 1.593622] e100: Copyright(c) 1999-2006 Intel Corporation
[ 1.599693] tlan: ThunderLAN driver v1.17
[ 1.604004] tlan: 0 devices installed, PCI: 0 EISA: 0
[ 1.681488] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
[ 1.689524] davinci_mdio 4a101000.mdio: detected phy mask ffffffae
[ 1.698640] libphy: 4a101000.mdio: probed
[ 1.702962] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver unknown
[ 1.711348] davinci_mdio 4a101000.mdio: phy[4]: device 4a101000.mdio:04, driver unknown
[ 1.719809] davinci_mdio 4a101000.mdio: phy[6]: device 4a101000.mdio:06, driver unknown
[ 1.729840] cpsw 4a100000.ethernet: Detected MACID = f4:5e:ab:4d:ee:68
[ 1.736929] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
[ 1.743653] cpsw 4a100000.ethernet: ALE Table size 1024
[ 1.749163] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
[ 1.757615] cpsw 4a100000.ethernet: cpsw: Detected MACID = 64:69:4e:fc:82:cd
[ 1.766074] PPP generic driver version 2.4.2
[ 1.770832] PPP BSD Compression module registered
[ 1.775819] PPP Deflate Compression module registered
[ 1.781129] PPP MPPE Compression module registered
[ 1.786162] NET: Registered protocol family 24
[ 1.790847] PPTP driver version 0.8.5
[ 1.795041] usbcore: registered new interface driver asix
[ 1.800766] usbcore: registered new interface driver ax88179_178a
[ 1.807383] usbcore: registered new interface driver cdc_ether
[ 1.813562] usbcore: registered new interface driver cdc_eem
[ 1.819522] usbcore: registered new interface driver net1080
[ 1.825503] usbcore: registered new interface driver cdc_subset
[ 1.831754] usbcore: registered new interface driver zaurus
[ 1.837638] usbcore: registered new interface driver simcom_wwan
[ 1.843991] usbcore: registered new interface driver sierra_net
[ 1.850244] usbcore: registered new interface driver cdc_ncm
[ 1.856231] usbcore: registered new interface driver qmi_wwan
[ 1.863192] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.870032] ehci-platform: EHCI generic platform driver
[ 1.875776] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.882294] ohci-platform: OHCI generic platform driver
[ 1.888369] usbcore: registered new interface driver cdc_acm
[ 1.894328] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 1.902771] usbcore: registered new interface driver cdc_wdm
[ 1.908757] usbcore: registered new interface driver usb-storage
[ 1.915172] usbcore: registered new interface driver usbserial_generic
[ 1.922065] usbserial: USB Serial support registered for generic
[ 1.928385] usbcore: registered new interface driver ipw
[ 1.933994] usbserial: USB Serial support registered for IPWireless converter
[ 1.941515] usbcore: registered new interface driver option
[ 1.947376] usbserial: USB Serial support registered for GSM modem (1-port)
[ 1.954716] usbcore: registered new interface driver sierra
[ 1.960581] usbserial: USB Serial support registered for Sierra USB modem
[ 1.967742] usbcore: registered new interface driver usb_serial_simple
[ 1.974630] usbserial: USB Serial support registered for carelink
[ 1.981034] usbserial: USB Serial support registered for zio
[ 1.987019] usbserial: USB Serial support registered for funsoft
[ 1.993355] usbserial: USB Serial support registered for flashloader
[ 2.000032] usbserial: USB Serial support registered for google
[ 2.006276] usbserial: USB Serial support registered for libtransistor
[ 2.013152] usbserial: USB Serial support registered for vivopay
[ 2.019470] usbserial: USB Serial support registered for moto_modem
[ 2.026077] usbserial: USB Serial support registered for motorola_tetra
[ 2.033047] usbserial: USB Serial support registered for novatel_gps
[ 2.039723] usbserial: USB Serial support registered for hp4x
[ 2.045782] usbserial: USB Serial support registered for suunto
[ 2.052024] usbserial: USB Serial support registered for siemens_mpi
[ 2.061058] am335x-phy-driver 47401300.usb-phy: 47401300.usb-phy supply vcc not found, using dummy regulator
[ 2.071573] am335x-phy-driver 47401300.usb-phy: Linked as a consumer to regulator.0
[ 2.082592] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
[ 2.088456] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
[ 2.096485] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[ 2.105176] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.112755] usb usb1: Product: MUSB HDRC host driver
[ 2.117953] usb usb1: Manufacturer: Linux 4.19.59-g5f8c1c6121 musb-hcd
[ 2.124801] usb usb1: SerialNumber: musb-hdrc.0
[ 2.130157] hub 1-0:1.0: USB hub found
[ 2.134212] hub 1-0:1.0: 1 port detected
[ 2.140129] am335x-phy-driver 47401b00.usb-phy: 47401b00.usb-phy supply vcc not found, using dummy regulator
[ 2.150715] am335x-phy-driver 47401b00.usb-phy: Linked as a consumer to regulator.0
[ 2.161644] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[ 2.167515] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
[ 2.175528] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[ 2.184219] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.191813] usb usb2: Product: MUSB HDRC host driver
[ 2.197011] usb usb2: Manufacturer: Linux 4.19.59-g5f8c1c6121 musb-hcd
[ 2.203859] usb usb2: SerialNumber: musb-hdrc.1
[ 2.209219] hub 2-0:1.0: USB hub found
[ 2.213271] hub 2-0:1.0: 1 port detected
[ 2.219824] omap_rtc 44e3e000.rtc: registered as rtc0
[ 2.225525] i2c /dev entries driver
[ 2.231904] cpuidle: enable-method property 'ti,am3352' found operations
[ 2.241123] usbcore: registered new interface driver usbhid
[ 2.247264] usbhid: USB HID core driver
[ 2.254159] ipip: IPv4 and MPLS over IPv4 tunneling driver
[ 2.260589] gre: GRE over IPv4 demultiplexor driver
[ 2.265928] Initializing XFRM netlink socket
[ 2.271161] NET: Registered protocol family 10
[ 2.277525] Segment Routing with IPv6
[ 2.281616] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 2.289276] NET: Registered protocol family 17
[ 2.294103] NET: Registered protocol family 15
[ 2.299382] can: controller area network core (rev 20170425 abi 9)
[ 2.306283] NET: Registered protocol family 29
[ 2.310950] can: raw protocol (rev 20170425)
[ 2.315504] can: broadcast manager protocol (rev 20170425 t)
[ 2.321906] 8021q: 802.1Q VLAN Support v1.8
[ 2.326355] lib80211: common routines for IEEE802.11 drivers
[ 2.332424] Key type dns_resolver registered
[ 2.337163] ThumbEE CPU extension supported.
[ 2.341721] Registering SWP/SWPB emulation handler
[ 2.346742] omap_voltage_late_init: Voltage driver support not added
[ 2.354471] Loading compiled-in X.509 certificates
[ 2.369587] OMAP GPIO hardware version 0.1
[ 2.376304] omap-gpmc 50000000.gpmc: GPMC revision 6.0
[ 2.381841] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
[ 2.389873] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xda
[ 2.396614] nand: Macronix MX30LF2G18AC
[ 2.400632] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[ 2.408665] nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme



Thanks.

Rgds
Shine

  • Hi Shine,

    Can you please clarify by "turn on/off USB power"?

    Which power to turn on/off, the power to the USB module in AM3352 SoC, or to the USB bus, or something else?

  • Hi Bin,

    Thanks for your great support.

    Customer wanted to turn on/off VBUS power supply by controlling the USBX_DRVVBUS. USBX_DRVVBUS drives one MOS switcher.

    Thanks.
    Rgds
    Shine

  • Hi Shine,

    Kernel doesn't support user controlling the USBx_DRVVBUS pin.

    Can you please describe the scenario why the customer wants to turn off the USB bus power? Why they cannot just unplug the USB device?

  • Hi Bin,

    Thanks for your great support.

    Customer connected a module to USB0. When the module doesn't work, it need to shut down the VBUS power supply so that he can restart the module remotely. 

    This module doesn't support hot plugin and it is always connected to the usb. 

    If the kernel doesn't support user controlling the USBx_DRVVBUS pin. Can he configure the USBx_DRVVBUS as GPIO? Will it influence the USB function?

    Thanks.
    Rgds
    Shine

  • Hi Shine,

    USBx_DRVVBUS cannot be configured as GPIO, it won't work in USB mode.

    Please try the following command to turn off the USB bus power:

    root@am335x-evm:~# echo 0 > /sys/kernel/debug/usb/musb-hdrc.1/softconnect

    Use value '1' in the same command to turn on the USB bus power.

    This command is for USB1 controller. If USB0 controller is used, please replace 'musb-hdrc.1' with 'musb-hdrc.0'.

  • Hi Bin,

    Thanks.

    Customer ran the above command and met below error message.

    ~ # echo 0 > /sys/kernel/debug/usb/musb-hdrc.0/softconnect
    -sh: can't create /sys/kernel/debug/usb/musb-hdrc.0/softconnect: nonexistent directory
    ~ # ls /sys/kernel/debug/
    ~ # ls /sys/kernel/debug/
    ~ #

    Would you please kindly give him more advice?

    Thanks.
    Rgds
    Shine

  • Hi Shine,

    Please ensure the debugfs is enabled in kernel config, and debugfs has been mounted to /sys/kernel/debug. This is the default in Processor SDK Linux.

  • Hi Bin,

    Thank you very much for your great support.

    The issue has been resolved. 

    1. unmount for test:
    mount -t debugfs nono /sys/kernel/debug

    2. command:
    echo 0 > /sys/kernel/debug/musb-hdrc.0/softconnect
    echo 1 > /sys/kernel/debug/musb-hdrc.0/softconnect
    He can control the VBUS power supply now.

    Thanks.
    Rgds
    Shine