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 a3671bf39d196..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 @@ -5417,14 +5418,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) @@ -7338,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; }