mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/3] usb: dwc2: Add USB DRD support on CV1800 Series SoC
@ 2026-11-11  5:56 Inochi Amaoto
  2026-11-11  5:56 ` [PATCH v2 1/3] usb: dwc2: gadget: honor pullup requests in core_connect Inochi Amaoto
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Inochi Amaoto @ 2026-11-11  5:56 UTC (permalink / raw)
  To: Minas Harutyunyan, Greg Kroah-Hartman, Felipe Balbi,
	Paul Zimmerman, Dinh Nguyen
  Cc: Inochi Amaoto, linux-usb, linux-kernel, Yixun Lan, Longbin Li

The current DRD implementation of DRD will cause a interrupt flow on
CV1800 Series SoC. It has two reasons:
1. The DRD does not sync the phy mode when change the controller mode,
   it is a violation of the DRD as it does not rely on a OTG phy.
2. The CV1800 is entered with a Session End Detected interrupt, but the
   DRD code has no change on it, so the controller will enter the
   interrupt storm.

This patch add fixes for these two problem, and I have tested this on
a Huashan PI board (it has a CV1812H SoC).

Note: This patches set does not resolve all the problems, as
      usb_add_hcd() will override the role set by dwc2, but I am not
      sure whether it should change skip_phy_initialization of hcd.
      So I kept it as it is and users still needs to set the role
      in the userspace as "role-switch-default-mode" in devicetree
      takes no effect.

Changed from v1:
- https://lore.kernel.org/linux-usb/20261110070627.217946-1-inochiama@gmail.com
1. the DTS patch is dropped and will be sent separately.
patch 2:
1. fix wrong is_host check in dwc2_drd_init()
2. remove unnecessary role check before setting phy mode in
   dwc2_drd_role_sw_set()


Inochi Amaoto (3):
  usb: dwc2: gadget: honor pullup requests in core_connect
  usb: dwc2: drd: Sync the generic PHY mode with role requests
  usb: dwc2: Add USB DRD support on CV1800 series SoC

 drivers/usb/dwc2/core.h     |  5 ++-
 drivers/usb/dwc2/drd.c      | 75 ++++++++++++++++++++++++++++---------
 drivers/usb/dwc2/gadget.c   |  3 +-
 drivers/usb/dwc2/params.c   |  1 +
 drivers/usb/dwc2/platform.c |  4 +-
 5 files changed, 68 insertions(+), 20 deletions(-)

--
2.56.0


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

end of thread, other threads:[~2026-11-11  5:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-11  5:56 [PATCH v2 0/3] usb: dwc2: Add USB DRD support on CV1800 Series SoC Inochi Amaoto
2026-11-11  5:56 ` [PATCH v2 1/3] usb: dwc2: gadget: honor pullup requests in core_connect Inochi Amaoto
2026-11-11  5:56 ` [PATCH v2 2/3] usb: dwc2: drd: Sync the generic PHY mode with role requests Inochi Amaoto
2026-11-11  5:56 ` [PATCH v2 3/3] usb: dwc2: Add USB DRD support on CV1800 series SoC Inochi Amaoto

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

all inboxes | Powered by JetHome®