maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   N900 will not allow USB OTG! (https://talk.maemo.org/showthread.php?t=31921)

geohsia 2010-03-20 23:23

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by qole (Post 574115)
Use a camera that uses SD cards. Buy a micro-SD card with an SD adapter. Put the microSD with adapter into the camera, take lots of pictures. Take the microSD out of the camera, put it into the N900. Send the pictures over the Internet.

Thanks for the idea but but I shoot with a DSLR and given the investment can't move systems just to send photos. I'm hoping the techno-gurus here are able to provide a more elegant solution.

sarahn 2010-03-21 01:05

Re: N900 will not allow USB OTG!
 
BTW I believe the schematic wiki page is incorrect - the id pin apparently is connected to the twl4030 and generates an interrupt. Otherwise the usb state machine would not be moved to the a_idle state when the id pin is grounded and linkstat in /sys wouldn't say idpin. But I can't edit the page.

joerg_rw 2010-03-21 04:12

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by sarahn (Post 575260)
Having not been able to see the schematic before posting that, I thought perhaps it showed the twl4030 as the phy. That's not the case.

So the twl4030 (cribbing from the tps65950 datasheet) can drive vbus using an integrated charge pump. In order to drive vbus, cp.in needs to be connected to vbat. It is. r6 (cp.gnd) is grounded which is also good. However, I don't see any indication of the CP flying capacitor being present. According to wikipedia, the source of all knowledge, a charge pump uses a capacitor to operate. AFAIK that would not be integrated with the twl4030, so the charge pump can't operate. I also don't see vbus going to any other power supply.
.

I thought it'd be clear by my previous post that I've checked these details. It's not just wild guessing only when I suggest to try and patch kernel driver to set the correct bits in GAIA registers. AIUI there are all needed components present for the chargepump in twl4030 gaia. (see C4213,14,15). The charge pump CAN operate. So VBUS going to GAIA R8 should be sufficient for +5V supply on USB-host.

Quote:

Originally Posted by sarahn (Post 575260)
So the question is, why not have the charge pump? The 4 things I can think of is a) it added too much noise b) it doesn't actually work c) it can't supply enough power to meet spec d) it's stupid and tries to charge itself off its own charge pump.

Or perhaps there is no integrated charge pump on the chip they used. As I understand charge pumps are expensive and they may have decided the demand didn't justify the additional cost.

No, the real question is why Nokia decided to have a dedicated PHY chip for USB instead of using the builtin in TWL4030 GAIA. There might have been silicon erata (bug in chip).

Quote:

Originally Posted by sarahn (Post 575260)
Also, even though the ID pin is connected to the twl4030, I suspect that normally this interrupt needs to be signaled through the ulpi interface (I think that's what normally happens) which the twl4030 can't do.

If something creates such a need, then it's the kernel driver. I was under the impression we intended to fix it to work with the given hardware. Also nota bene that detecting ID pin is more of an OTG feature and absolutely optional for the manually activated hostmode I suggested (exactly like it's usually done on N810 as well, as it seems nobody is able to get such a magic cable with grounded ID pin. And even if you could find such a cable, it had a micro-A plug while the receptacle of N900 is a micro-B - N810 is micro-AB)

jOERG

sarahn 2010-03-21 05:49

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by joerg_rw (Post 575451)
I thought it'd be clear by my previous post that I've checked these details. It's not just wild guessing only when I suggest to try and patch kernel driver to set the correct bits in GAIA registers. AIUI there are all needed components present for the chargepump in twl4030 gaia. (see C4213,14,15).

You're saying that CP.CAPP and CP.CAPM are not the relevant signals?

Quote:

Originally Posted by joerg_rw (Post 575451)
No, the real question is why Nokia decided to have a dedicated PHY chip for USB instead of using the builtin in TWL4030 GAIA. There might have been silicon erata (bug in chip).

The beagleboard uses the tps65950 USB PHY. I thought the isp170x was used because it supported the battery charging specification and the twl4030 doesn't.

Quote:

Originally Posted by joerg_rw (Post 575451)
Also nota bene that detecting ID pin is more of an OTG feature and absolutely optional for the manually activated hostmode I suggested (exactly like it's usually done on N810 as well, as it seems nobody is able to get such a magic cable with grounded ID pin. And even if you could find such a cable, it had a micro-A plug while the receptacle of N900 is a micro-B - N810 is micro-AB)

I have such an adapter. http://www.electronicproductonline.c...oducts_id=2043 http://www.electronicproductonline.c...oducts_id=2004

It works just fine.

qole 2010-03-21 05:56

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by geohsia (Post 575263)
Thanks for the idea but but I shoot with a DSLR and given the investment can't move systems just to send photos. I'm hoping the techno-gurus here are able to provide a more elegant solution.

I understand, some DSLRs use other flash memory formats, not much you can do about that if you've invested lots of cash into that system.

I think host mode is possible with the N900. I just highly doubt it will be "elegant" to use it.

I dearly hope I'm wrong. I think that a custom kernel and a special cable isn't too ugly a solution... Maybe a special hand-held battery-powered hub that handles the hardware side of things... That would be fine, too...

joerg_rw 2010-03-21 17:28

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by sarahn (Post 575490)
You're saying that CP.CAPP and CP.CAPM are not the relevant signals?.

You're right the RX51 schematics seem missing the 2.2uF C(VBUS.FC) capacitor that should go to CP.CAPP and CP.CAPN. AIUI this is the flying cap of the chargepump. Should Nokia have messed it for us on such a stupid oopsie? :eek:

Quote:

Originally Posted by sarahn (Post 575490)
The beagleboard uses the tps65950 USB PHY. I thought the isp170x was used because it supported the battery charging specification and the twl4030 doesn't.

According to the tps65950 datasheet it should be capable of doing all that's needed for USB charging

Quote:

Originally Posted by sarahn (Post 575490)

Hmm, isn't that a mini-jack, not a micro?

jOERG

blue_led 2010-03-21 18:41

Re: N900 will not allow USB OTG!
 
1 Attachment(s)
hey, guys, we are talking too much about charge pump !
We don't neet it, bellow i'll explain why !

1. An regular PC drive vbus with 5 volt ALL THE TIME so any peripherial stick, external drive, scanner, any junk usb device can work in that configuration, switching vbus is absolutely not mandatory to usb to work. it is switching on portable devices ONLY to conserve battery power and charge pump is necessary only because batt deliver only 3.7 v.
final conclusion : we don't need switch vbus on n900. we can use a hacked cable with data lines coming from n900 and 5v from power adapter ( this config , device is called Accessory Power Adapter and i can porvide a link to some specs). N900 can charge battery when it is in host mode ( usb standard ALLOW this !! ) . charging circuits are INDEPENDENT from usb electronics and limitation, protection it is only at software level. nobody on earth can tell why n900 can't charge during communicating on host mode to any device.
let stop this discussion.

2. discussions about vbus going to twl 4030 .. useless
reason : acording twl internals this chip is doing monitorind of vbus for detecting valid state vbus. if n900 is in charge mode on vbus 5v is present and we assume 5v is alive and kicking so we can change host mode any time we want.
monitoring vbus make sense for interrupts to wake up some daemons on usb software but we want to switch host mode manualy we need only drvvbus=false and nothing else

THE LIMITATIONS ARE AT SOFTWARE LEVEL
( to be continued )

i try switch host mode but i have no success, digging in source code i can't find one f... byte of code performing even otg mode.
until now starting coding for n900 ... another head desease

joerg_rw 2010-03-22 01:28

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by blue_led (Post 576137)
hey, guys, we are talking too much about charge pump !
We don't neet it, bellow i'll explain why !

well, google for "openmoko joerg y-cable" or see http://people.openmoko.org/joerg/Y-Cable/

I'm well aware we could have hostmode without chargepump, and the kernel drivers for usb hostmode are missing. Nevertheless having a correct VBUS provided by N900 will help a lot, as nobody wants to carry an additional battery powered 5V power supply with him all the time, to occasionally connect a device to N900.
So I don't think we are talking about that 'too much'. Maybe we are talking about switching the PHY chip to hostmode (switch between 2k2 pullup and 2 * 15k pulldown) too little. And of course the main obstacle are the missing hostmode kernel drivers for now.

jOERG

cheve 2010-03-22 01:49

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by geohsia (Post 575263)
Thanks for the idea but but I shoot with a DSLR and given the investment can't move systems just to send photos. I'm hoping the techno-gurus here are able to provide a more elegant solution.

how about getting some SD-to-CF adapter? also may be you can send the pic wirelessly from your cam to N900,depending your cam system.

good luck

cheve 2010-03-22 02:00

Re: N900 will not allow USB OTG!
 
@geohsia: try search for 'cf adapter' at the 'evil-bay'


All times are GMT. The time now is 12:09.

vBulletin® Version 3.8.8