PCIE mode on VIM4 fails with new quectel firmware

Which system do you use? Android, Ubuntu, OOWOW or others?

Ubuntu

Which version of system do you use? Please provide the version of the system here:

5.15.119 #1.6.9.1 SMP PREEMPT Thu Jun 20 09:22:43 CST 2024

(server)

Please describe your issue below:

Quectel RM520 with R03 firmware does not work in PCIE mode.
Dmesg shows the message below and the /dev/mhi_DUN etc devices are not created.

The same config works on older Quectel R01 firmware.
Quectel say the R03 works in PCIE mode on other boards.
Is there anything I can do to change the driver config to work around this error ?

Thanks.

@numbqq (perhaps?)

Post a console log of your issue below:


[   43.907416] mhi_init Quectel_Linux_PCIE_MHI_Driver_V1.3.7
[   43.908037] Failed to set up IOMMU for device 0000:01:00.0; retaining platform DMA ops
[   43.908078] mhi_pci_probe pci_dev->name = 0000:01:00.0, domain=0, bus=1, slot=0, vendor=17CB, device=0308

Any ideas here ?
It looks like the driver partially loads then fails to map the MMU.
Is there a timing problem here (power up sequence?).

If I blacklist the driver, then manually insmod it I can sometimes get it to load correctly.

I’d stick with the old firmware except that it doesn’t support e-sims correctly and the new firmware does.

Clues? Help? Please…

@numbqq

@numbqq Hi, I have sent logs to the Quectel R+D team and they say that the Khadas PCIE behaviour is wrong

  1. I have checked the logsFromModule.txt file,the log shows PCIe link training failed;
  2. The link training fail reason is the host set PCIe PERST pin to low when the host and module execute PCIe link training, below is the log:
  3. Please check host PCIe PERST pin timing, why host PCIe set PERST pin to high and then set to low;

I can send you the associated logs etc by DM if you need them.

Is there a way to change this behaviour on the PCIE driver in the 5.15 kernel ?

Thanks.
Tim.

Hello @steely-glint

Could you check with latest image 1.7.1-240930? You can install with oowow online.

Hi @numbqq I hope you had a good {short} holiday!.

I installed the 1.7.1-240930 image - exactly the same results - only /dev/mhi_BHI is present none of the other mhi_* devices. Also the same message in dmesg.

I can give you ssh access to a VIM4 with the RM520 if that helps - or I can DM you the detailed comments from Quectel.

Or let me know how I can help debug this.

Thanks.

Tim.

Not sure about this, but it works for our 5G NR module add-on RM500Q, we can’t reproduce this issue as we don’t have same module you used.

@numbqq Have you upgraded to the latest firmware on the RM500 ? It used to work on the older firmware on the RM520 then stopped working when I upgraded to get the e-sim functionality.

I will DM you the notes from Quectel.

Hello @steely-glint

We will check on our side. How you upgrade the firmeware?

@numbqq I bought a new one direct from Quectel!

(backstory:
On an older module with a damaged antenna connector I ran
QFirehose -f /mnt/sdb1/firmware
to do the upgrade with the correct firmware from Quectel.
I assumed I’d bricked it because the interfaces didn’t come up, and bought a new one.
Turns out that the upgrade was fine but it doesn’t get on with your pcie kernel driver…)

Hello @steely-glint

We have reproduced this issue with RM500 to upgrade the firmware, we will check this issue on our side.

1 Like