[BPI-R64] mt7622 vanilla kernel pci issue

I have an issue trying to make any pci-e devices work with vanilla 5.10.108 kernel. I’ve found a lot of issues connected with pci-e on BPI-R64 but I cannot understand which one do I have). Facts that I know:

  • lspci shows absolutely nothing, even host/pci bridges
  • there is no interesting messages about pci on dmesg:
[[email protected]:~]$ dmesg | grep -i pci
[    0.859860] PCI: CLS 0 bytes, default 64
[    2.208226] ehci-pci: EHCI PCI platform driver
[    2.208619] ohci-pci: OHCI PCI platform driver

How can I find out what goes wrong and how to fix it? What should I check first? Maybe there is some obvious patches/config options that should be enabled?

Afaik 5.10 had issues with msi handling and needed change for splitting pcie and different interrupt handling

Refer pci patches e.g. from 5.11

https://github.com/frank-w/BPI-R2-4.14/commits/5.11-main

Btw. You can use an up-to-date from my repo compiled by yourself with all necessary patches for r64 (like bluetooth). 5.10-hnat has hardware nat backporting

Afaik 5.10 had issues with msi handling and needed change for splitting pcie and different interrupt handling

Refer pci patches e.g. from 5.11

https://github.com/frank-w/BPI-R2-4.14/commits/5.11-main

Thank you so much for response! Will start with https://github.com/frank-w/BPI-R2-4.14/commit/231179075efad285f1346443005df132f223c0f4 https://github.com/frank-w/BPI-R2-4.14/commit/800f219c7ab788b65cb84cc8f66fd039df1d5aa1.

Btw. You can use an up-to-date from my repo compiled by yourself with all necessary patches for r64 (like bluetooth). 5.10-hnat has hardware nat backporting

Thank you but with nixOS easier to bring patches than replace the kernel. Maybe if stealing patches from your repo will not help I will try to replace whole kernel.

Well, I’ve ported all pci-related patches to the vanilla kernel and still there is no pic devices. It seems that it is time for debug(. Does anyone have a hint where to begin?

the 2 you’ve posted fixing the msi issue, but mt7622 needs the port-splitting too (afair it should be in 5.15+ if you can use this as base)

Ok, I’ve ported all pci-e related patches and now some of the pci-e devices works) Thats a good news. But some of them still didn’t work (didn’t visible in lspci output or in /sys/bus/pci... tree). For example Intel AC 7260 detects and works but WLE600VX-2 didn’t. Even if I use kernel compiled from https://github.com/frank-w/BPI-R2-4.14 repo (5.11-main branch). Is it some hw issue with BPI-R64 board?

My kernels have sata enabled, so one pcie-slot is disabled. Else there is a current limitation which affects some wifi 6 cards.