OpenWrt Forum Archive

Topic: USB 2.0 via SPI on IXP4XX (MI424WR)

The content of this topic has been archived on 8 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I've been researching the best way to add a USB 2.0 host controller (usb mod) to my MI424WR (ixp4xx).  The MI424WR has a SPI bus and GPIO pins for SPI CLK, RxD, TxD and CS.  So I thought the SPI bus would be a simple way to add the USB interface.

I found an IC to handle the USB host interface via SPI, the Vinculum (FTDI) VNC1L USB Host Controller:
http://www.vinculum.com/prd_vnc1l.html

Vinculum also provides ready to use modules (with pre-installed VDAP firmware) that utilize the VNC1L, such as the VDIP1, VDIP2 and VDRIVE2:
http://www.vinculum.com/prd_vdip1.html
http://www.vinculum.com/prd_vdrive1.html

Here's the VDIP1 and VDRIVE2 datasheets:
http://www.vinculum.com/documents/datas … _VDIP1.pdf
http://www.vinculum.com/documents/datas … DRIVE2.pdf

Using one of these modules, I think I can simply connect to the SPI GPIO pins and be ready to go.  Can anyone (with more knowledge and understanding of SPI and USB) confirm this will work?  Has anyone tried this with OpenWrt?

Thanks,
LinkZ

(Last edited by LinkZ on 12 Apr 2010, 20:06)

I read up some more on the FTDI VNC1L USB Host Controller.  Even though it provides a USB 2.0 host, it is only full-speed (not high-speed) and therefore can only provide speeds of USB 1.1 (i.e. 12 Mb/s).

Another post in this forum (https://forum.openwrt.org/viewtopic.php?id=23308) describes a USB mod (USB 1.1 host controller) for the bcm4712 (WRT54G/GS).  So I checked out the ixp425 (MI424WR) specifications and sure enough there is a built in USB 1.1. host controller (OHCI)... so this is definitely an option for adding a USB 1.1 host controller to the MI424WR.  I just need to a find a datasheet listing the chip's pin-outs.

Here's a product brief for the Intel IPX425:
http://www.datasheetcatalog.org/datashe … 710_DS.pdf

Although, I'd rather have USB 2.0 (EHCI) if possible.  Does anyone know a USB 2.0 mod (high-speed) for the MI424WR?

(Last edited by LinkZ on 13 Apr 2010, 18:36)

another approach is to use the mini pci port....
but you may need a pci riser(bridge) or a wrt compatible usb wifi adapter

this may be helpful
http://jlime.com/mw4/index.php/Accessing_BGA_pins

(Last edited by zerx on 13 Apr 2010, 19:35)

I think others have had success adding USB 2.0 to the MI424WR via the PCI bus (see https://forum.openwrt.org/viewtopic.php?id=19107).  There are 3 PCI devices on the MI424WR: 1 mini-pci slot (intended for the wifi card) and 2 moca devices (on-board, no mini-pci slots) for the propriaritary (unsupported) coax interface used for fibre optic internet and TV (Verizon).  I suppose a new PCI device could be added via a hardware mod (i.e. soldering it to the proper connections on the board)... but I have no idea how to do it.

Adding a USB 2.0 mini-pci card would be an option, but I don't want to give up my Atheros mini-pci wifi.  So a mini-pci riser or extender may do the trick... but I can't find a suitable one anywhere (for a reasonable price).

So I would like to just add a USB 1.1 port (similar to the WRT54GS USB mod), as the IXP425 has an on-board USB host controller... but once again, I have no idea what the pin-outs are for the IXP425.  I can't seem to find a suitable ICD or datasheet with this info.

Any help would be appreciated.

I was mistaken in stating the IXP425 has a built-in USB 1.1 host controller... it only has a USB 1.1 device controller.  So the only option for adding USB to the MI424WR would be via an external chip, such as a PCI device or a SPI device (as described above).  The SPI option should be easiest, but only provides full-speed USB, whereas a PCI device could provide high-speed USB.

The SPI approach will be the easiest. SPI is only used for accessing the Ethernet switch. Right now that's used once at boot.

Your best approach is to find an unused latch to use as a chip select. The wiki documents only the 8 latches but there are 16. The rest are mostly going to unused LEDs on rev A boards. The other latch bits are documented in the original sources from Actiontec in some .h file.

cherry31459 wrote:

The SPI approach will be the easiest. SPI is only used for accessing the Ethernet switch. Right now that's used once at boot.

Your best approach is to find an unused latch to use as a chip select. The wiki documents only the 8 latches but there are 16. The rest are mostly going to unused LEDs on rev A boards. The other latch bits are documented in the original sources from Actiontec in some .h file.

I may be mistaken, but I believe the Micrel KSZ8995MA switch is the SPI master.  Per the MI424WR wiki, the following GPIO pins are hardwired to the switch (SPI master):

2 - SPI CLK (serial clock, output from master)
3 - SPI RxD/MOSI (master output, slave input)
4 - SPI TxD/MISO (master input, slave output)
9 - SPI CS/SS (chip select/slave select, output from master)

Therefore, the following single master/single slave setup should work, with the VDRIVE2 (USB) being the slave device:
(see SPI at Wikipedia: http://en.wikipedia.org/wiki/Serial_Per … rface_Bus)

If this is the case, I don't think I'll need to use an unused latch as the chip select (CS).  I think I can simply use GPIO 9 as the CS.  "I think" is the key phrase here... I may be incorrect as I don't know much about SPI... I'm kind of figuring it out as I go.

(Last edited by LinkZ on 10 May 2010, 07:03)

After looking at the Micrel KSZ8999MA datasheet (http://www.micrel.com/_PDF/Ethernet/dat … 8995ma.pdf), it appears I was mistaken about the switch being the SPI master.  According to the datasheet, the switch can only act as a slave.  I guess the IXP425 acts as the master then?  In that case, I will need to find a chip select for the USB slave device as cherry suggested.

Also, none of this can be implemented unless I can trace the GPIO pins on the IXP425 motherboard.  I know the pinouts of the KSZ899MA switch from the datasheet, and therefore should be able to find GPIO 2, 3, 4 and 9 (as they are connected to the KSZ899MA).  Then it should be easy enough to find an unused LED latch for the CS/SS.  The SPI wiki suggested that SPI slaves can sometimes be daisy-chained, so perhaps this won't be necessary.

(Last edited by LinkZ on 23 Apr 2010, 17:30)

IXP4XX has PCI Interface. On the Linksys NSLU2 every PCI Pin is routed outside the CPU. I sucessfully connected a PCI lan card to it.

I don't know the bandwith of SPI and this isn't the easiest way to get USB 2, but i think the best.

If you have PCI, you have High Speed USB and Gigabit Ethernet.

If you know the layout or have a broken board (remove all components and etch it) you can check if it's possible or not.

devnullfast wrote:

IXP4XX has PCI Interface. On the Linksys NSLU2 every PCI Pin is routed outside the CPU. I sucessfully connected a PCI lan card to it.

I don't know the bandwith of SPI and this isn't the easiest way to get USB 2, but i think the best.

If you have PCI, you have High Speed USB and Gigabit Ethernet.

If you know the layout or have a broken board (remove all components and etch it) you can check if it's possible or not.

USB over SPI has a maximum bandwidth of 12 Mbit/s (USB full-speed).  PCI would be faster, providing hi-speed USB.  My concern is finding the pins on the board.  SPI is more simple and only needs 4.  I'm not sure how many are needed for PCI, but I think it's much more.  Either way, finding the pins may be a challenge.

Send me a broken Board and i give you the PCI Pinout

devnullfast wrote:

Send me a broken Board and i give you the PCI Pinout

Thanks for the offer, but I don't have a spare board to give up.

I may pick this up again in the near future, but for now it's easier (and possibly cheaper) to just purchase a new router that supports USB... so I bought a Buffalo WZR-HP-G300NH.

LinkZ wrote:
devnullfast wrote:

Send me a broken Board and i give you the PCI Pinout

Thanks for the offer, but I don't have a spare board to give up.

I may pick this up again in the near future, but for now it's easier (and possibly cheaper) to just purchase a new router that supports USB... so I bought a Buffalo WZR-HP-G300NH.

What you would realy wanted to tell us is that you learned a lot from the openwrt community but aren't willing to give something back to the community.

- You buyed a new board BEFORE you broke your psychologically fitness by killing a PCB that was actually supported by openwrt.org.
- You buyed a new board BEFORE you broke your PCB that was actually supported by openwrt.org.

In Fact, whitout Openwrt.org your Router (your PCB) would have been broken since a long time.

What you won't had been talking about is a spare Board because a spare board is what you actually own: A fully Router compatible PCB actually fully supported by Openwrt.

If I talk about a broken board i really mean a broken board!

Just to help peoples from all around the world that aren't familiar with technical english:
A "spare" is a replacement part. A "spare" is something that replaces something else.

Nobody replaces something that actually works with something that doesn't. So a "spare" has to bee something that, at time it was declared as spare, worked like expected (have a look at sparepart in your dictionary or something like that).

Bye the way:

a "broken" board means something that actually doesn't work.

Is the way you go the american way of live?

devnullfast wrote:
LinkZ wrote:
devnullfast wrote:

Send me a broken Board and i give you the PCI Pinout

Thanks for the offer, but I don't have a spare board to give up.

I may pick this up again in the near future, but for now it's easier (and possibly cheaper) to just purchase a new router that supports USB... so I bought a Buffalo WZR-HP-G300NH.

What you would realy wanted to tell us is that you learned a lot from the openwrt community but aren't willing to give something back to the community.

- You buyed a new board BEFORE you broke your psychologically fitness by killing a PCB that was actually supported by openwrt.org.
- You buyed a new board BEFORE you broke your PCB that was actually supported by openwrt.org.

In Fact, whitout Openwrt.org your Router (your PCB) would have been broken since a long time.

What you won't had been talking about is a spare Board because a spare board is what you actually own: A fully Router compatible PCB actually fully supported by Openwrt.

If I talk about a broken board i really mean a broken board!

Just to help peoples from all around the world that aren't familiar with technical english:
A "spare" is a replacement part. A "spare" is something that replaces something else.

Nobody replaces something that actually works with something that doesn't. So a "spare" has to bee something that, at time it was declared as spare, worked like expected (have a look at sparepart in your dictionary or something like that).

Bye the way:

a "broken" board means something that actually doesn't work.

Is the way you go the american way of live?

WTF?  Are you kidding me?

Who are you to tell me what I do or don't contribute to OpenWrt?  You don't know me.  And by the way, I don't have a "broken" board either.  I don't have an extra, spare, backup, unused or surplus board... broken or functional.  Any way you want to put it, you're an asshole.  Can you translate that?

Hello, sorry to resurrect an ancient thread, but were you ever successful in adding the SPI USB host controller? I am currently looking into an unorthodox method of adding an HCI over SPI to an embedded linux system, and the only options than I am seeing are the vinculum chips and the MAX3421 SPI-usb hci, both of which don't seem to be directly supported by the linux kernel without a huge investment in time to code up a usb kernel module, and in the case of the vinculum chip, extra time to code its firmware. I was wondering if you had any advice, pointers, or even extra chips that I have missed that might have actual mainline kernel support?

http://www.maximintegrated.com/datashee … vp/id/3639

The discussion might have continued from here.