Difference between revisions of "DESK-MX6UL-L/Peripherals/USB Host"

From DAVE Developer's Wiki
Jump to: navigation, search
m (U0007 moved page DESK-MX6UL-L/Pheripherals/USB Host to DESK-MX6UL-L/Peripherals/USB Host without leaving a redirect)
(USB Host section update for DESK-MX6UL-L release)
(4 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
! 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" |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" |{{oldid|14248|2021/07/20}}
+
| 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" |Jul 2021
 
| 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" |{{oldid|16317|2022/03/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" |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" |DESK-MX6UL-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:#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
! 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/05/04
 
! 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-MX6UL-L 4.0.0 release
 
 
|-
 
|-
 
|}
 
|}
Line 70: Line 70:
  
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
[ 199.668004] usb 1-1: new high-speed USB device number 2 using ci_hdrc
+
[   39.935600] usb 1-1: new high-speed USB device number 2 using ci_hdrc
[ 199.876433] usb 1-1: New USB device found, idVendor=13fe, idProduct=6700, bcdDevice= 1.10
+
[   40.138049] usb 1-1: New USB device found, idVendor=0781, idProduct=5591, bcdDevice= 1.00
[ 199.876545] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
+
[   40.146476] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 199.876604] usb 1-1: Product: USB DISK 3.0
+
[   40.153786] usb 1-1: Product: SanDisk 3.2Gen1
[ 199.876647] usb 1-1: Manufacturer: Wilk
+
[   40.165109] usb 1-1: Manufacturer: USB
[ 199.876690] usb 1-1: SerialNumber: 07012533C2BE5935
+
[   40.172245] usb 1-1: SerialNumber: 03017128082020175157
[ 199.897372] usb-storage 1-1:1.0: USB Mass Storage device detected
+
[   40.189949] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 199.918075] scsi host0: usb-storage 1-1:1.0
+
[   40.209663] scsi host0: usb-storage 1-1:1.0
[ 200.961571] scsi 0:0:0:0: Direct-Access     Wilk    USB DISK 3.0    PMAP PQ: 0 ANSI: 6
+
[   41.297685] scsi 0:0:0:0: Direct-Access     USB     SanDisk 3.2Gen1 1.00 PQ: 0 ANSI: 6
[ 200.976402] sd 0:0:0:0: [sda] 60628992 512-byte logical blocks: (31.0 GB/28.9 GiB)
+
[   41.321918] sd 0:0:0:0: [sda] 30031872 512-byte logical blocks: (15.4 GB/14.3 GiB)
[ 200.977682] sd 0:0:0:0: [sda] Write Protect is off
+
[   41.337048] sd 0:0:0:0: [sda] Write Protect is off
[ 200.977729] sd 0:0:0:0: [sda] Mode Sense: 45 00 00 00
+
[   41.341891] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 200.989604] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
+
[   41.355746] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 201.200618]  sda: sda1 sda2
+
[   41.443001]  sda: sda1
[ 201.214974] sd 0:0:0:0: [sda] Attached SCSI removable disk
+
[   41.464325] sd 0:0:0:0: [sda] Attached SCSI removable disk
 +
[  43.344264] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
 
</pre>
 
</pre>
 
=== Additional information ===
 
=== Additional information ===
Line 90: Line 91:
  
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
root@desk-mx6ul-axelulite:~# mkdir -p /mnt/usbApr
+
root@desk-mx6ul-axelulite:~# mkdir -p /mnt/usb
 
root@desk-mx6ul-axelulite:~# mount /dev/sda1 /mnt/usb/
 
root@desk-mx6ul-axelulite:~# mount /dev/sda1 /mnt/usb/
 
root@desk-mx6ul-axelulite:~# ls -la /mnt/usb/
 
root@desk-mx6ul-axelulite:~# ls -la /mnt/usb/
 
total 24
 
total 24
drwxr-xr-x 3 root root    4096 Apr 1 14:16 .
+
drwxr-xr-x 3 root root    4096 Feb 24 14:16 .
drwxr-xr-x 4 root root    4096 Apr 3 18:15 ..
+
drwxr-xr-x 4 root root    4096 Feb 27 18:15 ..
drwx------ 2 root root  16384 Apr 3 14:16 lost+found
+
drwx------ 2 root root  16384 Feb 24 14:16 lost+found
-rwxr-xr-x 1 root root 6881192 Apr 3 14:16 uImage
+
-rwxr-xr-x 1 root root 6881192 Feb 24 14:16 uImage
 
</pre>
 
</pre>
 
----
 
----
  
 
[[Category:AXEL ULite]]
 
[[Category:AXEL ULite]]

Revision as of 18:17, 27 February 2022

History
Version Issue Date Notes
1.0.0 Jul 2021 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 ULite SOM:

From imx6ul-axelulite-cb003a.dts:

        reg_usb_otg1_vbus: regulator@2 {
                compatible = "regulator-fixed";
                reg = <2>;
                pinctrl-names = "default";
                pinctrl-0 = <&pinctrl_usb_otg1>;
                regulator-name = "usb_otg1_vbus";
                regulator-min-microvolt = <5000000>;
                regulator-max-microvolt = <5000000>;
                gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
                enable-active-high;
        };
...
...
&usbotg1 {
        vbus-supply = <&reg_usb_otg1_vbus>;
        disable-over-current;
        dr_mode = "host";
        status = "okay";
};
...
...
&iomuxc {
        pinctrl-0 = <&pinctrl_hog_gpios>;
        imx6ul-axelulite {
...
...
                pinctrl_usb_otg1: usbotg1grp {
                        fsl,pins = <
                                MX6UL_PAD_UART1_CTS_B__GPIO1_IO18       0x10b0          /* HOST PWR */
                                MX6UL_PAD_GPIO1_IO03__GPIO1_IO03        0x10b0          /* HOST OC */
                        >;
                };
};


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.)

[   39.935600] usb 1-1: new high-speed USB device number 2 using ci_hdrc
[   40.138049] usb 1-1: New USB device found, idVendor=0781, idProduct=5591, bcdDevice= 1.00
[   40.146476] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   40.153786] usb 1-1: Product:  SanDisk 3.2Gen1
[   40.165109] usb 1-1: Manufacturer:  USB
[   40.172245] usb 1-1: SerialNumber: 03017128082020175157
[   40.189949] usb-storage 1-1:1.0: USB Mass Storage device detected
[   40.209663] scsi host0: usb-storage 1-1:1.0
[   41.297685] scsi 0:0:0:0: Direct-Access      USB      SanDisk 3.2Gen1 1.00 PQ: 0 ANSI: 6
[   41.321918] sd 0:0:0:0: [sda] 30031872 512-byte logical blocks: (15.4 GB/14.3 GiB)
[   41.337048] sd 0:0:0:0: [sda] Write Protect is off
[   41.341891] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[   41.355746] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   41.443001]  sda: sda1
[   41.464325] sd 0:0:0:0: [sda] Attached SCSI removable disk
[   43.344264] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)

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-mx6ul-axelulite:~# mkdir -p /mnt/usb
root@desk-mx6ul-axelulite:~# mount /dev/sda1 /mnt/usb/
root@desk-mx6ul-axelulite:~# ls -la /mnt/usb/
total 24
drwxr-xr-x 3 root root    4096 Feb 24 14:16 .
drwxr-xr-x 4 root root    4096 Feb 27 18:15 ..
drwx------ 2 root root   16384 Feb 24 14:16 lost+found
-rwxr-xr-x 1 root root 6881192 Feb 24 14:16 uImage