Active Topics

 


Closed Thread
Thread Tools
Posts: 946 | Thanked: 1,650 times | Joined on Oct 2009 @ Germany
#941
unfortunately it doesn't work. I already uncommented it during our last IRC session
and verified that one cannot force the chip to hostmode. It ignores the flag even if you properly also change the flag in the context register that is normally restored as suspend or during connect.
some other conditions need to fulfilled (device connected as peripheral?) for this flag to be effective.

Originally Posted by joerg_rw View Post
http://mxr.maemo.org/fremantle/sourc...b_procfs.c#661

Code:
656         case 'H':
657                 if (mbase) {
658                         reg = musb_readb(mbase, MUSB_DEVCTL);
659                         reg |= MUSB_DEVCTL_HR;
660                         musb_writeb(mbase, MUSB_DEVCTL, reg);
661                         /* MUSB_HST_MODE( ((struct musb*)data) ); */
662                         /* WARNING("Host Mode\n"); */
663                 }
664                 break;
 

The Following User Says Thank You to titan For This Useful Post:
joerg_rw's Avatar
Posts: 2,222 | Thanked: 12,651 times | Joined on Mar 2010 @ SOL 3
#942
just to keep you up to date (quite some kernel patches were used, including FORCE_HOSTMODE for SoC musb. NO kickstart host PC involved).


for reference:
[2010-05-24 03:59:09] <javispedro> plug b-device into
[2010-05-24 03:59:39] <javispedro> n8x0:
[2010-05-24 03:59:40] <javispedro> [25277.234375] musb_stage0_irq 645: CONNECT (a_host) devctl 5d
[2010-05-24 03:59:40] <javispedro> [25277.234375] hub 1-0:1.0: state 8 ports 1 chg 0000 evt 0000
[2010-05-24 03:59:40] <javispedro> [25277.234375] usb usb1: usb auto-resume
[2010-05-24 03:59:40] <javispedro> [25277.234375] usb usb1: finish resume
[2010-05-24 03:59:40] <javispedro> [25277.234375] hub 1-0:1.0: hub_resume
[2010-05-24 03:59:43] <javispedro> ...
[2010-05-24 03:59:56] <javispedro> Status: MHDRC, Mode=Host (Power=f0, DevCtl=5d)
[2010-05-24 03:59:57] <javispedro> OTG state: a_host; active



N900:
[2010-05-24 04:35:46] <javispedro> Status: MHDRC, Mode=Host (Power=60, DevCtl=5f)
[2010-05-24 04:35:47] <javispedro> OTG state: a_host; active
[2010-05-24 04:35:50] <javispedro> that
[2010-05-24 04:35:55] <javispedro> devctl changed after pumping power
[2010-05-24 04:35:58] <DocScrutinizer> STRIKE!
[2010-05-24 04:36:14] <javispedro> [20987.088165] generic_interrupt
[2010-05-24 04:36:14] <javispedro> [20987.088256] musb_interrupt
[2010-05-24 04:36:14] <javispedro> [20987.088287] musb_interrupt 1818: ** IRQ host usb000d tx0000 rx0000
[2010-05-24 04:36:14] <javispedro> [20987.088317] musb_stage0_irq
[2010-05-24 04:36:14] <javispedro> [20987.088348] musb_stage0_irq 580: <== Power=60, DevCtl=c4, int_usb=0x5
[2010-05-24 04:36:15] <javispedro> [20987.088378] musb_stage0_irq 764: SUSPEND (b_idle) devctl c4 power 60
[2010-05-24 04:36:17] <javispedro> [20987.088439] musb_stage0_irq 960: BABBLE devctl: c4
[2010-05-24 04:36:21] <javispedro> interrupts!!!
[2010-05-24 04:36:24] <javispedro> my beloved interrupts.
[2010-05-24 04:39:02] <javispedro> 5f is "session started"
[2010-05-24 04:39:07] <javispedro> 5d isn't
[2010-05-24 04:41:04] <javispedro> I am stable in devctl=5f as long as I keep running i2cset
__________________
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
 

The Following 7 Users Say Thank You to joerg_rw For This Useful Post:
Posts: 1 | Thanked: 0 times | Joined on May 2010
#943
Does the new commit for meego help at all?
http://meego.gitorious.org/+meego-ar...7f2aca16d605e3
 
joerg_rw's Avatar
Posts: 2,222 | Thanked: 12,651 times | Joined on Mar 2010 @ SOL 3
#944
Originally Posted by Icsoft View Post
Does the new commit for meego help at all?
http://meego.gitorious.org/+meego-ar...7f2aca16d605e3
Alas not really.
This are patches to expose a few values (of questionable relevance) from low level hardware stuff to sysfs-nodes, and similar. The whole purpose is to make bme blob work (or test if it does), under meego.
Nevertheless many thanks for sharing the pointer :-)

cheers
jOERG
__________________
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
 

The Following User Says Thank You to joerg_rw For This Useful Post:
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#945
At least it's a bit cleaned up.
 
Posts: 146 | Thanked: 14 times | Joined on Oct 2009
#946
So.. Impossible?
 

The Following User Says Thank You to Tiptronic For This Useful Post:
Posts: 992 | Thanked: 995 times | Joined on Dec 2009 @ California
#947
Originally Posted by joerg_rw View Post
just to keep you up to date (quite some kernel patches were used, including FORCE_HOSTMODE for SoC musb. NO kickstart host PC involved).


for reference:
[2010-05-24 03:59:09] <javispedro> plug b-device into
[2010-05-24 03:59:39] <javispedro> n8x0:
[2010-05-24 03:59:40] <javispedro> [25277.234375] musb_stage0_irq 645: CONNECT (a_host) devctl 5d
[2010-05-24 03:59:40] <javispedro> [25277.234375] hub 1-0:1.0: state 8 ports 1 chg 0000 evt 0000
[2010-05-24 03:59:40] <javispedro> [25277.234375] usb usb1: usb auto-resume
[2010-05-24 03:59:40] <javispedro> [25277.234375] usb usb1: finish resume
[2010-05-24 03:59:40] <javispedro> [25277.234375] hub 1-0:1.0: hub_resume
[2010-05-24 03:59:43] <javispedro> ...
[2010-05-24 03:59:56] <javispedro> Status: MHDRC, Mode=Host (Power=f0, DevCtl=5d)
[2010-05-24 03:59:57] <javispedro> OTG state: a_host; active



N900:
[2010-05-24 04:35:46] <javispedro> Status: MHDRC, Mode=Host (Power=60, DevCtl=5f)
[2010-05-24 04:35:47] <javispedro> OTG state: a_host; active
[2010-05-24 04:35:50] <javispedro> that
[2010-05-24 04:35:55] <javispedro> devctl changed after pumping power
[2010-05-24 04:35:58] <DocScrutinizer> STRIKE!
[2010-05-24 04:36:14] <javispedro> [20987.088165] generic_interrupt
[2010-05-24 04:36:14] <javispedro> [20987.088256] musb_interrupt
[2010-05-24 04:36:14] <javispedro> [20987.088287] musb_interrupt 1818: ** IRQ host usb000d tx0000 rx0000
[2010-05-24 04:36:14] <javispedro> [20987.088317] musb_stage0_irq
[2010-05-24 04:36:14] <javispedro> [20987.088348] musb_stage0_irq 580: <== Power=60, DevCtl=c4, int_usb=0x5
[2010-05-24 04:36:15] <javispedro> [20987.088378] musb_stage0_irq 764: SUSPEND (b_idle) devctl c4 power 60
[2010-05-24 04:36:17] <javispedro> [20987.088439] musb_stage0_irq 960: BABBLE devctl: c4
[2010-05-24 04:36:21] <javispedro> interrupts!!!
[2010-05-24 04:36:24] <javispedro> my beloved interrupts.
[2010-05-24 04:39:02] <javispedro> 5f is "session started"
[2010-05-24 04:39:07] <javispedro> 5d isn't
[2010-05-24 04:41:04] <javispedro> I am stable in devctl=5f as long as I keep running i2cset
I got the same result with FORCE_HOSTMODE last week with 3.5V from TWL4030. For a moment it is a clear response from other side - "protocol violation" (BABBLE). I am reading USB docs now to understand why is it. Your log shows that the problem is not in 3.5V vs 5V - is it right, that you use 5V VBUS?

BTW, can you publish your actual commands to configure chip - it may help?

Last edited by egoshin; 2010-05-24 at 19:27.
 

The Following User Says Thank You to egoshin For This Useful Post:
Posts: 306 | Thanked: 566 times | Joined on Jan 2010 @ Romania
#948
i prepare for receiving tomatoes on my face ....
preface, facts
as i understand on n900 there is 4 usb channels the first one is otg capable and the last 3 are pure hosts. isp1707 chip is connected to first channel ( otg )
until now nothing new so concentrate to this otg controller
i read a mentor datasheet saying this controller is made with ~50.000 logical gates . this assembly may work stand alone or with help of core microprocessor like cheap soft "controllers", i don't care. some logic is inside this and kernel drivers must fit this.
if designers of this controller follow the otg specifications saying otg session ( & state machine ) start from peripheral i wonder how can force this state machine with almost generic kernel routines trying to trick this blackbox
if phy would be connected to host only port i don't have any problem, host kernel routines may fit well.
so if any hacker who attempt doing host work don't have full access to full datasheet of this controller to have a clear idea how it work, which command force host and which prerequisites are necessary we grope in the dark
my english prevent me to develop this ideas
i watched this thread and tried to help but i don't "see" anybody wonder about what is real otg controller
until now any success of host mode don't trick the specifications saying : start from peripheral mode & vbus valid ( over 4.4 V)

is host working on meego ?

Last edited by blue_led; 2010-05-24 at 20:20.
 

The Following User Says Thank You to blue_led For This Useful Post:
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#949
Originally Posted by egoshin View Post
BTW, can you publish your actual commands to configure chip - it may help?
At that point,1707 was not configured in any special way other than soft reset -- so yes, it is same as your old setup.

Some snippets...
Read / Set 1707 registers:
Code:
    case 'm':
        if (mbase) {
            u8 r;
            u32 l;
            r = gpio_get_value(RX51_USB_TRANSCEIVER_RST_GPIO);
            printk("RX51_USB_TRANSCEIVER_RST_GPIO = %hu\n", r);
            l = omap_readl(OTG_SYSCONFIG);
            printk("OTG_SYSCONFIG = %x\n", l);
            r = musb_ulpi_readb(mbase, ISP1704_OTG_CTRL);
            printk("ulpi read result isp1704_otg_ctrl=%hx\n", r);
            r = musb_ulpi_readb(mbase, ISP1704_FUNC_CTRL);
            printk("                 isp1704_func_ctrl=%hx\n", r);
            r = musb_ulpi_readb(mbase, ISP1704_USB_INTRISE);
            printk("                 isp1704_usb_intr_en_r=%hx\n", r);
            r = musb_ulpi_readb(mbase, ISP1704_USB_INTFALL);
            printk("                 isp1704_usb_intr_en_f=%hx\n", r);
            r = musb_ulpi_readb(mbase, ISP1704_USB_INTSTAT);
            printk("                 isp1704_usb_intr_stat=%hx\n", r);
            r = musb_ulpi_readb(mbase, ISP1704_PWR_CTRL);
            printk("                 isp1704_pwr_ctrl=%hx\n", r);
        }
        break;

    case 'M':
        if (mbase) {
        	u8 r;
			r = ISP1704_OTG_CTRL_DP_PULLDOWN | ISP1704_OTG_CTRL_DM_PULLDOWN;
			musb_ulpi_writeb(mbase, ISP1704_OTG_CTRL, r);
			printk("writing otg_ctrl=%hx\n", r);
        }
        break;
Power up the 1707 (usually powered on/off by twl4030 vbus sense interrupts, so if you commented/removed them down it should not be needed).
Code:
    case '2':
        musb->xceiv->set_suspend(musb->xceiv, 0);
        break;
Then wait two or three seconds.

And configuring the bq vbus pump was done via user space as per DocScrutinizer instructions.

Note: after seeing all this myself I don't feel this is the right way. It's hard for me to explain a feeling, but basically, it's getting interrupts that would case the state machine to move on the n8x0, but it's not moving on the n900 -- for example one that wasn't quoted was a SESSION REQUEST while in a_wait_bcon.
Nothing happened, while on the N8x0 it would mean the state machine moves on to a_host state. After a while, when I killed the 5V pump, I got the BABBLE as the device died but the musb state machine didn't move either.
 

The Following 3 Users Say Thank You to javispedro For This Useful Post:
Posts: 1 | Thanked: 0 times | Joined on May 2010
#950
im sorry if it has been posted before but this seems to be a good alternative till some one gets the usb host working on n900.
http://www.airstash.com//support/index.html
At 99$ i think its worth it considering it features.
 
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


 
Forum Jump


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