imx8mp usb mass storage device doesnt show on connected host via m.2

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx8mp usb mass storage device doesnt show on connected host via m.2

1,056 Views
shlomz
Contributor I

Hi,

I connected our custom board (usb on the board -> m.2 on the host) and tried to use the g_mass_storage module though it doesn't show any sign of life on the host.

if I use the the ums functionality in u-boot (ums mmc 2:1) it works just fine. 

if I connect the board to a standard usb port on the host it also works fine so the dts definition seems to be ok. Perhaps I'm missing some support in the kernel (??) 

i suspect the usb1_pwr or usb1_id pins but can tell for sure how are they affected when going through m.2.

What'm getting when on m.2:

[ 1735.264993] udc 38100000.usb: binding gadget driver [g_mass_storage]
[ 1735.271516] Mass Storage Function, version: 2009/09/11
[ 1735.276704] LUN: removable file: (no medium)
[ 1735.281207] lun0: open backing file: /dev/mmcblk2p1
[ 1735.286201] LUN: file: /dev/mmcblk2p1
[ 1735.289886] Number of LUNs=1
[ 1735.292783] g_mass_storage gadget.0: adding config #1 'Linux File-Backed Storage'/00000000c366dad4
[ 1735.301784] g_mass_storage gadget.0: adding 'Mass Storage Function'/00000000a84cf412 to config 'Linux File-Backed Storage'/00000000c366dad4
[ 1735.314677] g_mass_storage gadget.0: I/O thread pid: 460
[ 1735.320026] g_mass_storage gadget.0: cfg 1/00000000c366dad4 speeds: super high full
[ 1735.327721] g_mass_storage gadget.0: interface 0 = Mass Storage Function/00000000a84cf412
[ 1735.336098] g_mass_storage gadget.0: Mass Storage Gadget, version: 2009/09/11
[ 1735.343253] g_mass_storage gadget.0: g_mass_storage ready

 

im using yocto 6.1-langdale and based our code on the im8mp-evk-lpddr4 board. (ours is also lpddr4).

would appreciate your help,

 

thanks!

0 Kudos
Reply
3 Replies

1,018 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

It is possible that this problem is due to not give enough power to the m.2?

Regards

0 Kudos
Reply

1,013 Views
shlomz
Contributor I

Hi,

if that is the case, why does it work when using UMS from u-boot?

on the board:
u-boot=> ums mmc 2:1
UMS: LUN 0, dev mmc 2, hwpart 0, sector 0x4000, count 0x29998

/

on the host:

# dmesg -W
[43488.425747] usb 3-7: new high-speed USB device number 30 using xhci_hcd
[43488.575021] usb 3-7: New USB device found, idVendor=1fc9, idProduct=0152, bcdDevice= 2.23
[43488.575034] usb 3-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[43488.575038] usb 3-7: Product: USB download gadget
[43488.575041] usb 3-7: Manufacturer: FSL
[43488.575044] usb 3-7: SerialNumber: 051a58008468e3e1
[43488.578474] usb-storage 3-7:1.0: USB Mass Storage device detected
[43488.579421] scsi host1: usb-storage 3-7:1.0
[43489.583274] scsi 1:0:0:0: Direct-Access Linux UMS disk 0 ffff PQ: 0 ANSI: 2
[43489.584117] sd 1:0:0:0: Attached scsi generic sg0 type 0
[43489.585778] sd 1:0:0:0: [sdb] 170392 512-byte logical blocks: (87.2 MB/83.2 MiB)
[43489.586482] sd 1:0:0:0: [sdb] Write Protect is off
[43489.586489] sd 1:0:0:0: [sdb] Mode Sense: 0f 00 00 00
[43489.586902] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[43489.592363] sdb:
[43489.592794] sd 1:0:0:0: [sdb] Attached SCSI removable disk

 

is there a diff in the power draw setting between u-boot and Linux?

0 Kudos
Reply

976 Views
shlomz
Contributor I

I found that reducing the usb speed will allow to host to recognize it as USB2 but max speed for USB3 

will remain undetected.

it could mean a USB configuration on the m.2 host side is missing or something else on the IMX8MP to properly work via USB3 (type-C connector? )as this thread suggests:

https://statics.teams.cdn.office.net/evergreen-assets/safelinks/1/atp-safelinks.html

0 Kudos
Reply