]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
PCI: sg2042: Avoid L0s and L1 on Sophgo 2042 PCIe Root Ports
authorYao Zi <me@ziyao.cc>
Sun, 5 Apr 2026 15:41:54 +0000 (15:41 +0000)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 9 Apr 2026 18:28:17 +0000 (13:28 -0500)
Since commit f3ac2ff14834 ("PCI/ASPM: Enable all ClockPM and ASPM states
for devicetree platforms") force enables ASPM on all device tree platforms,
the SG2042 Root Ports are breaking as they advertise L0s and L1
capabilities without supporting them.

Set ASPM quirks to disable the L0s and L1 capabilities for the Root Ports
so that these broken link states won't be enabled.

Fixes: 4e27aca4881a ("riscv: sophgo: dts: add PCIe controllers for SG2042")
Co-developed-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Yao Zi <me@ziyao.cc>
[mani: commit log]
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Han Gao <gaohan@iscas.ac.cn>
Tested-by: Chen Wang <unicorn_wang@outlook.com> # Pioneerbox
Reviewed-by: Chen Wang <unicorn_wang@outlook.com>
Link: https://patch.msgid.link/20260405154154.46829-3-me@ziyao.cc
drivers/pci/controller/cadence/pcie-sg2042.c

index 0c50c74d03eeb28b00b0ab3d6dd836557fa16ce0..4a2af4d0713e655a230ed15d6cb1234f7c048997 100644 (file)
@@ -48,6 +48,8 @@ static int sg2042_pcie_probe(struct platform_device *pdev)
        bridge->child_ops = &sg2042_pcie_child_ops;
 
        rc = pci_host_bridge_priv(bridge);
+       rc->quirk_broken_aspm_l0s = 1;
+       rc->quirk_broken_aspm_l1 = 1;
        pcie = &rc->pcie;
        pcie->dev = dev;