Author Topic: C860 as usb host by software?  (Read 10874 times)

drag0

  • Newbie
  • *
  • Posts: 1
    • View Profile
C860 as usb host by software?
« Reply #15 on: December 12, 2004, 04:15:27 am »
For file copying anyway, take a look at this Addontech 2Copy2:

http://www.addontech.net/products/2copy2/

..it should work with Sharp C860 as well, since it has a mass-storage mode (though I didn't get it working right away, only had C for 2 days so haven't tinkered much yet).

It's not very expensive, something like $50 or so. Works with batteries.
Doubles as a 'laptop' to move your digital photos from the memory card to your external harddrive. =)

I have one of these 2Copy2s lying around somewhere at work, maybe I'll find it and try it out.

thseiler

  • Newbie
  • *
  • Posts: 12
    • View Profile
C860 as usb host by software?
« Reply #16 on: December 13, 2004, 06:05:46 pm »
Quote
I have been wondering about this for a while now. Since USB is bidirectional, is there a way to emulate a usb host in software using the client port on the c860?
I don't think that this is possible. The state machines in PXA255 usb controller are hardwired, and it is not possible to change them to support host functions (like enumeration, etc...)

But if you *really really really* want a real USB Host / OTG function in your Zaurus C7XX, I think it would be possible to add an Philips ISP1161A USB host controller
http://www.semiconductors.philips.com/pip/ISP1161ABD.html

For this to work, one would have to
* get a ISP1161A
* open the Zaurus (shrudder)
* Find a volume of free space (7 x 7 x 1.4 mm to put the chip)
* Identify the following signals on the main board
   GND, VCC33 (power for the chip)
   D0...D15   (16 bit Data Bus)
   A0, A1      (two adress Lines)
   RD, WR    (Write / Read Control Lines)
   INT          (somewhere )
   RESET      (Reset)
   CS           (A unused Chip select ??? )
* wire them to the apropriate pins of ISP1161A (total of 23 wires)
* patch the kernel to include the OHCI interfaces
* put the usb lines somehow outside of the zaurus.

I do not say that this is easy, but I think once this works, it sould be possible to craft a mod, that is reasonably unintrusive and hides itself inside space between the Z and the large battery cover.

Problems:
* we need a memory map and details about the banking of all Zaurus C7XX models.
* we need to hijack 4 memory adresses for this
* we need a Chip Select ?
* Waranty is void...
* The connector has to be taken to the outside world somwhere...
* Power (5 volts)

Benefits:
* 12 MBit/s USB host, 12MBit/s USB Client
* all the usb hardware that is supported by linux.

Does anybody know of a super small, flat  usb wifi dongle that is supported by linux?
because the ISP 1611A has *two* host ports....

Any thoughts, comments ?

tom

vputz

  • Full Member
  • ***
  • Posts: 163
    • View Profile
C860 as usb host by software?
« Reply #17 on: December 13, 2004, 09:26:40 pm »
Quote
It may not be very useable, but surely it's about what's possible?

Okay, I have absolutely nothing useful to contribute to this thread, but this quote from Lardman pretty much, in my mind, encapsulates the Zaurus and its community.  Man, I love these things (grin).

-->VPutz

thseiler

  • Newbie
  • *
  • Posts: 12
    • View Profile
C860 as usb host by software?
« Reply #18 on: December 14, 2004, 09:57:21 am »
Quote
But if you *really really really* want a real USB Host / OTG function in your Zaurus C7XX, I think it would be possible to add an Philips ISP1161A USB host controller
I have thought about this a bit more...

Bus:
Many of the needed signals are accessible on the P2ROM of the zaurus. Its the chip that contains the Bios, service menus and diag menus, and is read only, so no risk of accitently deleting the bios. This leaves us with the folloing signals to investigate:

RESET: is not really needed; to reset the chip into known state, one can simply turn the Z off and on
INT: any GPIO pin of PXA255 can be used to generate an interrupt, we have to find a free one
DMA: there are two external DMA lines in PXA255, both of which are multiplexed with a GPIO line. I think they use the pins for keyboard multiplexing....

Room:
the P2ROM is packed in 44TSOP package. This is a very thin package, and there is room left above it. It should be possible to put the ISP1161 directly on this chip. (I wonder if we manage to find a socket that allows us to "plug" onto the P2Rom chip ?)

Price:
I have found pricing of the Chip in single quantities via Arrow is 13 euros.
To this, we would need to add a connector, and some passive elements, a
quarz and a connector. Estimative BOM of arounf 25 euros.

Power:
The zaurus is charged with 5.0 Volts. The USB socket provides 5.0 volts !
Coincidence or Destany  :-)
So this mod would give you a real USB host port as long as your Z is plugged into mains. On battery, the port would degrade into USB On the Go mode, and not
provide power, but would still allow to access Digicams and other equipment with
its own power source.

Connector :
The usb lines have to go outside the zaurus somewhere. But where ???
Should we hijack Sharps USB lines of the Docking Port ?
Or add a new port somewhere ?

tom

thseiler

  • Newbie
  • *
  • Posts: 12
    • View Profile
C860 as usb host by software?
« Reply #19 on: December 14, 2004, 10:28:00 am »
Other suggestion, and this time it requires no change to the Z:

I think that it is possible to build a small black box, not unlike the one of CE-UC1 standart USB cable from SHARP.

In this box, there would be a ISP1161 and a 16 bit microcontroller.
The ISP1161 Host #1 would connect to the normal Zaurus USB client.
The ISP1161 Host #2 would be available as a normal USB Host Port.
The ISP1161 Client port would be connected to the same USB Host Port.

This cable can work as normal cable to sync your PDA, charge it and so on...
Additionally when your mains is plugged in, you can use it as USB Host
and when your running from battery, as USB on the go, and connect to other devices that have power integrated, like Digital Still Cammeras.

The problem is, that it would never reach USB's 12Mbit/s peak performance.
I don't know how fast/slow it will be.

tom
« Last Edit: December 14, 2004, 10:28:41 am by thseiler »

thseiler

  • Newbie
  • *
  • Posts: 12
    • View Profile
C860 as usb host by software?
« Reply #20 on: December 14, 2004, 10:35:48 am »
For the kernel side of things, there is a module for OHCI for ISP1161 in kernel 2.4
The device has 4 registers, 2 for the client and 2 for the host controller.

All we would need to to is to "emulate" the ISP1161 by changing the functions used to access these 4 registers, and the invent a protocol to transfer register accesses to the 16 bit microcontroller in the blackbox.

I don't know it it is doable, i think i prefer the build in solution, its simpler to do a driver for it.

tom

thseiler

  • Newbie
  • *
  • Posts: 12
    • View Profile
C860 as usb host by software?
« Reply #21 on: December 19, 2004, 08:28:42 am »
regarding power,

There are ways to provide the 5 volts even when not connected to mains.
i.e. a step up converter chip could generate the 5 volts from the li-ion battery.

I still have to figure out how to generate a CS signal...

tom

wrider

  • Newbie
  • *
  • Posts: 7
    • View Profile
C860 as usb host by software?
« Reply #22 on: March 23, 2005, 03:48:17 am »
Interesting, you all guys are genius!

omega

  • Hero Member
  • *****
  • Posts: 626
    • View Profile
    • http://
C860 as usb host by software?
« Reply #23 on: March 23, 2005, 04:51:48 am »
It's possible that there is 5v power available somewhere in the c860, apparently the c3000 has it on its host port.  I like the external solution.... I will have time after May...   16bit microcontroller? What about 14-bit... I have a lot of experience by now programming PICs in assembly (esp 16F877A).
Gorgeous C860, 256 Sandisk SD, 1Gig Pretec 40x CF, PDAIR leather case & the really cool retractable iPDA USB sync/charge cable. Powered by PDAXROM BETA 1.

My wish - to have a Command & Conquer style game on my Z! (FREECNC!!!) Simcity 2000 would also be great.