MM6108 SPI Mode Integration with ECQ601x

Hi,

We are trying to integrate Quectel’s FGH100M (containing MM6108 chipset) with our IPQ601x platform board, using SPI interface.

While running the morse.ko script,

  1. We got the chip initialized in SPI mode at 50MHz , with “chip ID=0x0306”
  2. Device node ‘/dev/morse_io’ created successfully
  3. Firmware Manifest MAC: 90:03:71:52:9d:ac

After which we got failed to transfer one message from queue and morse_spi_set_func_address_base failed (errno=-110)

We are using Debian Linux 5.10.83, with Dot11ah and morse micro driver “version 0-rel_1_12_4_2024_Jun_11”.

Are we missing any steps or configuration? Please help us fix this error. Let us know if you need any other inputs.

Full log:

[   52.361714] Morse Micro Dot11ah driver registration. Version 0-rel_1_12_4_2024_Jun_11                                                                                                                          
[   52.524125] morse micro driver registration. Version 0-rel_1_12_4_2024_Jun_11                                                                                                                                  
[   52.525119] morse_spi spi1.0: Reading gpio pins configuration from device tree                                                                                                                                 
[   52.530448] morse_spi spi1.0: Read gpio pin - 506, MORSE_SPI_HW_IRQ_RPI_GPIO_DEFAULT - 506                                                                                                                     
[   52.537420] morse_spi spi1.0: Final gpio - 506, gpio pin - 506, MORSE_SPI_HW_IRQ_RPI_GPIO_DEFAULT - 506                                                                                                        
[   52.545841] morse_spi spi1.0: Morse Micro SPI device found, chip ID=0x0306                                                                                                                                     
[   52.554906] morse_spi spi1.0: Board serial: default                                                                                                                                                            
[   52.561906] morse_spi spi1.0: clock=50 MHz, delay bytes=250, max block count=10                                                                                                                                
[   52.566840] uaccess char driver major number is 239                                                                                                                                                            
[   52.575756] morse_io: Device node '/dev/morse_io' created successfully                                                                                                                                         
[   52.584913] morse_spi spi1.0: Loaded firmware from morse/mm6108.bin, size 433044, crc32 0x436ba524                                                                                                             
[   52.588200] morse_spi spi1.0: Loaded BCF from morse/bcf_default.bin, size 1127, crc32 0xd9cd0bd3                                                                                                               
[   53.137076] morse_spi spi1.0: Write BCF board_config to chip - addr 8011fa80 size 52                                                                                                                           
[   53.137342] morse_spi spi1.0: Write BCF .regdom_IN to chip - addr 8011fab4 size 12                                                                                                                             
[   53.221499] morse_spi spi1.0: Firmware initialized                                                                                                                                                             
[   53.222052] morse_spi spi1.0: morse pagers detected 4                                                                                                                                                          
[   53.230807] morse_spi spi1.0: Firmware Manifest MAC: 90:03:71:52:9d:ac                                                                                                                                         
[   53.230848] morse_spi spi1.0: Firmware Manifest Flags0: 0x21f01857                                                                                                                                             
[   53.236843] morse_spi spi1.0: Firmware Manifest Flags1: 0x20000c80                                                                                                                                             
[   53.242900] morse_spi spi1.0: Firmware Manifest Flags2: 0x0                                                                                                                                                    
[   53.249116] morse_spi spi1.0: Firmware Manifest Flags3: 0x0                                                                                                                                                    
[   53.254529] morse_spi spi1.0:        AMPDU Minimum start spacing: 7                                                                                                                                            
[   53.260166] morse_spi spi1.0:        Morse Minimum Start Spacing offset: 2                                                                                                                                     
[   53.266124] morse_spi spi1.0:        Beamformee STS Capability: 0                                                                                                                                              
[   53.272410] morse_spi spi1.0:        Number of Sounding Dimensions: 0                                                                                                                                          
[   53.277776] morse_spi spi1.0:        Maximum AMPDU Length Exponent: 3                                                                                                                                          
[   53.283623] morse_spi spi1.0: TX Status pager bypass enabled: buffer addr 0x8010188c                                                                                                                           
[   53.289562] morse_spi spi1.0: morse_mac_init: WARNING enable_ps modparam must only be used for testing - use iw set power_save                                                                                 
[   53.297605] morse_spi spi1.0: Mesh types supported: true                                                                                                                                                       
[   53.310283] morse_spi spi1.0: Setting regulatory domain to IN                                                                                                                                                  
[   53.325711] morse_spi spi1.0: Driver loaded with kernel module parameters                                                                                                                                      
[   53.325758] morse_spi spi1.0:     enable_1mhz_probes                      : Y                                                                                                                                  
[   53.331492] morse_spi spi1.0:     enable_hw_scan                          : Y                                                                                                                                  
[   53.338709] morse_spi spi1.0:     enable_pv1                              : N                                                                                                                                  
[   53.345845] morse_spi spi1.0:     enable_page_slicing                     : N                                                                                                                                  
[   53.352848] morse_spi spi1.0:     log_modparams_on_boot                   : Y                                                                                                                                  
[   53.360109] morse_spi spi1.0:     enable_mcast_at_op_bw                   : N                                                                                                                                  
[   53.367201] morse_spi spi1.0:     enable_mcast_whitelist                  : Y                                                                                                                                  
[   53.374203] morse_spi spi1.0:     ocs_type                                : 1                                                                                                                                  
[   53.381407] morse_spi spi1.0:     enable_auto_mpsw                        : Y                                                                                                                                  
[   53.388553] morse_spi spi1.0:     duty_cycle_probe_retry_threshold        : 2500                                                                                                                               
[   53.395614] morse_spi spi1.0:     duty_cycle_mode                         : 0                                                                                                                                  
[   53.419005] morse_spi spi1.0:     enable_auto_duty_cycle                  : Y                                                                                                                                  
[   53.419052] morse_spi spi1.0:     dhcpc_lease_update_script               : /morse/scripts/dhcpc_update.sh                                                                                                     
[   53.425139] morse_spi spi1.0:     enable_ibss_probe_filtering             : Y                                                                                                                                  
[   53.434748] morse_spi spi1.0:     enable_dhcpc_offload                    : Y                                                                                                                                  
[   53.441932] morse_spi spi1.0:     enable_arp_offload                      : Y                                                                                                                                  
[   53.449057] morse_spi spi1.0:     enable_bcn_change_seq_monitor           : 0                                                                                                                                  
[   53.456158] morse_spi spi1.0:     enable_cac                              : 0                                                                                                                                  
[   53.463238] morse_spi spi1.0:     max_mc_frames                           : 10                                                                                                                                 
[   53.470387] morse_spi spi1.0:     tx_max_power_mbm                        : 2200                                                                                                                               
[   53.477511] morse_spi spi1.0:     enable_twt                              : Y                                                                                                                                  
[   53.485026] morse_spi spi1.0:     enable_mac80211_connection_monitor      : N                                                                                                                                  
[   53.492087] morse_spi spi1.0:     enable_airtime_fairness                 : N                                                                                                                                  
[   53.499218] morse_spi spi1.0:     enable_raw                              : Y                                                                                                                                  
[   53.506324] morse_spi spi1.0:     max_aggregation_count                   : 0                                                                                                                                  
[   53.513412] morse_spi spi1.0:     max_rate_tries                          : 1                                                                                                                                  
[   53.520567] morse_spi spi1.0:     max_rates                               : 3                                                                                                                                  
[   53.527684] morse_spi spi1.0:     enable_watchdog_reset                   : N                                                                                                                                  
[   53.534766] morse_spi spi1.0:     watchdog_interval_secs                  : 30                                                                                                                                 
[   53.541913] morse_spi spi1.0:     enable_watchdog                         : N                                                                                                                                  
[   53.549049] morse_spi spi1.0:     country                                 : IN                                                                                                                                 
[   53.556251] morse_spi spi1.0:     enable_cts_to_self                      : N                                                                                                                                  
[   53.563325] morse_spi spi1.0:     enable_rts_8mhz                         : N                                                                                                                                  
[   53.570604] morse_spi spi1.0:     enable_trav_pilot                       : Y                                                                                                                                  
[   53.577692] morse_spi spi1.0:     enable_sgi_rc                           : Y                                                                                                                                  
[   53.584765] morse_spi spi1.0:     enable_mbssid_ie                        : N                                                                                                                                  
[   53.591913] morse_spi spi1.0:     virtual_sta_max                         : 0                                                                                                                                  
[   53.599044] morse_spi spi1.0:     thin_lmac                               : 0                                                                                                                                  
[   53.606152] morse_spi spi1.0:     enable_dynamic_ps_offload               : Y                                                                                                                                  
[   53.613238] morse_spi spi1.0:     enable_ps                               : 0                                                                                                                                  
[   53.620391] morse_spi spi1.0:     enable_subbands                         : 2                                                                                                                                  
[   53.627509] morse_spi spi1.0:     enable_survey                           : Y                                                                                                                                  
[   53.634594] morse_spi spi1.0:     mcs10_mode                              : 0                                                                                                                                  
[   53.641738] morse_spi spi1.0:     mcs_mask                                : 1023                                                                                                                               
[   53.648868] morse_spi spi1.0:     no_hwcrypt                              : 0                                                                                                                                  
[   53.656329] morse_spi spi1.0:     enable_ext_xtal_init                    : N                                                                                                                                  
[   53.663326] morse_spi spi1.0:     enable_otp_check                        : 1                                                                                                                                  
[   53.670472] morse_spi spi1.0:     bcf                                     :                                                                                                                                    
[   53.677598] morse_spi spi1.0:     serial                                  : default                                                                                                                            
[   53.684680] morse_spi spi1.0:     debug_mask                              : 15                                                                                                                                 
[   53.692111] morse_spi spi1.0:     tx_status_lifetime_ms                   : 15000                                                                                                                              
[   53.699403] morse_spi spi1.0:     tx_queued_lifetime_ms                   : 1000                                                                                                                               
[   53.707017] morse_spi spi1.0:     max_txq_len                             : 32                                                                                                                                 
[   53.714369] morse_spi spi1.0:     default_cmd_timeout_ms                  : 600                                                                                                                                
[   53.721441] morse_spi spi1.0:     enable_short_bcn_as_dtim_override       : -1                                                                                                                                 
[   53.728634] morse_spi spi1.0:     fw_bin_file                             :                                                                                                                                    
[   53.735924] morse_spi spi1.0:     sdio_reset_time                         : 400                                                                                                                                
[   53.743099] morse_spi spi1.0:     macaddr_suffix                          : 00:00:00                                                                                                                           
[   53.750165] morse_spi spi1.0:     macaddr_octet                           : 255                                                                                                                                
[   53.758147] morse_spi spi1.0:     max_total_vendor_ie_bytes               : 514                                                                                                                                
[   53.765149] morse_spi spi1.0:     coredump_include                        : 1                                                                                                                                  
[   53.772472] morse_spi spi1.0:     coredump_method                         : 1                                                                                                                                  
[   53.779762] morse_spi spi1.0:     enable_coredump                         : Y                                                                                                                                  
[   53.786879] morse_spi spi1.0:     spi_use_edge_irq                        : N                                                                                                                                  
[   53.793968] morse_spi spi1.0:     spi_clock_speed                         : 50000000                                                                                                                           
[   53.801113] morse_spi spi1.0:     enable_mm_vendor_ie                     : Y                                                                                                                                  
[   56.395515] morse_spi spi1.0: SPI transfer failed: -110                                                                                                                                                        
[   56.395572] spi_master spi1: failed to transfer one message from queue                                                                                                                                         
[   56.399556] morse_spi spi1.0: morse_spi_set_func_address_base failed (errno=-110)                                                                                                                              
[   56.406254] ------------[ cut here ]------------                                                                                                                                                               
[   56.413788] WARNING: CPU: 0 PID: 433 at drivers/net/wireless/fgh100m/spi.c:763 morse_spi_get_func+0x7c/0x100 [morse]                                                                                           
[   56.418392] Modules linked in: morse(+) dot11ah [last unloaded: spidev]                                                                                                                                        
[   56.428895] CPU: 0 PID: 433 Comm: irq/105-Morse S Not tainted 5.10.83-aheesa-1.08 #85                                                                                                                          
[   56.435228] Hardware name: Aheesa Digital Innovations Private Limited. AH-ECQ6018/AH-ECQ6018-PXE (DT)                                                                                                          
[   56.443221] pstate: 20400005 (nzCv daif +PAN -UAO -TCO BTYPE=--)                                                                                                                                               
[   56.452485] pc : morse_spi_get_func+0x7c/0x100 [morse]                                                                                                                                                         
[   56.458548] lr : morse_spi_get_func+0x68/0x100 [morse]                                                                                                                                                         
[   56.463433] sp : ffffffc011f8bc90                                                                                                                                                                              
[   56.468552] x29: ffffffc011f8bc90 x28: 0000000000000000                                                                                                                                                        
[   56.471942] x27: ffffff8006f13768 x26: ffffffc011f8bd84                                                                                                                                                        
[   56.477323] x25: ffffff8006ed6eac x24: 0000000000000004                                                                                                                                                        
[   56.482619] x23: 00000000100a6050 x22: ffffff8006f13650                                                                                                                                                        
[   56.487914] x21: ffffff8006f11f00 x20: 00000000ffffff92                                                                                                                                                        
[   56.493208] x19: ffffff8006f13650 x18: 0000000000000000                                                                                                                                                        
[   56.498503] x17: 0000000000000000 x16: 0000000000000000                                                                                                                                                        
[   56.503799] x15: 000000000000000a x14: 00000000000618c4                                                                                                                                                        
[   56.509093] x13: ffffffc091f8b7e7 x12: 0000000000000006                                                                                                                                                        
[   56.514390] x11: 000000000000027e x10: 00000000ffffffea                                                                                                                                                        
[   56.519684] x9 : ffffffc011432620 x8 : ffffffc011f8b7c8                                                                                                                                                        
[   56.524979] x7 : ffffffc011f8b7d0 x6 : 00000000ffffefff                                                                                                                                                        
[   56.530275] x5 : 0000000000000000 x4 : 0000000000000000                                                                                                                                                        
[   56.535570] x3 : 0000000000000000 x2 : ffffffc008ae94d0                                                                                                                                                        
[   56.540865] x1 : 0000000000000000 x0 : 0000000000000001                                                                                                                                                        
[   56.546161] Call trace:                                                                                                                                                                                        
[   56.551515]  morse_spi_get_func+0x7c/0x100 [morse]                                                                                                                                                             
[   56.553688]  morse_spi_mem_read+0x70/0x1e4 [morse]                                                                                                                                                             
[   56.558548]  morse_spi_reg32_read+0x24/0x6c [morse]                                                                                                                                                            
[   56.563322]  morse_hw_irq_handle+0x54/0x114 [morse]                                                                                                                                                            
[   56.568097]  morse_spi_irq_handler+0x44/0x88 [morse]                                                                                                                                                           
[   56.572903]  irq_thread_fn+0x2c/0x74                                                                                                                                                                           
[   56.578105]  irq_thread+0xf8/0x1a4                                                                                                                                                                             
[   56.581664]  kthread+0x10c/0x11c                                                                                                                                                                               
[   56.584875]  ret_from_fork+0x10/0x30                                                                                                                                                                           
[   56.588258] ---[ end trace 1de03be4357fd25f ]---                                                                                                                                                               
[   56.591888] morse_spi spi1.0: morse_spi_get_func failed                                                                                                                                                        
[   56.596448] morse_spi spi1.0: morse_spi_mem_read failed (errno=-95)                                                                                                                                            
[   56.601376] morse_spi spi1.0: morse_spi_reg32_read failed (errno=-95)                                                                                                                                          
[   57.675276] morse_spi spi1.0: SPI transfer failed: -110                                                                                                                                                        
[   57.675334] spi_master spi1: failed to transfer one message from queue                                                                                                                                         
[   57.679345] morse_spi spi1.0: morse_spi_set_func_address_base failed (errno=-110)

The error failed to transfer one message from queue is coming from the SPI subsystem driver in the kernel, specifically this code block in __spi_pump_messages() in spi.c. (5.15 kernel). This makes me suspect there as an issue with the hardware configuration - especially as it successfully reads the chip id, which uses the same code path as the failed function - morse_spi_reg32_read.

Can you share your device tree configuration?

I would be interested to know what the return code from this function is, if you have the capability to modify the kernel here to add a print for this return code.

Try reducing the spi clock speed with module parameter spi_clock_speed for the morse driver, try 5000000, 10000000, and maybe 20000000.

If possible, please also share a logic analyzer capture of the bus. That is, all SPI lines as well as the RESET, and SPI_IRQ lines.

Hi,

Thanks for your response.

Our DTS:

&spi_1 {
        status = "okay";
        fgh100m@0 {
                reg=<0>;
                compatible = "morse,mm610x-spi";
                spi-max-frequency=<50000000>;
                spi-irq-gpios=<&tlmm 74 GPIO_ACTIVE_HIGH>;
                status="okay";
        };
};

As suggested, we tried reducing the clock speed using “spi_clock_speed=” argument. The logs and logic analyzer captures are attached for your perusal.

Regarding the hardware setup, we have built a custom PCB with Quectel’s FGH100M Module on it (schematic attached). We have tied the reset signal high and don’t control it through the processor. Is it a mandatory to control the Reset externally?
AH_FGH100M.pdf (233.5 KB)

Let us know if you need additional inputs.

Thanks,
RMS

Log_20250728_5M.txt (20.3 KB)
Log_20250728_10M.txt (3.0 KB)
Log_20250728_20M.txt (19.0 KB)
Log_20250728_50M.txt (17.9 KB)



Regarding the hardware setup, we have built a custom PCB with Quectel’s FGH100M Module on it (schematic attached). We have tied the reset signal high and don’t control it through the processor. Is it a mandatory to control the Reset externally?

We strongly recommend connecting the RESET signal to the host, especially when using SPI mode, as it will be more robust should the driver need to be reinserted without powering the device on/off.
However, the RESET line is not the cause of this specific problem as you are seeing some data come through, including loading firmware.

The current logic analyzer captures appear to look okay - with the Morse chip looking like it is responding correctly to commands, but these captures only show transaction of a single message on the bus (of which we know some succeed from the logs). Is it possible to share an entire capture file from boot of the device, rather than images, so we can inspect the whole process up to and including when the failure occurs?

Can you share how the SPI master controller is configured as well (device tree), as well as any pinctrls?
We have seen some failures similar to this before, on a Qualcomm part, which had “sleep” GPIO states defined for its SPI controller. These were misconfigured as “pull down”, which caused all sorts of issues with subsequent transactions.

Failing that, the another test to help narrow what might be causing the error would be to confirm that this continues to occur when using polled I/O only - disabling DMA on your SPI controller.