Difference between revisions of "DESK-MX6-L/Pheripherals/USB Host"

From DAVE Developer's Wiki
Jump to: navigation, search
m (U0009 moved page AXEL Lite SOM/DESK-MX6-L/Pheripherals/USB Host to DESK-MX6-L/Pheripherals/USB Host: modifica gestione DESK come prodotto a se stante)
(USB Host section update for DESK-MX6-L release)
Line 1: Line 1:
<section begin=History/>
+
<section begin="History" />
 
{| style="border-collapse:collapse; "
 
{| style="border-collapse:collapse; "
!colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History
+
! 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" |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" |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:#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
+
| 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" |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
+
| 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
 +
|-
 +
| 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" |3.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 2022
 +
| 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" |3.0.0 DESK release
 
|}
 
|}
<section end=History/>
+
<section end="History" />
<section begin=Body/>
+
<section begin="Body" />
  
 
==Peripheral USB Host ==
 
==Peripheral USB Host ==
Line 51: Line 55:
  
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
root@desk-mx6:~# 635.250658] usb 1-1: new high-speed USB device number 3 using ci_hdrc
+
293.085612] usb 1-1: new high-speed USB device number 2 using ci_hdrc
635.452905] usb 1-1: New USB device found, idVendor=18a5, idProduct=0302
+
293.287458] usb 1-1: New USB device found, idVendor=0781, idProduct=5591, bcdDevice= 1.00
635.459662] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
+
293.287490] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
635.468681] usb 1-1: Product: STORE N GO
+
293.287509] usb 1-1: Product: SanDisk 3.2Gen1
635.473596] usb 1-1: Manufacturer: Verbatim
+
293.287525] usb 1-1: Manufacturer: USB
635.477809] usb 1-1: SerialNumber: CCYYMMDDHHmmSSNUFLQ9
+
293.287541] usb 1-1: SerialNumber: 03017128082020175157
635.491337] usb-storage 1-1:1.0: USB Mass Storage device detected
+
293.289195] usb-storage 1-1:1.0: USB Mass Storage device detected
635.497852] scsi host0: usb-storage 1-1:1.0
+
293.302275] scsi host0: usb-storage 1-1:1.0
638.418581] scsi 0:0:0:0: Direct-Access     Verbatim STORE N GO      1100 PQ: 0 ANSI: 4
+
294.376862] scsi 0:0:0:0: Direct-Access     USB      SanDisk 3.2Gen1 1.00 PQ: 0 ANSI: 6
638.429992] sd 0:0:0:0: [sda] 61069312 512-byte logical blocks: (31.3 GB/29.1 GiB)
+
294.379701] sd 0:0:0:0: [sda] 30031872 512-byte logical blocks: (15.4 GB/14.3 GiB)
638.444695] sd 0:0:0:0: [sda] Write Protect is off
+
294.381105] sd 0:0:0:0: [sda] Write Protect is off
638.453430] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
+
294.381122] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
638.473696]  sda: sda1
+
[  294.381838] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
638.481431] sd 0:0:0:0: [sda] Attached SCSI removable disk
+
294.439432]  sda: sda1
root@desk-mx6:~#
+
294.446425] sd 0:0:0:0: [sda] Attached SCSI removable disk
 
</pre>
 
</pre>
  
Line 73: Line 77:
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
 
root@desk-mx6:~# mkdir -p /mnt/usb
 
root@desk-mx6:~# mkdir -p /mnt/usb
root@desk-mx6:~# mount /dev/sda1 /mnt/usb
+
root@desk-mx6:~# mount /dev/sda1 /mnt/usb/
[  831.081734] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
+
root@desk-mx6:~# ls -la /mnt/usb/
root@desk-mx6:~# ls -la /mnt/usb
+
total 24
total 6756
+
drwxr-xr-x 3 root root   4096 Feb 24 14:16 .
drwxr-xr-x 3 root root   16384 Jan  1  1970 .
+
drwxr-xr-x 5 root root    4096 Feb 27 15:41 ..
drwxr-xr-x 4 root root    4096 Oct  7 16:33 ..
+
drwx------ 2 root root  16384 Feb 24 14:16 lost+found
drwxr-xr-x 2 root root  16384 Feb 26  2020 System Volume Information
+
-rwxr-xr-x 1 root root 6881192 Feb 24 14:16 uImage
-rwxr-xr-x 1 root root 6881192 Mar 31  2020 uImage-4.14.98-xelk-5.0.0-rc2+gb0960b6
 
root@desk-mx6:~#
 
 
</pre>
 
</pre>
  
<section end=Body/>
+
<section end="Body" />
  
 
----
 
----
  
 
[[Category:AXEL Lite]]
 
[[Category:AXEL Lite]]

Revision as of 15:43, 27 February 2022

History
Version Issue Date Notes
1.0.0 Oct 2020 First DESK release
3.0.0 Feb 2022 3.0.0 DESK release


Peripheral USB Host[edit | edit source]

The USB Host port requires to configure the USB VBUS regulator and the gpio used for enabling the 5V USB power switch.

Device tree configuration[edit | edit source]

Here below an example of device tree configuration used on standard DAVE's kit for the AXEL Lite SOM:

From imx6qdl-axelcommon.dtsi:

    regulators {
        compatible = "simple-bus";
 
        reg_usb_h1_vbus: usb_h1_vbus {
            compatible = "regulator-fixed";
            regulator-name = "usb_h1_vbus";
            regulator-min-microvolt = <5000000>;
            regulator-max-microvolt = <5000000>;
            gpio = <&gpio2 11 0>;
            enable-active-high;
        };
    };
...
...
&usbh1 {
    vbus-supply = <&reg_usb_h1_vbus>;
    status = "okay";
};

Accessing the peripheral[edit | edit source]

Linux messages at boot time[edit | edit source]

When a USB peripheral is inserted, in the following example a memory mass storage device, the kernel recognizes the device (i.e. xlass, vendor id, product id, etc.)

[  293.085612] usb 1-1: new high-speed USB device number 2 using ci_hdrc
[  293.287458] usb 1-1: New USB device found, idVendor=0781, idProduct=5591, bcdDevice= 1.00
[  293.287490] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  293.287509] usb 1-1: Product:  SanDisk 3.2Gen1
[  293.287525] usb 1-1: Manufacturer:  USB
[  293.287541] usb 1-1: SerialNumber: 03017128082020175157
[  293.289195] usb-storage 1-1:1.0: USB Mass Storage device detected
[  293.302275] scsi host0: usb-storage 1-1:1.0
[  294.376862] scsi 0:0:0:0: Direct-Access      USB      SanDisk 3.2Gen1 1.00 PQ: 0 ANSI: 6
[  294.379701] sd 0:0:0:0: [sda] 30031872 512-byte logical blocks: (15.4 GB/14.3 GiB)
[  294.381105] sd 0:0:0:0: [sda] Write Protect is off
[  294.381122] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[  294.381838] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[  294.439432]  sda: sda1
[  294.446425] sd 0:0:0:0: [sda] Attached SCSI removable disk

Additional information[edit | edit source]

If the root file system configuration does not automatically mount the partition, it is possible to mount the device using the following command:

root@desk-mx6:~# mkdir -p /mnt/usb
root@desk-mx6:~# mount /dev/sda1 /mnt/usb/
root@desk-mx6:~# ls -la /mnt/usb/
total 24
drwxr-xr-x 3 root root    4096 Feb 24 14:16 .
drwxr-xr-x 5 root root    4096 Feb 27 15:41 ..
drwx------ 2 root root   16384 Feb 24 14:16 lost+found
-rwxr-xr-x 1 root root 6881192 Feb 24 14:16 uImage