This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

新一代Davici DM81xx Uboot中新增USB HOST功能

Genius 12210 points
Other Parts Discussed in Thread: DM388, DM3730, DM385

大家好,

   针对目前PSP04.04.00.02版本中uboot无法支持USB的情况,本人近日刚完成了USB HOST (USB port 0)部分功能的支持,在DM388平台使用USB Flash Disk初步验证通过后,特分享于此,供大家学习参考指正,谢谢。

本例使用的DM81xx的uboot基线版本为IPNC RDK V3.8 uboot-2010.06,以及git tree地址如下:

arago-project.org/.../

U-boot Patch:

测试日志:

DM388_IPNC#

DM388_IPNC#usb start
(Re)start USB...
usb.c:usb_init:96:
usb.c:usb_init:100:
usb.c:usb_init:113: usb_lowlevel_init index 0
USB0: musb_uboot.c:usb_lowlevel_init:126:
musb_uboot.c:usb_lowlevel_init:132: mbase-val:47401400
musb_uboot.c:usb_lowlevel_init:133: MUSB_DEVCTL-val:99
musb_uboot.c:usb_lowlevel_init:144:
scanning bus 0 for devices... 1 USB Device(s) found
usb.c:usb_init:140: usb s0
scanning usb for storage devices... 1 Storage Device(s) found
DM388_IPNC#usb info
1: Mass Storage, USB Revision 2.0
- General usb disk 88C1298FAB72261A
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor: 0xabcd Product 0xef18 Version 1.0
Configuration: 1
- Interfaces: 1 Bus Powered 100mA
Interface: 0
- Alternate Setting 0, Endpoints: 2
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 2 Out Bulk MaxPacket 512
- Endpoint 2 In Bulk MaxPacket 512

DM388_IPNC#usb dev

USB device 0: Vendor: General Rev: 1.21 Prod: usb disk
Type: Removable Hard Disk
Capacity: 3804.0 MB = 3.7 GB (7790592 x 512)
DM388_IPNC#usb part

Partition Map for USB device 0 -- Partition Type: DOS

Partition Start Sector Num Sectors Type
1 63 7790529 b
DM388_IPNC#fatload usb 0:1 0x81000000 u-boot.dm388.min.uart
reading u-boot.dm388.min.uart

49164 bytes read
DM388_IPNC#md 0x81000000
81000000: ea000012 e59ff014 e59ff014 e59ff014 ................
81000010: e59ff014 e59ff014 e59ff014 e59ff014 ................
81000020: 80700120 80700180 807001e0 80700240 .p...p...p.@.p.
81000030: 807002a0 80700300 80700360 12345678 ..p...p.`.p.xV4.
81000040: 80700000 80700000 8070c00c 8070ca10 ..p...p...p...p.
81000050: e10f0000 e3c0001f e38000d3 e129f000 ..............).
81000060: eb00001c e24f006c e51f1030 e1500001 ....l.O.0.....P.
81000070: 0a000007 e51f2038 e51f3038 e0432002 ....8 ..80... C.
81000080: e0802002 e8b007f8 e8a107f8 e1500002 . .......P.
81000090: dafffffb e51f005c e2400b09 e2400080 ....\.....@...@.
810000a0: e240d00c e3cdd007 e51f0068 e51f1068 ..@.....h...h...
810000b0: e3a02000 e5802000 e1500001 e2800004 . ... ....P.....
810000c0: 1afffffb ee070f15 ee070f9a ee070f95 ................
810000d0: e51ff004 8070132c e3a00000 ee080f17 ....,.p.........
810000e0: ee070f15 ee070fd5 ee070f9a ee070f95 ................
810000f0: ee110f10 e3c00a02 e3c00007 e3800002 ................
DM388_IPNC#