RE: [PATCH 1/3 v3] AM35x: Add musb support
Hi, [..] > > +* 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. > > +*/ > > + devconf2 &= ~CONF2_OTGMODE; > > +#ifdef CONFIG_USB_MUSB_HOST > > + devconf2 |= CONF2_FORCE_HOST; > > Well, this is only necessary if the board doesn't have pulldown on > the USB ID signal. On DA830 EVM, rev. of the board A had it, and it got > removed on the later revisions (presumably it conflicted with OTG > function?), so this override became necessary. So, make sure this is > indeed necessary on your board as using the overrides isn't generally > desirable (they all also override VBUS sensing in addition to ID pin). Yes, it's not needed for AM3517EVM -Ajay > > > +#else > > + devconf2 |= CONF2_SESENDEN | CONF2_VBDTCTEN; > > +#endif > > + > > + omap_ctrl_writel(devconf2, AM35XX_CONTROL_DEVCONF2); > > + > > + usb_musb_init(&musb_board_data); > > +} > > + > > static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst > = { > > .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, > > #if defined(CONFIG_PANEL_SHARP_LQ043T1DG01) || \ > > WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3 v3] AM35x: Add musb support
Hello. Gupta, Ajay Kumar wrote: AM35x has musb interface (version 1.8) and uses CPPI41 DMA engine. It has USB phy built inside the IP itself. So it's more like DaVinci (earlier CPPI as well as integrated PHY) than OMAP3... Yes. Actually they removed original musb controller from OMAP3 and replaced it with DaVinci family musb ip. DA8xx/OMAP-L1x family actually. DaVinci has MUSB RTL 1.3 and CPPI 3.0, while DA8xx has RTL 1.8 and CPPI 4.1 like AM35x. -Ajay WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 1/3 v3] AM35x: Add musb support
> > > AM35x has musb interface (version 1.8) and uses CPPI41 > > DMA engine. > > > It has USB phy built inside the IP itself. > > So it's more like DaVinci (earlier CPPI as well as > integrated PHY) than OMAP3... Yes. Actually they removed original musb controller from OMAP3 and replaced it with DaVinci family musb ip. -Ajay > > > > Also added ARCH_AM35x which is required to > > differentiate musb ips > > > between OMAP3x and AM35x. -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3 v3] AM35x: Add musb support
--- On Fri, 5/28/10, Sergei Shtylyov wrote: > > Ajay Kumar Gupta wrote: > > > AM35x has musb interface (version 1.8) and uses CPPI41 > DMA engine. > > It has USB phy built inside the IP itself. So it's more like DaVinci (earlier CPPI as well as integrated PHY) than OMAP3... > > Also added ARCH_AM35x which is required to > differentiate musb ips > > between OMAP3x and AM35x. -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3 v3] AM35x: Add musb support
Hello. Ajay Kumar Gupta wrote: AM35x has musb interface (version 1.8) and uses CPPI41 DMA engine. It has USB phy built inside the IP itself. Also added ARCH_AM35x which is required to differentiate musb ips between OMAP3x and AM35x. This config would be used to for below purposes, - Select am3517.c instead of omap2430.c for compilation at drivers/usb/musb directory. Please note there are significant differneces in these two files as musb ip in quite different on AM35x. - Select workaround codes applicable for AM35x musb issues. one such workaround is for bytewise read issue on AM35x. Signed-off-by: Ajay Kumar Gupta [...] @@ -375,6 +376,43 @@ static void __init am3517_evm_init_irq(void) omap_gpio_init(); } +static struct omap_musb_board_data musb_board_data = { + .interface_type = MUSB_INTERFACE_ULPI, + .mode = MUSB_OTG, + .power = 500, +}; + +static __init void am3517_evm_musb_init(void) +{ + u32 devconf2; + + /* +* Set up USB clock/mode in the DEVCONF2 register. +*/ + devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2); + + /* USB2.0 PHY reference clock is 13 MHz */ + devconf2 &= ~CONF2_REFFREQ; + devconf2 |= CONF2_REFFREQ_13MHZ; + + /* +* 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. +*/ + devconf2 &= ~CONF2_OTGMODE; +#ifdef CONFIG_USB_MUSB_HOST + devconf2 |= CONF2_FORCE_HOST; Well, this is only necessary if the board doesn't have pulldown on the USB ID signal. On DA830 EVM, rev. of the board A had it, and it got removed on the later revisions (presumably it conflicted with OTG function?), so this override became necessary. So, make sure this is indeed necessary on your board as using the overrides isn't generally desirable (they all also override VBUS sensing in addition to ID pin). +#else + devconf2 |= CONF2_SESENDEN | CONF2_VBDTCTEN; +#endif + + omap_ctrl_writel(devconf2, AM35XX_CONTROL_DEVCONF2); + + usb_musb_init(&musb_board_data); +} + static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, #if defined(CONFIG_PANEL_SHARP_LQ043T1DG01) || \ WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html