Migration from Kirkstone to Scarthgap results in loss of PCIe/Wifi

I am migrating an Apalis-IMX8 on an Ixora carrier card from kirkstone to scarthgap. I am using the scarthgap-7.x.y branches of the toradex bsp layers.

In the builds based on kirkstone-6.x.y I consider these to be normal logs.

   [    2.465440] imx6q-pcie 5f010000.pcie: supply epdev_on not found, using dummy regulator
[    2.466291] imx6q-pcie 5f000000.pcie: supply epdev_on not found, using dummy regulator
[    2.466331] imx6q-pcie 5f010000.pcie: No cache used with register defaults set!
[    2.466801] imx6q-pcie 5f000000.pcie: No cache used with register defaults set!
[    2.468925] imx6q-pcie 5f010000.pcie: PCIe PLL is locked.
[    2.573394] imx6q-pcie 5f000000.pcie: PCIe PLL is locked.
[    2.705537] imx6q-pcie 5f010000.pcie: iATU unroll: disabled
[    2.711175] imx6q-pcie 5f010000.pcie: Detected iATU regions: 6 outbound, 6 inbound
[    2.719064] imx6q-pcie 5f010000.pcie: host bridge /bus@5f000000/pcie@0x5f010000 ranges:
[    2.727134] imx6q-pcie 5f010000.pcie:       IO 0x007ff80000..0x007ff8ffff -> 0x0000000000
[    2.735369] imx6q-pcie 5f010000.pcie:      MEM 0x0070000000..0x007fefffff -> 0x0070000000
[    2.743713] imx6q-pcie 5f010000.pcie: iATU unroll: disabled
[    2.749326] imx6q-pcie 5f010000.pcie: Detected iATU regions: 6 outbound, 6 inbound
[    2.793428] imx6q-pcie 5f000000.pcie: iATU unroll: disabled
[    2.803222] imx6q-pcie 5f000000.pcie: Detected iATU regions: 6 outbound, 6 inbound
[    2.810822] imx6q-pcie 5f000000.pcie: host bridge /bus@5f000000/pcie@0x5f000000 ranges:
[    2.818883] imx6q-pcie 5f000000.pcie:       IO 0x006ff80000..0x006ff8ffff -> 0x0000000000
[    2.827095] imx6q-pcie 5f000000.pcie:      MEM 0x0060000000..0x006fefffff -> 0x0060000000
[    2.835444] imx6q-pcie 5f000000.pcie: iATU unroll: disabled
[    2.841035] imx6q-pcie 5f000000.pcie: Detected iATU regions: 6 outbound, 6 inbound
[    2.868973] imx6q-pcie 5f010000.pcie: Link up
[    2.873351] imx6q-pcie 5f010000.pcie: Link: Gen2 disabled
[    2.878974] imx6q-pcie 5f010000.pcie: Link up, Gen1
[    2.989381] imx6q-pcie 5f010000.pcie: Link up
[    2.994103] imx6q-pcie 5f010000.pcie: PCI host bridge to bus 0000:00
[    3.171592] pcieport 0000:00:00.0: PME: Signaling with IRQ 573
[    3.849849] imx6q-pcie 5f000000.pcie: Phy link never came up
[    3.862710] imx6q-pcie: probe of 5f000000.pcie failed with error -110

but on the scarthgap builds all I am seeing for pcie is this:

root@apalis-imx8:~# dmesg | grep pcie
[    1.796155] imx6q-pcie 5f010000.pcie: unable to find hsio ctrl registers
[    1.796766] imx6q-pcie 5f000000.pcie: unable to find hsio ctrl registers

Any ideas what could be causing this? I am using the apalis-imx8 machine definition. This is a custom distro so all I have removed is the toradex-demo layer. It is linux-toradex v6.6.54 and in u-boot the fdtfile is defined as imx8qm-apalis-v1.1-eval.dtb.

Thank you,
Joe

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 Joe,

Thank you for reaching out with your question about the PCIe issue after migrating from the Kirkstone to Scarthgap BSP on your Apalis iMX8 module. Let’s explore some potential solutions to address the problem with the HSIO control registers:

  1. Device Tree Configuration: Verify that your device tree file (imx8qm-apalis-v1.1-eval.dtb) is correctly set up for your hardware. Ensure it accurately reflects the PCIe configuration and any changes between the BSP versions.

  2. Kernel Configuration: Check that your kernel configuration includes all necessary options for PCIe support. Look for any differences in the kernel configuration between the Kirkstone and Scarthgap versions that might affect PCIe functionality.

  3. HSIO Control Registers: The error regarding missing HSIO control registers suggests a possible misconfiguration. Ensure that the HSIO settings are correctly defined in the device tree and that any required drivers are enabled in the kernel.

  4. BSP Changes: Review the release notes and documentation for the Scarthgap BSP to identify any changes that might impact PCIe functionality, such as driver support or device tree bindings.

  5. Log Analysis: Compare the boot logs from both the Kirkstone and Scarthgap builds to identify any differences in the PCIe subsystem initialization. This can provide insights into what might be missing or misconfigured.

  6. Custom Distro Considerations: Since you are using a custom distribution, ensure that any modifications do not inadvertently disable or misconfigure PCIe support.

By following these steps, you should be able to narrow down the cause of the PCIe issue and take corrective action. If the problem persists, further investigation into specific changes between the BSP versions may be necessary.

I hope this helps resolve your issue. Please feel free to reach out if you have any more questions.

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.

Hey Joe,

From the last two lines of your Kirkstone logs, it looks like the pcie is aslo mentioned, as not being connected. Do you have a pcie device connected to your module, or are you seeing anything not connected that should be? It could be something is configured in the device tree for pcie, but you are not using it.

-Eric

Eric Singer
Toradex

Hey Joe,

From the last two lines of your Kirkstone logs, it looks like the pcie is aslo mentioned, as not being connected. Do you have a pcie device connected to your module, or are you seeing anything not connected that should be? It could be something is configured in the device tree for pcie, but you are not using it.

Eric

Eric Singer
Toradex

Hi Eric,

The WiFi module doesn’t seem to be detected and I believe it is connected through pcie from the kernel modules I see loaded on a module that’s still running the kirkstone based operating system.

Thank you,
Joe

Hey @joekale,

We should first test this on a basic reference image to see if its custom software related.

Are you able to put the device in recovery mode, load our easy installer and select a reference image. Then can you share the output from lspci from cli of the module. This should list pci devices.

-Eric

I was able to load the multimedia reference image. The problem does appear to lie with what ever changes I have made.

TDX Wayland with XWayland 7.0.0+build.1 (scarthgap) apalis-imx8-14904029 ttyLP1
Apalis-iMX8_Reference-Multimedia-Image
root@apalis-imx8-14904029:~# lspci
0000:00:00.0 PCI bridge: Freescale Semiconductor Inc Device 0000 (rev 01)
0000:01:00.0 Ethernet controller: Marvell Technology Group Ltd. Device 2b42 (rev 11)
0001:00:00.0 PCI bridge: Freescale Semiconductor Inc Device 0000 (rev 01)

The mwifiex-pcie module is being automatically loaded and dmesg is showing expected pcie logs.

root@apalis-imx8-14904029:~# dmesg | grep pcie
[    6.273628] imx8q-pcie-phy 5f1a0000.pcie-phy: phy impedance ratio is not specified.
[    6.294134] imx8q-pcie-phy 5f180000.pcie-phy: phy impedance ratio is not specified.
[    6.303613] imx8q-pcie-phy 5f190000.pcie-phy: phy impedance ratio is not specified.
[    6.306124] imx6q-pcie 5f000000.pcie: host bridge /bus@5f000000/pcie@5f000000 ranges:
[    6.306178] imx6q-pcie 5f000000.pcie:       IO 0x006ff80000..0x006ff8ffff -> 0x0000000000
[    6.306197] imx6q-pcie 5f000000.pcie:      MEM 0x0060000000..0x006fefffff -> 0x0060000000
[    6.323170] imx6q-pcie 5f010000.pcie: host bridge /bus@5f000000/pcie@5f010000 ranges:
[    6.335434] imx6q-pcie 5f010000.pcie:       IO 0x007ff80000..0x007ff8ffff -> 0x0000000000
[    6.359641] imx6q-pcie 5f010000.pcie:      MEM 0x0070000000..0x007fefffff -> 0x0070000000
[    6.392676] imx8q-pcie-phy 5f190000.pcie-phy: PHY PLL is locked
[    6.418956] imx8q-pcie-phy 5f180000.pcie-phy: PHY PLL is locked
[    6.616722] imx6q-pcie 5f010000.pcie: iATU: unroll F, 6 ob, 6 ib, align 4K, limit 4G
[    6.616775] imx6q-pcie 5f010000.pcie: eDMA: unroll F, 1 wr, 1 rd
[    6.640822] imx6q-pcie 5f000000.pcie: iATU: unroll F, 6 ob, 6 ib, align 4K, limit 4G
[    6.640918] imx6q-pcie 5f000000.pcie: eDMA: unroll F, 1 wr, 1 rd
[    6.716837] imx6q-pcie 5f010000.pcie: PCIe Gen.1 x1 link up
[    6.727960] imx6q-pcie 5f010000.pcie: Link: Only Gen1 is enabled
[    6.727965] imx6q-pcie 5f010000.pcie: Link up, Gen1
[    6.827535] imx6q-pcie 5f010000.pcie: PCIe Gen.1 x1 link up
[    6.828086] imx6q-pcie 5f010000.pcie: PCI host bridge to bus 0000:00
[    7.021612] pcieport 0000:00:00.0: PME: Signaling with IRQ 592
[    7.028036] pcieport 0000:00:00.0: AER: enabled with IRQ 592
[    7.640855] imx6q-pcie 5f000000.pcie: Phy link never came up
[    8.640569] imx6q-pcie 5f000000.pcie: Phy link never came up
[    8.648819] imx6q-pcie 5f000000.pcie: PCI host bridge to bus 0001:00
[    8.756617] pcieport 0001:00:00.0: PME: Signaling with IRQ 593
[    8.763319] pcieport 0001:00:00.0: AER: enabled with IRQ 593
[    8.940469] imx8q-pcie-phy 5f1a0000.pcie-phy: PHY PLL is locked
[    8.941844] imx8q-pcie-phy 5f1a0000.pcie-phy: PHY calibration is done
[    9.051229] mwifiex_pcie 0000:01:00.0: no quirks enabled
[    9.059624] mwifiex_pcie 0000:01:00.0: enabling device (0000 -> 0002)
[    9.079255] mwifiex_pcie: PCI memory map Virt0: 000000004d3ea244 PCI memory map Virt2: 00000000bea98574
[   10.174083] mwifiex_pcie 0000:01:00.0: info: FW download over, size 639044 bytes
[   10.940538] mwifiex_pcie 0000:01:00.0: WLAN FW is active
[   11.001936] mwifiex_pcie 0000:01:00.0: info: MWIFIEX VERSION: mwifiex 1.0 (16.68.10.p159) 
[   11.011925] mwifiex_pcie 0000:01:00.0: driver_version = mwifiex 1.0 (16.68.10.p159)

I’ll keep searching through what’s missing but I have been operating thus far without making kernel file changes so it must be something included or configured through the toradex layers I must not have carried over properly in kirkstone.

Hey @joekale,

Were you able to resolve this topic?

-Eric

Hi @eric.tx,

I have not had time to get back to this yet. I can say the problem is not with the toradex reference images (even 7.1 builds did not have this issue). I haven’t isolated what the cause is yet but As far as layer differences I believe I am only missing the demo layer as far as layers pertaining to nxp boards is concerned.

Joe