USB on-the-go (OTG)- how to use the Neo1973 with USB host and an external keyboard?

Harald Welte laforge at openmoko.org
Sun Mar 25 18:11:52 CEST 2007


DISCLAIMER: Please note that the Neo1973 does NOT support USB OTG.

USB OTG is a complex specification, spanning from electrical over
logical and software stack issues.

So while the Neo1973 can operate in USB host mode, it does not by any
means support OTG.

On Sat, Mar 24, 2007 at 01:29:02AM +0100, Robert Michel wrote:
 
> I have soldered an USB power injector and now I can 
> sharge the Neo1973 with a 9V battery (one 7805 IC 
> and two capacitor 100nF are generating 5V),
> but when I plug an external keybord with this injector
> to the neo, udevmonitor does nothing says...
> 
> Is it a software configuration to swith the Neo1973
> USB interface from device (network adapter) to host?
> How?

There is no such API (see below)

> http://www.maxim-ic.com/appnotes.cfm?appnote_number=1822&CMP=WP-3
> 
> Or does the 5th pin need a connection to GND for that 
> the Neo1973 switch to host mode?

This is how it is intended to work, but still not yet implemented in the
kernel.

The fifth pin is interconnected to the GPB8 GPIO (see
http://svn.openmoko.org/trunk/doc/hardware/GTA01Bv3/gpio.txt)
which is IRQ capable.

In the GTA01Bv3 circuit, the ID pin has a 4.7kOhms pullup to 3.3V, i.e.
AB_DETECT is alwasy high-level until you insert a cable with ID shorted
to GND.  If you configure GPB8 as an edge-triggered interrupt source,
the 'switch to host mode' code can be inserted into that interrupt
handler (host mode: falling edge, device mode: rising edge).

The 'switch to host mode' is done using the S3C2410 MISCCR register,
where you can basically reroute the USB pins from the UDC to the OHCI
side (and back).

Feel free to submit a patch ;)

In the upcoming GTA01Bv4 revision, we will use the accessory detection
unit (ACD) of the PFC50606 PMU, and thus the code will look different.

> Does anybody knows good tutorials about USB OTG or just
> a good article how to work with USB OTG and Linux.

It's complex and does not apply to the Neo1973.  And no, I don't know
good sources apart from the spec.

-- 
- Harald Welte <laforge at openmoko.org>          	        http://openmoko.org/
============================================================================
Software for the world's first truly open Free Software mobile phone



More information about the openmoko-devel mailing list