Open main menu

DAVE Developer's Wiki β

Changes

DESK-MX8M-L/Peripherals/USB1 OTG

3,153 bytes added, 15 April
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"|Version
!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 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"|Notes
|-
|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{{oldid|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"15724|Jan 20222021/12/30}}|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-MX8M -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|17612|2023/02/24}}
| 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-MX8M-L-2.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" |{{oldid|19173|2023/08/22}}
| 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-MX8M-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:#ededed; padding:5px; color:#000000" |2024/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:#000000" |DESK-MX8M-L-4.1.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"|2.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"|Feb 2023
|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-MX8M-L-2.0.0
|}
<section end="History" /><section begin="Body" />
==Peripheral USB USB1 OTG ==
=== Device tree configuration ===
};
};
......
</pre>
Here below an example of device tree configuration used on standard DAVE's kit for the MITO 8M Mini:
From <code>imx8mm-mito8mmini.dtsdtsi</code>:
<pre>
...
...
&usbotg1 {
dr_mode = "otg";
hnp-disable;
adp-disable;
status = "disabled";
};
...
...
</pre>
 
From <code>imx8mm-mito8mmini-sbcx.dts</code>:
 
<pre>
...
...
&usbotg1 {
status = "okay";
};
...
...
</pre>
===Accessing the peripheral SBC ORCA===
 
====Linux messages in host mode====
 
When a USB2.0 peripheral is inserted, in the following example a memory mass storage device, the kernel recognizes the device (i.e. class, vendor id, product id, etc.)
 
<pre class="workstation-terminal">
root@desk-mx8mp:~# [ 2778.596667] usb 1-1.2: new high-speed USB device number 4 using xhci-hcd
[ 2778.733583] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[ 2778.741662] scsi host0: usb-storage 1-1.2:1.0
[ 2780.854831] scsi 0:0:0:0: Direct-Access Fanxiang F206 1100 PQ: 0 ANSI: 4
[ 2780.864795] sd 0:0:0:0: [sda] 61440000 512-byte logical blocks: (31.5 GB/29.3 GiB)
[ 2780.875879] sd 0:0:0:0: [sda] Write Protect is off
[ 2780.882883] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 2780.883777] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 2780.902324] sda: sda1
[ 2780.908573] sd 0:0:0:0: [sda] Attached SCSI removable disk
</pre>
When a USB3.0 peripheral is inserted, in the following example a memory mass storage device, the kernel recognizes the device (i.e. class, vendor id, product id, etc.)
<pre class="workstation-terminal">
root@desk-mx8mp:~# [ 2786.628638] usb 2-1.2: new SuperSpeed USB device number 4 using xhci-hcd
[ 2786.663569] usb-storage 2-1.2:1.0: USB Mass Storage device detected
[ 2786.670261] scsi host0: usb-storage 2-1.2:1.0
[ 2787.695351] scsi 0:0:0:0: Direct-Access Wilk USB DISK 3.0 PMAP PQ: 0 ANSI: 6
[ 2787.719089] sd 0:0:0:0: [sda] 60628992 512-byte logical blocks: (31.0 GB/28.9 GiB)
[ 2787.727267] sd 0:0:0:0: [sda] Write Protect is off
[ 2787.732132] sd 0:0:0:0: [sda] Mode Sense: 45 00 00 00
[ 2787.733341] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 2787.818114] sda:
[ 2787.822985] sd 0:0:0:0: [sda] Attached SCSI removable disk
</pre>
===Accessing the peripheral MITO 8M Mini===
====Linux messages at boot time=Additional information ===If the root file system configuration does not automatically mount the partition, it is possible to mount the device using the following command:
<pre class="workstation-terminal">
root@desk-mx8mp:~# mkdir -p /mnt/usbroot@desk-mx8mp:~# mount /dev/sda1 /mnt/usbroot@desk-mx8mp:~# ls -la /mnt/usbtotal 104drwxr-xr-x 5 root root 4096 Jul 26 06:58 .drwxr-xr-x 3 root root 4096 Jul 26 06:45 ..drwxr-xr-x 2 root root 4096 Jul 26 06:57 boot-rw-r--r-- 1 root root 33432 Jul 26 06:57 boot.scr-rw-r--r-- 1 root root 0 Jul 26 06:57 config..txt[ 4.954820] usb_otg_vbusdrwx------ 2 root root 16384 Jul 26 06: disabling54 lost+found...drwxr-xr-x 2 root root 4096 Jul 26 06:58 rfs-rw-r--r-- 1 root root 33432 Jul 26 06:58 settings...txt
</pre>
 
===Accessing the peripheral MITO 8M Mini===
==== Usage with [https://www.kernel.org/doc/Documentation/usb/mass-storage.txt mass-storage] ====
<pre class="workstation-terminal">
root@desk-mx8mm:~# modprobe g_mass_storage removable=y file=mass_storage
[ 891128.807023240835] Mass Storage Function, version: 2009/09/11[ 891128.813145246113] LUN: removable file: (no medium)[ 891128.818901250510] LUN: removable file: /home/root/mass_storage[ 891128.824754255874] Number of LUNs=1[ 891128.827901259140] g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11[ 891128.834955266151] g_mass_storage gadget: userspace failed to provide iSerialNumber[ 891128.842109273216] g_mass_storage gadget: g_mass_storage ready
root@desk-mx8mm:~#
</pre>
<pre class="workstation-terminal">
root@desk-mx6mx8mm:~# [ 892.036840] g_mass_storage gadget: high-speed config #1: Linux File-Backed Storage
</pre>
----
[[Category:ORCA]] [[Category:MITO 8M Mini]]
dave_user
424
edits