[U-Boot] [PATCH 3/3] HACK: ehci-omap: do gpio toggle after port power is set

Roger Quadros rogerq at ti.com
Tue Jul 9 11:59:27 CEST 2013


On 07/08/2013 11:59 PM, Dan Murphy wrote:
> Need to check why gpio toggling in ehci-omap is not
> working and works only from ehci-hcd.

do you mean HSIC detection is not working?

GPIO toggling has to work from anywhere.

> 
> Signed-off-by: Dan Murphy <dmurphy at ti.com>
> ---
>  drivers/usb/host/ehci-hcd.c  |    7 ++++++-
>  drivers/usb/host/ehci-omap.c |    2 +-
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
> index 706cf0c..17d0c9c 100644
> --- a/drivers/usb/host/ehci-hcd.c
> +++ b/drivers/usb/host/ehci-hcd.c
> @@ -29,7 +29,7 @@
>  #include <malloc.h>
>  #include <watchdog.h>
>  #include <linux/compiler.h>
> -
> +#include <asm/ehci-omap.h>
>  #include "ehci.h"
>  
>  #ifndef CONFIG_USB_MAX_CONTROLLER_COUNT
> @@ -776,6 +776,11 @@ ehci_submit_root(struct usb_device *dev, unsigned long pipe, void *buffer,
>  			if (HCS_PPC(ehci_readl(&ctrl->hccr->cr_hcsparams))) {
>  				reg |= EHCI_PS_PP;
>  				ehci_writel(status_reg, reg);
> +#ifdef CONFIG_USB_EHCI_OMAP
> +				omap_ehci_phy_reset(1, 1000);
> +				mdelay(10);
> +				omap_ehci_phy_reset(0, 1000);
> +#endif

Did you try to first keep the PHY in reset, start the EHCI controller
and then release the reset?

At least this is what is done in the Linux kernel to get it to work.

>  			}
>  			break;
>  		case USB_PORT_FEAT_RESET:
> diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
> index 17f2214..68add44 100644
> --- a/drivers/usb/host/ehci-omap.c
> +++ b/drivers/usb/host/ehci-omap.c
> @@ -109,7 +109,7 @@ int board_usb_init(void) __attribute__((weak, alias("__board_usb_init")));
>  #if defined(CONFIG_OMAP_EHCI_PHY1_RESET_GPIO) || \
>  	defined(CONFIG_OMAP_EHCI_PHY2_RESET_GPIO)
>  /* controls PHY(s) reset signal(s) */
> -static inline void omap_ehci_phy_reset(int on, int delay)
> +void omap_ehci_phy_reset(int on, int delay)
>  {
>  	/*
>  	 * Refer ISSUE1:
> 

cheers,
-roger


More information about the U-Boot mailing list