[RFC 0/5] Add mt7988 XS-PHY

From: Frank Wunderlich
Date: Sun Apr 13 2025 - 04:58:30 EST


From: Frank Wunderlich <frank-w@xxxxxxxxxxxxxxx>

Mediatek XS-Phy is a high speed phy used for pcie and usb on mt7988 platform.

It requires a topmisc power controller to switch between USB and PCI mode.
This topmisc system controller is also used by ethernet-node which is not
upstreamed yet.
---
regading syscon-fallback...i know that it should be avoided ;)

based on these commits:

ba5095ebbc7a ("mfd: syscon: Allow syscon nodes without a "syscon" compatible")
5728c92ae112 ("mfd: syscon: Restore device_node_to_regmap() for non-syscon nodes")

I tried to get it working without syscon by changing

instance->type_sw = syscon_node_to_regmap(args.np);
to
device_node_to_regmap()

then xsphy was probed sucessfully, but all pcie (not only the one with xsphy)
stopped working.

for ethernet its driver uses syscon_regmap_lookup_by_phandle which needs to
be patched in syscon driver to also use device_node_to_regmap instead of
syscon_node_to_regmap (with create=true). But have not tried this.

regarding the pcie issue when dropping the syscon compatible i would leave
this compatible, but send this patchset as RFC. Maybe anyone can solve this.

Daniel Golle (1):
phy: mediatek: xsphy: support type switch by pericfg

Frank Wunderlich (4):
dt-bindings: phy: mtk-xs-phy: Add mt7988 compatible
dt-bindings: phy: mtk-xs-phy: support type switch by pericfg
dt-bindings: power: Add binding for MediaTek MT7988 topmisc power
controller
arm64: dts: mediatek: mt7988: Add xsphy for ssusb0/pcie2

.../bindings/phy/mediatek,xsphy.yaml | 17 ++++
.../power/mediatek,power-controller.yaml | 35 +++++---
arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 39 +++++++++
drivers/phy/mediatek/phy-mtk-xsphy.c | 85 ++++++++++++++++++-
4 files changed, 164 insertions(+), 12 deletions(-)

--
2.43.0