Open main menu

DAVE Developer's Wiki β

Changes

DESK-MX9-L/Peripherals/USB2 OTG

3,135 bytes added, 30 January
Created page with "<section begin=History/> {| style="border-collapse:collapse; " !colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History |- |style="border-le..."
<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:#edf8fb; padding:5px; color:#000000"|2024/01/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"|DESK-MX9-L-5.0.0 release
|-
|}
<section end=History/>
<section begin=Body/>

==Peripheral USB2 OTG ==

The SOM support this modality otg/host/peripheral, on [[DESK-MX9-L]] on SBCX the port are configured to <code>host</code>.

=== Device tree configuration ===
Here below an example of device tree configuration used on standard DAVE's kit for the AURA SOM:

From kernel device tree <code>imx93-aura.dtsi</code>:

<pre>
...
&usbotg2 {
dr_mode = "otg";
hnp-disable;
srp-disable;
adp-disable;
disable-over-current;
samsung,picophy-pre-emp-curr-control = <3>;
samsung,picophy-dc-vol-level-adjust = <7>;
status = "disabled";
};
...
</pre>

From kernel device tree <code>imx93-aura-cb2001.dts</code>:

<pre>
/ {
...
regulators {
...
reg_usb_pwr: usb_pwr {
compatible = "regulator-fixed";
regulator-name = "usb_pwr_en";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio1 8 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
...
};
...
};
...
&usbotg2 {
dr_mode = "host";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usb_pwr>;
vbus-supply = <&reg_usb_pwr>;
status = "okay";
};
...
&iomuxc {
...
pinctrl_usb_pwr: usbpwrgrp {
fsl,pins = <
MX93_PAD_PDM_CLK__GPIO1_IO08 0x31e
>;
};
...
};
</pre>

===Accessing the peripheral===
====Linux messages at boot time====
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.)

<pre class="workstation-terminal">
[ 1272.354409] usb 1-1: new high-speed USB device number 3 using ci_hdrc
[ 1272.521077] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 1272.527735] scsi host0: usb-storage 1-1:1.0
[ 1273.539755] scsi 0:0:0:0: Direct-Access USB SanDisk 3.2Gen1 1.00 PQ: 0 ANSI: 6
[ 1273.550783] sd 0:0:0:0: [sda] 60125184 512-byte logical blocks: (30.8 GB/28.7 GiB)
[ 1273.560595] sd 0:0:0:0: [sda] Write Protect is off
[ 1273.567632] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 1273.592520] sda: sda1
[ 1273.601008] sd 0:0:0:0: [sda] Attached SCSI removable disk
</pre>

=== Additional information ===

The root file system configuration does automatically mount the partition:

<pre class="workstation-terminal">
root@desk-mx93:~# lsblk /dev/sda
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 1 28.7G 0 disk
`-sda1 8:1 1 28.7G 0 part /run/media/<name-usb-partition>-sda1
</pre>

The directory name mounted depend from usb name partition.

----

[[Category:AURA]] [[Category:SBCX AURA]]
dave_user
226
edits