Difference between revisions of "DESK-MX9-L/Peripherals/USB2 OTG"

From DAVE Developer's Wiki
Jump to: navigation, search
(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...")
 
Line 2: Line 2:
 
{| 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"|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"|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"|2024/01/30
Line 8: Line 11:
 
|}
 
|}
 
<section end=History/>
 
<section end=History/>
 +
__FORCETOC__
 
<section begin=Body/>
 
<section begin=Body/>
  
 
==Peripheral USB2 OTG ==
 
==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>.
+
AURA SOM supports OTG/Host/Peripheral modes: on [[AURA SOM/AURA Evaluation Kit | AURA Evaluation Kit]] the USB2 OTG port is configured as USB Host.  
  
 
=== Device tree configuration ===
 
=== Device tree configuration ===
Line 102: Line 106:
 
The directory name mounted depend from usb name partition.
 
The directory name mounted depend from usb name partition.
  
----
+
<section end=Body/>
  
[[Category:AURA]] [[Category:SBCX AURA]]
+
[[Category:AURA]]

Revision as of 09:39, 1 February 2024

History
Issue Date Notes
2024/01/30 DESK-MX9-L-5.0.0 release



Peripheral USB2 OTG[edit | edit source]

AURA SOM supports OTG/Host/Peripheral modes: on AURA Evaluation Kit the USB2 OTG port is configured as USB Host.

Device tree configuration[edit | edit source]

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

From kernel device tree imx93-aura.dtsi:

...
&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";
};
...

From kernel device tree imx93-aura-cb2001.dts:

/ {
...
	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
		>;
	};
...
};

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

[ 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

Additional information[edit | edit source]

The root file system configuration does automatically mount the partition:

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

The directory name mounted depend from usb name partition.