Re: N900 usb host + power charge

Re: N900 usb host + power charge

Quim Gil
Karma: 2662
2009-09-20 18:44 UTC
Hi,

> > > I plan to create a proposal for the push n900[1] and I plan to use the
> > > usb port. I have the following question.
> > > When the device is in usb-host mode it should of course provide power does
> > > it? Is it possible to charge the device while it's in usb-host mode?

The N900 comes without USB host mode. When I asked I was told that the limitation comes at hardware level.

The reason for this decision was the complexity of providing support for charging, PC connectivity and USB OTG efficiently through the same Micro USB port within the project deadlines. We needed to make choices and the decision was to sacrify USB OTG and concentrate on the essential use cases of charging and connecting to the PC, bringing the N900 to the market in its due time.

--
Quim Gil
open source advocate
Maemo Devices @ Nokia
  •  Reply

Re: N900 usb host + power charge

Igor Stoppa
Karma: 181
2009-09-20 19:02 UTC
On Sun, 2009-09-20 at 20:44 +0200, Gil Quim (Nokia-D/Helsinki) wrote:
> Hi,
>
> > > > I plan to create a proposal for the push n900[1] and I plan to
> use the
> > > > usb port. I have the following question.
> > > > When the device is in usb-host mode it should of course provide
> power does
> > > > it? Is it possible to charge the device while it's in usb-host
> mode?
>
> The N900 comes without USB host mode. When I asked I was told that the
> limitation comes at hardware level.

I can confirm this. The most reasonable setup would have been to provide
the A connector, but only gadget mode working forthe sales release, then
in a SW update to provide full spectrum support.

Then enters the USB certification with all its mass of quite often
bizantine, obsolete and plain braindead requirements.

One of them being that the certification with A connector can be passed
only if full functionality is provided by the SW.

In this case I propose that complaints are directed to the USB
consortium. I have really come to doubt that it's actually protecting
the consumers' interests in nowadays scenario.

> The reason for this decision was the complexity of providing support
> for charging, PC connectivity and USB OTG efficiently through the same
> Micro USB port within the project deadlines.

Add to that several HW bugs that were discovered during the development
and needed workarounds.

> We needed to make choices and the decision was to sacrify USB OTG and
> concentrate on the essential use cases of charging and connecting to
> the PC, bringing the N900 to the market in its due time.

Although noone really liked the choice we had to make. We do use our
products and as consumers we are aware of the limitations sometimes we
have to apply.

--

Cheers, Igor

---

Igor Stoppa
Maemo Software - Nokia Devices R&D - Helsinki

  •  Reply

Re: N900 usb host + power charge

David Greaves
Karma: 715
2009-09-20 20:36 UTC
quim.gil@nokia.com wrote:
> Hi,
>
>> > > I plan to create a proposal for the push n900[1] and I plan to use
> the
>> > > usb port. I have the following question.
>> > > When the device is in usb-host mode it should of course provide
> power does
>> > > it? Is it possible to charge the device while it's in usb-host mode?
>
> The N900 comes without USB host mode. When I asked I was told that the
> limitation comes at hardware level.
>
> The reason for this decision was the complexity of providing support for
> charging, PC connectivity and USB OTG efficiently through the same Micro
> USB port within the project deadlines. We needed to make choices and the
> decision was to sacrify USB OTG and concentrate on the essential use
> cases of charging and connecting to the PC, bringing the N900 to the
> market in its due time.

Sigh :(

I realised today that PUSH needed a way for software people to get at it easily.

So I spent the entire day packaging an I/O library and porting it to Maemo so
there was a python app that could do:
ReadDigitalChannel(1)
or
WriteAllDigital(17)
to do the I/O


This afternoon I created a garage project and then wrote an article:
http://mer-l-in.blogspot.com/2009/09/want-to-push-need-kickstart.html

Never mind...

Hmm, can I get dispensation to enter PUSH using a $100 SmartQ ?

Maybe I could run ssh from the N900 and have the N900 drive a Maemo powered
SmartQ... proxy host mode...

David

--
"Don't worry, you'll be fine; I saw it work in a cartoon once..."
  •  Reply

Re: N900 usb host + power charge

Kees Jongenburger
Karma: 161
2009-09-20 20:56 UTC
On Sun, Sep 20, 2009 at 9:02 PM, Igor Stoppa <igor.stoppa@nokia.com> wrote:
> On Sun, 2009-09-20 at 20:44 +0200, Gil Quim (Nokia-D/Helsinki) wrote:
>> The N900 comes without USB host mode. When I asked I was told that the
>> limitation comes at hardware level.
>
> I can confirm this. The most reasonable setup would have been to provide
> the A connector, but only gadget mode working for the sales release, then
> in a SW update to provide full spectrum support.

>> The reason for this decision was the complexity of providing support
>> for charging, PC connectivity and USB OTG efficiently through the same
>> Micro USB port within the project deadlines.
>
> Add to that several HW bugs that were discovered during the development
> and needed workarounds.

Does this simply mean it's not possible at all? not even for example
booting in HOST only mode?

>
>>  We needed to make choices and the decision was to sacrify USB OTG and
>> concentrate on the essential use cases of charging and connecting to
>> the PC, bringing the N900 to the market in its due time.
>
> Although noone really liked the choice we had to make. We do use our
> products and as consumers we are aware of the limitations sometimes we
> have to apply.

Thanks a LOT for the answers, its really great to be able to get them!.


Greetings

Kees Jongenburger
  •  Reply

Re: N900 usb host + power charge

Igor Stoppa
Karma: 181
2009-09-20 21:01 UTC
On Sun, 2009-09-20 at 22:56 +0200, ext Kees Jongenburger wrote:
> On Sun, Sep 20, 2009 at 9:02 PM, Igor Stoppa <igor.stoppa@nokia.com> wrote:

> > Add to that several HW bugs that were discovered during the development
> > and needed workarounds.
>
> Does this simply mean it's not possible at all? not even for example
> booting in HOST only mode?

AFAIK no. Not even that. Note that i'm no USB expert, but if i have
understood correctly, part of the configuration is done automatically by
the transceiver and that cannot be done because of the missing line from
the connector that would identify the port as A type.

--

Cheers, Igor

---

Igor Stoppa
Maemo Software - Nokia Devices R&D - Helsinki

  •  Reply

Re: N900 usb host + power charge

Sarah Newman
Karma: 179
2009-09-20 22:45 UTC
quim.gil@nokia.com wrote:
> Hi,
>
>>>> I plan to create a proposal for the push n900[1] and I plan to use the
>>>> usb port. I have the following question.
>>>> When the device is in usb-host mode it should of course provide power does
>>>> it? Is it possible to charge the device while it's in usb-host mode?
>
> The N900 comes without USB host mode. When I asked I was told that the limitation comes at hardware level.


The processor itself can support OTG.

Am I being told that if the kernel was working perfectly I could still
not use a program such as
http://maemo.org/downloads/product/OS2008/usbcontrol/ to manually switch?

I have heard a rumor that perhaps USB is not well enough supported yet
in the kernel for OMAP3, though very unfortunately I have not taken time
to look at it.

If I could never ever use the n900 as a host that's absolutely terrible
and extremely disappointing from a development viewpoint. It is no
better than other phones then for many possible applications.
  •  Reply

USB host mode on N900 (was Re: N900 usb host + power charge)

Paul Fertser

2009-12-08 02:06 UTC
Hi,

On Mon, 21 Sep 2009 00:01:41 +0300, Igor Stoppa wrote:
> On Sun, 2009-09-20 at 22:56 +0200, ext Kees Jongenburger wrote:
> > On Sun, Sep 20, 2009 at 9:02 PM, Igor Stoppa wrote:
> > > Add to that several HW bugs that were discovered during the
> > > development
> > > and needed workarounds.
> >
> > Does this simply mean it's not possible at all? not even for example
> > booting in HOST only mode?
>
> AFAIK no. Not even that. Note that i'm no USB expert, but if i have
> understood correctly, part of the configuration is done
> automatically by the transceiver and that cannot be done because of
> the missing line from the connector that would identify the port as
> A type.

I'm no USB expert either but given what i already know about it, i
think more hardware information is needed to be able to give a final
verdict on the N900 usb host mode functionality. I'm not talking here
about perfectly correct standards implementation or certification
issues though i personally would prefer to have a working hostmode
implementation to having a useless usb logo on the box.

So, a bit of theory first:

1. n810 analogy doesn't work here since n810 uses a dedicated usb
controller (tusb6010b) along with a power management ic (tps65030)
while n900 uses an integrated Mentor Graphics OTG controller (musb
mhdrc) and other components still unknown to the general public.

2. For "true" OTG operation a dedicated line should be routed from the
"ID" pin of receptable to the MUSB core.

3. For a device to act as a slave a "strong" 1.5k pullup should be
connected to the DP line, this way a slave signals its presence.

4. For a device to act as a host two 15k pulldowns should be connected
to DM and DP lines. If actual hardware lacks those, they can be easily
connected externally, along with the peripheral equipment.

5. MUSB has output pins to control the necessary resistors and
external circuits to provide power on Vbus.

6. Even in traditional usb-host <-> usb-device scenario power on the
5V line can come from either side, one can e.g. modify a powered hub
in a way to provide power both to the host and to the peripherals, and
since host charging circuit is generally independent from the usb
controller, one most likely can use a hub like that to charge host and
to enable usage of slave devices at the same time. Probably current
musb driver doesn't support this scenario yet but it shouldn't be hard
to implement.

7. I can't tell for sure because MUSB "datasheet" looks like a parody
but it seems highly unlikely that it's impossible to manually switch
musb to the host mode.

Now, the questions:

0. Is there any real show-stopper to use USB host mode?

1. Does n900 have an integrated curcuit to provide power to the
external devices over usb and if yes, what is it and how is it
connected/controlled?

2. Does n900 have the necessary 15k pulldowns in place?

3. Is it indeed the connection between the ID pin on usb receptable
and musb that is missing? It'd look strange to not route that line,
even if the hostmode/otg is not fully functional, it's only one
possibly useful line after all.

4. What HW bugs you mentioned are still present in the mass-produced
devices, how do they affect usb operation?

5. Since musb driver doesn't seem to be in a particularly good shape,
is it possible that some problems nokia engineers faced are software
issues and hence can be fixed? What were they?

Looking forward to your reply, TIA :)
Happy hacking!
--
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav@gmail.com
  •  Reply

Re: USB host mode on N900 (was Re: N900 usb host + power charge)

Sarah Newman
Karma: 179
2009-12-08 05:24 UTC
Paul Fertser wrote:
> I'm no USB expert either but given what i already know about it, i
> think more hardware information is needed to be able to give a final
> verdict on the N900 usb host mode functionality. I'm not talking here
> about perfectly correct standards implementation or certification
> issues though i personally would prefer to have a working hostmode
> implementation to having a useless usb logo on the box.

Please take this with a grain of salt as I only spent a couple of hours
on this.

I don't know at this time what Nokia went through to get their USB
charging to work, but my expectation is that host mode is not supported
because the n900 cannot supply power.
We also don't know what errata, if any, are active against the omap3430
and the PMIC. FYI the beagleboard uses the omap3530 and the tps65950
which appear to be functionally equivalent.

This http://www.maxim-ic.com/appnotes.cfm/an_pk/1822/ seems like a
reasonably good introduction to OTG.

That spec as well as the kernel source indicates it is possible for a
"B" device to act as host. Note on Figure 5 of that web page above that
the select for "B" device and peripheral vs. host device can be
separate. However it is still necessary for those peripheral/host
resistors to swap even if the "A/B" resistors do not swap.

Swapping the resistors appears to generally be called SoftConnect. I
recall some notes in the kernel to the effect that SoftConnect is not
supported, but whether the barrier is software or hardware I don't know.

"B" device as host looks to be at least partially implemented in the
n900 kernel but that doesn't mean it works. Connecting another device
with linux and OTG to an n900 should be the easiest way to determine if
"B" host mode is possible, assuming the other device can also support
the HNP.

There's also supposed to be a new standard where an OTG can both charge
and act as host at the same time. I have not looked at it.

In theory you should be able to measure the resistance between the
different USB lines and that may be easier to do than pure speculation.
There is also some amount of debugging information for usb available
with the default kernel.

I think there are true OTG cables which may be an easier route for testing.

Regards, Sarah

  •  Reply

Re: USB host mode on N900 (was Re: N900 usb host + power charge)

Paul Fertser

2009-12-08 08:04 UTC
Hi,

On Mon, Dec 07, 2009 at 09:24:51PM -0800, Sarah Newman wrote:
> Paul Fertser wrote:
>> I'm no USB expert either but given what i already know about it, i
>> think more hardware information is needed to be able to give a final
>> verdict on the N900 usb host mode functionality. I'm not talking here
>> about perfectly correct standards implementation or certification
>> issues though i personally would prefer to have a working hostmode
>> implementation to having a useless usb logo on the box.
>
> I don't know at this time what Nokia went through to get their USB
> charging to work, but my expectation is that host mode is not supported
> because the n900 cannot supply power.

Even if n900 can't supply power hostmode should still be possible if you
provide power to the peripheral from the outside.

Your other remarks about OTG are valid but even if proper OTG support is
impossible on n900, having host mode working in a manual way would still be
great. I mean one just switches it to the host mode, provides power and
15k pulldowns (if necessary) and it should just work.

If i had an n900 in my hands, i would use the "mode" sysfs node of the musb
driver, valid parameters are "host", "peripheral" and "otg". I'd switch it
to the host mode and measured with DMM if there's power on the Vbus and
checked the resistance between DM/DP and GND (should be ~15k). I'd connect
what's lacking externally and tried attaching some mass-storage device or a
mouse.

--
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav@gmail.com
  •  Reply

Re: USB host mode on N900 (was Re: N900 usb host + power charge)

Joerg Reisenweber
Karma: 1285
2010-11-06 10:25 UTC
[Paul Fertser Di 8. Dezember 2009]:
> Hi,
>
> On Mon, 21 Sep 2009 00:01:41 +0300, Igor Stoppa wrote:
> > On Sun, 2009-09-20 at 22:56 +0200, ext Kees Jongenburger wrote:
> > > On Sun, Sep 20, 2009 at 9:02 PM, Igor Stoppa wrote:
> > > > Add to that several HW bugs that were discovered during the
> > > > development
> > > > and needed workarounds.
> > >
> > > Does this simply mean it's not possible at all? not even for example
> > > booting in HOST only mode?
> >
> > AFAIK no. Not even that. Note that i'm no USB expert, but if i have
> > understood correctly, part of the configuration is done
> > automatically by the transceiver and that cannot be done because of
> > the missing line from the connector that would identify the port as
> > A type.
>
> I'm no USB expert either but given what i already know about it, i
> think more hardware information is needed to be able to give a final
> verdict on the N900 usb host mode functionality. I'm not talking here
> about perfectly correct standards implementation or certification
> issues though i personally would prefer to have a working hostmode
> implementation to having a useless usb logo on the box.
>
> So, a bit of theory first:
>
> 1. n810 analogy doesn't work here since n810 uses a dedicated usb
> controller (tusb6010b) along with a power management ic (tps65030)
> while n900 uses an integrated Mentor Graphics OTG controller (musb
> mhdrc) and other components still unknown to the general public.
>
> 2. For "true" OTG operation a dedicated line should be routed from the
> "ID" pin of receptable to the MUSB core.
>
> 3. For a device to act as a slave a "strong" 1.5k pullup should be
> connected to the DP line, this way a slave signals its presence.
>
> 4. For a device to act as a host two 15k pulldowns should be connected
> to DM and DP lines. If actual hardware lacks those, they can be easily
> connected externally, along with the peripheral equipment.
>
> 5. MUSB has output pins to control the necessary resistors and
> external circuits to provide power on Vbus.
>
> 6. Even in traditional usb-host <-> usb-device scenario power on the
> 5V line can come from either side, one can e.g. modify a powered hub
> in a way to provide power both to the host and to the peripherals, and
> since host charging circuit is generally independent from the usb
> controller, one most likely can use a hub like that to charge host and
> to enable usage of slave devices at the same time. Probably current
> musb driver doesn't support this scenario yet but it shouldn't be hard
> to implement.
>
> 7. I can't tell for sure because MUSB "datasheet" looks like a parody
> but it seems highly unlikely that it's impossible to manually switch
> musb to the host mode.
>
> Now, the questions:
>
> 0. Is there any real show-stopper to use USB host mode?
>
> 1. Does n900 have an integrated curcuit to provide power to the
> external devices over usb and if yes, what is it and how is it
> connected/controlled?
>
> 2. Does n900 have the necessary 15k pulldowns in place?
>
> 3. Is it indeed the connection between the ID pin on usb receptable
> and musb that is missing? It'd look strange to not route that line,
> even if the hostmode/otg is not fully functional, it's only one
> possibly useful line after all.
>
> 4. What HW bugs you mentioned are still present in the mass-produced
> devices, how do they affect usb operation?
>
> 5. Since musb driver doesn't seem to be in a particularly good shape,
> is it possible that some problems nokia engineers faced are software
> issues and hence can be fixed? What were they?
>
> Looking forward to your reply, TIA :)
> Happy hacking!


It's a pity nobody ever answered those questions, as it would have
saved us an Olympus Mons of troubles we had to go through, to find
out about all that by ourselves, with ZERO support from Nokia.

Whatever, Nokia said it's not possible, I always said it's
impossible that this is not possible, so finally

hostmode taskforce team [1] proudly presents:


* USB HOSTMODE ON N900 *
* ==================== *

see
https://garage.maemo.org/pipermail/h-e-n-devel/2010/000035.html
https://garage.maemo.org/plugins/ggit/browse.php/?p=h-e-n;a=commit;h=d7f76e505b16f7e9305c59c51d02fb1473ab5b2c

[1] hostmode taskforce team mostly are the gals and guys listed as members of h-e-n.garage.maemo.org



Joerg Reisenweber

System Architect, Senior EE, Consultant

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)

iEYEABECAAYFAkzVLSQACgkQ7Xtwhpk1UgxUlACffOorHsLHM1W/R9BEjfAHo5lm
IFgAnRQBmdq8NIpEB1L4JvG+HSD75KB1
=Pcay
-----END PGP SIGNATURE-----

  •  Reply