Ufs3 Usb Driver -
The driver achieves 94% of raw UFS read bandwidth (spec peak 1050 MB/s), limited by USB controller overhead and DMA setup time.
—UFS 3.1, USB gadget driver, UAS protocol, MIPI M-PHY, embedded storage, command queuing. I. Introduction Universal Flash Storage (UFS) 3.1 has become the de facto non-volatile memory standard for high-performance embedded systems, offering dual-lane MIPI M-PHY at Gear 4 (11.6 Gbps per lane) and command queuing depth of 32. When such storage is exposed to a USB host—e.g., for file transfer, debugging, or mass storage mode—a conventional USB Mass Storage Class (MSC) driver becomes a bottleneck due to its single command-at-a-time design. ufs3 usb driver
Power measurement: At idle, Unipro auto power-down reduces driver overhead to <15 mW. Active bulk transfer at 900 MB/s consumes 1.8 W. Existing UFS drivers (e.g., in Android kernels) are host-side block drivers, not USB gadget drivers. Prior USB-to-storage gadgets for eMMC used MSC or UAS but ignored UFS-specific queuing. Our work is the first open design mapping USB streams to UFS command slots. VII. Conclusion and Future Work We have presented a complete USB device driver for UFS 3.1 storage, exploiting command queuing through UAS protocol and Unipro integration. The driver demonstrates near-linear scaling of IOPS with queue depth up to 32, bridging the gap between mobile UFS performance and USB host accessibility. The driver achieves 94% of raw UFS read
| Metric | UAS over UFS 3.1 | MSC over eMMC 5.1 | |----------------------------|------------------|-------------------| | Sequential Read (MB/s) | 981 | 232 | | Sequential Write (MB/s) | 874 | 148 | | Random 4K Read (IOPS) | 58,200 | 12,400 | | Random 4K Write (IOPS) | 44,100 | 9,300 | | Max Queue Depth Supported | 32 | 1 | | Command Latency (µs, QD=1) | 112 | 380 | Introduction Universal Flash Storage (UFS) 3
Abstract —The transition from eMMC to UFS 3.1 in mobile and automotive platforms demands a fundamental rethinking of USB gadget drivers. This paper presents the architecture, implementation challenges, and performance characterization of a UFS 3.1-compliant USB device controller driver. Unlike block-oriented drivers for eMMC, the UFS 3.1 driver must manage command queuing, task management, and power management over a shared MIPI M-PHY while exposing a standard SCSI-over-USB (UAS) interface to the host. We detail the driver’s integration with the Linux UDC framework, handling of up to 32 hardware command slots, and the critical role of the Unipro link layer. Experimental results on a Qualcomm Snapdragon 8 Gen 2 platform show sustained read throughput of 980 MB/s over USB 3.2 Gen 2, a 4.2× improvement over eMMC-based USB gadgets.