Open main menu

DAVE Developer's Wiki β

Changes

DESK-MX6-L/Peripherals/USB OTG

452 bytes added, 8 January
no edit summary
<section begin="History" />
{| style="border-collapse:collapse; "
!colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History
|-
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|VersionIssue Date!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Issue DateNotes|-| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |{{oldid|14089|2021/07/16}}| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |First DESK-MX6-L release|-| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |{{oldid|17003|2022/03/03}}| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |DESK-MX6-L 3.0.0 release|-!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |2023/04/11! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:white#000000"|NotesDESK-MX6-L 4.0.0 release
|-
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|1.0.0
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|Oct 2020
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|First DESK release
|}
<section end="History" /><section begin="Body" />
==Peripheral USB OTG ==
===Accessing the peripheral===
====Linux messages at boot time====
 
<pre class="workstation-terminal">
...
...
[ 4.954820] usb_otg_vbus: disabling
...
...
</pre>
 
==== Usage with [https://www.kernel.org/doc/Documentation/usb/mass-storage.txt mass-storage] ====
256+0 records in
256+0 records out
268435456 bytes (268 MB, 256 MiB) copied, 158.924 63267 s, 1631.9 1 MB/sroot@imx6qdlxelkdesk-mx6:~# mkfs.msdos mass_storagemkfs.fat 4.1 2 (20172021-01-2431)
root@desk-mx6:~# mkdir loop
root@desk-mx6:~# mount -o loop mass_storage loop
[ 176.970284] loop0: detected capacity change from 0 to 524288
root@desk-mx6:~# echo "Test USB OTG with mass storage device" > loop/usb.txt
root@desk-mx6:~# umount loop
<pre class="workstation-terminal">
root@desk-mx6:~# modprobe g_mass_storage removable=y file=mass_storage
root@desk-mx6:~# dmesg | tail -n 7[ 891157.807023011126] Mass Storage Function, version: 2009/09/11[ 891157.813145011146] LUN: removable file: (no medium)[ 891157.818901011252] LUN: removable file: /home/root/mass_storage[ 891157.824754011263] Number of LUNs=1[ 891157.827901012243] g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11[ 891157.834955012263] g_mass_storage gadget: userspace failed to provide iSerialNumber[ 891157.842109012272] g_mass_storage gadget: g_mass_storage readyroot@desk-mx6:~#
</pre>
Once the USB cable is connected to the PC, the kernel prints storage is mounted and the following messages''usb.txt'' file is available:
<pre class="workstation-terminal">
root@desk$ cat /media/user/0001-mx6:~# [ 89266DD/usb.036840] g_mass_storage gadget: high-speed config #1: Linux File-Backed Storagetxt Test USB OTG with mass storage device
</pre>
and the The Windows PC also activate the driver and the disk is available as a Drive Unit (with the ''usb.txt'' file available).
=== Additional information ===
More information about Mass Storage Gadget driver is given in the kernel tree under ''Documentation/usb/mass-storage.txtrst''
<section end="Body" />
----
[[Category:AXEL Lite]]
8,221
edits