PCIe Bridge unavailable after kernel upgrade

This is a follow-on to the thread below which resolved USB Modem and GPS modules not being recognised when migrating from Kernel 5.4.-2.3.x-imx to 6.6-2.0.x-imx.A a custom carrier board is being used with the IMX8 Apalis v1.1 Toradex.

The device tree was modified to ensure that GPIO Chip 0 Pin 30 is set high by default. This resolved the modem/gps problem.

The fix was:

At the time it was not noticed that the PCIe bridge was now not being seen. We need this for the on-board WiFi module to be available.

lspci is drawing a blank:

~$ sudo lspci -vvv admin@07108252-0000006
~$ sudo lspci -t 
-[0000:00]-

Logs

admin@server:~$ sudo dmesg | grep pci
[ 0.000000] Kernel command line: pci=earlydump net.ifnames=0 debug loglevel=8 root=PARTUUID=f6344cd2-6d03-4b9f-baff-31610df1041e ro rootfstype=ext4 rootwait fsck.repair=yes systemd.unified_cgroup_hierarchy=0
[ 27.637106] platform 5f010000.pcie: deferred probe pending

Please advise.

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

To address the issue of the PCIe bridge not being recognized after your kernel upgrade on the Apalis iMX8, here are some steps you can follow:

  1. Device Tree Configuration: Since you previously modified the device tree for GPIO settings, ensure that the PCIe-related nodes are correctly configured. Verify that the PCIe controller is enabled in the device tree and that any necessary GPIOs for PCIe power or reset are correctly set.

  2. Kernel Logs: Use dmesg to check for any PCIe-related messages during boot. Look for errors or warnings that might indicate why the PCIe bridge is not initializing. The message “deferred probe pending” suggests that a required resource might not be available at the time of probing, possibly due to unmet dependencies like power or clock signals.

  3. Kernel Configuration: Ensure that your kernel configuration includes support for PCIe. This can be verified by checking the kernel configuration file (usually found in /boot/config-*) for options related to PCIe support.

  4. PCIe Clock and Power: Make sure that the PCIe clock and power are correctly configured and supplied. This might involve checking additional GPIOs or regulators that need to be enabled for the PCIe interface to function.

  5. Consult Documentation: Review the Apalis iMX8 datasheet and any relevant errata for known issues or additional configuration steps required for PCIe.

By following these steps, you should be able to identify and resolve the issue with the PCIe bridge. If the problem persists, further investigation into the specific kernel version changes may be necessary.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Apalis IMX8 BSP 7 Kernel 6.6.23 - PCI MSI issues.

Nothing in the bot-response above helps.

Dear @scuba-hacker,

Thank you for bringing up this issue and checking the suggestions made by @ToradexAI.
I would like to ask a few questions to better understand the situation.

Which kernel config do you specifically need? Is it possible that some kernel config was disabled and thusly the issue arises?

By board, do you mean the module (Apalis iMX8) or your carrier board?

Best regards,
Collin

Hi @collin.tx

I’m referring to the wifi module on the Apalis iMX8.

We disable these modules:

vpu_decoder, vpu_encoder, wakeup_key

Kind Regards

Mark

@collin.tx Any advice regarding this please?

Hi @scuba-hacker !

Looking at the device tree of the latest version of the kernel (6.6-2.2.x-imx),
we see that the original reset GPIO for the Apalis PCIE1 is &lsio_gpio0 30 (MXM 26) instead of &lsio_gpio0 0 (MXM 279):

https://git.toradex.com/cgit/linux-toradex.git/tree/arch/arm64/boot/dts/freescale/imx8-apalis-v1.1.dtsi?h=toradex_6.6-2.2.x-imx#n808

So, in your modification, you are configuring a PIN other than the default one to be your PCIE reset. It will affect devices connected to the Apalis PCIE1 (&pciea on the device tree).

The on-module Wi-Fi on Apalis iMX8QM is connected to another PCIe: &pcieb on the device tree.

https://git.toradex.com/cgit/linux-toradex.git/tree/arch/arm64/boot/dts/freescale/imx8-apalis-v1.1.dtsi?h=toradex_6.6-2.2.x-imx#n813

So it should not be affected by your change on the PCI1 (&pciea).

As a sanity check, could you please flash the latest Reference Minimal and check it there?

Best regards,

Hi @henrique.tx

I’ve installed the latest Torizon reference image using online install via Tezi.

The GPS and LTE Modems can be seen using lsusb and the pcie bus and wifi modules are shown in logs (but not in lspci as it’s not part of the reference image) which I have attached.

Can you confirm what the next steps are?

Thanks
torizon-logs.txt (7.6 KB)

Any assistance would be greatly appreciated.

Hello @scuba-hacker,

I apologize for the delay on this topic.

Are you using the same device tree as you used for kernel 5.4?
If so, there could be a number of problems that could cause the onboard WiFi to not work.

When migrating between major versions of the Toradex BSP, a Linux kernel update is expected.
Therefore, to do such migration, the following approach is recommended on the device tree side:

  • Compare your custom device tree with the base device tree provided by Toradex and make a list of changes.
  • Study the new device tree provided by Toradex.
  • Do the changes you need to the new base device tree.
    • In this step, it is recommended that you enable features one by one, testing them so you can see that your changes are actually having the intended effect.

With such workflow you should come from a known-working configuration – the base Toradex BSP – to your new image working on your board.

Best Regards,
Bruno