Community
cancel
Showing results for 
Search instead for 
Did you mean: 

USBHost

USBHost



uClinux setup for USBHost

If you want to add ISP1362 support to your hardware, you must name the instance of the component as "ISP1362" in SOPC builder. Otherwise you have to modify the instance name in linux-2.6/arch/nios2/kernel/usb.c .

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 usb1: New USB device found, idVendor=1d6b, idProduct=0001

usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

usb usb1: Product: ISP1362 Host Controller

usb usb1: Manufacturer: uClinux 2.6.27-rc7 isp1362-hcd

usb usb1: SerialNumber: isp1362-hcd

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

Please note, some disks are formatted without a partition table in Windows. You won't see sda1 in this case. You will just use "dev/sda" instead.

mount -t vfat /dev/sda /mnt


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 CTRL 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 (ISP1161A 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.

Download



Alternates

FPS-Tech supports all ISP/NXP devices in the FPS-Stable distribution, in addition to an integrated USB Host that requires only an inexpensive USB PHY.

Version history
Revision #:
1 of 1
Last update:
‎06-26-2019 02:23 AM
Updated by:
 
Contributors