PCIe probe failure on AmLogic A311D after 6.18-rc1

Linnaea Lavia linnaea-von-lavia at live.com
Fri Oct 31 05:26:42 PDT 2025


On 10/31/2025 4:50 PM, Neil Armstrong wrote:
> On 10/31/25 06:34, Linnaea Lavia wrote:
>> On 10/30/2025 1:15 AM, Bjorn Helgaas wrote:
>>> On Wed, Oct 29, 2025 at 06:50:46PM +0800, Linnaea Lavia wrote:
>>>> On 10/29/2025 6:16 AM, Bjorn Helgaas wrote:
>>>
>>>>> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
>>>>> index 214ed060ca1b..9cd12924b5cb 100644
>>>>> --- a/drivers/pci/quirks.c
>>>>> +++ b/drivers/pci/quirks.c
>>>>> @@ -2524,6 +2524,7 @@ static void quirk_disable_aspm_l0s_l1(struct pci_dev *dev)
>>>>>     * disable both L0s and L1 for now to be safe.
>>>>>     */
>>>>>    DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ASMEDIA, 0x1080, quirk_disable_aspm_l0s_l1);
>>>>> +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SYNOPSYS, 0xabcd, quirk_disable_aspm_l0s_l1);
>>>>>    /*
>>>>>     * Some Pericom PCIe-to-PCI bridges in reverse mode need the PCIe Retrain
>>>>
>>>> I have applied the patch on 6.18-rc3 but it's still trying to enable ASPM for some reasons.
>>>
>>> Sorry, my fault, I should have made that fixup run earlier, so the
>>> patch should be this instead:
>>>
>>> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
>>> index 214ed060ca1b..4fc04015ca0c 100644
>>> --- a/drivers/pci/quirks.c
>>> +++ b/drivers/pci/quirks.c
>>> @@ -2524,6 +2524,7 @@ static void quirk_disable_aspm_l0s_l1(struct pci_dev *dev)
>>>    * disable both L0s and L1 for now to be safe.
>>>    */
>>>   DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ASMEDIA, 0x1080, quirk_disable_aspm_l0s_l1);
>>> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SYNOPSYS, 0xabcd, quirk_disable_aspm_l0s_l1);
>>
>> L1 still got enabled
> 
> <snip>
> 
>>
>> The card works just fine. I'm thinking the ASPM issue is probably from the glue driver reporting the link to be down when it's really just in low power state.
> 
> You're probbaly right, the meson_pcie_link_up() not only checks the LTSSM but also the speed, which is probably wrong.
> 
> Can you try removing the test for speed ?
> 
> -                 if (smlh_up && rdlh_up && ltssm_up && speed_okay)
> +                 if (smlh_up && rdlh_up && ltssm_up)
> 
> The other drivers just checks the link, and some only the smlh_up && rdlh_up. So you can also probably drop ltssm_up aswell.
> 

I can confirm that removing the check for ltssm_up and speed_okay made ASPM work.

We still need a solution to the original issue that's preventing the controller from being initialized.

My kernel has the following patch applied, but I think it's not suitable for upstream as this changes device tree bindings for PCIe controller on meson.

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
index dcc927a9da80..ca455f634834 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
@@ -138,7 +138,7 @@ pcie: pcie at fc000000 {
  			reg = <0x0 0xfc000000 0x0 0x400000>,
  			      <0x0 0xff648000 0x0 0x2000>,
  			      <0x0 0xfc400000 0x0 0x200000>;
-			reg-names = "elbi", "cfg", "config";
+			reg-names = "dbi", "cfg", "config";
  			interrupts = <GIC_SPI 221 IRQ_TYPE_LEVEL_HIGH>;
  			#interrupt-cells = <1>;
  			interrupt-map-mask = <0 0 0 0>;
diff --git a/drivers/pci/controller/dwc/pci-meson.c b/drivers/pci/controller/dwc/pci-meson.c
index 787469d1b396..404c4d9e1900 100644
--- a/drivers/pci/controller/dwc/pci-meson.c
+++ b/drivers/pci/controller/dwc/pci-meson.c
@@ -109,10 +109,6 @@ static int meson_pcie_get_mems(struct platform_device *pdev,
  {
  	struct dw_pcie *pci = &mp->pci;
  
-	pci->dbi_base = devm_platform_ioremap_resource_byname(pdev, "elbi");
-	if (IS_ERR(pci->dbi_base))
-		return PTR_ERR(pci->dbi_base);
-
  	mp->cfg_base = devm_platform_ioremap_resource_byname(pdev, "cfg");
  	if (IS_ERR(mp->cfg_base))
  		return PTR_ERR(mp->cfg_base);

> Neil
> 
> 




More information about the linux-amlogic mailing list