NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
UsbSoftwareInterface
USB Software Interface
Linux PSP
Contents
About this page[edit]
This page describes the software interface available in Linux kernel on different kernel versions. Please refer the config option which matches with kernel version of release you are using.
Linux v3.2[edit]
sysfs interface [edit]
Serial Number | sysfs attribute | Description |
---|---|---|
1 | mode | The entry /sys/devices/platform/musb_hdrc.X/mode is a read-only entry. It will show the state of the OTG state machine.
|
2 | vbus | The entry /sys/devices/platform/musb_hdrc.X/vbus is a write-only entry. It is used to set the VBUS timeout value during OTG. If the current OTG state is a_wait_bcon then then urb submission is disabled.
|
procfs [edit]
The procfs entry /proc/driver/musb_hdrc.X
is used to control the driver behavior as well as check the status of the driver.
Serial Number | Desired test | Command to be used |
---|---|---|
1 | To see the uses of procfs interface | echo "?" > /proc/driver/musb_hdrc.X
|
2 | To switch on the session OR to switch on the Vbus while acting as host |
echo "F" > /proc/driver/musb_hdrc.X
|
musb driver debugfs [edit]
To use the debugfs feature of kernel and musb, you need to enable the kernel debugfs option through menuconfig, as shown below
Menuconfig->kernel hacking --> [ ] Enable unused/obsolete exported symbols [*] Debug Filesystem [ ] Run 'make headers_check' when building vmlinux [*] Kernel debugging
mount the debug file system (debugfs) [edit]
#mount -t debugfs none /sys/kernel/debug/
musb driver TEST-MODE debugfs support[edit]
Serial Number | Desired Test | Command to be used |
---|---|---|
1 | Force musb to host mode | echo "force host" > /sys/kernel/debug/musb/testmode
|
2 | Force musb to full speed | echo "force full-speed" > /sys/kernel/debug/musb/testmode
|
3 | Force musb to high speed | echo "force high-speed" > /sys/kernel/debug/musb/testmode
|
4 | Send test packet | echo "test packet" > /sys/kernel/debug/musb/testmode
|
5 | Generate test K pattern | echo "test K" > /sys/kernel/debug/musb/testmode
|
5 | Generate test J pattern | echo "test J" > /sys/kernel/debug/musb/testmode
|
6 | Generate test SE0 NAK pattern | echo "test SE0 NAK" > /sys/kernel/debug/musb/testmode
|