Hi,

this is my first try on activating EHCI on imx53 (primarily via dt). However,
probe() still hangs on the first ehci_writel() l.189. I guess some
clock/enabling is still missing?

Sascha, do you already have EHCI running on imx53?

Any hint would be very much appreciated.

Thanks in advance,

Roland

---
 arch/arm/boot/dts/imx53.dtsi      |    8 ++++++++
 arch/arm/mach-imx/Kconfig         |    1 +
 arch/arm/mach-imx/devices-imx53.h |    4 ++++
 arch/arm/mach-imx/imx53-dt.c      |    7 +++++++
 drivers/usb/host/ehci-mxc.c       |   12 ++++++++++++
 5 files changed, 32 insertions(+)

--- linux-2.6.orig/arch/arm/boot/dts/imx53.dtsi
+++ linux-2.6/arch/arm/boot/dts/imx53.dtsi
@@ -135,6 +135,14 @@
                                };
                        };
 
+                       ehci@53f80000 {
+                               compatible = "fsl,mxc-ehci";
+                               interrupt-parent = <&tzic>;
+                               interrupts = <14>;
+                               reg = <0x53f80000 0x4000>;
+                               status = "disabled";
+                       };
+
                        gpio1: gpio@53f84000 {
                                compatible = "fsl,imx53-gpio", "fsl,imx35-gpio";
                                reg = <0x53f84000 0x4000>;
--- linux-2.6.orig/arch/arm/mach-imx/Kconfig
+++ linux-2.6/arch/arm/mach-imx/Kconfig
@@ -799,6 +799,7 @@ config MACH_MX53_DIMM
        select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
        select IMX_HAVE_PLATFORM_SPI_IMX
        select IMX_HAVE_PLATFORM_MXC_NAND
+       select IMX_HAVE_PLATFORM_MXC_EHCI
        select LEDS_GPIO_REGISTER
        help
          Include support for DIMM MX53 platform. This includes specific
--- linux-2.6.orig/arch/arm/mach-imx/devices-imx53.h
+++ linux-2.6/arch/arm/mach-imx/devices-imx53.h
@@ -45,4 +45,8 @@ extern const struct imx_pata_imx_data im
 #define imx53_add_pata_imx() \
        imx_add_pata_imx(&imx53_pata_imx_data)
 
+extern const struct imx_mxc_ehci_data imx53_mxc_ehci_data;
+#define imx53_add_mxc_ehci(pdata) \
+       imx_add_mxc_ehci(&imx53_mxc_ehci_data, pdata)
+
 extern struct platform_device *__init imx53_add_ahci_imx(void);
--- linux-2.6.orig/arch/arm/mach-imx/imx53-dt.c
+++ linux-2.6/arch/arm/mach-imx/imx53-dt.c
@@ -23,6 +23,12 @@
 #include <mach/common.h>
 #include <mach/mx53.h>
 
+#include <mach/mxc_ehci.h>
+
+static struct mxc_usbh_platform_data otg_pdata __initdata = {
+       .portsc = MXC_EHCI_MODE_SERIAL,
+};
+
 /*
  * Lookup table for attaching a specific name and platform_data pointer to
  * devices as they get created by of_platform_populate().  Ideally this table
@@ -48,6 +54,7 @@ static const struct of_dev_auxdata imx53
        OF_DEV_AUXDATA("fsl,imx53-i2c", MX53_I2C3_BASE_ADDR, "imx-i2c.2", NULL),
        OF_DEV_AUXDATA("fsl,imx53-sdma", MX53_SDMA_BASE_ADDR, "imx35-sdma", 
NULL),
        OF_DEV_AUXDATA("fsl,imx53-wdt", MX53_WDOG1_BASE_ADDR, "imx2-wdt.0", 
NULL),
+       OF_DEV_AUXDATA("fsl,mxc-ehci", MX53_OTG_BASE_ADDR, "mxc-ehci.0", 
&otg_pdata),
        { /* sentinel */ }
 };
 
--- linux-2.6.orig/drivers/usb/host/ehci-mxc.c
+++ linux-2.6/drivers/usb/host/ehci-mxc.c
@@ -18,6 +18,8 @@
  */
 
 #include <linux/platform_device.h>
+#include <linux/of.h>
+#include <linux/of_platform.h>
 #include <linux/clk.h>
 #include <linux/delay.h>
 #include <linux/usb/otg.h>
@@ -311,11 +313,21 @@ static void ehci_mxc_drv_shutdown(struct
 
 MODULE_ALIAS("platform:mxc-ehci");
 
+#ifdef CONFIG_OF
+static const struct of_device_id mxc_ehci_dt_ids[] = {
+       { .compatible = "fsl,mxc-ehci" },
+       { /* sentinel */ }
+};
+
+MODULE_DEVICE_TABLE(of, mxc_ehci_dt_ids);
+#endif
+
 static struct platform_driver ehci_mxc_driver = {
        .probe = ehci_mxc_drv_probe,
        .remove = __exit_p(ehci_mxc_drv_remove),
        .shutdown = ehci_mxc_drv_shutdown,
        .driver = {
                   .name = "mxc-ehci",
+                  .of_match_table = of_match_ptr(mxc_ehci_dt_ids),
        },
 };
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to