Hi Alban,

On 2022-06-16 01:47, Alban Bedel wrote:
Hi all,

Sometimes ago I submitted a patch to fix the support for the DWC3
controller on the imx8mq which, unlike most DWC3 implementation, doesn't
use a top glue node with child DWC3 nodes. Instead it has the DWC3 node
directly on the main bus.

Angus Ainslie then asked why this patch was needed as he had submitted
the original support for the imx8mq. Looking into the issue it turned out that Angus patch basically let the driver use the `port` subnodes, which are there to define the connection to a type C connector, as DWC3 nodes.
As the board I'm working on has no type C connecor, hence no `port`
subnodes the driver just did nothing in my case.

This new series replace my previous patch (usb: dwc3-generic: Fix the
iMX8MQ support). It starts by reverting Angus patch as it was not
following the DT binding and then add support for generic DWC3 without
glue node. This fix the imx8mq case and might add support for a few
other SoC at the same time.


I tested this on my imx8mq target and it works for SDP and the USB works in Linux.

If I try and use host mode in u-boot that no longer works.

 nop           1  [   ]   dwc3-wrapper          |   |-- usb@38100000
 usb           0  [   ]   dwc3-generic-periphe  |   |   `-- usb@38100000
 phy           0  [   ]   nxp_imx8mq_usb_phy    |   |-- usb-phy@381f0040
 nop           2  [ + ]   dwc3-wrapper          |   |-- usb@38200000
 usb           0  [   ]   dwc3-generic-host     |   |   `-- usb@38200000
 phy           1  [ + ]   nxp_imx8mq_usb_phy    |   `-- usb-phy@382f0040

This is a snip from running "dm tree" and the dwc3-generic-host gets identified but the driver isn't bound.

The host controller also doesn't get found when using "usb start"

u-boot=> usb start
starting USB...
Bus usb@38200000: dwc3-generic-host usb@38200000: this is not a DesignWare USB3 DRD Core
dwc3-generic-host usb@38200000: failed to initialize core
Port not available.

Thanks
Angus

Alban

--
v2: - Rebased onto current master

    - Fixed a typo the log message

Alban Bedel (2):
  Revert "usb: dwc3: dwc3-generic: check the parent nodes"
  usb: dwc3: Add support for standalone DWC3 nodes

 drivers/usb/dwc3/dwc3-generic.c | 124 +++++++++++++++++---------------
 1 file changed, 68 insertions(+), 56 deletions(-)

Reply via email to