[PATCH v2 0/3] usb: dwc2: Add USB DRD support on CV1800 Series SoC
From: Inochi Amaoto
Date: Wed Nov 11 2026 - 00:57:39 EST
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@xxxxxxxxx
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