Hi Chris, On Tue, Oct 29, 2013 at 5:15 AM, Chris Ruehl <chris.ruehl@xxxxxxxxxxxx> wrote: > Fabio was right, the imx27 uses the ChipIdea for its USB my dts config was > wrong. > More accurate settings for the OTG and H2 are: > > usbotg: usb@10024000 { > compatible = "fsl,imx27-usb"; > > reg = <0x10024000 0x200>; > interrupts = <56>; > clocks = <&clks 75>, <&clks 62>; > clock-names = "ipg", "ahb"; > > dr_mode = "host"; > phy_type = "ulpi"; > status = "disabled"; > }; > > usbh1: usb@10024200 { > compatible = "fsl,imx27-usb"; > reg = <0x10024200 0x200>; > interrupts = <54>; > clocks = <&clks 75>, <&clks 62>; > clock-names = "ipg", "ahb"; > dr_mode = "host"; > phy_type = "serial"; > status = "disabled"; > }; > > usbh2: usb@10024400 { > compatible = "fsl,imx27-usb"; > reg = <0x10024400 0x200>; > interrupts = <55>; > clocks = <&clks 75>, <&clks 62>; > clock-names = "ipg", "ahb"; > > dr_mode = "host"; > phy_type = "ulpi"; > status = "disabled"; > }; Where do you configure the pins as USB functionality? I would expect a 'pinctrl-0' into your board dts file that configure the USB pins. > and add to usbmisc_imx.c > > --- linux-3.12-rc7/drivers/usb/chipidea/usbmisc_imx.c 2013-10-28 > 07:12:03.000000000 +0800 > +++ linux-3.12-rc7-gtsys/drivers/usb/chipidea/usbmisc_imx.c 2013-10-29 > 13:31:45.523288470 +0800 > @@ -21,6 +21,11 @@ > #define MX25_USB_PHY_CTRL_OFFSET 0x08 > #define MX25_BM_EXTERNAL_VBUS_DIVIDER BIT(23) > > +#define MX27_USB_PHY_CTRL_OFFSET 0x600 /* MCIMX27RM Reference Manual v0.4 > */ > +#define MX27_BM_OVER_CUR_DIS_H1 BIT(8) /* 30.5.1.1 USBCONTROL—USB Control > Register (USB_CTRL) */ > +#define MX27_BM_OVER_CUR_DIS_H2 BIT(16) > +#define MX27_BM_OVER_CUR_DIS_OTG BIT(24) > + > #define MX53_USB_OTG_PHY_CTRL_0_OFFSET 0x08 > #define MX53_USB_UH2_CTRL_OFFSET 0x14 > #define MX53_USB_UH3_CTRL_OFFSET 0x18 > @@ -68,6 +73,37 @@ > return 0; > } > > +static int usbmisc_imx27_init(struct imx_usbmisc_data *data) > +{ > + void __iomem *reg = NULL; > + unsigned long flags; > + u32 val = 0; > + > + if (data->index > 3) > + return -EINVAL; > + > + if (data->disable_oc) { > + spin_lock_irqsave(&usbmisc->lock, flags); > + reg = usbmisc->base + MX27_USB_PHY_CTRL_OFFSET; > + switch (data->index) { > + case 0: > + val = readl(reg) | MX27_BM_OVER_CUR_DIS_OTG; > + break; > + case 1: > + val = readl(reg) | MX27_BM_OVER_CUR_DIS_H1; > + break; > + case 2: > + val = readl(reg) | MX27_BM_OVER_CUR_DIS_H2; > + break; > + } > + if (reg && val) > + writel(val, reg); > + spin_unlock_irqrestore(&usbmisc->lock, flags); > + } > + > + return 0; > +} > + > static int usbmisc_imx53_init(struct imx_usbmisc_data *data) > { > void __iomem *reg = NULL; > @@ -128,6 +164,10 @@ > .post = usbmisc_imx25_post, > }; > > +static const struct usbmisc_ops imx27_usbmisc_ops = { > + .init = usbmisc_imx27_init, > +}; > + > static const struct usbmisc_ops imx53_usbmisc_ops = { > .init = usbmisc_imx53_init, > }; > @@ -162,6 +202,10 @@ > .data = &imx25_usbmisc_ops, > }, > { > + .compatible = "fsl,imx27-usbmisc", > + .data = &imx27_usbmisc_ops, > + }, > + { > .compatible = "fsl,imx53-usbmisc", > .data = &imx53_usbmisc_ops, > }, > > [ 1.104173] ci_hdrc ci_hdrc.0: ChipIdea HDRC found, lpm: 0; cap: f4424100 > op: f4424140 > [ 1.104243] ci_hdrc ci_hdrc.0: It is OTG capable controller > [ 1.104732] ci_hdrc ci_hdrc.0: EHCI Host Controller > [ 1.109861] ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1 > [ 1.128447] ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00 > [ 1.134640] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 > [ 1.141599] usb usb1: New USB device strings: Mfr=3, Product=2, > SerialNumber=1 > [ 1.148958] usb usb1: Product: EHCI Host Controller > [ 1.153963] usb usb1: Manufacturer: Linux 3.12.0-rc7 ehci_hcd > [ 1.159831] usb usb1: SerialNumber: ci_hdrc.0 > [ 1.167399] hub 1-0:1.0: USB hub found > [ 1.171457] hub 1-0:1.0: 1 port detected > [ 1.177957] ci_hdrc ci_hdrc.1: ChipIdea HDRC found, lpm: 0; cap: f4424500 > op: f4424540 > [ 1.178071] ci_hdrc ci_hdrc.1: EHCI Host Controller > [ 1.183226] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 2 > [ 1.200450] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00 > [ 1.206643] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002 > [ 1.213601] usb usb2: New USB device strings: Mfr=3, Product=2, > SerialNumber=1 > [ 1.220962] usb usb2: Product: EHCI Host Controller > [ 1.225968] usb usb2: Manufacturer: Linux 3.12.0-rc7 ehci_hcd > [ 1.231835] usb usb2: SerialNumber: ci_hdrc.1 > [ 1.239414] hub 2-0:1.0: USB hub found > [ 1.243500] hub 2-0:1.0: 1 port detected > > A problem persists the ULPI 1504 not get detected > > any help here? Looks like you are in the right track. Have you selected the USB_ULPI in your .config? Also, please read this thread: http://www.spinics.net/lists/linux-usb/msg94584.html It talks about the non-dt mxc ehci driver, but could help you to fix the initialization order to get the 1504 detected. Regards, Fabio Estevam -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html