Linux on Apple ARM platform development
 help / color / mirror / Atom feed
* [PATCH next] phy: apple: atc: Reset USB2 PHY during probe as well
@ 2026-01-08 19:12 Sven Peter
  2026-01-09 10:19 ` Janne Grunau
  2026-01-14 16:51 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Sven Peter @ 2026-01-08 19:12 UTC (permalink / raw)
  To: Janne Grunau, Neal Gompa, Vinod Koul, Neil Armstrong
  Cc: asahi, linux-arm-kernel, linux-phy, linux-kernel,
	James Calligeros, Sven Peter

Now that the upstream Type-C PHY code is getting broader test coverage we
got reports of USB devices plugged in during boot or those plugged in for
the first time after boot occasionally not working correctly.
This is partially caused by the USB2 parts of the PHY being left in an
unknown state by the previous boot stages. We reset all other parts during
probe but forgot about the USB2 PHY so let's fix that and actually reset
and power off the USB2 PHY as well.

Reported-by: James Calligeros <jcalligeros99@gmail.com>
Reported-by: Janne Grunau <j@jannau.net>
Fixes: 8e98ca1e74db ("phy: apple: Add Apple Type-C PHY")
Signed-off-by: Sven Peter <sven@kernel.org>
---
 drivers/phy/apple/atc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/phy/apple/atc.c b/drivers/phy/apple/atc.c
index c8a58ee64b7aad3205df51cf16ae778471ad2c5d..ab0b40b72533f1b3878b646b59820c730239e85c 100644
--- a/drivers/phy/apple/atc.c
+++ b/drivers/phy/apple/atc.c
@@ -2227,6 +2227,7 @@ static int atcphy_probe_finalize(struct apple_atcphy *atcphy)
 	_atcphy_dwc3_reset_assert(atcphy);
 
 	/* Reset atcphy to clear any state potentially left by the bootloader */
+	atcphy_usb2_power_off(atcphy);
 	atcphy_power_off(atcphy);
 	atcphy_setup_pipehandler(atcphy);
 

---
base-commit: add66a6673bc4aacd0ef0f3c4a51271501770b17
change-id: 20260107-atcphy-coldboot-fix-08652d404347

Best regards,
-- 
Sven Peter <sven@kernel.org>


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

* Re: [PATCH next] phy: apple: atc: Reset USB2 PHY during probe as well
  2026-01-08 19:12 [PATCH next] phy: apple: atc: Reset USB2 PHY during probe as well Sven Peter
@ 2026-01-09 10:19 ` Janne Grunau
  2026-01-14 16:51 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Janne Grunau @ 2026-01-09 10:19 UTC (permalink / raw)
  To: Sven Peter
  Cc: Neal Gompa, Vinod Koul, Neil Armstrong, asahi, linux-arm-kernel,
	linux-phy, linux-kernel, James Calligeros

On Thu, Jan 08, 2026 at 08:12:06PM +0100, Sven Peter wrote:
> Now that the upstream Type-C PHY code is getting broader test coverage we
> got reports of USB devices plugged in during boot or those plugged in for
> the first time after boot occasionally not working correctly.
> This is partially caused by the USB2 parts of the PHY being left in an
> unknown state by the previous boot stages. We reset all other parts during
> probe but forgot about the USB2 PHY so let's fix that and actually reset
> and power off the USB2 PHY as well.
> 
> Reported-by: James Calligeros <jcalligeros99@gmail.com>
> Reported-by: Janne Grunau <j@jannau.net>
> Fixes: 8e98ca1e74db ("phy: apple: Add Apple Type-C PHY")
> Signed-off-by: Sven Peter <sven@kernel.org>
> ---
>  drivers/phy/apple/atc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/phy/apple/atc.c b/drivers/phy/apple/atc.c
> index c8a58ee64b7aad3205df51cf16ae778471ad2c5d..ab0b40b72533f1b3878b646b59820c730239e85c 100644
> --- a/drivers/phy/apple/atc.c
> +++ b/drivers/phy/apple/atc.c
> @@ -2227,6 +2227,7 @@ static int atcphy_probe_finalize(struct apple_atcphy *atcphy)
>  	_atcphy_dwc3_reset_assert(atcphy);
>  
>  	/* Reset atcphy to clear any state potentially left by the bootloader */
> +	atcphy_usb2_power_off(atcphy);
>  	atcphy_power_off(atcphy);
>  	atcphy_setup_pipehandler(atcphy);

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

thanks,

Janne

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

* Re: [PATCH next] phy: apple: atc: Reset USB2 PHY during probe as well
  2026-01-08 19:12 [PATCH next] phy: apple: atc: Reset USB2 PHY during probe as well Sven Peter
  2026-01-09 10:19 ` Janne Grunau
@ 2026-01-14 16:51 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2026-01-14 16:51 UTC (permalink / raw)
  To: Janne Grunau, Neal Gompa, Neil Armstrong, Sven Peter
  Cc: asahi, linux-arm-kernel, linux-phy, linux-kernel,
	James Calligeros


On Thu, 08 Jan 2026 20:12:06 +0100, Sven Peter wrote:
> Now that the upstream Type-C PHY code is getting broader test coverage we
> got reports of USB devices plugged in during boot or those plugged in for
> the first time after boot occasionally not working correctly.
> This is partially caused by the USB2 parts of the PHY being left in an
> unknown state by the previous boot stages. We reset all other parts during
> probe but forgot about the USB2 PHY so let's fix that and actually reset
> and power off the USB2 PHY as well.
> 
> [...]

Applied, thanks!

[1/1] phy: apple: atc: Reset USB2 PHY during probe as well
      commit: bc148def8924e43245c353c52ced47079a5026da

Best regards,
-- 
~Vinod



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

end of thread, other threads:[~2026-01-14 16:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-08 19:12 [PATCH next] phy: apple: atc: Reset USB2 PHY during probe as well Sven Peter
2026-01-09 10:19 ` Janne Grunau
2026-01-14 16:51 ` Vinod Koul

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