Firefly开源社区

[Android] 3566jd4- 最新git代码,android11系统,otg当host为什么接U盘没识别,

293

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
293
发表于 2022-11-30 11:55:59     
本帖最后由 zhu944567126 于 2022-11-30 12:01 编辑

我想要的是usb otg 能识别u盘   我的otg是usb3.0的口

我有尝试以下命令


  • Host Mode
  • echo host > /sys/devices/platform/fe8a0000.usb2-phy/otg_mode
  • Device Mode
  • echo peripheral > /sys/devices/platform/fe8a0000.usb2-phy/otg_mode
  • OTG Mode
  • echo otg > /sys/devices/platform/fe8a0000.usb2-phy/otg_mode



:/mnt/media_rw # echo host > /sys/devices/platform/fe8a0000.usb2-phy/otg_mode
:/mnt/media_rw # [ 1462.759703] xhci-hcd xhci-hcd.7.auto: xHCI Host Controller
[ 1462.760979] xhci-hcd xhci-hcd.7.auto: new USB bus registered, assigned bus number 7
[ 1462.761814] xhci-hcd xhci-hcd.7.auto: hcc params 0x0220fe64 hci version 0x110 quirks 0x0000001002010010
[ 1462.761882] xhci-hcd xhci-hcd.7.auto: irq 78, io mem 0xfcc00000
[ 1462.763391] usb usb7: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[ 1462.763431] usb usb7: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1462.763463] usb usb7: Product: xHCI Host Controller
[ 1462.763495] usb usb7: Manufacturer: Linux 4.19.219 xhci-hcd
[ 1462.763524] usb usb7: SerialNumber: xhci-hcd.7.auto
[ 1462.764886] hub 7-0:1.0: USB hub found
[ 1462.764952] hub 7-0:1.0: 1 port detected
[ 1462.765766] xhci-hcd xhci-hcd.7.auto: xHCI Host Controller
[ 1462.766677] xhci-hcd xhci-hcd.7.auto: new USB bus registered, assigned bus number 8
[ 1462.766795] xhci-hcd xhci-hcd.7.auto: Host supports USB 3.0 SuperSpeed
[ 1462.766909] usb usb8: We don't know the algorithms for LPM for this host, disabling LPM.1462.767078] usb usb8: New USB device found, idVendor=1d6b, idPre= 4.19
[ 1462.767100] usb usb8: New USB device strings: Mfr=3,ber=1
[ 1462.767114] usb usb8: Product: xHCI Host Controller
[sb8: Manufacturer: Linux 4.19.219 xhci-hcd
[ 1462.767131] usb uhci-hcd.7.auto
[ 1462.769202] hub 8-0:1.0: USB hub found
[ 146 1 port detected



console:/ $ echo host > /sys/devices/platform/fe8a0000.usb2-phy/otg_mode
[  497.467647] rockchip-usb2phy fe8a0000.usb2-phy: Same as current mode

以上是U盘未识别;




以下是其他usb口能识别adnroid能识别u盘
130|:/mnt/media_rw # [ 1573.313013] usb 1-1: new high-speed USB device number 3 using ehci-platform
[ 1573.463205] usb 1-1: New USB device found, idVendor=346d, idProduct=5678, bcdDevice= 2.00
[ 1573.463282] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1573.463310] usb 1-1: Product: Disk 2.0
[ 1573.463333] usb 1-1: Manufacturer: USB
[ 1573.463355] usb 1-1: SerialNumber: 1356281130901367479
[ 1573.465949] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 1573.467235] scsi host0: usb-storage 1-1:1.0
[ 1574.484456] scsi 0:0:0:0: Direct-Access     VendorCo ProductCode      2.00 PQ: 0 ANSI: 4
[ 1574.486086] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 1574.487580] sd 0:0:0:0: [sda] 31129600 512-byte logical blocks: (15.9 GB/14.8 GiB)
[ 1574.488308] sd 0:0:0:0: [sda] Write Protect is off
[ 1574.489056] sd 0:0:0:0: [sda] No Caching mode page found
[ 1574.489077] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 1574.490075] type=1400 audit(1669175112.586:120): avc: denied { create } for comm="kdevtmpfs" name="sda" scontext=u:r:kernel:s0 tcontext=u:object_r:device:s0 tclass=blk_file permissive=1
[ 1574.490449] type=1400 audit(1669175112.586:121): avc: denied { setattr } for comm="kdevtmpfs" name="sda" dev="devtmpfs" ino=43598 scontext=u:r:kernel:s0 tcontext=u:object_r:device:s0 tclass=blk_file permissive=1
[ 1574.494968]  sda: sda1
[ 1574.503321] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 1575.234332] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 1575.262129] sdcardfs version 2.0
[ 1575.262167] sdcardfs: dev_name -> /mnt/media_rw/00F1-3B01
[ 1575.262174] sdcardfs: options -> fsuid=1023,fsgid=1023,mask=6,userid=0,gid=1015,reserved_mb=100
[ 1575.262183] sdcardfs: mnt -> 0000000060b83f0c
[ 1575.262243] sdcardfs: mounted on top of /mnt/media_rw/00F1-3B01 type vfat
[ 1575.262899] Remount options were mask=23,gid=9997 for vfsmnt 000000009d2f2ffe.
[ 1575.263006] sdcardfs : options - debug:1
[ 1575.263022] sdcardfs : options - gid:9997
[ 1575.263039] sdcardfs : options - mask:23
[ 1575.263424] Remount options were mask=7,gid=9997 for vfsmnt 00000000785ed327.
[ 1575.263450] sdcardfs : options - debug:1
[ 1575.263458] sdcardfs : options - gid:9997
[ 1575.263463] sdcardfs : options - mask:7
[ 1575.263830] Remount options were mask=7,gid=9997 for vfsmnt 000000004753f3b5.
[ 1575.263853] sdcardfs : options - debug:1
[ 1575.263866] sdcardfs : options - gid:9997
[ 1575.263877] sdcardfs : options - mask:7


回复

使用道具 举报

发表于 2022-12-8 11:55:59     
自制底板还是官方底板?
回复

使用道具 举报

293

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
293
发表于 2022-12-8 13:35:58     
firefly_zhongw 发表于 2022-12-8 11:55
自制底板还是官方底板?

自制底板,官方的底板是个typec的接口,我无法接u盘口
回复

使用道具 举报

发表于 2022-12-8 19:13:31     
1. 自制底板,OTG要用USB的话,参考 RKDocs/common/usb/Rockchip_RK356X_User_Guide_USB_CN.pdf
2. 需要我司协助设计硬件及调试软件的,麻烦请先联系商务 sales@t-firefly.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Copyright © 2014-2022 中山市天启智能科技有限公司 粤ICP备14022046号
快速回复 返回顶部 返回列表