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)

javispedro 2010-05-05 18:16

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by egoshin (Post 644788)
It is not enough - ISP1707 should be switched too. And some driver internals, it doesn't switch yet to host-mode-only state machine..

That's why I am asking if we know of any forced host mode setting that works on a Beagle Board, considering they're using mostly the same driver.

EDIT: <removed stupid assertion until more info>.

I gather that mode switching is also broken on the Beagleboard: http://www.beagleboard.org/irclogs/i...2-17#T14:58:33

Venemo 2010-05-06 00:13

Re: N900 will not allow USB OTG!
 
Quote:

Quote:

There's an app in Extras-Devel calles "usbcontrol". Is it of any use?
Alas not, it's heritage from N810 and largely useless on N900, I.E. doesn't work
A pity.
Has anyone actually tried?

I mean, if it is not working, what's the point in having it in the repository?

Quote:

Originally Posted by daperl (Post 644852)
Also, from reading that stuff, I get the impression that even with chip changes and reroutes, that, besides the jack, Nokia made software-only changes to disable OTG and host mode

Yeah, it's a good habbit of theirs. (also for FM transmitters, and other stuff)

But still, it is hard to believe that Quim actually lied that the limitation comes from a hardware level.

Perhaps they said that because they didn't want us to bother and try it anyway?

joerg_rw 2010-05-06 00:55

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by Venemo (Post 645503)
But still, it is hard to believe that Quim actually lied that the limitation comes from a hardware level.

Perhaps they said that because they didn't want us to bother and try it anyway?

Quim and Igor told the absolute truth. OTG is not possible on a device with micro-B receptacle. Igor even explained why they had to do that.

Please also read the previous post of mine, with the blue and greenblue text. I elaborate on that topic a little more there

/j

Venemo 2010-05-06 01:03

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by joerg_rw (Post 645542)
Quim and Igor told the absolute truth. OTG is not possible on a device with micro-B receptacle. Igor even explained why they had to do that.

Please also read the previous post of mine, with the blue and greenblue text. I elaborate on that topic a little more there

/j

I read all your posts from the last 10 or so pages. Brilliant work. I'm not talking about OTG.
On the link, they say exactly the following:
Quote:

The N900 doesn't support USB host mode and the limitation comes at hardware level.
This is what I meant.

joerg_rw 2010-05-06 01:12

Re: N900 will not allow USB OTG!
 
hmm, to me it seems a) Quite a Number of people mix OTG and hostmode and aren't really aware of the elementary difference, and b) most have to rely on what they're told and just try to cite as good as they can, sometimes failing as they are no Electronics Engineers.

I wouldn't blame anybody for that.

/j

egoshin 2010-05-06 01:14

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by Venemo (Post 645552)
I read all your posts from the last 10 or so pages. Brilliant work. I'm not talking about OTG.
On the link, they say exactly the following:

> The N900 doesn't support USB host mode and the limitation comes at hardware level.

This is what I meant.

It is from their's honest point of view. The real truth can be tested.

javispedro 2010-05-07 00:07

Re: N900 will not allow USB OTG!
 
After booting N900, cat /proc/interrupts | grep usb:
Code:

92:          0        INTC  musb_hdrc
 93:          0        INTC  musb_hdrc
378:          5    twl4030  twl4030_usb

Plug into powered hub, as a gadget:
Code:

92:          1        INTC  musb_hdrc
 93:          0        INTC  musb_hdrc
378:          6    twl4030  twl4030_usb

Plug into self-powered hub, as a host: no new interrupts.

Even though you can hack around musb until you really convince it that it should be in host mode
Code:

Status: MHDRC, Mode=Host (Power=e1, DevCtl=82)
OTG state: a_idle; inactive

I get no debug output from it when plugged into a selfpowered hub via female-female adaptor, and seemingly no interrupts.

Also, I tried to build non-otg, only host mode kernel, but fails to boot (wild guess: tries to insert gadget modules during early start).

egoshin 2010-05-07 01:06

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by javispedro (Post 647315)
Code:

Status: MHDRC, Mode=Host (Power=e1, DevCtl=82)
OTG state: a_idle; inactive


82 means - your USB is still in B-mode, with A-session requested but not confirmed from other side. No VBUS at all.

javispedro 2010-05-07 03:26

Re: N900 will not allow USB OTG!
 
I see, so that is the DEVCTL MUSB register.


From what I gather, the ISP1707 is actually only configured specifically in one single function: http://mxr.maemo.org/fremantle/sourc...omap2430.c#400 . The twl3040 stuff is just sitting there wasting cycles, as it accesses the twl3040 registers via i2c instead of ulpi (thus configuring the 3040 and not the isp1707). (Curiously enough it's also wasting a bit of power according to 1704a datasheet as the way it is setup it is uselessly sampling the ID line).

Today I was trying a stupid approach of just lying in the linkstate about the ID pin state, and patching the force host mode function with certain 1707 specifics, like disabling the dm & dp pulldown resistors. Most of the time though, at the a_idle state, the PHY seems to be shut down: I just get timeouts trying to write via ulpi to registers, UNLESS the cable is connected or unless I have just recently reset it.

The charger sysfs node also queries the 1707, and also suffers from timeouts when no connection.

My second wild guess of the day thus is that there can't be any power saving mode when waiting for a device in host mode -- the driver should configure the 1707 properly then waste power by repeatedly trying to start a session until it succeeds. I think this is what the N8x0 does while in the a_wait_bcon state (but I really have no idea).

egoshin 2010-05-07 03:47

Re: N900 will not allow USB OTG!
 
Javier,

The cable/hw patchwork is not enough, some additonal activity in driver is needed. I am working on it.

There are two un-answered issues now for me -

- configuration of 1707 DM/DP pulldown registers is done in reverse with document. What is it - document error or software bug which does still not produce a problem? I don't know but try to find, it actually changes the resitor values only.

- Is VBUS voltage needed for 1707 to support ARM CPU USB in HOST mode? I am not familiar with USB protocol details yet to answer it fast.


All times are GMT. The time now is 07:14.

vBulletin® Version 3.8.8