Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

OMAPL138/AM1808 USB0 OTG config in board file

$
0
0

Hi

     I'm working on OMAPL138_LCDK board and i want to enable USB2.0 OTG on J2 connector. But there is a no initialization part for USB2.0 in board file so my self modified the board file 

static __init void omapl138_hawk_usb_init(void)
{
int ret;
u32 cfgchip2;

...

ret = da8xx_register_usb11(&omapl138_hawk_usb11_pdata);
if (ret) {
pr_warning("%s: USB 1.1 registration failed: %d\n",
__func__, ret);
goto usb11_setup_fail;
}

//USB2.0 OTG start

/*
* We have to override VBUS/ID signals when MUSB is configured into the
* host-only mode -- ID pin will float if no cable is connected, so the
* controller won't be able to drive VBUS thinking that it's a B-device.
* Otherwise, we want to use the OTG mode and enable VBUS comparators.
*/

#ifdef CONFIG_USB_MUSB_HOST
cfgchip2 |= CFGCHIP2_FORCE_HOST;
#else
cfgchip2 |= CFGCHIP2_SESENDEN | CFGCHIP2_VBDTCTEN;
#endif

cfgchip2 &= ~CFGCHIP2_OTGMODE;
cfgchip2 |= CFGCHIP2_SESENDEN | CFGCHIP2_VBDTCTEN;

pr_info("USB 2.0 OTG initialization..!!");

ret = davinci_cfg_reg(DA830_USB0_DRVVBUS);
if (ret)
pr_warning("%s: USB 2.0 PinMux setup failed: %d\n",
__func__, ret);
else {
/*
* TPS2065 switch @ 5V supplies 1 A (sustains 1.5 A),
* with the power on to power good time of 3 ms.
*/
ret = da8xx_register_usb20(1000, 3);
if (ret)
pr_warning("%s: USB 2.0 registration failed: %d\n",
__func__, ret);
}
//USB2.0 OTG end
return;

usb11_setup_fail:
gpio_free(DA850_USB1_OC_PIN);
usb11_setup_oc_fail:
gpio_free(DA850_USB1_VBUS_PIN);
}

and configuration file modification is

#
# USB Host Controller Drivers
#

CONFIG_USB_MUSB_HDRC=y
CONFIG_USB_MUSB_DA8XX=y
CONFIG_MUSB_PIO_ONLY=y

#
# USB Miscellaneous drivers
#

CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_VBUS_DRAW=2
CONFIG_USB_GADGET_DUALSPEED=y

#
# OTG and related infrastructure
#
CONFIG_USB_OTG_UTILS=y
# CONFIG_USB_GPIO_VBUS is not set
# CONFIG_USB_ULPI is not set
# CONFIG_NOP_USB_XCEIV is not set

got built success fully and i got this error

da8xx_musb_interrupt 350: VBUS error workaround (delay coming)
da8xx_musb_interrupt 350: VBUS error workaround (delay coming)

root@omapl138-lcdk:/proc/driver# ls
rtc snd-page-alloc
root@omapl138-lcdk:/proc/driver# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

there is no node for musb_hrdc. 

I dono what i missed and please let me know the issue and how to fix it.

Here i've attached log file and defconfig file.

 (Please visit the site to view this file)

(Please visit the site to view this file)

Thanks

Sangly 


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>