From 008cad83d40f5b183e9efc451e7eacfb36493590 Mon Sep 17 00:00:00 2001 From: Erik Bourget Date: Mon, 16 Nov 2026 06:26:59 -0500 Subject: [PATCH 1/2] PCI: apple: T6050: the radio host's deep sleep on the J716c too The radio's host takes its port down for a deep sleep (the DART saved and held, the link shut down through the sleep controller) and brings it up after, with the N1's warm reset. It was set up on the J714s only; on the J716c the host's noirq suspend then refused every deep sleep for want of a port. The J716c's host is the same T6050 host with the N1 adopted on port 0, and its ADT gives the same warm reset (SMC key 'bpli', 0x1000000). Set it up there too. Its other port is not described, so there is nothing to park. Developed with Claude Code. Signed-off-by: Erik Bourget --- drivers/pci/controller/pcie-apple.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/pci/controller/pcie-apple.c b/drivers/pci/controller/pcie-apple.c index a3671bf39d196..9780c97eccfc2 100644 --- a/drivers/pci/controller/pcie-apple.c +++ b/drivers/pci/controller/pcie-apple.c @@ -5417,14 +5417,16 @@ static int apple_pcie_t6050_warm_reset(struct apple_pcie *pcie, bool noirq) } /* - * The adopted host's firmware sleep is set up on the board it has run on, the J714s. On another - * T6050 board nothing is registered and no port is taken for it: the host is as before. + * The adopted host's firmware sleep is set up on the boards with a T6050 sleep, the J714s and + * the J716c. On another T6050 board nothing is registered and no port is taken for it: the + * host is as before. */ static void apple_pcie_t6050_sleep_probe(struct platform_device *pdev, struct apple_pcie *pcie) { struct apple_pcie_port *port; - if (pcie->managed_sids || !of_machine_is_compatible("apple,j714s")) + if (pcie->managed_sids || !(of_machine_is_compatible("apple,j714s") || + of_machine_is_compatible("apple,j716c"))) return; /* The one port a boot loader trained; an endpoint Linux powers is parked instead. */ list_for_each_entry(port, &pcie->ports, entry) From 28b371b9fab695c663df0aee4d5e630e54e54422 Mon Sep 17 00:00:00 2001 From: Erik Bourget Date: Sun, 15 Nov 2026 23:52:42 -0500 Subject: [PATCH 2/2] PCI: apple: T6050: J716c: the tunnelled PCIe over a router's sleep in place The J716c's right-port USB4 router sleeps in place as the J714s's does, with the same tunnelled PCIe controller. Apply the J714s's rules for it to the J716c too: the PME turn-off port word, the controller's suspend, the tunnel's links and its noirq resume. The J714s-only diagnostics stay J714s only. Developed with Claude Code. Signed-off-by: Erik Bourget --- drivers/pci/controller/pcie-apple-cio.c | 6 ++++-- drivers/pci/controller/pcie-apple.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/pci/controller/pcie-apple-cio.c b/drivers/pci/controller/pcie-apple-cio.c index 18882e376f630..717cea2ca891e 100644 --- a/drivers/pci/controller/pcie-apple-cio.c +++ b/drivers/pci/controller/pcie-apple-cio.c @@ -200,7 +200,8 @@ static void apple_pcie_cio_t6050_reset(struct apple_pcie *pcie, struct apple_pci */ static u32 apple_pcie_cio_t6050_pme_reg(void) { - return of_machine_is_compatible("apple,j714s") ? PORT_T6050_PCIEC_PME_TURN_OFF : + return (of_machine_is_compatible("apple,j714s") || + of_machine_is_compatible("apple,j716c")) ? PORT_T6050_PCIEC_PME_TURN_OFF : PORT_PME_TURN_OFF; } @@ -387,7 +388,8 @@ static int apple_pcie_cio_suspend(struct apple_pcie *pcie) u32 stat; int i, ret, recover; - if (pcie->hw == &t6050_pciec_hw && of_machine_is_compatible("apple,j714s")) + if (pcie->hw == &t6050_pciec_hw && (of_machine_is_compatible("apple,j714s") || + of_machine_is_compatible("apple,j716c"))) return apple_pcie_cio_suspend_t6050(pcie); port = list_first_entry(&pcie->ports, struct apple_pcie_port, entry); dev_info(pcie->dev, "CIO PCIe-C drain and reset\n"); diff --git a/drivers/pci/controller/pcie-apple.c b/drivers/pci/controller/pcie-apple.c index 9780c97eccfc2..8e20a36cc575e 100644 --- a/drivers/pci/controller/pcie-apple.c +++ b/drivers/pci/controller/pcie-apple.c @@ -4312,7 +4312,8 @@ static int apple_pcie_tunnel_add_links(struct apple_pcie *pcie) if (ret == -EOPNOTSUPP) dev_warn(pcie->dev, "DART has no CIO sleep path; a docked deep sleep is refused\n"); } else if (cio_s2r && pcie->hw == &t6050_pciec_hw && - of_machine_is_compatible("apple,j714s") && + (of_machine_is_compatible("apple,j714s") || + of_machine_is_compatible("apple,j716c")) && of_property_present(dart_pdev->dev.of_node, "apple,clock-protection")) { /* * TEST: T6050, a router that sleeps in place. Only with the DART's clock @@ -7340,7 +7341,8 @@ static int apple_pcie_resume_noirq(struct device *dev) * failed for it (run sv6t4: "PM: failed to resume noirq: error -107"). */ if (ret == -ENOTCONN && pcie->cio_lost && pcie->hw == &t6050_pciec_hw && - of_machine_is_compatible("apple,j714s")) { + (of_machine_is_compatible("apple,j714s") || + of_machine_is_compatible("apple,j716c"))) { dev_warn(dev, "T6050 sleep: PCIe-C tunnel gone with its dock during the sleep: the port is closed as after an unplug, its functions return when the dock is plugged in again\n"); return 0; }