View Single 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: