Go Back   maemo.org - Talk > Devices > Nokia N900
 
Register FAQ Community Calendar Today's Posts Search

Closed Thread
 
Thread Tools
  #1011  
Old 2010-06-01, 21:33
blue_led blue_led is offline
 
Join Date: Jan 2010
Location: Romania
Posts: 306
Thanks!: 112
Thanked 566 Times in 186 Posts
Default Re: N900 will not allow USB OTG!

if N8 can otg out of the box it must have uAB receptacle and the cable can be uA male to A female which is useless for us, for N900, for this topic, for ....
The Following 2 Users Say Thank You to blue_led For This Useful Post:
  #1012  
Old 2010-06-01, 21:34
MohammadAG's Avatar
MohammadAG MohammadAG is offline
 
Join Date: Oct 2009
Location: Jerusalem, PS/IL
Posts: 2,473
Thanks!: 1,091
Thanked 12,265 Times in 1,478 Posts
Send a message via MSN to MohammadAG Send a message via Skype™ to MohammadAG
Default Re: N900 will not allow USB OTG!

Can we keep this thread for on-topic (development talk) only?

Discussions can go here imo http://talk.maemo.org/showthread.php?t=52227
The Following 8 Users Say Thank You to MohammadAG For This Useful Post:
  #1013  
Old 2010-06-01, 21:39
hcm hcm is offline
 
Join Date: Jan 2010
Location: Germany
Posts: 75
Thanks!: 26
Thanked 78 Times in 32 Posts
Default Re: N900 will not allow USB OTG!

just a short update, also a bit of a reminder for myself

according to my recent studies, "twl4030_usb_irq" is the first interrupt executed after applying VBUS and sometimes (?) also after plugging in a selfpowered hub.

this interrupt checks the state of the ID pin by calling "twl4030_usb_linkstat". Therefor I tried to fake the state of the ID pin in this function. I was in a_idle after that, and interrupts occured after plugging in peripherals. But I couldn't get my n900 to enumerate them.

Too tired to continue now, but perhaps somebody finds this information useful

Last edited by hcm; 2010-06-01 at 21:39. Reason: minor typo fix
The Following 6 Users Say Thank You to hcm For This Useful Post:
  #1014  
Old 2010-06-02, 00:13
blue_led blue_led is offline
 
Join Date: Jan 2010
Location: Romania
Posts: 306
Thanks!: 112
Thanked 566 Times in 186 Posts
Default Re: N900 will not allow USB OTG!

Because uB plug have power pins longer than id pin and vbus "select case" is first then sensing id never happen with power on vbus.

589 spin_lock_irqsave(&twl->lock, flags);
590 switch (twl->linkstat) {
591 case USB_LINK_VBUS:
592 link = "vbus";
593 break;

594 case USB_LINK_ID:
595 link = "idpin";
596 break;
597 case USB_LINK_NONE:
598 link = "none";
599 break;
600 default:
601 link = "unknown";
602 break;
603 }

this is the reason for using sequence described in my post #992 because i use stock kernel

Last edited by blue_led; 2010-06-02 at 00:17.
The Following 4 Users Say Thank You to blue_led For This Useful Post:
  #1015  
Old 2010-06-02, 07:26
javispedro's Avatar
javispedro javispedro is offline
 
Join Date: Jan 2009
Location: Barcelona
Posts: 2,355
Thanks!: 2,145
Thanked 5,249 Times in 1,344 Posts
Default Re: N900 will not allow USB OTG!

According to sarahn's test (see prev page) gaia does not assert the vbus pin but only sets the id pin bit if both vbus and id are sensed. Could you check that?
The Following 3 Users Say Thank You to javispedro For This Useful Post:
  #1016  
Old 2010-06-02, 16:28
joerg_rw's Avatar
joerg_rw joerg_rw is offline
 
Join Date: Mar 2010
Location: SOL 3
Posts: 2,222
Thanks!: 3,399
Thanked 12,651 Times in 1,970 Posts
Talking Re: N900 will not allow USB OTG!

[2010-06-02 18:25:11] <MohammadAG> WOHOOOOOOOOOO
[2010-06-02 18:25:12] <MohammadAG> [ 5635.814331] sd 0:0:0:0: [sda] Attached SCSI removable disk
[2010-06-02 18:25:29] <SpeedEvil>
[2010-06-02 18:25:38] <DocScrutinizer> now that sounds kinda nice
[2010-06-02 18:25:53] <MohammadAG> there's a lot before it, just need to filter out the debug messages
[2010-06-02 18:25:57] <DocScrutinizer> MohammadAG: you got hte friggin "too low power" patched out and your memstick working now? without ID pin grounded, without kickstart PC, and without external VBUS power applied thru powered hub or y-cable?
[2010-06-02 18:26:11] <MohammadAG> too many questions, sec
[2010-06-02 18:26:14] <MohammadAG> patched out, yes
[2010-06-02 18:26:19] <MohammadAG> flash working, yes
[2010-06-02 18:26:33] <MohammadAG> without ID ground, idk what that means so assume default :P
[2010-06-02 18:26:37] <MohammadAG> no PC involved
[2010-06-02 18:26:41] <MohammadAG> no external power
[2010-06-02 18:26:48] <DocScrutinizer> STRIIIIKE!!!

[2010-06-02 18:31:49] <MohammadAG>
[2010-06-02 18:31:53] <MohammadAG> DocScrutinizer, OTG state: a_host:9; active
[2010-06-02 18:32:28] <t-tan> show me the patches, otherwise I don't believe it ;-)
[2010-06-02 18:32:37] <MohammadAG> they're on tmo
[2010-06-02 18:32:42] <MohammadAG> huge thanks to tealbird_afk
[2010-06-02 18:33:01] <MohammadAG> btw my steps to reproduce need to be cleaned up, too many repeats :P
[2010-06-02 18:33:03] <MohammadAG> echo H >/proc/driver/musb_hdrc
[2010-06-02 18:33:04] <MohammadAG> echo host >/sys/devices/platform/musb_hdrc/mode
[2010-06-02 18:33:04] <MohammadAG> echo e > /proc/driver/musb_hdrc
[2010-06-02 18:33:04] <MohammadAG> echo F > /proc/driver/musb_hdrc
[2010-06-02 18:33:04] <MohammadAG> echo host >/sys/devices/platform/musb_hdrc/mode
[2010-06-02 18:33:20] <MohammadAG> stop bme; sleep 3; i2cset -y -m 0x07 2 0x6b 0x01 0x05; while true; do sleep 28; i2cset -y -m 0x80 2 0x6b 0x00 0x80; done

please stay cool! I know all of you are excited now ;-P But it will take another week to clean up the kernel and provide a nice little gui to handle hostmode correctly in a *safe* way

special super THANK YOU to sarahn
__________________
Maemo Community Council member [2012-10, 2013-05, 2013-11, 2014-06 terms]
Hildon Foundation Council inaugural member.
MCe.V. foundation member

EX Hildon Foundation approved
Maemo Administration Coordinator (stepped down due to bullying 2014-04-05)
aka "techstaff" - the guys who keep your infra running - Devotion to Duty http://xkcd.com/705/

IRC(freenode): DocScrutinizer*
First USB hostmode fanatic, father of H-E-N

Last edited by joerg_rw; 2010-06-02 at 18:14.
  #1017  
Old 2010-06-02, 16:30
MohammadAG's Avatar
MohammadAG MohammadAG is offline
 
Join Date: Oct 2009
Location: Jerusalem, PS/IL
Posts: 2,473
Thanks!: 1,091
Thanked 12,265 Times in 1,478 Posts
Send a message via MSN to MohammadAG Send a message via Skype™ to MohammadAG
Default Re: N900 will not allow USB OTG!

Huge props to sarahn for the kernel patches!
The Following 14 Users Say Thank You to MohammadAG For This Useful Post:
  #1018  
Old 2010-06-02, 18:35
qole's Avatar
qole qole is offline
Moderator
 
Join Date: Oct 2007
Location: Vancouver, BC, Canada
Posts: 7,109
Thanks!: 7,369
Thanked 8,820 Times in 2,918 Posts
Default Re: N900 will not allow USB OTG!

Titan, please make the kernel patches available as part of your Swiss Army Knife kernel! I think this, along with PR 1.2, pushes me over the edge. I will now flash a custom kernel!
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
The Following 2 Users Say Thank You to qole For This Useful Post:
  #1019  
Old 2010-06-02, 19:53
titan titan is offline
 
Join Date: Oct 2009
Location: Germany
Posts: 946
Thanks!: 216
Thanked 1,650 Times in 417 Posts
Default Re: N900 will not allow USB OTG!

Some bad news: I coudn't reproduce it, even with MohammadAG's kernel, script and his help on IRC.
I could get the LEDs of my stick flashing for a moment but no hostmode.
Let's hope it's just me, my device or stick and that someone else can reproduce it.
The Following 4 Users Say Thank You to titan For This Useful Post:
  #1020  
Old 2010-06-02, 20:35
Bec's Avatar
Bec Bec is offline
 
Join Date: Dec 2009
Posts: 876
Thanks!: 616
Thanked 396 Times in 193 Posts
Default Re: N900 will not allow USB OTG!

If you guys would write a tutorial I can help since I have some no-name sticks and a micro SD card reader to test on. I ordered my "OTG adapters" and they should be here in a week but I'll try some local hardware stores too in the meantime.

If you decide to write a tutorial it would be best if it's one post alone that can be edited and updated.
__________________
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


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 18:47.