views:

25

answers:

1

I need to configure USB OTG on iMX31 for device mode. We need a raw channel between the host and target and usb seems to be the best suited. However I haven't been able to correctly configure the OTG controller. I dont know what I am missing. I have performed the steps mentioned in section 32.14.1 of iMX31 Reference Manual. I have also configured PORTSC1 register for ULPI.

Can any one help me out here? any poineters/code/any thing that can help me is welcome.

Thanks

+1  A: 

The litekit is supported by the vanilla Linux kernel.

It's pretty easy to declare the OTG for device mode. You just need to declare it as device when you register your device:

static struct fsl_usb2_platform_data usb_pdata = {
     .operating_mode = FSL_USB2_DR_DEVICE,
     .phy_mode       = FSL_USB2_PHY_ULPI,
};

Register code:

mxc_register_device(&mxc_otg_udc_device, &usb_pdata);

Don't forget to configure the pads for the physical ULPI lines, and eventually make the initial transactions for your transceiver.

You can find all the necessary code as I did it for the moboard platform and the marxbot board file.

Longfield