Re: USB host mode on N900 (was Re: N900 usb host + power charge)
[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/35.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 signature.asc Description: This is a digitally signed message part. ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: USB host mode on N900 (was Re: N900 usb host + power charge)
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:fercer...@gmail.com ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: USB host mode on N900 (was Re: N900 usb host + power charge)
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 ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
USB host mode on N900 (was Re: N900 usb host + power charge)
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:fercer...@gmail.com ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers