public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Freescale P1022 SoC hangs when initializing USB
@ 2013-05-24 14:42 Thumshirn, Johannes Tobias
  2013-05-24 17:05 ` Anatolij Gustschin
  0 siblings, 1 reply; 3+ messages in thread
From: Thumshirn, Johannes Tobias @ 2013-05-24 14:42 UTC (permalink / raw)
  To: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org

Hi list,

I'm experiencing problems while booting on a Freescale P1013 based board. It hangs on USB initialization:
[    3.763584] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.770519] ehci-pci: EHCI PCI platform driver
[    3.775116] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    3.781972] fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
[    3.788812] fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1

The corresponding device-tree:
usb@22000 {
                     #address-cells = <1>;
                     #size-cells = <0>;
                     compatible = "fsl-usb2-dr";
                     reg = <0x22000 0x1000>;
                     interrupt-parent = <&mpic>;
                     interrupts = <28 0x2 0 0>;
                     phy_type = "ulpi";
};

usb@23000 {
                      #address-cells = <1>;
                      #size-cells = <0>;
                      compatible = "fsl-usb2-dr";
                      reg = <0x23000 0x1000>;
                      interrupt-parent = <&mpic>;
                      interrupts = <46 0x2 0 0>;
                      phy_type = "ulpi";
};

It also seems I'm not the only one having this problem: 
https://lists.ozlabs.org/pipermail/linuxppc-dev/2013-January/103344.html
though my configuration uses ULPI instead of UTMI mode and a warm reset doesn't
get it up as well.

I can verify that the 1st write to ehci->regs->port_status[0] in ehci_fsl_setup_phy()
causes the hang and the P1022 Datasheet  states:
"A write to registers in the USB controller memory map may cause the
system to hang if PORTSC[PHCD]=0 when no USB PHY clock is applied."
- (Ch. 18.2 - p. 1098).
Setting PORTSC[PHCD]=1 solves the hang for exactly one write.
I can verify it on 3.4.18 as well as on 3.10-rc2.

A hardware problem can be eliminated as U-Boot and VxWorks have no trouble initializing the EHCI.
Does anyone have similar problems or a solution to this?

Copying U-Boot's PHY initialization routine to enable the ULPI clock did not get it up either.

Thanks in advance,
Johannes

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Freescale P1022 SoC hangs when initializing USB
  2013-05-24 14:42 Freescale P1022 SoC hangs when initializing USB Thumshirn, Johannes Tobias
@ 2013-05-24 17:05 ` Anatolij Gustschin
  2013-05-27  8:47   ` AW: " Thumshirn, Johannes Tobias
  0 siblings, 1 reply; 3+ messages in thread
From: Anatolij Gustschin @ 2013-05-24 17:05 UTC (permalink / raw)
  To: Thumshirn, Johannes Tobias
  Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org

On Fri, 24 May 2013 14:42:46 +0000
"Thumshirn, Johannes Tobias" <Johannes.Thumshirn@men.de> wrote:

> Hi list,
> 
> I'm experiencing problems while booting on a Freescale P1013 based board. It hangs on USB initialization:
> [    3.763584] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> [    3.770519] ehci-pci: EHCI PCI platform driver
> [    3.775116] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
> [    3.781972] fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
> [    3.788812] fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1
> 
> The corresponding device-tree:
> usb@22000 {
>                      #address-cells = <1>;
>                      #size-cells = <0>;
>                      compatible = "fsl-usb2-dr";
>                      reg = <0x22000 0x1000>;
>                      interrupt-parent = <&mpic>;
>                      interrupts = <28 0x2 0 0>;
>                      phy_type = "ulpi";
> };
> 
> usb@23000 {
>                       #address-cells = <1>;
>                       #size-cells = <0>;
>                       compatible = "fsl-usb2-dr";
>                       reg = <0x23000 0x1000>;
>                       interrupt-parent = <&mpic>;
>                       interrupts = <46 0x2 0 0>;
>                       phy_type = "ulpi";
> };

please change compatible property in both nodes to

 compatible = "fsl-usb2-dr-v1.6", "fsl-usb2-dr";

and try again to see if it helps.

Thanks,

Anatolij

^ permalink raw reply	[flat|nested] 3+ messages in thread

* AW: Freescale P1022 SoC hangs when initializing USB
  2013-05-24 17:05 ` Anatolij Gustschin
@ 2013-05-27  8:47   ` Thumshirn, Johannes Tobias
  0 siblings, 0 replies; 3+ messages in thread
From: Thumshirn, Johannes Tobias @ 2013-05-27  8:47 UTC (permalink / raw)
  To: Anatolij Gustschin
  Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org


> Hi list,
> 
> I'm experiencing problems while booting on a Freescale P1013 based board. It hangs on USB initialization:
> [    3.763584] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> [    3.770519] ehci-pci: EHCI PCI platform driver
> [    3.775116] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
> [    3.781972] fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
> [    3.788812] fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1
> 
> The corresponding device-tree:
> usb@22000 {
>                      #address-cells = <1>;
>                      #size-cells = <0>;
>                      compatible = "fsl-usb2-dr";
>                      reg = <0x22000 0x1000>;
>                      interrupt-parent = <&mpic>;
>                      interrupts = <28 0x2 0 0>;
>                      phy_type = "ulpi"; };
> 
> usb@23000 {
>                       #address-cells = <1>;
>                       #size-cells = <0>;
>                       compatible = "fsl-usb2-dr";
>                       reg = <0x23000 0x1000>;
>                       interrupt-parent = <&mpic>;
>                       interrupts = <46 0x2 0 0>;
>                       phy_type = "ulpi"; };

please change compatible property in both nodes to

 compatible = "fsl-usb2-dr-v1.6", "fsl-usb2-dr";

and try again to see if it helps.

Thanks,

Anatolij

This solves the boot hang, thanks a lot

Johannes

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-27  8:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-24 14:42 Freescale P1022 SoC hangs when initializing USB Thumshirn, Johannes Tobias
2013-05-24 17:05 ` Anatolij Gustschin
2013-05-27  8:47   ` AW: " Thumshirn, Johannes Tobias

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox