完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
各位好,现在想要u***0设置为从模式,与PC通信;u***1设置为主模式,通过hub连接各种u***设备。u***1功能已实现,u***0通过u***线连接电脑无反应。
硬件上,两个u***的vbus脚都是直接接5V,u***0的ID脚悬空,u***1的ID脚下拉到地。除DM、DP外的其它脚悬空。 dts配置如下: &u*** [ status = "okay"; control@44e10620 [ status = "okay"; ]; u***-phy@47401300 [ status = "okay"; ]; u***-phy@47401b00 [ status = "okay"; ]; u***@47401000 [ status = "okay"; ]; u***@47401800 [ status = "okay"; dr_mode = "host"; ]; dma-controller@47402000 [ status = "okay"; dr_mode = "peripheral"; ];]; 启动后u***信息如下: dmesg | grep u***[ 0.250293] u***core: registered new interface driver u***fs[ 0.250482] u***core: registered new interface driver hub[ 0.250677] u***core: registered new device driver u***[ 1.275226] u***core: registered new interface driver asix[ 1.281138] u***core: registered new interface driver ax88179_178a[ 1.287742] u***core: registered new interface driver cdc_ether[ 1.294095] u***core: registered new interface driver smsc95xx[ 1.300298] u***core: registered new interface driver net1080[ 1.306424] u***core: registered new interface driver cdc_subset[ 1.312794] u***core: registered new interface driver zaurus[ 1.318900] u***core: registered new interface driver cdc_ncm[ 1.325029] u***core: registered new interface driver cdc_mbim[ 1.355088] u***core: registered new interface driver cdc_wdm[ 1.361281] u***core: registered new interface driver u***-storage[ 1.368011] u***core: registered new interface driver u***serial[ 1.374324] u***core: registered new interface driver option[ 1.380329] u***serial: USB Serial support registered for GSM modem (1-port)[ 1.389949] of_get_named_gpiod_flags: can't parse gpios property of node '/ocp/u***@47400000/u***-phy@47401300[0]'[ 1.390014] 47401300.u***-phy supply vcc not found, using dummy regulator[ 1.399816] mu***-hdrc mu***-hdrc.0.auto: Failed to request rx1.[ 1.406019] mu***-hdrc mu***-hdrc.0.auto: mu***_init_controller failed with status -517[ 1.414335] platform mu***-hdrc.0.auto: Driver mu***-hdrc requests probe deferral[ 1.422741] of_get_named_gpiod_flags: can't parse gpios property of node '/ocp/u***@47400000/u***-phy@47401b00[0]'[ 1.422794] 47401b00.u***-phy supply vcc not found, using dummy regulator[ 1.432417] mu***-hdrc mu***-hdrc.1.auto: Failed to request rx1.[ 1.438708] mu***-hdrc mu***-hdrc.1.auto: mu***_init_controller failed with status -517[ 1.446892] platform mu***-hdrc.1.auto: Driver mu***-hdrc requests probe deferral[ 1.512511] u***core: registered new interface driver uvcvideo[ 1.586269] u***core: registered new interface driver u***hid[ 1.592184] u***hid: USB HID core driver[ 2.870145] mu***-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)[ 2.870162] mu***-hdrc: MHDRC RTL version 2.0 [ 2.870172] mu***-hdrc: setup fifo_mode 4[ 2.870187] mu***-hdrc: 28/31 max ep, 16384/16384 memory[ 2.870292] mu***-hdrc mu***-hdrc.0.auto: MUSB HDRC host driver[ 2.876833] mu***-hdrc mu***-hdrc.0.auto: new USB bus registered, assigned bus number 1[ 2.885360] u*** u***1: New USB device found, idVendor=1d6b, idProduct=0002[ 2.892526] u*** u***1: New USB device strings: Mfr=3, Product=2, SerialNumber=1[ 2.900127] u*** u***1: Product: MUSB HDRC host driver[ 2.905351] u*** u***1: Manufacturer: Linux 3.14.26 mu***-hcd[ 2.911141] u*** u***1: SerialNumber: mu***-hdrc.0.auto[ 2.930167] mu***-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)[ 2.930186] mu***-hdrc: MHDRC RTL version 2.0 [ 2.930194] mu***-hdrc: setup fifo_mode 4[ 2.930209] mu***-hdrc: 28/31 max ep, 16384/16384 memory[ 2.930333] mu***-hdrc mu***-hdrc.1.auto: MUSB HDRC host driver[ 2.936934] mu***-hdrc mu***-hdrc.1.auto: new USB bus registered, assigned bus number 2[ 2.945428] u*** u***2: New USB device found, idVendor=1d6b, idProduct=0002[ 2.952588] u*** u***2: New USB device strings: Mfr=3, Product=2, SerialNumber=1[ 2.960197] u*** u***2: Product: MUSB HDRC host driver[ 2.965417] u*** u***2: Manufacturer: Linux 3.14.26 mu***-hcd[ 2.971195] u*** u***2: SerialNumber: mu***-hdrc.1.auto[ 3.387144] u*** 2-1: new high-speed USB device number 2 using mu***-hdrc[ 3.549623] u*** 2-1: New USB device found, idVendor=0424, idProduct=2514[ 3.556675] u*** 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0[ 3.888301] u*** 2-1.2: new high-speed USB device number 3 using mu***-hdrc[ 4.117340] u*** 2-1.2: New USB device found, idVendor=058f, idProduct=5608[ 4.124577] u*** 2-1.2: New USB device strings: Mfr=3, Product=1, SerialNumber=0[ 4.132276] u*** 2-1.2: Product: USB 2.0 Web Camera[ 4.137322] u*** 2-1.2: Manufacturer: Alcor Micro, Corp.[ 4.217896] input: USB 2.0 Web Camera as /devices/ocp.3/47400000.u***/47401c00.u***/mu***-hdrc.1.auto/u***2/2-1/2-1.2/2-1.2:1.0/input/input1root@am335x-evm:~# dmesg | grep hub[ 0.250482] u***core: registered new interface driver hub[ 2.917427] hub 1-0:1.0: USB hub found[ 2.921458] hub 1-0:1.0: 1 port detected[ 2.977400] hub 2-0:1.0: USB hub found[ 2.981425] hub 2-0:1.0: 1 port detected[ 3.588407] hub 2-1:1.0: USB hub found[ 3.592472] hub 2-1:1.0: 4 ports detected 想问下: 1.硬件上是否可以这样设计? 2.如果可以,是否还有哪里需要设置或什么的?之前调试u***1的时候,由于下接hub不支持热插拔,打过一个patch,此外就没有修改过内核u***相关文件了。 期待各位的回复,先行谢过。 |
|
相关推荐
11个回答
|
|
现在想着打一下Sitara Linux SDK MUSB Issues里边的patch尝试一下,但是我这边一直打不开这些patch包的链接,各位谁能帮忙给贴出来??谢谢了。
|
|
|
|
刚仔细过了一遍,发现dts中有问题,已经改过来了,如下:
&u*** [ status = "okay"; control@44e10620 [ status = "okay"; ]; u***-phy@47401300 [ status = "okay"; ]; u***-phy@47401b00 [ status = "okay"; ]; u***@47401000 [ status = "okay"; dr_mode = "peripheral"; ]; u***@47401800 [ status = "okay"; dr_mode = "host"; ]; dma-controller@47402000 [ status = "okay"; ];]; 但是还是不行,不知道哪里还有问题? |
|
|
|
刚才仔细过了一遍,发现dts中有点问题,已经改过来了,如下:
&u*** [ status = "okay"; control@44e10620 [ status = "okay"; ]; u***-phy@47401300 [ status = "okay"; ]; u***-phy@47401b00 [ status = "okay"; ]; u***@47401000 [ status = "okay"; dr_mode = "peripheral"; ]; u***@47401800 [ status = "okay"; dr_mode = "host"; ]; dma-controller@47402000 [ status = "okay"; ];]; 但是还是不行,想要把u***0配成从模式的hid,与pc通信,不知道还有哪里有问题。 |
|
|
|
|
|
|
|
感谢您的回复,原理图如下:( u***0中除了DM和DP,都是悬空的。) 另外测试了下,将u***0 的id脚接地后,配置成host引脚,是正常工作的。期待您的回复! |
|
|
|
不好意思,上边写错了,是配置成host模式,u***0可以正常工作。 在mu***_dspc.c的dsps_interrupt函数中,添加了一条打印信息,在host模式的时候,会打印进入中断的信息;在配置成peripheral模式的时候,插入电脑u***口后,无进入此中断的信息。 config配置信息大致如下: |
|
|
|
经修改hid.c文件,并且配置成模块的方式,linux启动后手动加载模块,已经可以被PC识别为HID,再次感谢回复。
|
|
|
|
经修改hid.c文件,并且配置为模块,在linux启动后手动加载模块,已能被PC端检测为HID设备,再次感谢回复。 |
|
|
|
Hi, jinfeng 你好,我遇到的现象和你类似,SDK8.0,Board参考TI AM335X SK board Device Tree 配置: u***@47401000 [ status = "okay"; dr_mode = "otg"; ]; u***@47401800 [ status = "okay"; dr_mode = "host"; ]; USB0我想配置为OTG Mode, 因为需要HOST mode & Device mode的切换,So,SW setting USB0 mode is "OTG" 进入系列之后,发现USB0中断的确没有进去,Insert U Disk没有任何反应 修改DTS,USB0 Mode 配置为 HOST, 一切OK 就是想请教一下,看到你Modify hid.c 文件,不知道Modify Code是否可以share一下,谢谢! My mial:renyanjinlong@163.com |
|
|
|
coolgirl01012 发表于 2018-5-15 13:11 已发,请注意查收。 |
|
|
|
你好。我现在也在做u***0是gadget模式 u***1是host模式
|
|
|
|
只有小组成员才能发言,加入小组>>
344 浏览 1 评论
539 浏览 2 评论
NA555DR VCC最低电压需要在5V供电,为什么用3.3V供电搭了个单稳态触发器也使用正常?
783 浏览 3 评论
MSP430F249TPMR出现高温存储后失效了的情况,怎么解决?
655 浏览 1 评论
对于多级放大电路板,在PCB布局中,电源摆放的位置应该注意什么?
1138 浏览 1 评论
AT32F407在USART2 DMA发送数据时,接包接到了要发送的数据,程序还是处于等待传输完成的标识判断中,为什么?
73浏览 29评论
239浏览 23评论
请问下tpa3220实际测试引脚功能和官方资料不符,哪位大佬可以帮忙解答下
261浏览 20评论
请教下关于TAS5825PEVM评估模块原理图中不太明白的地方,寻求答疑
208浏览 14评论
两个TMP117传感器一个可以正常读取温度值,一个读取的值一直是0,为什么?
67浏览 13评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-26 05:04 , Processed in 1.196713 second(s), Total 67, Slave 61 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号