Patchwork [U-Boot,04/12] imx: mx51_efikamx/sb: Convert to iomux-v3

login
register
mail settings
Submitter Benoît Thébaudeau
Date May 2, 2013, 8:52 p.m.
Message ID <1367527941-30587-4-git-send-email-benoit.thebaudeau@advansee.com>
Download mbox | patch
Permalink /patch/241092/
State Superseded
Delegated to: Stefano Babic
Headers show

Comments

Benoît Thébaudeau - May 2, 2013, 8:52 p.m.
There is no change of behavior, except for older silicon revisions for which
support is removed.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
---
 board/genesi/mx51_efikamx/efikamx-usb.c |  122 +++++++++++++++++--------------
 1 file changed, 69 insertions(+), 53 deletions(-)
Matt Sealey - May 3, 2013, 3:58 p.m.
I had a patch queued which did exactly this, but I am fine with
someone else doing it ;)

Tested works exactly the same.

Signed-off-by: Matt Sealey <matt@genesi-usa.com>

On Thu, May 2, 2013 at 3:52 PM, Benoît Thébaudeau
<benoit.thebaudeau@advansee.com> wrote:
> There is no change of behavior, except for older silicon revisions for which
> support is removed.
>
> Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
> ---
>  board/genesi/mx51_efikamx/efikamx-usb.c |  122 +++++++++++++++++--------------
>  1 file changed, 69 insertions(+), 53 deletions(-)
>
> diff --git a/board/genesi/mx51_efikamx/efikamx-usb.c b/board/genesi/mx51_efikamx/efikamx-usb.c
> index cf020c3..cabad70 100644
> --- a/board/genesi/mx51_efikamx/efikamx-usb.c
> +++ b/board/genesi/mx51_efikamx/efikamx-usb.c
> @@ -26,8 +26,7 @@
>  #include <usb.h>
>  #include <asm/io.h>
>  #include <asm/arch/imx-regs.h>
> -#include <asm/arch/mx5x_pins.h>
> -#include <asm/arch/iomux.h>
> +#include <asm/arch/iomux-mx51.h>
>  #include <asm/gpio.h>
>  #include <usb/ehci-fsl.h>
>  #include <usb/ulpi.h>
> @@ -35,40 +34,57 @@
>
>  #include "../../../drivers/usb/host/ehci.h"
>
> -/* USB pin configuration */
> -#define USB_PAD_CONFIG (PAD_CTL_PKE_ENABLE | PAD_CTL_SRE_FAST | \
> -                       PAD_CTL_DRV_HIGH | PAD_CTL_100K_PU | \
> -                       PAD_CTL_HYS_ENABLE | PAD_CTL_PUE_PULL)
> -
>  /*
>   * Configure the USB H1 and USB H2 IOMUX
>   */
>  void setup_iomux_usb(void)
>  {
> -       setup_iomux_usb_h1();
> -
> -       if (machine_is_efikasb())
> -               setup_iomux_usb_h2();
> -
> -       /* USB PHY reset */
> -       mxc_request_iomux(MX51_PIN_EIM_D27, IOMUX_CONFIG_ALT1);
> -       mxc_iomux_set_pad(MX51_PIN_EIM_D27, PAD_CTL_PKE_ENABLE |
> -                       PAD_CTL_SRE_FAST | PAD_CTL_DRV_HIGH);
> -
> -       /* USB HUB reset */
> -       mxc_request_iomux(MX51_PIN_GPIO1_5, IOMUX_CONFIG_ALT0);
> -       mxc_iomux_set_pad(MX51_PIN_GPIO1_5, PAD_CTL_PKE_ENABLE |
> -                       PAD_CTL_SRE_FAST | PAD_CTL_DRV_HIGH);
> -
> -       /* WIFI EN (act low) */
> -       mxc_request_iomux(MX51_PIN_EIM_A22, IOMUX_CONFIG_GPIO);
> -       mxc_iomux_set_pad(MX51_PIN_EIM_A22, 0);
> -       /* WIFI RESET */
> -       mxc_request_iomux(MX51_PIN_EIM_A16, IOMUX_CONFIG_GPIO);
> -       mxc_iomux_set_pad(MX51_PIN_EIM_A16, 0);
> -       /* BT EN (act low) */
> -       mxc_request_iomux(MX51_PIN_EIM_A17, IOMUX_CONFIG_GPIO);
> -       mxc_iomux_set_pad(MX51_PIN_EIM_A17, 0);
> +       static const iomux_v3_cfg_t usb_h1_pads[] = {
> +               MX51_PAD_USBH1_CLK__USBH1_CLK,
> +               MX51_PAD_USBH1_DIR__USBH1_DIR,
> +               MX51_PAD_USBH1_STP__USBH1_STP,
> +               MX51_PAD_USBH1_NXT__USBH1_NXT,
> +               MX51_PAD_USBH1_DATA0__USBH1_DATA0,
> +               MX51_PAD_USBH1_DATA1__USBH1_DATA1,
> +               MX51_PAD_USBH1_DATA2__USBH1_DATA2,
> +               MX51_PAD_USBH1_DATA3__USBH1_DATA3,
> +               MX51_PAD_USBH1_DATA4__USBH1_DATA4,
> +               MX51_PAD_USBH1_DATA5__USBH1_DATA5,
> +               MX51_PAD_USBH1_DATA6__USBH1_DATA6,
> +               MX51_PAD_USBH1_DATA7__USBH1_DATA7,
> +       };
> +
> +       static const iomux_v3_cfg_t usb_pads[] = {
> +               MX51_PAD_EIM_D27__GPIO2_9, /* USB PHY reset */
> +               MX51_PAD_GPIO1_5__GPIO1_5, /* USB HUB reset */
> +               NEW_PAD_CTRL(MX51_PAD_EIM_A22__GPIO2_16, 0), /* WIFI /EN */
> +               NEW_PAD_CTRL(MX51_PAD_EIM_A16__GPIO2_10, 0), /* WIFI RESET */
> +               NEW_PAD_CTRL(MX51_PAD_EIM_A17__GPIO2_11, 0), /* BT /EN */
> +       };
> +
> +       imx_iomux_v3_setup_multiple_pads(usb_h1_pads, ARRAY_SIZE(usb_h1_pads));
> +
> +       if (machine_is_efikasb()) {
> +               static const iomux_v3_cfg_t usb_h2_pads[] = {
> +                       MX51_PAD_EIM_A24__USBH2_CLK,
> +                       MX51_PAD_EIM_A25__USBH2_DIR,
> +                       MX51_PAD_EIM_A26__USBH2_STP,
> +                       MX51_PAD_EIM_A27__USBH2_NXT,
> +                       MX51_PAD_EIM_D16__USBH2_DATA0,
> +                       MX51_PAD_EIM_D17__USBH2_DATA1,
> +                       MX51_PAD_EIM_D18__USBH2_DATA2,
> +                       MX51_PAD_EIM_D19__USBH2_DATA3,
> +                       MX51_PAD_EIM_D20__USBH2_DATA4,
> +                       MX51_PAD_EIM_D21__USBH2_DATA5,
> +                       MX51_PAD_EIM_D22__USBH2_DATA6,
> +                       MX51_PAD_EIM_D23__USBH2_DATA7,
> +               };
> +
> +               imx_iomux_v3_setup_multiple_pads(usb_h2_pads,
> +                                                ARRAY_SIZE(usb_h2_pads));
> +       }
> +
> +       imx_iomux_v3_setup_multiple_pads(usb_pads, ARRAY_SIZE(usb_pads));
>  }
>
>  /*
> @@ -77,18 +93,18 @@ void setup_iomux_usb(void)
>  static void efika_usb_enable_devices(void)
>  {
>         /* Enable Bluetooth */
> -       gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_EIM_A17), 0);
> +       gpio_direction_output(IMX_GPIO_NR(2, 11), 0);
>         udelay(10000);
> -       gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_EIM_A17), 1);
> +       gpio_set_value(IMX_GPIO_NR(2, 11), 1);
>
>         /* Enable WiFi */
> -       gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_EIM_A22), 1);
> +       gpio_direction_output(IMX_GPIO_NR(2, 16), 1);
>         udelay(10000);
>
>         /* Reset the WiFi chip */
> -       gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_EIM_A16), 0);
> +       gpio_direction_output(IMX_GPIO_NR(2, 10), 0);
>         udelay(10000);
> -       gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_EIM_A16), 1);
> +       gpio_set_value(IMX_GPIO_NR(2, 10), 1);
>  }
>
>  /*
> @@ -97,11 +113,11 @@ static void efika_usb_enable_devices(void)
>  static void efika_usb_hub_reset(void)
>  {
>         /* HUB reset */
> -       gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_GPIO1_5), 1);
> +       gpio_direction_output(IMX_GPIO_NR(1, 5), 1);
>         udelay(1000);
> -       gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_GPIO1_5), 0);
> +       gpio_set_value(IMX_GPIO_NR(1, 5), 0);
>         udelay(1000);
> -       gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_GPIO1_5), 1);
> +       gpio_set_value(IMX_GPIO_NR(1, 5), 1);
>  }
>
>  /*
> @@ -110,28 +126,26 @@ static void efika_usb_hub_reset(void)
>  static void efika_usb_phy_reset(void)
>  {
>         /* SMSC 3317 PHY reset */
> -       gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_EIM_D27), 0);
> +       gpio_direction_output(IMX_GPIO_NR(2, 9), 0);
>         udelay(1000);
> -       gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_EIM_D27), 1);
> +       gpio_set_value(IMX_GPIO_NR(2, 9), 1);
>  }
>
>  static void efika_ehci_init(struct usb_ehci *ehci, uint32_t stp_gpio,
> -                               uint32_t alt0, uint32_t alt1)
> +                               iomux_v3_cfg_t stp_pad_gpio,
> +                               iomux_v3_cfg_t stp_pad_usb)
>  {
>         int ret;
>         struct ulpi_regs *ulpi = (struct ulpi_regs *)0;
>         struct ulpi_viewport ulpi_vp;
>
> -       mxc_request_iomux(stp_gpio, alt0);
> -       mxc_iomux_set_pad(stp_gpio, PAD_CTL_DRV_HIGH |
> -                               PAD_CTL_PKE_ENABLE | PAD_CTL_SRE_FAST);
> -       gpio_direction_output(IOMUX_TO_GPIO(stp_gpio), 0);
> +       imx_iomux_v3_setup_pad(stp_pad_gpio);
> +       gpio_direction_output(stp_gpio, 0);
>         udelay(1000);
> -       gpio_set_value(IOMUX_TO_GPIO(stp_gpio), 1);
> +       gpio_set_value(stp_gpio, 1);
>         udelay(1000);
>
> -       mxc_request_iomux(stp_gpio, alt1);
> -       mxc_iomux_set_pad(stp_gpio, USB_PAD_CONFIG);
> +       imx_iomux_v3_setup_pad(stp_pad_usb);
>         udelay(10000);
>
>         ulpi_vp.viewport_addr = (u32)&ehci->ulpi_viewpoint;
> @@ -204,11 +218,13 @@ void board_ehci_hcd_postinit(struct usb_ehci *ehci, int port)
>                 tmp = (tmp & ~0x3) | 0x01;
>                 writel(tmp, OTG_BASE_ADDR + 0x80c);
>         } else if (port == 1) {
> -               efika_ehci_init(ehci, MX51_PIN_USBH1_STP,
> -                               IOMUX_CONFIG_ALT2, IOMUX_CONFIG_ALT0);
> +               efika_ehci_init(ehci, IMX_GPIO_NR(1, 27),
> +                               MX51_PAD_USBH1_STP__GPIO1_27,
> +                               MX51_PAD_USBH1_STP__USBH1_STP);
>         } else if ((port == 2) && machine_is_efikasb()) {
> -               efika_ehci_init(ehci, MX51_PIN_EIM_A26,
> -                               IOMUX_CONFIG_ALT1, IOMUX_CONFIG_ALT2);
> +               efika_ehci_init(ehci, IMX_GPIO_NR(2, 20),
> +                               MX51_PAD_EIM_A26__GPIO2_20,
> +                               MX51_PAD_EIM_A26__USBH2_STP);
>         }
>
>         if (port)
> --
> 1.7.10.4
>
Benoît Thébaudeau - May 3, 2013, 4:01 p.m.
On Friday, May 3, 2013 5:58:24 PM, Matt Sealey wrote:
> I had a patch queued which did exactly this, but I am fine with
> someone else doing it ;)
> 
> Tested works exactly the same.
> 
> Signed-off-by: Matt Sealey <matt@genesi-usa.com>

You probably mean "Tested-by".

Best regards,
Benoît
Matt Sealey - May 16, 2013, 6:05 p.m.
I mean Signed-off-by since I'm the maintainer on the file you changed
and I put the iomux-v3 support in the tree in the first place so I'm
in the delivery path of the patch ;)

Sure, I tested it, otherwise I wouldn't be totally fine with it. But
this is code I have to look after in the future... so I'm signing off
on it.

On Fri, May 3, 2013 at 11:01 AM, Benoît Thébaudeau
<benoit.thebaudeau@advansee.com> wrote:
> On Friday, May 3, 2013 5:58:24 PM, Matt Sealey wrote:
>> I had a patch queued which did exactly this, but I am fine with
>> someone else doing it ;)
>>
>> Tested works exactly the same.
>>
>> Signed-off-by: Matt Sealey <matt@genesi-usa.com>
>
> You probably mean "Tested-by".
>
> Best regards,
> Benoît
Benoît Thébaudeau - May 16, 2013, 6:51 p.m.
Hi Matt,

On Thursday, May 16, 2013 8:05:22 PM, Matt Sealey wrote:
> I mean Signed-off-by since I'm the maintainer on the file you changed
> and I put the iomux-v3 support in the tree in the first place so I'm
> in the delivery path of the patch ;)
> 
> Sure, I tested it, otherwise I wouldn't be totally fine with it. But
> this is code I have to look after in the future... so I'm signing off
> on it.

It's not how the rules in U-Boot work. See:
http://www.denx.de/wiki/view/U-Boot/Patches#Review_Process_Git_Tags
;)

Only the people directly involved in the development of a patch may add their
SoB line, not custodians, not maintainers, not people in its delivery path if
they have not changed anything, and not authors of previous commits of related
code.

And being the author of previous commits on which a new patch depends has
nothing to do with being in the delivery path of this patch.

Hence, the only options that you have in this particular case are Reviewed-by,
Acked-by (I think that this one is also available to maintainers, not only to
custodians), and Tested-by.

Best regards,
Benoît

Patch

diff --git a/board/genesi/mx51_efikamx/efikamx-usb.c b/board/genesi/mx51_efikamx/efikamx-usb.c
index cf020c3..cabad70 100644
--- a/board/genesi/mx51_efikamx/efikamx-usb.c
+++ b/board/genesi/mx51_efikamx/efikamx-usb.c
@@ -26,8 +26,7 @@ 
 #include <usb.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
-#include <asm/arch/mx5x_pins.h>
-#include <asm/arch/iomux.h>
+#include <asm/arch/iomux-mx51.h>
 #include <asm/gpio.h>
 #include <usb/ehci-fsl.h>
 #include <usb/ulpi.h>
@@ -35,40 +34,57 @@ 
 
 #include "../../../drivers/usb/host/ehci.h"
 
-/* USB pin configuration */
-#define USB_PAD_CONFIG	(PAD_CTL_PKE_ENABLE | PAD_CTL_SRE_FAST | \
-			PAD_CTL_DRV_HIGH | PAD_CTL_100K_PU | \
-			PAD_CTL_HYS_ENABLE | PAD_CTL_PUE_PULL)
-
 /*
  * Configure the USB H1 and USB H2 IOMUX
  */
 void setup_iomux_usb(void)
 {
-	setup_iomux_usb_h1();
-
-	if (machine_is_efikasb())
-		setup_iomux_usb_h2();
-
-	/* USB PHY reset */
-	mxc_request_iomux(MX51_PIN_EIM_D27, IOMUX_CONFIG_ALT1);
-	mxc_iomux_set_pad(MX51_PIN_EIM_D27, PAD_CTL_PKE_ENABLE |
-			PAD_CTL_SRE_FAST | PAD_CTL_DRV_HIGH);
-
-	/* USB HUB reset */
-	mxc_request_iomux(MX51_PIN_GPIO1_5, IOMUX_CONFIG_ALT0);
-	mxc_iomux_set_pad(MX51_PIN_GPIO1_5, PAD_CTL_PKE_ENABLE |
-			PAD_CTL_SRE_FAST | PAD_CTL_DRV_HIGH);
-
-	/* WIFI EN (act low) */
-	mxc_request_iomux(MX51_PIN_EIM_A22, IOMUX_CONFIG_GPIO);
-	mxc_iomux_set_pad(MX51_PIN_EIM_A22, 0);
-	/* WIFI RESET */
-	mxc_request_iomux(MX51_PIN_EIM_A16, IOMUX_CONFIG_GPIO);
-	mxc_iomux_set_pad(MX51_PIN_EIM_A16, 0);
-	/* BT EN (act low) */
-	mxc_request_iomux(MX51_PIN_EIM_A17, IOMUX_CONFIG_GPIO);
-	mxc_iomux_set_pad(MX51_PIN_EIM_A17, 0);
+	static const iomux_v3_cfg_t usb_h1_pads[] = {
+		MX51_PAD_USBH1_CLK__USBH1_CLK,
+		MX51_PAD_USBH1_DIR__USBH1_DIR,
+		MX51_PAD_USBH1_STP__USBH1_STP,
+		MX51_PAD_USBH1_NXT__USBH1_NXT,
+		MX51_PAD_USBH1_DATA0__USBH1_DATA0,
+		MX51_PAD_USBH1_DATA1__USBH1_DATA1,
+		MX51_PAD_USBH1_DATA2__USBH1_DATA2,
+		MX51_PAD_USBH1_DATA3__USBH1_DATA3,
+		MX51_PAD_USBH1_DATA4__USBH1_DATA4,
+		MX51_PAD_USBH1_DATA5__USBH1_DATA5,
+		MX51_PAD_USBH1_DATA6__USBH1_DATA6,
+		MX51_PAD_USBH1_DATA7__USBH1_DATA7,
+	};
+
+	static const iomux_v3_cfg_t usb_pads[] = {
+		MX51_PAD_EIM_D27__GPIO2_9, /* USB PHY reset */
+		MX51_PAD_GPIO1_5__GPIO1_5, /* USB HUB reset */
+		NEW_PAD_CTRL(MX51_PAD_EIM_A22__GPIO2_16, 0), /* WIFI /EN */
+		NEW_PAD_CTRL(MX51_PAD_EIM_A16__GPIO2_10, 0), /* WIFI RESET */
+		NEW_PAD_CTRL(MX51_PAD_EIM_A17__GPIO2_11, 0), /* BT /EN */
+	};
+
+	imx_iomux_v3_setup_multiple_pads(usb_h1_pads, ARRAY_SIZE(usb_h1_pads));
+
+	if (machine_is_efikasb()) {
+		static const iomux_v3_cfg_t usb_h2_pads[] = {
+			MX51_PAD_EIM_A24__USBH2_CLK,
+			MX51_PAD_EIM_A25__USBH2_DIR,
+			MX51_PAD_EIM_A26__USBH2_STP,
+			MX51_PAD_EIM_A27__USBH2_NXT,
+			MX51_PAD_EIM_D16__USBH2_DATA0,
+			MX51_PAD_EIM_D17__USBH2_DATA1,
+			MX51_PAD_EIM_D18__USBH2_DATA2,
+			MX51_PAD_EIM_D19__USBH2_DATA3,
+			MX51_PAD_EIM_D20__USBH2_DATA4,
+			MX51_PAD_EIM_D21__USBH2_DATA5,
+			MX51_PAD_EIM_D22__USBH2_DATA6,
+			MX51_PAD_EIM_D23__USBH2_DATA7,
+		};
+
+		imx_iomux_v3_setup_multiple_pads(usb_h2_pads,
+						 ARRAY_SIZE(usb_h2_pads));
+	}
+
+	imx_iomux_v3_setup_multiple_pads(usb_pads, ARRAY_SIZE(usb_pads));
 }
 
 /*
@@ -77,18 +93,18 @@  void setup_iomux_usb(void)
 static void efika_usb_enable_devices(void)
 {
 	/* Enable Bluetooth */
-	gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_EIM_A17), 0);
+	gpio_direction_output(IMX_GPIO_NR(2, 11), 0);
 	udelay(10000);
-	gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_EIM_A17), 1);
+	gpio_set_value(IMX_GPIO_NR(2, 11), 1);
 
 	/* Enable WiFi */
-	gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_EIM_A22), 1);
+	gpio_direction_output(IMX_GPIO_NR(2, 16), 1);
 	udelay(10000);
 
 	/* Reset the WiFi chip */
-	gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_EIM_A16), 0);
+	gpio_direction_output(IMX_GPIO_NR(2, 10), 0);
 	udelay(10000);
-	gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_EIM_A16), 1);
+	gpio_set_value(IMX_GPIO_NR(2, 10), 1);
 }
 
 /*
@@ -97,11 +113,11 @@  static void efika_usb_enable_devices(void)
 static void efika_usb_hub_reset(void)
 {
 	/* HUB reset */
-	gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_GPIO1_5), 1);
+	gpio_direction_output(IMX_GPIO_NR(1, 5), 1);
 	udelay(1000);
-	gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_GPIO1_5), 0);
+	gpio_set_value(IMX_GPIO_NR(1, 5), 0);
 	udelay(1000);
-	gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_GPIO1_5), 1);
+	gpio_set_value(IMX_GPIO_NR(1, 5), 1);
 }
 
 /*
@@ -110,28 +126,26 @@  static void efika_usb_hub_reset(void)
 static void efika_usb_phy_reset(void)
 {
 	/* SMSC 3317 PHY reset */
-	gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_EIM_D27), 0);
+	gpio_direction_output(IMX_GPIO_NR(2, 9), 0);
 	udelay(1000);
-	gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_EIM_D27), 1);
+	gpio_set_value(IMX_GPIO_NR(2, 9), 1);
 }
 
 static void efika_ehci_init(struct usb_ehci *ehci, uint32_t stp_gpio,
-				uint32_t alt0, uint32_t alt1)
+				iomux_v3_cfg_t stp_pad_gpio,
+				iomux_v3_cfg_t stp_pad_usb)
 {
 	int ret;
 	struct ulpi_regs *ulpi = (struct ulpi_regs *)0;
 	struct ulpi_viewport ulpi_vp;
 
-	mxc_request_iomux(stp_gpio, alt0);
-	mxc_iomux_set_pad(stp_gpio, PAD_CTL_DRV_HIGH |
-				PAD_CTL_PKE_ENABLE | PAD_CTL_SRE_FAST);
-	gpio_direction_output(IOMUX_TO_GPIO(stp_gpio), 0);
+	imx_iomux_v3_setup_pad(stp_pad_gpio);
+	gpio_direction_output(stp_gpio, 0);
 	udelay(1000);
-	gpio_set_value(IOMUX_TO_GPIO(stp_gpio), 1);
+	gpio_set_value(stp_gpio, 1);
 	udelay(1000);
 
-	mxc_request_iomux(stp_gpio, alt1);
-	mxc_iomux_set_pad(stp_gpio, USB_PAD_CONFIG);
+	imx_iomux_v3_setup_pad(stp_pad_usb);
 	udelay(10000);
 
 	ulpi_vp.viewport_addr = (u32)&ehci->ulpi_viewpoint;
@@ -204,11 +218,13 @@  void board_ehci_hcd_postinit(struct usb_ehci *ehci, int port)
 		tmp = (tmp & ~0x3) | 0x01;
 		writel(tmp, OTG_BASE_ADDR + 0x80c);
 	} else if (port == 1) {
-		efika_ehci_init(ehci, MX51_PIN_USBH1_STP,
-				IOMUX_CONFIG_ALT2, IOMUX_CONFIG_ALT0);
+		efika_ehci_init(ehci, IMX_GPIO_NR(1, 27),
+				MX51_PAD_USBH1_STP__GPIO1_27,
+				MX51_PAD_USBH1_STP__USBH1_STP);
 	} else if ((port == 2) && machine_is_efikasb()) {
-		efika_ehci_init(ehci, MX51_PIN_EIM_A26,
-				IOMUX_CONFIG_ALT1, IOMUX_CONFIG_ALT2);
+		efika_ehci_init(ehci, IMX_GPIO_NR(2, 20),
+				MX51_PAD_EIM_A26__GPIO2_20,
+				MX51_PAD_EIM_A26__USBH2_STP);
 	}
 
 	if (port)