Why the driver is not stable?

Hi,

I have driver with Morse chip, however the interface is not stable on start up, sometime it is UP but some time it got error below. Do you know if the error “-5” meaning?

[ 164.147618] Morse Micro Dot11ah driver registration. Version 0-rel_1_9_3_2023_Aug_28
[ 181.326115] morse micro driver registration. Version 0-rel_1_9_3_2023_Aug_28
[ 181.333310] SPI driver morse_spi has no spi_device_id for morse,mm610x-spi
[ 181.344550] morse_spi_probe: Setup SPI, clock: 50000000
[ 181.344575] morse_spi_probe: Of Probe…
[ 181.364314] morse_spi spi0.0: Reading gpio pins configuration from device tree
[ 181.383503] morse_spi spi0.0: power-gpio-0 : 420
[ 181.388947] morse_spi spi0.0: power-gpio-1 : -2
[ 181.393511] morse_spi spi0.0: reset-gpio-0 : 503
[ 181.398874] morse_spi spi0.0: spi-irq-gpios-0 : 505
[ 181.403838] morse_spi_probe: Reset Module using gpio 503
[ 181.403871] Reseting Morse Chip – 1
[ 181.568729] Done
[ 181.571898] spi_geni 984000.spi: tx_fifo 0 rx_fifo 0 tx_width 0
[ 181.579830] morse_spi_probe: SD_IO_MORSE_INIT [0]
[ 181.586663] morse_spi_probe morse_spi_reg32_read ret: 0
[ 181.591915] morse_spi_probe Morse-chip-id: 0x306
[ 181.597434] Morse Micro SPI device found, chip ID=0x0306, serial number=default
[ 181.605336] Morse Micro clock=50 MHz, delay bytes=250, max block count=10
[ 181.612560] morse_spi spi0.0: Morese User Access Init…
[ 181.618852] uaccess char driver major number is 489
[ 181.663601] morse_io: Device node ‘/dev/morse_io’ created successfully
[ 181.674358] morse_spi spi0.0: Morese User Access Done.
[ 181.681540] Loading firmware from morse/mm6108.bin
[ 181.731270] Loading BCF from morse/bcf_default.bin
[ 182.306928] morse_spi spi0.0: Write BCF board_config to chip - addr 0 size 352
[ 182.320148] morse_spi spi0.0: Write BCF .regdom_AU to chip - addr 160 size 12
[ 182.916285] QCMAP: Modem in service NAS indication received on sub0
[ 183.052843] QCMAP:bringup v6
[ 183.354919] morse_spi spi0.0: FW manifest pointer not set
[ 183.922202] morse_spi spi0.0: Write BCF board_config to chip - addr 0 size 352
[ 183.931062] morse_spi spi0.0: Write BCF .regdom_AU to chip - addr 160 size 12
[ 184.963782] morse_spi spi0.0: FW manifest pointer not set
[ 185.525761] morse_spi spi0.0: Write BCF board_config to chip - addr 0 size 352
[ 185.533947] morse_spi spi0.0: Write BCF .regdom_AU to chip - addr 160 size 12
[ 186.564712] morse_spi spi0.0: FW manifest pointer not set
[ 186.570400] morse_spi spi0.0: morse_firmware_init failed: -5
[ 186.582806] morse_spi_probe failed. The driver has not been loaded!
[ 186.589116] morse_spi: probe of spi0.0 failed with error -5

BR
Meqqn

Hi @meqqn

We usually see this error when the firmware, bcf, and/or driver versions do not match.
Can you check the BCF binary (bcf_default.bin) and firmware binary (mm6108.bin) you are using come from the same package release (in your case, 1.9.3)?
If you’re uncertain, please share the sha256 sum of the files above.

However, you state that it “sometimes” works. This would not happen if it was a version mismatch. “Sometimes” working usually indicates some form of hardware issue such as signal integrity problems or poor power supplies. Can you share any information about the hardware you are using?

Thanks Arien,

I have two sources of the bcf_default.bin and firmware binary mm6108.bin that may cause the problem. I have just used the same source and it works now.

Just curious how to check if they are matched.

BR
Meqqn

The previous issue has been solved. It’s because of mismatched files.

Another question I want to ask: which file should be kept in /lib/firmware/morse? just file bcf_default.bin and mm6108.bin or All the files provided in 1.9.3 package?

BR
MEQQN

Glad you were able to solve the issue!

You will need both files in /lib/firmware/morse. mm6108.bin is the chip firmware binary, and bcf_default.bin will contain radio calibration data specific to the board hardware design.

For the firmware binary (mm6108.bin) you can check the version of the file by running: strings /lib/firmware/morse/mm6108.bin | grep rel_. There isn’t a simple way to get a compatible version from the bcf binary.

Which device/module are you using?

Hi all
Where to find bcf_default.bin ?
I dont found.

@termus the correct bcf file will actually depend on the module you are using. If you’re using a module made by Morse Micro, you can find the BCFs in the release artefacts here: Releases · MorseMicro/bcf_binaries · GitHub

However if you’re using a module from one of our module vendors (eg, Quectel, AsiaRF, Azurewave, etc) you will need to contact them for the correct BCF file.

You can either copy this to your device as bcf_default.bin, but you might find it neater to specify the bcf module parameter when inserting morse.ko. For example,
insmod morse.ko bcf=bcf_mf08651_us.bin

1 Like

Hi
My module is from Alfa, mm6108

This dont contains named file bcf_default.bin just different names. Or i need to rename(bcf_default.bin) the file to the wished to load bin?

Morse driver already load by depmod, how to reload to params bcf=bcf_mf08651_us.bin ? or i need to back again from mose.ko file to insmod morse.ko bcf=bcf_mf08651_us.bin?

A post was split to a new topic: Morse_sdio_reg32_write