Welcome, guest ( Login )

UsbHost

Version 9, changed by hippo5329@yahoo.com.tw. 07/15/2008.   Show version history

uClinux setup for USBHost

In kernel menuconfig,

Turn on SCSI device and SCSI disk.

SCSI device support --->

[ ] RAID Transport Class                          
[*] SCSI device support                           
[ ] SCSI target support                           
[*] legacy /proc/scsi/ support                    
    *** SCSI support type (disk, tape, CD-ROM) ***
[*] SCSI disk support                             

Turn on host-side usb, usb dev filesystem, your hcd (eg : ISP1362 or ISP 116x), and the usb device you want to use (eg : mass storage device).

[*] USB support  --->

--- USB support                                                  
[*]   Support for Host-side USB                                  
[ ]     USB verbose debug messages                               
[ ]     USB announce new devices                                 
        *** Miscellaneous USB options ***                        
[*]     USB device filesystem                                    
[*]     USB device class-devices (DEPRECATED)                    
[ ]     Dynamic USB minor allocation                             
[ ]     Rely on OTG Targeted Peripherals List                    
[ ]     Disable external hubs                                    

        *** USB Host Controller Drivers ***                      
[ ]     Cypress C67x00 HCD support                               
[ ]     ISP116X HCD support                                      
[*]     ISP1362 HCD support                                      
[ ]     ISP 1760 HCD support                                     
[ ]     SL811HS HCD support                                      
[ ]     R8A66597 HCD support                                     

      *** NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
      *** may also be needed; see USB_STORAGE Help for more infor
[*]   USB Mass Storage support                                   
[ ]     USB Mass Storage verbose debug                           

[ ]   USB Monitor   # unselect this


Turn on file system support, eg, FAT,

File systems -->
DOS/FAT/NT Filesystems --->
[*] MSDOS fs support
[*] VFAT (Windows-95) fs support
(437) Default codepage for FAT
(iso8859-1) Default iocharset for FAT
Native Language Support -->
(iso8859-1) Default NLS Option
[*] Codepage 437 (United States, Canada)
[*] NLS ISO 8859-1 (Latin 1; Western European Languages)

If you are using DE2, you may try the example project DE2_System_v1.6/DE2_demonstrations/DE2_NIOS_HOST_MOUSE_VGA of the DE2 v1.6 CD.

when booting, the kernel will detect your hcd, your usb devices.

usbmon: debugfs is not available
driver isp1362-hcd, 2005-04-04
isp1362-hcd isp1362-hcd: ISP1362 Host Controller
isp1362_hc_reset:
isp1362-hcd isp1362-hcd: new USB bus registered, assigned bus number 1
isp1362-hcd isp1362-hcd: irq 4, io mem 0x80c810d0
isp1362_hc_start:
isp1362-hcd isp1362-hcd: ISP1362 Memory usage:
isp1362-hcd isp1362-hcd: ISTL: 2 * 256: 512 @ $0000:$0100
isp1362-hcd isp1362-hcd: INTL: 16 * ( 64+8): 1152 @ $0200
isp1362-hcd isp1362-hcd: ATL : 32 * ( 64+8): 2304 @ $0680
isp1362-hcd isp1362-hcd: USED/FREE: 3968 128
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ISP1362 Host Controller, irq 4
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
Freeing unused kernel memory: 436k freed (0x1a0000 - 0x20c000)
init started: BusyBox v1.1.1-pre0 (2006.04.20-12:52+0000) multi-call binary

BusyBox v1.1.1-pre0 (2006.04.20-12:52+0000) Built-in shell (msh)
Enter 'help' for a list of built-in commands.

#

usb 1-2: new full speed USB device using isp1362-hcd and address 3
usb 1-2: configuration #1 chosen from 1 choice
scsi1 : SCSI emulation for USB Mass Storage devices
Vendor: USB 2.0 Model: Mobile Disk Rev: 2.00
Type: Direct-Access ANSI SCSI revision: 02
SCSI device sda: 256000 512-byte hdwr sectors (131 MB)
sda: Write Protect is off
sda: assuming drive cache: write through
SCSI device sda: 256000 512-byte hdwr sectors (131 MB)
sda: Write Protect is off
sda: assuming drive cache: write through
sda: sda1
sd 1:0:0:0: Attached scsi removable disk sda

# fdisk -l /dev/sda

Disk /dev/sda: 131 MB, 131072000 bytes
16 heads, 32 sectors/track, 500 cylinders
Units = cylinders of 512 * 512 = 262144 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 499 127728 6 FAT16
# mount -t vfat /dev/sda1 /mnt
# cd /mnt
# ls


Linux Host Controller driver for the NXP (was Philips semi) ISP176x USB High Speed Host Controller PCI kit. This driver provides BULK, INTERRUPT, and ISOCHRONOUS transfer support.  hcd and dcd on sf.net .
Bernard ported the driver to a PXA255 running 2.6.17. It's at http://dagobah.ucc.asn.au/isp1761/. See http://sourceforge.net/mailarchive/forum.p...&forum_id=38940 for more info.
If you are designing a new board, you should consider ISP1761 instead of ISP1362. The ISP1761 is much faster (at high speed) and support more features.

Understanding and developing Linux USB drivers


SOPC Component for ISP1362

For SOPC Builder, create a new component using this verilog file ISP1362_CTRL.v. Click next until the "interface" tab, then make the following changes :

  •     Slave Adressing : Native
  •     Units : ns
  •     Setup : 100
  •     Read Wait : 100
  •     Write Wait : 100
  •     Hold : 100

After creating the component, add it to your design. Make sure it is named "ISP1362". Thats it.

After compiling the design, the pin assignments must be set. The pin names used in the verilog code matches the pin names used in the DE2 User manual. Make sure the pin assignment is done correctly.

This works in Altera Quartus 7.1sp1.

SOPC Component for ISP1161A (also works with Microtronix USB-Ethernet daughterboard)

Add this file (ISP1161A_CRTL_hw.tcl) into your Quartus Project folder, and refresh your SOPC builder. It will then be available under UTM > ISP1161A. Add it into your project and rename the component to "usb". This works in Altera Quartus 8.0.

If the above method gives errors, or doesnt work with a newer version of quartus, use this file (ISP1161_CTRL.v) and create a new component.

Set irq_n as "Interrupt Sender - irq_n". Make sure to assign this interrupt sender to the Avalon bus in the next page.

Set all the USB chip pins as "Conduit - export".

In the next page, set the following values for timing :

  •     Units : ns
  •     Setup : 100
  •     Read Wait : 100
  •     Write Wait : 100
  •     Hold : 100

After creating the component, add it to your design. Make sure it is named "usb". Thats it.

After compiling the design, the pin assignments must be set. The pin names used in the verilog code matches the pin names used in the DE2 User manual. Make sure the pin assignment is done correctly.

When compiling uClinux, make sure to choose the correct device driver in the "make menuconfig" command.

Attachments (4)

  File By Size Attached Ver.
 DE2-usb-isp1362-2007-08-18.zip mamba125 1M 08/18/2007 1 Delete attachment
 ISP1362_CTRL.v vishnu350 1K 10/26/2007 1 Delete attachment
 ISP1161A_CTRL_hw.tcl vishnu350 4K 07/14/2008 1 Delete attachment
 ISP1161A_CTRL.v vishnu350 1K 07/14/2008 1 Delete attachment