From: Kevin Hilman <khilman@deeprootsystems.com>
To: David Anders <x0132446@ti.com>
Cc: linux-omap@vger.kernel.org,
linux-arm-kernel@lists.arm.linux.org.uk,
Anand Gadiyar <gadiyar@ti.com>
Subject: Re: [PATCH 4/4] omap4: pandaboard: enable the ehci port on pandaboard
Date: Wed, 06 Oct 2010 14:58:06 -0700 [thread overview]
Message-ID: <87vd5fgf0x.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1286399673-912-5-git-send-email-x0132446@ti.com> (David Anders's message of "Wed, 6 Oct 2010 16:14:33 -0500")
David Anders <x0132446@ti.com> writes:
> The OMAP4 PandaBoard has EHCI port1 hooked up to an external
> SMSC3320 transciever. GPIO 1 is used to power on the transceiver
> and GPIO 62 for reset on the transceiver.
>
> Signed-off-by: David Anders <x0132446@ti.com>
> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
This one fails to apply to current l-o master.
Kevin
> ---
> arch/arm/mach-omap2/board-omap4panda.c | 54 ++++++++++++++++++++++++++++++++
> 1 files changed, 54 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
> index 94e819c..6163a59 100644
> --- a/arch/arm/mach-omap2/board-omap4panda.c
> +++ b/arch/arm/mach-omap2/board-omap4panda.c
> @@ -39,6 +39,8 @@
> #include <plat/mmc.h>
> #include "hsmmc.h"
>
> +#define GPIO_HUB_POWER 1
> +#define GPIO_HUB_NRESET 62
>
> static void __init omap4_panda_init_irq(void)
> {
> @@ -280,6 +282,57 @@ static int __init omap4_panda_i2c_init(void)
> omap_register_i2c_bus(4, 400, NULL, 0);
> return 0;
> }
> +
> +static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
> + .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
> + .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN,
> + .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
> + .phy_reset = false,
> + .reset_gpio_port[0] = -EINVAL,
> + .reset_gpio_port[1] = -EINVAL,
> + .reset_gpio_port[2] = -EINVAL
> +};
> +
> +static void __init omap4_ehci_init(void)
> +{
> + int ret;
> +
> +
> + /* disable the power to the usb hub prior to init */
> + ret = gpio_request(GPIO_HUB_POWER, "hub_power");
> + if (ret) {
> + pr_err("Cannot request GPIO %d\n", GPIO_HUB_POWER);
> + goto error1;
> + }
> + gpio_export(GPIO_HUB_POWER, 0);
> + gpio_direction_output(GPIO_HUB_POWER, 0);
> + gpio_set_value(GPIO_HUB_POWER, 0);
> +
> + /* reset phy+hub */
> + ret = gpio_request(GPIO_HUB_NRESET, "hub_nreset");
> + if (ret) {
> + pr_err("Cannot request GPIO %d\n", GPIO_HUB_NRESET);
> + goto error2;
> + }
> + gpio_export(GPIO_HUB_NRESET, 0);
> + gpio_direction_output(GPIO_HUB_NRESET, 0);
> + gpio_set_value(GPIO_HUB_NRESET, 0);
> + gpio_set_value(GPIO_HUB_NRESET, 1);
> +
> + usb_ehci_init(&ehci_pdata);
> +
> + /* enable power to hub */
> + gpio_set_value(GPIO_HUB_POWER, 1);
> + return;
> +
> +error2:
> + gpio_free(GPIO_HUB_POWER);
> +error1:
> + pr_err("Unable to initialize EHCI power/reset\n");
> + return;
> +
> +}
> +
> static void __init omap4_panda_init(void)
> {
> omap4_panda_i2c_init();
> @@ -287,6 +340,7 @@ static void __init omap4_panda_init(void)
> omap4_twl6030_hsmmc_init(mmc);
> /* OMAP4 Panda uses internal transceiver so register nop transceiver */
> usb_nop_xceiv_register();
> + omap4_ehci_init();
> /* FIXME: allow multi-omap to boot until musb is updated for omap4 */
> if (!cpu_is_omap44xx())
> usb_musb_init(&musb_board_data);
next prev parent reply other threads:[~2010-10-06 21:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-06 21:14 [PATCH 0/4] omap4: pandaboard: machine cleanups David Anders
2010-10-06 21:14 ` [PATCH 1/4] omap4: pandaboard: remove unused hsmmc definition David Anders
2010-10-06 21:14 ` [PATCH 2/4] omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set David Anders
2010-10-06 21:14 ` [PATCH 3/4] omap4: pandaboard: Adding card detect support for MMC1 David Anders
2010-10-06 21:57 ` Kevin Hilman
2010-10-06 21:59 ` Tony Lindgren
2010-10-06 21:14 ` [PATCH 4/4] omap4: pandaboard: enable the ehci port on pandaboard David Anders
2010-10-06 21:58 ` Kevin Hilman [this message]
2010-10-06 22:12 ` [PATCH 0/4] omap4: pandaboard: machine cleanups Kevin Hilman
-- strict thread matches above, loose matches on Subject: below --
2010-10-06 21:20 David Anders
2010-10-06 21:20 ` [PATCH 4/4] omap4: pandaboard: enable the ehci port on pandaboard David Anders
2010-10-06 21:12 [PATCH 0/4] omap4: pandaboard: machine cleanups David Anders
2010-10-06 21:12 ` [PATCH 4/4] omap4: pandaboard: enable the ehci port on pandaboard David Anders
2010-09-21 21:24 [PATCH 0/4] omap4: pandaboard: machine cleanups David Anders
2010-09-21 21:24 ` [PATCH 4/4] omap4: pandaboard: enable the ehci port on pandaboard David Anders
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=87vd5fgf0x.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=gadiyar@ti.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-omap@vger.kernel.org \
--cc=x0132446@ti.com \
/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.