Re: usb: dwc2: regression during boot on Raspberry Pi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/07/2015 05:16 PM, Stefan Wahren wrote:
> Hi,
> 
> i try to run linux-next-20151106 (U-Boot + USB patches from Stephen
> Warren) on my Raspberry Pi B rev2 and get a kernel oops (see bootlog at
> the end). I bisect the issue to this commit:
> 
> 09a75e8577901489f77a14a3b305a9a1f67bf25b ("usb: dwc2: refactor common
> low-level hw code to platform.c")
> 
> Looking at the messages before the oops
> 
> [ 1.658393] dwc2 20980000.usb: Configuration mismatch. Forcing host mode
> [ 1.665605] dwc2 20980000.usb: no platform data or transceiver defined
> 
> seems to come from missing DT properties according to
> Documentation/devicetree/bindings/usb/dwc2.txt:
> 
>   * dr_mode (optional)
>   * clocks (required)
>   * clock-names (required)

When I first added the USB node into bcm2835.dtsi, the binding did not
state that "clocks" and "clock-names" were required. The later addition
of that requirement is a non-backwards-compatible change, and should not
have been made. The new properties should have been optional.

The following commit added the clock-related properties as required:

65b4eb9e3513 staging: dwc2: update DT binding to add generic clock/phy
properties

The following commit, at almost exactly the same time, added DWC2 into
bcm2835.dtsi:

5631e7f4e29b ARM: bcm2835: add USB controller to device tree

>   * phys (optional)
>   * phy-names (optional)
> 
> So here are my questions:
> 
> How to fix the kernel oops in dwc2 driver?

Do you know exactly what causes the crash; you've bisected to the
specific commit, but I don't think mentioned why that commit causes an
issue.

> Should we specify dr_mode = "host" for all Raspberry Pi variants in DT?

It's optional so the driver must work without it. However, that value
seems appropriate, so you could certainly add it.

> Which clock should be referenced by USB host in DT?
> 
> Do we need a USB PHY DT node and driver for bcm2835?

I don't think there's a separate PHY module in bcm2835 is there?
Certainly there is no documentation, binding, or driver for it that I'm
aware of. I haven't checked the RPi Foundation downstream kernel though.
--
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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux