您尚未登录。

楼主 # 2025-02-27 17:16:58

fxx
会员
注册时间: 2023-11-13
已发帖子: 9
积分: 24

t113 fel阶段usb协议与启动后host模式不兼容

项目节省功耗,不设SD卡,但需要用一块t113芯片通过USB启动下一块t113芯片。

查阅t113芯片手册,只内置了ehci和ohci两个usb-controller。

插入虚拟机(主机)获得的log如下

[1019819.266687] usb 1-2.1: new full-speed USB device number 19 using uhci_hcd
[1019819.538587] usb 1-2.1: New USB device found, idVendor=1f3a, idProduct=efe8, bcdDevice= 2.b3
[1019819.538594] usb 1-2.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0

BROM的fel启动系统在虚拟机(主机)显示用uhci识别,且禁用uhci后虚拟机(主机)无法识别此设备。推测t113的fel只支持uhci协议,而uhci与ohci和ehci都不兼容。

以下为t113片上系统部分log

# dmesg |grep hci
[    0.166027] Warning! fotg210_hcd should always be loaded before uhci_hcd and ohci_hcd, not after
[    1.244036] ehci-platform 4200000.usb: EHCI Host Controller
[    1.249662] ehci-platform 4200000.usb: new USB bus registered, assigned bus number 2
[    1.257663] ehci-platform 4200000.usb: irq 241, io mem 0x04200000
[    1.264949] ohci-platform 4200400.usb: Generic Platform OHCI controller
[    1.271605] ohci-platform 4200400.usb: new USB bus registered, assigned bus number 3
[    1.279541] ohci-platform 4200400.usb: irq 243, io mem 0x04200400
[    1.292862] ehci-platform 4200000.usb: USB 2.0 started, EHCI 1.00
[    1.319741] usb usb2: Manufacturer: Linux 6.1.0-rc3 ehci_hcd
[    1.378907] usb usb3: Manufacturer: Linux 6.1.0-rc3 ohci_hcd
[    2.238217] ehci-platform 4101000.usb: EHCI Host Controller
[    2.238217] ohci-platform 4101400.usb: Generic Platform OHCI controller
[    2.238261] ohci-platform 4101400.usb: new USB bus registered, assigned bus number 4
[    2.243836] ehci-platform 4101000.usb: new USB bus registered, assigned bus number 5
[    2.250573] ohci-platform 4101400.usb: irq 242, io mem 0x04101400
[    2.258274] ehci-platform 4101000.usb: irq 240, io mem 0x04101000
[    2.302824] ehci-platform 4101000.usb: USB 2.0 started, EHCI 1.00
[    2.329533] usb usb5: Manufacturer: Linux 6.1.0-rc3 ehci_hcd
[    2.370209] usb usb4: Manufacturer: Linux 6.1.0-rc3 ohci_hcd

//此时插入另一个未激活的t113设备
# [  499.222812] usb 3-1: new full-speed USB device number 2 using ohci-platform
[  499.487860] usb 3-1: New USB device found, idVendor=1f3a, idProduct=efe8, bcdDevice= 2.b3
[  499.496084] usb 3-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[  512.702810] random: crng init done

# lsusb
Bus 005 Device 001: ID 1d6b:0002
Bus 003 Device 001: ID 1d6b:0001
Bus 001 Device 001: ID 1d6b:0002
Bus 004 Device 001: ID 1d6b:0001
Bus 002 Device 001: ID 1d6b:0002
Bus 003 Device 003: ID 1f3a:efe8

t113分配ohci来识别未激活的t113设备,却没有相应的驱动,搜了一下发现1f3a:efe8驱动都是windows系统上的,可否移植uhci的驱动给ohci使用?

以下摘录t113 user manual部分内容:

2.2.11.2 USB HOST
 One USB 2.0 HOST (USB1), with integrated USB 2.0 analog PHY
 Complies with USB2.0 Specification 
 Supports USB2.0 Host function - - - -
Compatible with Enhanced Host Controller Interface (EHCI) Specification, Version 1.0
Compatible with Open Host Controller Interface (OHCI) Specification, Version 1.0a
Supports High-Speed (HS, 480 Mbit/s), Full-Speed (FS, 12 Mbit/s) and Low-Speed (LS, 1.5 Mbit/s)
Device
Supports only 1 USB Root port shared between EHCI and OHCI
 An internal DMA Controller for data transfer with memory

2.2.11.1 USB DRD
 One USB 2.0 DRD (USB0), with integrated USB 2.0 analog PHY
 Complies with USB2.0 Specification 
 Supports USB Host function - - - -
Compatible with Enhanced Host Controller Interface (EHCI) Specification, Version 1.0
Compatible with Open Host Controller Interface (OHCI) Specification, Version 1.0a
Supports High-Speed (HS, 480 Mbit/s), Full-Speed (FS, 12 Mbit/s), and Low-Speed (LS, 1.5 Mbit/s)
Supports only 1 USB Root port shared between EHCI and OHCI
 Supports USB Device function - - - - -
Supports High-Speed (HS, 480 Mbit/s), Full-Speed (FS, 12 Mbit/s)
Supports bi-directional endpoint0 (EP0) for Control transfer
Up to (8 KB + 64 Bytes) FIFO for all EPs (including EP0)
Up to 10 user-configurable endpoints (EP1+, EP1-, EP2+, EP2-, EP3+, EP3-, EP4+, EP4-, EP5+, EP5-) for
Bulk transfer, Isochronous transfer and Interrupt transfer
Supports interface to an external Normal DMA controller for every EP
 Supports an internal DMA controller for data transfer with memory
 Supports High-Bandwidth Isochronous & Interrupt transfers
 Automated splitting/combining of packets for Bulk transfers
 Supports point-to-point and point-to-multipoint transfer in both Host and Peripheral modes
 Includes automatic ping capabilities
 Soft connect/disconnect function
 Performs all transaction scheduling in hardware
 Power optimization and power management capabilities
 Device and host controller share a 8K SRAM and a physical PHY

如何实现一块t113启动另一块t113芯片?请提供一切思路

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn