]> git.ipfire.org Git - thirdparty/linux.git/commit
phy: apple: Add Apple Type-C PHY
authorSven Peter <sven@kernel.org>
Sun, 14 Dec 2025 11:51:36 +0000 (11:51 +0000)
committerVinod Koul <vkoul@kernel.org>
Tue, 23 Dec 2025 17:41:05 +0000 (23:11 +0530)
commit8e98ca1e74db2ae051c9b545d42b879efa5a2f6c
tree9f73397416eb0bb94221eb9f4431de1346de49e0
parentc1538b87caef6b2783502c820457be092a7266be
phy: apple: Add Apple Type-C PHY

The Apple Type-C PHY (ATCPHY) is a PHY for USB 2.0, USB 3.x,
USB4/Thunderbolt, and DisplayPort connectivity found in Apple Silicon SoCs.
The PHY handles muxing between these different protocols and also provides
the reset controller for the attached dwc3 USB controller.

There is no documentation available for this PHY and the entire sequence
of MMIO pokes has been figured out by tracing all MMIO access of Apple's
driver under a thin hypervisor and correlating the register reads/writes
to their kernel's debug output to find their names. Deviations from this
sequence generally results in the port not working or, especially when
the mode is switched to USB4 or Thunderbolt, to some watchdog resetting
the entire SoC.

This initial commit already introduces support for Display Port and
USB4/Thunderbolt but the drivers for these are not ready. We cannot
control the alternate mode negotiation and are stuck with whatever Apple's
firmware decides such that any DisplayPort or USB4/Thunderbolt device will
result in a correctly setup PHY but not be usable until the other drivers
are upstreamed as well.

Co-developed-by: Janne Grunau <j@jannau.net>
Signed-off-by: Janne Grunau <j@jannau.net>
Co-developed-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> # for reset controller
Reviewed-by: Neal Gompa <neal@gompa.dev>
Signed-off-by: Sven Peter <sven@kernel.org>
Link: https://patch.msgid.link/20251214-b4-atcphy-v3-3-ba82b20e9459@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
MAINTAINERS
drivers/phy/Kconfig
drivers/phy/Makefile
drivers/phy/apple/Kconfig [new file with mode: 0644]
drivers/phy/apple/Makefile [new file with mode: 0644]
drivers/phy/apple/atc.c [new file with mode: 0644]