lkml.org 
[lkml]   [2022]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: ChipIdea USB regression
+Arnd, Tony

On Fri, Jan 14, 2022 at 5:18 AM Charles Keepax
<ckeepax@opensource.cirrus.com> wrote:
>
> On Fri, Jan 14, 2022 at 10:56:20AM +0000, Charles Keepax wrote:
> > Hi guys,
> >
> > My Zynq based board stopped booting today, a bisect points to this
> > patch:
> >
> > commit 0f153a1b8193 ("usb: chipidea: Set the DT node on the child device")
> >
> > It looks like it gets stuck in some sort of boot loop of doom:
>
> Ok so poking that a little more, I think I can see what happens,
> the USB DT node looks like this:
>
> usb0: usb@e0002000 {
> compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";
> status = "disabled";
> clocks = <&clkc 28>;
> interrupt-parent = <&intc>;
> interrupts = <0 21 4>;
> reg = <0xe0002000 0x1000>;
> phy_type = "ulpi";
> };
>
> &usb0 {
> status = "okay";
>
> dr_mode = "host";
> usb-phy = <&usb_phy0>;
> };
>
> So when that patch copies the DT node to the new platform device
> in ci_hdrc_add_device it copies the compatible stuff as well as
> the IRQ stuff it was targeting, this presumably causes the kernel
> to bind a new copy of the driver to that new device, which probes
> and calls ci_hdrc_add_device again repeating the process until
> it dies.
>
> Kinda looks to me like the best solution might just be to revert
> the patch, I am not sure I see how that copy of the DT is supposed
> to work?

It's not copying the DT, but yes AFAICT it does match and bind the
child device on the parent driver using the compatible match instead
of matching on driver name. I think we can use the of_reuse_node flag
to avoid this in the match, but that needs some more investigation.

Rob

\
 
 \ /
  Last update: 2022-01-15 16:56    [W:0.093 / U:1.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site