N900 Hardware USB

The USB connector on the n900 is a micro-b connector, as required in european and chinese markets, under the new scheme to make all phone charger sockets identical.

=USB socket=

=USB implementation= The n900 seems initially to have been designed to be capable of acting as a USB host, or implementing OSG mode. This would have allowed keyboards, mice, and other peripherals to be plugged in.

This was changed relatively soon before release, and the host functionality was officialy removed - in order to comply with the USB standard - it could not get certification as a standard USB port with host mode, and the micro-b connector.

Lacking certification would have a large number of issues, from some operating systems requiring certification before allowing drivers to be distributed, to legal compliance with the USB charger specs - it would technically not be a USB port.

The Chips
There are four chips involved in the USB subsystem.

SoC
The System-on-a-chip is the main processor on the n900. This is the TI omap3430

Gaia
The TWL4030 is a TI companion chip to the SoC

USB battery charger
The bq24150 charger from TI is quite a flexible charger. It, along with the PHY chip - support charging without the intervention of the SoC when the system is charging from a completely dead battery. The PHY chip detects a charger (shorted D+ and D- pins) and the charger uses this information to charge more rapidly.

It also features reverse boost mode - which enables power to be supplied to a USB device connected to the n900.

USB Phy
The NXP isp1707 is used as the USB PHY chip. . This rights to this part have been bought by ST-Ericson and some information is available in a brief marketing sheet.

There is no published datasheet for this chip. It may be available under another name.

The device would normally be switched between host and device mode using the ID pin. This however is not connected externally.

Initially it was claimed that this made USB host mode impossible.

This however seems to be incorrect - it seems on a reading of similar device datasheets that yes, the ID pin is used on hardware that supports it to switch between host and device mode.

But, importantly, the ID pin does nothing directly to the state of the chip. It simply informs the CPU of the state of the ID pin, and leaves the driver to properly configure the chip.

So, if the kernel can be altered to ignore this pin - which should be trivial if there is host mode support for the chip in the kernel - then host mode works.

The current understanding by several people who are working on USB host mode is:

The USB port can supply power - at least 200mA. This is plenty for many devices - mice and keyboards.

It seems likely that a relatively simple kernel change should enable USB hostmode - http://focus.ti.com/lit/ug/spruf98d/spruf98d.pdf - search for FORCE_HOST - there may well be other cleaner solutions.

A possibly related errata is detailed at 3.1.3 in this document - this, and other erratas may or may not cause issues with implementing host mode.

The Circuit

 * The SoC has the USB protocol controller - this is the 'high level' controller - it implements most of the USB protocol.


 * The PHY (physical layer) chip connects to the world through the USB socket. This is not the normal companion chip - but the NXP part, and is connected to the SoC. It does the very lowest level USB hardware protocol.


 * The Battery charger. This is connected to the battery, and the PHY chip, as well as to the SoC though I2C. It handles (with the PHY chip) charging from dead. It also implements boost mode, to enable powering things through the USB socket.


 * Gaia. The TWL4030 is only used to sense the value of the ID pin. This is not connected to the outside world in the n900, though schematics indicate it may have initially been intended to.

The Software

 * BME - the battery managment entity. This has its hands in everything, and is split into
 * BME - kernel
 * BME - userspace


 * Kernel driver.
 * This seems to be a partially implemented OTG driver for the initial design of the n900, with OTG mode partially implemented, assuming that the twl4030 would be used as the USB PHY. It seems to have been modified only to the extent required to make the NXP PHY work as a replacement.

=USB socket= It seems that there is a USB socket hardware issue on some N900 ...

May this depends on the build date, can you help and report details on your broken device :


 * http://talk.maemo.org/poll.php?do=showresults&pollid=339

No reason to panic most users are not affected and it could be trivial to prevent or repair once investigated by some diy hackers...

what to do ?
Please fill ( template : nickname : build date ; SN ; contact url or email ; notes ), also tell hw version (" sysinfo-tool -g /device/hw-version" )


 * Ha... (TBC)
 * H...P... (TBC) http://talk.maemo.org/showthread.php?p=549339#1
 * Sh.... (TBC)
 * Z...n (TBC) : http://talk.maemo.org/showthread.php?p=548915#post548915
 * T... : http://tabulacrypticum.wordpress.com/2009/12/13/connecting-on-the-surface-an-n900-risk/
 * n... : http://talk.maemo.org/showthread.php?p=550378#post550378
 * ... : http://talk.maemo.org/showthread.php?p=550704#post550704

Also answers polls :


 * http://talk.maemo.org/showthread.php?p=548177
 * http://talk.maemo.org/showthread.php?t=37107

Solution

 * Waranty :http://discussions.europe.nokia.com/t5/Maemo-Devices/Nokia-responds-to-reports-about-the-N900-micro-usb-port-getting/td-p/629019
 * DIY : may void Warranty ? http://talk.maemo.org/showthread.php?p=540344#post540344
 * Repair : http://www.nokia.com/repair
 * Replace by a fixed one : http://www.astel.be/Les-Nokia-N900-suivants-tardent-defaut-de-fabrication-au-micro-USB_3568
 * External charger : http://talk.maemo.org/showthread.php?t=45887

Misc

 * Please Avoid FUD, not sure it will help : http://slashdot.org/submission/1180314/Nokia-N900-Hardware-failure---USB-port-falling-off


 * http://img2.pixhost.org/images/668/1649730_img_0366_edit.jpg
 * data sheet : http://www.hirose.co.jp/cataloge_hp/e24200011.pdf
 * hardware version : http://talk.maemo.org/showthread.php?t=46314&page=3