Skip to content

Commit 406c5b1

Browse files
committed
PCI: apple: Avoid PERST# deassertion through gpiod initialization
The Aquantia AQC113 10GB ethernet device used in Apple silicon Mac Studio, Mac Pro and as option in Mac mini is sensitive to PERST# deassertion before clock setup. The perst pins are defined as GPIO_ACTIVE_LOW in the device tree. GPIOD_OUT_LOW will deassert the PERST# pin. This breaks the link setup reliably under m1n1's hypervisor on a M1 Ultra Mac Studio. There might have been reports of unavailable 10GB NICs before u-boot took over the PCIe link setup. Signed-off-by: Janne Grunau <j@jannau.net> Fixes: a6b9ede ("PCI: apple: Do not leak reset GPIO on unbind/unload/error") Fixes: 1e33888 ("PCI: apple: Add initial hardware bring-up")
1 parent ed572d2 commit 406c5b1

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

drivers/pci/controller/pcie-apple.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,8 +566,14 @@ static int apple_pcie_setup_link(struct apple_pcie *pcie,
566566
u32 stat;
567567
int ret;
568568

569+
/*
570+
* Assert PERST# and configure the pin as output.
571+
* The Aquantia AQC113 10GB nic used desktop macs is sensitive to
572+
* deasserting it without prior clock setup.
573+
* Observed on M1 Max/Ultra Mac Studios under m1n1's hypervisor.
574+
*/
569575
reset = devm_fwnode_gpiod_get(pcie->dev, of_fwnode_handle(np), "reset",
570-
GPIOD_OUT_LOW, "PERST#");
576+
GPIOD_OUT_HIGH, "PERST#");
571577
if (IS_ERR(reset))
572578
return PTR_ERR(reset);
573579

0 commit comments

Comments
 (0)