From: Sergei Shtylyov <sshtylyov-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
To: Ajay Kumar Gupta <ajay.gupta-l0cyMroinI0@public.gmane.org>
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/3 v3] AM35x: Add musb support
Date: Fri, 28 May 2010 18:09:16 +0400 [thread overview]
Message-ID: <4BFFCE8C.40909@ru.mvista.com> (raw)
In-Reply-To: <1274769522-28212-1-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
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 <ajay.gupta-l0cyMroinI0@public.gmane.org>
[...]
> @@ -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-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-05-28 14:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-25 6:38 [PATCH 1/3 v3] AM35x: Add musb support Ajay Kumar Gupta
2010-05-25 6:38 ` [PATCH 2/3 v3] musb: add musb support for AM35x Ajay Kumar Gupta
[not found] ` <1274769522-28212-2-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2010-05-25 6:38 ` [PATCH 3/3 v3] musb: AM35x: Workaround for fifo read issue Ajay Kumar Gupta
[not found] ` <1274769522-28212-1-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2010-05-28 14:09 ` Sergei Shtylyov [this message]
[not found] ` <4BFFCE8C.40909-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2010-05-28 14:41 ` [PATCH 1/3 v3] AM35x: Add musb support David Brownell
2010-05-29 4:29 ` Gupta, Ajay Kumar
[not found] ` <19F8576C6E063C45BE387C64729E7394044E6D2537-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2010-05-29 12:24 ` Sergei Shtylyov
2010-06-01 11:08 ` Gupta, Ajay Kumar
-- strict thread matches above, loose matches on Subject: below --
2010-05-17 10:47 Ajay Kumar Gupta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BFFCE8C.40909@ru.mvista.com \
--to=sshtylyov-igf4poytycdqt0dzr+alfa@public.gmane.org \
--cc=ajay.gupta-l0cyMroinI0@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.