Bpi-r4 requesting help using fm350-gl

Using the official firmware, fm350-gl can be recognized as a pcie device normally, but there is no driver. Firmware compiled with dangowrt source code, fm350 recognizes it as a USB device. The dts has also been modified according to the official source code, but it still doesn’t work!

[ 0.043578] mtk-xsphy soc:xphy@11e10000: failed to get ref_clk(id-1)

0.043977] mtk-pcie-gen3 11280000.pcie: host bridge /soc/pcie@11280000 ranges: [ 0.043994] mtk-pcie-gen3 11280000.pcie: Parsing ranges property… [ 0.044006] mtk-pcie-gen3 11280000.pcie: IO 0x0020000000…0x00201fffff → 0x0020000000 [ 0.044019] mtk-pcie-gen3 11280000.pcie: MEM 0x0020200000…0x0027ffffff → 0x0020200000 [ 1.385215] mtk-pcie-gen3 11280000.pcie: host bridge /soc/pcie@11280000 ranges: [ 1.392543] mtk-pcie-gen3 11280000.pcie: Parsing ranges property… [ 1.398810] mtk-pcie-gen3 11280000.pcie: IO 0x0020000000…0x00201fffff → 0x0020000000 [ 1.407246] mtk-pcie-gen3 11280000.pcie: MEM 0x0020200000…0x0027ffffff → 0x0020200000 [ 1.415746] mtk-pcie-gen3 11280000.pcie: failed to get max link width [ 1.756787] mtk-pcie-gen3 11280000.pcie: PCIe link down, current LTSSM state: detect.quiet (0x0) [ 1.765582] mtk-pcie-gen3: probe of 11280000.pcie failed with error -110

Looking forward to your help!

Are you sure you look on the right pcie controller (r4 have 4 controllers)? Is lspci empty?

I think it strange that one firmware sees pcie device and the other a usb one…it is possible that your card has both…can you share datasheet with pins from your card?

Afaik the xphy can be ignored as it has no clock defined in dts but front-usb works which is also on xphy behind usb hub

Currently no ssd card is inserted into pcie3

No changes were made to fm350-gl, and the two firmwares recognized different results.

The pcie2 code in dts is the same

The only difference is that the clocks definition of ssusb1 is different

bpi

dangowrt

Under dts of dangowrt, ssusb1 can always recognize the card as a USB device regardless of whether pcie2 is enabled or not.

If daniels openwrt recognizes the usb-part then usb there is fine you can focus on pcie part.

The label of infracfg does not matter if the clock itself are same (value does matter,name of const basicly not…)

If dts for pcie is same and it works with sinovoip image it can be a driver difference…try to compare mtk-gen3 driver in both sources. Another cause could be clock not ready when pcie is probed…maybe we need to make one critical or the full clock path (but i’m no expert here)

@sam33 have you an idea here?

What is strange is that the bpi firmware, lsusb does not recognize the fm350! Is it because the kernel is 5.4?

I do not know it,but imho we should get newer kernel version working and using vendor vrsion only as reference…maybe your card can use only one interface (usb or pcie) and disables the other once one is “connected”

Hi Have you make some progress? I have buy a cheap version and today is arrived. With the current version of Openwrt its detect on PCIe (sometimes the system crashed)

0003:01:00.0 Wireless controller [0d40]: MEDIATEK Corp. Device 4d75 (rev 01)
        Subsystem: Device 1cf8:3500
        Flags: bus master, fast devsel, latency 0, IRQ 112
        Memory at 21800000 (64-bit, prefetchable) [size=32K]
        Memory at 20800000 (64-bit, non-prefetchable) [size=8M]
        Memory at 21000000 (64-bit, prefetchable) [size=8M]
        Capabilities: [80] Express Endpoint, MSI 00
        Capabilities: [d0] MSI-X: Enable+ Count=34 Masked-
        Capabilities: [e0] MSI: Enable- Count=1/32 Maskable+ 64bit+
        Capabilities: [f8] Power Management version 3
        Capabilities: [100] Vendor Specific Information: ID=1556 Rev=1 Len=008 <?>
        Capabilities: [108] Latency Tolerance Reporting
        Capabilities: [110] L1 PM Substates
        Capabilities: [200] Advanced Error Reporting
        Capabilities: [300] Secondary PCI Express
        Kernel driver in use: mtk_t7xx

but after some time i get

mtk_t7xx 0003:01:00.0: MD handshake timeout mtk_t7xx 0003:01:00.0: Boot Handshake failure

i have no modem on mmcli -L and no tty or some modem devices

if i disable pcie port in the dtsi file after one or two minutes the device switch to usb mode i can install a rndis driver and i get a networkcard but no serial ports and its not detected in mmcli

Ok with the Patch from Fibocom FM350-GL Support - For Developers - OpenWrt Forum i got the Modem

When I use compiled kernerl from https://forum.banana-pi.org/t/bpi-r4-sd-debian-bookworm-bullseye-images-on-kernel-6-8-0-dango/17487/12 I am able to see wireless controller on lspci. Just make sure you choose mediatek t7xxx driver.