hello-linux
9年USB开发经验 + 6年网络及以太网驱动开发经验 + 2年PCIe驱动开发经验 + 5年romcode开发经验,专注网卡驱动、网络协议(TCP/IP)、USB驱动及应用开发。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
usb host配置好trb后,如何启动传输?
CMD_RUN用来run xhci controller,与trb传输没关系。stream ID用于usb3.0 bulk传输。读DB寄存器是0,原因见DB寄存器描述。使用doorbell启动传输,2. doorbell寄存器。原创 2023-11-03 17:07:50 · 506 阅读 · 0 评论 -
读写usb host xhci寄存器
比如读取xhci PORTSC寄存器:寄存器地址计算方法如下:CAPLENGTH。原创 2023-11-03 17:05:02 · 539 阅读 · 0 评论 -
usb configfs使能gadget流程
3. composite_bind用于legacy。原创 2023-07-03 17:10:24 · 499 阅读 · 0 评论 -
USB外设汇总
USB转M.2接口(NVME或SATA)USB采集卡(通常指视频采集卡)USB转HDMI,VGA,DP。USB 无线wifi。USB SD/TF卡。原创 2023-06-09 18:35:50 · 265 阅读 · 0 评论 -
USB HAPS验证
3)调试high-speed时,可以考虑使用USB以太网卡,网络协议我比较熟悉。另外也可以将demo板USB2.0接口虚拟成串口设备接到HAPS,这样调试也很方便。2)U盘测试如果出现问题,由于存在SCSI协议,比较复杂,不太好调试。串口相对简单,利用串口可以进行数据收发测试,方便调试。full-speed device:usb串口(PL2303,CH340等)1)full-speed相较于high-speed,timing要求更低。建议先从full-speed开始验证,利用USB串口进行测试。原创 2023-06-09 18:28:38 · 345 阅读 · 0 评论 -
linux USB千兆以太网卡配置及使用
绿联(UGREEN)USB3.0千兆有线网卡。芯片型号为ASIX AX88179。原创 2023-06-09 18:25:58 · 1599 阅读 · 0 评论 -
usb host 复位device
2. test3. kernel。原创 2023-05-24 20:35:38 · 612 阅读 · 0 评论 -
USB3.0 host xHCI驱动
USB3.0 host xHCI驱动原创 2022-11-04 18:17:22 · 3576 阅读 · 2 评论 -
cadence usb linux配置
cadence usb linux kernel配置原创 2022-11-04 18:13:08 · 289 阅读 · 0 评论 -
USB2.0 UTMI+接口
USB2.0 UTMI+接口原创 2022-11-04 18:06:38 · 1293 阅读 · 1 评论 -
FPGA USB host原型验证流程及调试手段
FPGA USB host原型验证流程及调试手段原创 2022-11-04 18:05:04 · 753 阅读 · 0 评论 -
FPGA USB device原型验证流程及调试手段
FPGA USB device原型验证流程及调试手段原创 2022-11-04 17:58:35 · 811 阅读 · 9 评论 -
USB2.0 ULPI接口介绍
usb2.0 ulpi接口介绍原创 2022-11-04 17:56:05 · 3088 阅读 · 0 评论 -
USB2.0 UTMI接口
usb utmi接口介绍原创 2022-11-04 17:53:23 · 1638 阅读 · 0 评论 -
USB3.0 PIPE接口
usb3.0 piep接口介绍原创 2022-11-04 17:51:17 · 2397 阅读 · 0 评论 -
PC如何控制USB外设进入休眠模式
一般PC待机/休眠的时候, 会控制device进入suspend2. 在设备管理器禁用设备,可以使设备进入suspend;当启用设备后,设备会退出suspend状态3. 参考:USB 选择性挂起 - Windows drivers | Microsoft Docs...原创 2021-11-17 18:17:34 · 2472 阅读 · 0 评论 -
libusb开发指南
libusb分析及使用指南原创 2018-10-07 20:18:44 · 23955 阅读 · 2 评论 -
UVC V4L2的实现
UVC V4L2的实现原创 2022-10-09 14:55:16 · 478 阅读 · 0 评论 -
优化USB UVC ISO传输速度
USB3.0单路uvc iso传输速率只有92MB/s, 1080p yuv 23.4fps,我们需要提高UVC传输速率(YUV帧率)原创 2022-10-09 14:50:45 · 2871 阅读 · 0 评论 -
xHCI host如何检测并枚举usb设备
1.roothubusb device <---> roothubusb device plugin to dwc3 directly1.1 plugin usb1) there are two method to callkick_hub_wqa. method1,handle_port_status, interruptb. method2, timerkick_hub_wq will wakeuphub_event.2)kthrea...原创 2020-11-09 20:36:27 · 1576 阅读 · 0 评论 -
USB xHCI中断
1. xHCI InterruptersAn Interrupter manages events and their notification to the host. The xHCIsupports up to 1024 Interrupters. The MaxIntrs field in HCSPARAMS1determines the Number of Interrupters implemented in the xHC. EachInterrupter consist...原创 2020-11-09 20:43:51 · 1781 阅读 · 0 评论 -
usb gadget kernel配置
reference:https://www.linux4sam.org/bin/view/Linux4SAM/USBGadgetConfigthere are TWO kind of gadgetconfiguration1)USB Gadget functions configurable through configfs(config it in userspace)2)USB Gadget precomposed configurations(config it in...原创 2020-11-09 20:52:22 · 934 阅读 · 0 评论 -
linux usb role switch
we can switch usb role in user space by this module.cdsn3 has used usb role switch module.1. kernel configDevice Drivers--->[*] USB support--->-*-USB Role Switch SupportCONFIG_USB_ROLE_SWITCH:USB Role Switch ...原创 2021-08-04 20:06:40 · 2477 阅读 · 0 评论 -
USB ISO传输带宽计算
USB ISO传输带宽计算原创 2021-09-17 20:15:56 · 2381 阅读 · 0 评论 -
usb2.0/3.0/3.1/3.2/4 各版本速率
USB 1.0/1.1版都有个Low/Full Speed(全速)的别名,USB 2.0版则还叫做High Speed(高速),但一般人很少用这么麻烦、难懂的英文名,只说版本号,一切都很好。USB 2.0诞生八年半之后,2008年1月份,USB 3.0正式发布,传输速度从480Mbps大幅升至5Gbps,带来了全新飞跃,同时也有了新名字SuperSpeed(超速),这也没什么。2013年7月份,USB 3.1发布,速度翻番至10Gbps,很好很强大,但这个时候USB-IF就开始胡闹了....原创 2021-10-28 18:29:43 · 19553 阅读 · 2 评论 -
USB带宽计算
1.USB2.0USB2.0的最大传输带宽为480Mbps(即60MB/s)。 这一数据只是理想值,也就是USB总线上只传输一个端点的数据,放弃所有通讯协议,不进行任何数据校验才可达到的速度。一般最高可达48MB/s。2. USB3.0USB3.0的最大传输带宽高达5.0Gbps,由于USB3.0的物理层采用8b/10b编码方式,这样算下来的理论速度是4Gbps,所以最大传输速度是500MB/s,实际速度还要扣除协议开销,因此比500MB/s要少。另外USB3.0是双向全双工模式,...原创 2021-10-28 18:31:44 · 6236 阅读 · 0 评论 -
USB device如何进入suspend模式
1. 当没有使能usb device(usb_conf DEVEN没有置1),device处于L3状态2. 当使能了usb device,但是没有连接到host,device处于L2(suspend)状态3. 当使能了usb device,且device连接到host,device处于L0状态原创 2021-11-17 18:19:44 · 2165 阅读 · 0 评论 -
USB LPM
In ECN, it formally defines 4 power management states for USB as follows: L0 (On) L1 (Sleep): New & finer granularity L2 (Suspend) L3 (Off)原创 2021-11-17 19:53:50 · 1962 阅读 · 0 评论 -
usb host控制devie进入suspend模式
1. 进入suspend模式在host端通过写3到portsc PLS,同时注意要配置LWS(bit16)为1才能写生效host:device:可以看到host和device都进入了suspend2. 退出suspend模式1)在device端如何唤醒(退出suspend)?在device端执行echo 123 > /dev/ttyGS0host:可以看到此时device和host均退出suspend2)在host端如何唤醒(退出su..原创 2021-11-17 19:50:54 · 1190 阅读 · 0 评论 -
linux usb filesystem
1.1 usb debugfs/sys/kernel/debug/usbmount -t debugfs none /sys/kernel/debug1.2usbfs(usb proc fs)/proc/bus/usbLXR linux/drivers/usb/core/inode.ckernel-3.5及以后的版本不再提供1.3 usb sysfs/sys/bus/usb/devices/LXR linux/drivers/usb/core/sysfs.c...原创 2021-10-28 18:34:15 · 509 阅读 · 0 评论 -
USB虚拟2路串口
通过configfs虚拟出两路usb串口,脚本如下:#!/bin/sh# usage# ./usb-acm.sh usb2 or ./usb-acm.sh usb3 # ./usb-acm.sh usb2 disable or ./usb-acm.sh usb3 disableusb_dev_controller=${1}_acmexport CONFIGFS_HOME=/etc/configfsUDC=$CONFIGFS_HOME/usb_gadget/${usb_dev_cont原创 2021-09-17 20:07:38 · 954 阅读 · 0 评论 -
uboot usb host支持U盘功能
1. support1.1 configDevice Drivers ---> [*] USB support ---> [*] Enable driver model for USB [*] xHCI HCD (USB 3.0) support [*] DesignWare USB3 DRD Core Support [*] USB Mass Storage supportComm..原创 2021-08-04 20:38:10 · 1656 阅读 · 0 评论 -
win10 android fastboot usb驱动
1.android fastboot appdownlaod:https://developer.android.com/studio/releases/platform-tools2.android fastboot driver for win10download:https://developer.android.com/studio/run/win-usbinstall android usb driver:注意,需要修改uboot usb......原创 2021-08-04 20:21:52 · 5075 阅读 · 0 评论 -
linux usb串口终端(usb tty console)
1. tty(printf)1.1enable usb gadget serialUSB Gadget Support <*> USB Gadget precomposed configurations <X> Serial Gadget (with CDC ACM and CDC OBEX support)Note, if don't enable serial gadget, uart-console will outpu...原创 2021-03-10 18:46:02 · 2470 阅读 · 0 评论 -
dwc3 usb debugfs(otg switch)
1. driverdriver/usb/dwc3/debugfs.cdwc3_probe ->dwc3_debugfs_init()2. enable debugfsmount -t debugfs none /sys/kernel/debug3. user space path# ls /sys/kernel/debug/300000.dwc3/link_statemoderegdumptestmode4. otg...原创 2021-03-10 18:30:33 · 1336 阅读 · 0 评论 -
linux usb host ACM(usb虚拟串口)
support usb device that use ACM driver, and generate /dev/ttyACMx in host.1. kernel configDevice Drivers------> USB support <*> USB Modem (CDC ACM) supportUSB Modem (CDC ACM) support:This driver supports USB modems...原创 2021-03-10 18:29:02 · 2675 阅读 · 1 评论 -
linux type-c driver
1. codeinclude/linux/usb/typec.hdrivers/usb/typec2. configDevice Drivers--->[*] USB support---><*>USB Type-C Support--->linux4.19 support Richtek RT1711H Type-C chip andFairchild FUSB302 Type-C...原创 2021-02-07 19:41:55 · 3225 阅读 · 0 评论 -
ARM linux支持extFAT
1. exfat-linuxThisexFAT filesystem module for Linux kernelis a backport of the latest Linux mainline's exFAT drivers by Samsung.https://github.com/arter97/exfat-linux2. build for arm linuxa. add this project file tofs/exfatb.Modifyf...原创 2021-02-07 19:22:41 · 614 阅读 · 0 评论 -
usb g_zero driver
Gadget Zero is a two-configuration device.It either sinks and sources bulk data; or it loops back a configurable number of ...原创 2021-01-04 19:42:52 · 740 阅读 · 0 评论 -
linux usb host串口驱动支持(cha341 and pl2303)
base on kernel4.19usb host usb2serial deiveryou have a USB device that provides normal serial ports, or acts like a serial device,Please read <file:Documentation/usb/usb-serial.txt>1. kernel configDevice Drivers--->[*] U...原创 2021-01-04 19:39:22 · 1338 阅读 · 0 评论