All of lore.kernel.org
 help / color / mirror / Atom feed
From: Janne Grunau <j@jannau.net>
To: Sven Peter <sven@svenpeter.dev>
Cc: Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Hector Martin <marcan@marcan.st>,
	Alyssa Rosenzweig <alyssa@rosenzweig.io>,
	Mark Kettenis <mark.kettenis@xs4all.nl>,
	Rob Herring <robh+dt@kernel.org>,
	linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] usb: dwc3: Add role switch reset quirk for Apple DWC3
Date: Sat, 13 Nov 2021 12:05:52 +0100	[thread overview]
Message-ID: <20211113110552.GA10073@jannau.net> (raw)
In-Reply-To: <20211108170946.49689-2-sven@svenpeter.dev>

On 2021-11-08 18:09:46 +0100, Sven Peter wrote:
> As mad as it sounds, the dwc3 controller present on Apple SoCs must be
> reset and reinitialized whenever a device is unplugged from the root port
> and triggers a role switch notification from the USB PD controller.
> 
> This is required for at least two reasons:
> 
>   - The USB2 D+/D- lines are connected through a stateful eUSB2 repeater
>     which in turn is controlled by a variant of the TI TPS6598x USB PD
>     chip. When the USB PD controller detects a hotplug event it resets
>     the eUSB2 repeater. Afterwards, no new device is recognized before
>     the DWC3 core and PHY are reset as well.
> 
>   - It's possible to completely break the dwc3 controller by switching
>     it to device mode and unplugging the cable at just the wrong time.
>     Even a CORESOFTRESET is not enough to allow new devices again.
>     The only workaround is to trigger a hard reset of the entire
>     dwc3 core. This also happens when running macOS on these
>     machines.

This patch is necessary and works on M1 Max (Macbook Pro 14" 2021).  
Tested with compatible = "apple,t6000,dwc3", "apple,dwc3", "snps,dwc3";.

Feel free to add

Tested-by: Janne Grunau <j@jannau.net>

Janne

  reply	other threads:[~2021-11-13 11:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-08 17:09 [PATCH v2 1/2] dt-bindings: usb: Add Apple dwc3 bindings Sven Peter
2021-11-08 17:09 ` [PATCH v2 2/2] usb: dwc3: Add role switch reset quirk for Apple DWC3 Sven Peter
2021-11-13 11:05   ` Janne Grunau [this message]
2021-11-29  1:27 ` [PATCH v2 1/2] dt-bindings: usb: Add Apple dwc3 bindings Rob Herring
2021-11-29 22:34   ` Sven Peter

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=20211113110552.GA10073@jannau.net \
    --to=j@jannau.net \
    --cc=alyssa@rosenzweig.io \
    --cc=balbi@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=marcan@marcan.st \
    --cc=mark.kettenis@xs4all.nl \
    --cc=robh+dt@kernel.org \
    --cc=sven@svenpeter.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.