public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Rohloff <ingo.rohloff@lauterbach.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Thinh.Nguyen@synopsys.com, linux-usb@vger.kernel.org
Subject: Re: [PATCH v2 2/2] dt-bindings: usb: dwc3: Add property to insert delay before TxValid.
Date: Thu, 26 Feb 2026 17:12:24 +0100	[thread overview]
Message-ID: <20260226171224.3ab6b68f@ingpc2.intern.lauterbach.com> (raw)
In-Reply-To: <9d59395b-ae39-40b3-af21-75468ec34cd8@kernel.org>

Hello Krzysztof,

On Thu, 26 Feb 2026 11:51:27 +0100
Krzysztof Kozlowski <krzk@kernel.org> wrote:

> On 25/02/2026 14:03, Ingo Rohloff wrote:
> > The Microchip USB3340x ULPI PHY requires a delay when switching to the
> > high-speed transmitter. See:
> >     http://ww1.microchip.com/downloads/en/DeviceDoc/80000645A.pdf
> >     Module 2 "Device Enumeration Failure with Link IP Systems"  
> 
> So that's deducible from the compatible and you do not need this
> property at all?
> 

Thanks for giving me a new idea :-)

The problem is, that the original device trees provided by Xilinx do not
mention the external ULPI PHY at all, which means I do not have a
"compatible" property to match to.

Additionally: The patch only works for the DWC3 controller, because this
particular USB controller has the necessary hardware support to insert the
needed delay.
Of course other USB controllers might not even need this fix at all,
because other controllers might always have the required delay.

Right now the patch by me uses a device tree property to tell the DWC3
controller to set the XCVRDLY bit to insert a delay (completely
autonomously done in hardware).

Which means: The system designer needs to know if this is necessary or
not, depending on the used ULPI PHY. If the delay is needed, the system
designer then sets the according device tree property.

I searched other device trees, but almost none of them have a device tree
"ulpi" node.

The DWC3 code does call ulpi_register_interface() and this function does
look for an "ulpi" device tree node (which currently doesn't exist in my
device tree).

By inserting such a device tree node, I can at least make
"drivers/usb/common/ulpi.c" read out the vendor and product ID of the ULPI
PHY via ulpi_read_id().

Using this product/vendor ID the DWC3 controller driver could
automatically set the XCVRDLY bit to support this particular PHY.

The condition is:
* If you have a DWC3 controller, which uses an external ULPI PHY
* and the external ULPI PHY is a Microchip USB3340 chip
  (detected via Vendor/Product ID)
then set the XCVRDLY bit in the DWC3 controller.

I am not sure what the right way is to implement this kind of automagic
and if this kind of automagic is wanted at all.

@Thinh: I need some advice:

Should the DWC3 controller really match to specific
ULPI Vendor/Product IDs to decide if to set the XCVRDLY bit or not?

How does the DWC3 controller get access to the
ULPI Vendor/Product ID or to the information that the XCVRDLY should be
set?

Reading the code I think an alternative way might be:
Implement a "struct ulpi_driver" for this specific USB3340 ULPI PHY.
Make this ulpi_driver create a software node to tell the DWC3 controller
to set the XCVRDLY bit.

Does this sound sensible at all?
This sounds like a lot of work to only fix this particular combination
of hardware.




> Please use scripts/get_maintainers.pl to get a list of necessary people
> and lists to CC....

I am sorry: I did not re-run get_maintainers.pl on v2 patch version.
I will do better for the next version.

with best regards
  Ingo

-- 


-------------------------------------------------------------------------
Dipl.-Inform.
Ingo ROHLOFF
Senior Staff Embedded Systems Engineering
phone +49 8102 9876-142 - ingo.rohloff@lauterbach.com

Lauterbach Engineering GmbH & Co. KG
Altlaufstrasse 40, 85635 Hoehenkirchen-Siegertsbrunn, GERMANY
www.lauterbach.com

Registered Office: Hoehenkirchen-Siegertsbrunn, Germany,
Local Court: Munich, HRA 87406, VAT ID: DE246770537,
Managing Directors: Lothar Lauterbach, Stephan Lauterbach, Dr. Thomas
Ullmann

-------------------------------------------------------------------------

  reply	other threads:[~2026-02-26 16:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-24 14:14 [PATCH] usb: dwc3: Support for USB3340x ULPI PHY, via "snps,enable_xcvrdly_quirk" Ingo Rohloff
2026-02-25  0:05 ` Thinh Nguyen
2026-02-25 12:49   ` Ingo Rohloff
2026-02-26  2:39     ` Thinh Nguyen
2026-02-26 11:32       ` Ingo Rohloff
2026-02-26 19:26         ` Thinh Nguyen
2026-02-26 20:27           ` Ingo Rohloff
2026-02-26 23:51             ` Thinh Nguyen
2026-02-27  0:02               ` Thinh Nguyen
2026-02-25 13:03   ` [PATCH v2 0/2] Re: [PATCH] usb: dwc3: Support for USB3340x ULPI PHY Ingo Rohloff
2026-02-25 13:03     ` [PATCH v2 1/2] usb: dwc3: Support USB3340x ULPI PHY high-speed negotiation Ingo Rohloff
2026-02-25 13:03     ` [PATCH v2 2/2] dt-bindings: usb: dwc3: Add property to insert delay before TxValid Ingo Rohloff
2026-02-26 10:51       ` Krzysztof Kozlowski
2026-02-26 16:12         ` Ingo Rohloff [this message]
2026-02-26 19:04           ` Thinh Nguyen
2026-02-27  0:20             ` Thinh Nguyen
2026-02-27 11:04               ` Ingo Rohloff
2026-02-28  1:05                 ` Thinh Nguyen
2026-02-26 10:51     ` [PATCH v2 0/2] Re: [PATCH] usb: dwc3: Support for USB3340x ULPI PHY Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260226171224.3ab6b68f@ingpc2.intern.lauterbach.com \
    --to=ingo.rohloff@lauterbach.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=krzk@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox