Closed Thread
Thread Tools
Posts: 992 | Thanked: 995 times | Joined on Dec 2009 @ California
#691
Originally Posted by joerg_rw View Post
Sorry I'm not sure what you want to ask me. Please elaborate

/jOERG
You want to fix a driver, right?

So - what driver can do with charger chip to switch to HOST mode?

I see the usage of i2cset command but if you explain a bit more I could set this in driver and if you explain a little more clear how bcm returns device mode (or how to continue HOST mode if timer-in-chip is an issue) I could prevent it in driver.

EDIT: why VBUS is going to GAIA? I suspect it may be a way to start battery charging with dead operating system...
EDIT2: No, I think it services a re-flash...

Last edited by egoshin; 2010-05-01 at 00:59.
 

The Following 3 Users Say Thank You to egoshin For This Useful Post:
Posts: 992 | Thanked: 995 times | Joined on Dec 2009 @ California
#692
It looks like I located a stuff in driver...

isp1301_set_host(), file drivers/usb/otg/isp1301_omap.c excludes handling of mini-B as host :

/* If this has a Mini-AB connector, this mode is highly
* nonstandard ... but can be handy for testing, especially with
* the Mini-A end of an OTG cable. (Or something nonstandard
* like MiniB-to-StandardB, maybe built with a gender mender.)
*/
isp1301_set_bits(isp, ISP1301_OTG_CONTROL_1, OTG1_VBUS_DRV);

This code is excluded by definition of CONFIG_USB_OTG during compilation. Not sure is it safe to remove CONFIG_USB_OTG from configuration, needs testing.

The same is in isp1301_set_peripheral(), BTW.
 

The Following 10 Users Say Thank You to egoshin For This Useful Post:
joerg_rw's Avatar
Posts: 2,222 | Thanked: 12,651 times | Joined on Mar 2010 @ SOL 3
#693
Last point first, more later (after a short offtime )
Originally Posted by egoshin View Post
why VBUS is going to GAIA? I suspect it may be a way to start battery charging with dead operating system...
Battery charging without system assistance is done by the CRG_DET->OTG link from 1707 PHY chip to bq24150 bat charger.
The GAIA connection is to initiate system boot when VBUS is detected and high enough voltage, and also will probably signal the already booted system about VBUS being applied (plug in detection, /sys/bus/i2c/devices/1-0048/twl4030_usb/vbus)

More tomorrow
/j

Last edited by joerg_rw; 2010-05-01 at 03:27.
 

The Following 3 Users Say Thank You to joerg_rw For This Useful Post:
Posts: 992 | Thanked: 995 times | Joined on Dec 2009 @ California
#694
After looking with attention I discovered that N900 uses TWL4030 chip driver but not ISP1301. Sorry for confusion.

And driver for TWL4030 doesn't have any attempt to enforce HOST/OTG mode actually. It just prepare a software support for peripheral devices in case of OTG/HOST setup. It is a reason why writing word 'host' to /sys/.../mode file changes nothing.

EDIT: Actually, the configuration option CONFIG_USB_MUSB_HOST has no code in TWL4030. The driver is clearly designed for OTG-via-cable host-mode usage.

Last edited by egoshin; 2010-05-01 at 05:22.
 

The Following 8 Users Say Thank You to egoshin For This Useful Post:
joerg_rw's Avatar
Posts: 2,222 | Thanked: 12,651 times | Joined on Mar 2010 @ SOL 3
#695
So that's exactly where the problem starts.
Do you think you could fix that? Don't bother about powering VBUS for now, it's not that simple, not that important, and probably best managed independently of the logical switch to hostmode (imagine hostmode and nevertheless powering device via USB, by using an external Y-cable)

cheers
jOERG
 

The Following 2 Users Say Thank You to joerg_rw For This Useful Post:
Posts: 992 | Thanked: 995 times | Joined on Dec 2009 @ California
#696
I need some description - what to do with both chips. Right now I am reading this thread but it is still vague for me.

If I understand what can be done with 4030 (actually tps65950 ?) and 170x when I could fix a driver.

Is any chance to see a difference between isp1301 and isp1707?

Last edited by egoshin; 2010-05-01 at 07:25.
 

The Following 2 Users Say Thank You to egoshin For This Useful Post:
Posts: 3,664 | Thanked: 1,530 times | Joined on Sep 2009 @ Hamilton, New Zealand
#697
so how long until we see OTG working on N900 with a few mode and hack?

This project just keep on surprise me!
 
Posts: 992 | Thanked: 995 times | Joined on Dec 2009 @ California
#698
I found a manual on ISP1704A and I see in it -

Table 25.
OTG_CTRL - OTG Control register (address R = 0Ah to 0Ch, W = 0Ah, S = 0Bh, C = 0Ch) bit description:


6. Drive VBUS External: Controls the external charge pump or 5 V supply by the PSW pin.
0b — PSW is LOW
1b — PSW is HIGH
DRV_VBUS_EXT

I also see in RX51 schematics that VBUS is connected to ISP1707 via 1kOhm. So?

BTW, kernel does work with ISP1704, register OTG_CTRL in musb driver and usb omap2430.c by Nokia. But only for charging and power saving/restore. No attempt to enforce 'host' mode, looks like they assume that it can be controlled by cable...
 

The Following 2 Users Say Thank You to egoshin For This Useful Post:
clasificado's Avatar
Posts: 466 | Thanked: 180 times | Joined on Feb 2010
#699
Originally Posted by maxximuscool View Post
so how long until we see OTG working on N900 with a few mode and hack?
if you can understand what egoshin is talking about then you can figure it by yourself :P

if not, you should patiently wait as the rest of us for this and PR1.2
 

The Following 2 Users Say Thank You to clasificado For This Useful Post:
joerg_rw's Avatar
Posts: 2,222 | Thanked: 12,651 times | Joined on Mar 2010 @ SOL 3
#700
Originally Posted by egoshin View Post
It looks like I located a stuff in driver...

isp1301_set_host(), file drivers/usb/otg/isp1301_omap.c excludes handling of mini-B as host :

/* If this has a Mini-AB connector, this mode is highly
* nonstandard ... but can be handy for testing, especially with
* the Mini-A end of an OTG cable. (Or something nonstandard
* like MiniB-to-StandardB, maybe built with a gender mender.)
*/
isp1301_set_bits(isp, ISP1301_OTG_CONTROL_1, OTG1_VBUS_DRV);

This code is excluded by definition of CONFIG_USB_OTG during compilation. Not sure is it safe to remove CONFIG_USB_OTG from configuration, needs testing.

The same is in isp1301_set_peripheral(), BTW.
unsorted add:
For 1707 pulldown R:
the pulldowns are bits 1 and 2 on the OTG control register that is 0Ah to 0Ch read, 0Ah write, 0Bh set and 0Ch clear

ID pin of 1707 is hardwired to 3V3, should have been GND or even ID. But maybe we don't really need the automatic modeswitch. In fact we're borked if we need as there are no B-plugs with ID grounded

Last edited by joerg_rw; 2010-05-01 at 18:00.
 

The Following User Says Thank You to joerg_rw For This Useful Post:
Closed Thread

Tags
awesomeness in the works, boulevard of broken deals, host, i am the dealbreaker, inspector gadget lies, mobidapter is a scam, nokia fanbois, otg, over 9000, usb, usbcontrol

Thread Tools

 
Forum Jump


All times are GMT. The time now is 00:33.