linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] usb: dwc3: qcom: fix wakeup implementation
@ 2022-08-02 15:13 Johan Hovold
  2022-08-02 15:13 ` [PATCH 1/8] usb: dwc3: fix PHY disable sequence Johan Hovold
                   ` (7 more replies)
  0 siblings, 8 replies; 28+ messages in thread
From: Johan Hovold @ 2022-08-02 15:13 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Felipe Balbi
  Cc: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Manivannan Sadhasivam, Konrad Dybcio, Krishna Kurapati,
	Stephen Boyd, Doug Anderson, Matthias Kaehlcke,
	Pavankumar Kondeti, quic_ppratap, quic_vpulyala, linux-arm-msm,
	linux-usb, devicetree, linux-kernel, Johan Hovold

This series fixes some of the fallout after the recently merged series
that added wakeup support to the Qualcomm dwc3 driver:

	https://lore.kernel.org/all/1655094654-24052-1-git-send-email-quic_kriskura@quicinc.com/

The first patch fixes a long standing PHY power sequencing issue in dwc3
core.

The second patch reverts a power-domain hack that was added by the above
series. There are other ways to implement this which doesn't violate the
genpd interface, and if for some reason those are not sufficient, the
genpd implementation needs to be extended, not hacked around.

The third patch fixes a couple of NULL-pointer dereferences when
suspending controllers in peripheral or OTG mode due to a hack that was
added to suspend path. Unfortunately, it seems the hack needs to stay
for now if we want functioning suspend on some Qualcomm platforms.

The fourth patch fixes another issue in the Qualcomm dwc3 implementation
that has been added a while back and which breaks runtime PM.

The remaining patches moves the wakeup-source property over from the
core node to the glue node in the binding and instead propagates the
wakeup capability to the former during probe.

Note that this incidentally also avoids adding probe-deferral hacks to
the driver as was recently proposed to deal with another problem with
the current implementation:

	https://lore.kernel.org/all/1657891312-21748-1-git-send-email-quic_kriskura@quicinc.com/

With this series I have functioning USB system suspend and wakeup as
well as somewhat functioning runtime PM in host mode on sc8280xp. Note
that the PHYs apparently do not need to be shutdown for wakeup on this
platform.

Some issues remain such as that the controller needs to be suspended to
handle remote wakeup during runtime PM (the wakeup interrupts probably
needs to be enabled whenever there's a wakeup-capable device connected
to the bus) and that root hub connect/disconnect events cannot
selectively be disabled.

And of course, the suspend speed hack needs to be replaced at some
point but that likely requires some more heavy lifting in the dwc3
implementation.

Johan


Johan Hovold (8):
  usb: dwc3: fix PHY disable sequence
  Revert "usb: dwc3: qcom: Keep power domain on to retain controller
    status"
  usb: dwc3: qcom: fix broken non-host-mode suspend
  usb: dwc3: qcom: fix runtime PM wakeup
  Revert "dt-bindings: usb: dwc3: Add wakeup-source property support"
  dt-bindings: usb: qcom,dwc3: add wakeup-source property
  usb: dwc3: qcom: fix wakeup implementation
  usb: dwc3: qcom: clean up suspend callbacks

 .../devicetree/bindings/usb/qcom,dwc3.yaml    |  2 +
 .../devicetree/bindings/usb/snps,dwc3.yaml    |  5 --
 drivers/usb/dwc3/core.c                       | 24 +++---
 drivers/usb/dwc3/dwc3-qcom.c                  | 77 ++++++++++---------
 4 files changed, 55 insertions(+), 53 deletions(-)

-- 
2.35.1


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

end of thread, other threads:[~2022-08-04 16:25 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-02 15:13 [PATCH 0/8] usb: dwc3: qcom: fix wakeup implementation Johan Hovold
2022-08-02 15:13 ` [PATCH 1/8] usb: dwc3: fix PHY disable sequence Johan Hovold
2022-08-02 21:21   ` Andrew Halaney
2022-08-03 17:33   ` Matthias Kaehlcke
2022-08-02 15:13 ` [PATCH 2/8] Revert "usb: dwc3: qcom: Keep power domain on to retain controller status" Johan Hovold
2022-08-02 18:00   ` Krishna Kurapati PSSNV
2022-08-03  7:42     ` Johan Hovold
2022-08-02 15:13 ` [PATCH 3/8] usb: dwc3: qcom: fix broken non-host-mode suspend Johan Hovold
2022-08-03 19:11   ` Matthias Kaehlcke
2022-08-04  6:12     ` Johan Hovold
2022-08-02 15:14 ` [PATCH 4/8] usb: dwc3: qcom: fix runtime PM wakeup Johan Hovold
2022-08-03 21:58   ` Matthias Kaehlcke
2022-08-04  7:35     ` Johan Hovold
2022-08-04 15:35       ` Matthias Kaehlcke
2022-08-04 16:04         ` Johan Hovold
2022-08-04 16:25           ` Matthias Kaehlcke
2022-08-02 15:14 ` [PATCH 5/8] Revert "dt-bindings: usb: dwc3: Add wakeup-source property support" Johan Hovold
2022-08-02 17:17   ` Rob Herring
2022-08-03  7:31     ` Johan Hovold
2022-08-03  7:51       ` Krzysztof Kozlowski
2022-08-04  7:37         ` Johan Hovold
2022-08-03 23:26       ` Rob Herring
2022-08-04  5:47         ` Johan Hovold
2022-08-04  7:40           ` Johan Hovold
2022-08-02 15:14 ` [PATCH 6/8] dt-bindings: usb: qcom,dwc3: add wakeup-source property Johan Hovold
2022-08-03 23:27   ` Rob Herring
2022-08-02 15:14 ` [PATCH 7/8] usb: dwc3: qcom: fix wakeup implementation Johan Hovold
2022-08-02 15:14 ` [PATCH 8/8] usb: dwc3: qcom: clean up suspend callbacks Johan Hovold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).