Morse_sdio_reg32_write failed

So i renamed bcf_mf08651_us.bin to bcf_default.bin and this how looks like:

termus@debian:~$ sudo dmesg | grep morse
[   23.282597] morse micro driver registration. Version 0-rel_1_12_4_2024_Jun_11-6-g63cd0768
[   23.308443] morse_sdio mmc1:0001:1: sdio new func 1 vendor 0x325b device 0x306 block 0x8/0x8
[   23.309019] morse_sdio mmc1:0001:2: sdio new func 2 vendor 0x325b device 0x306 block 0x200/0x200
[   23.309788] morse_sdio mmc1:0001:2: Device node not found
[   23.325800] morse_sdio mmc1:0001:2: No pin configs found, using defaults...
[   23.376083] morse_sdio mmc1:0001:2: Loaded firmware from morse/mm6108.bin, size 433044, crc32 0x436ba524
[   23.416113] morse_sdio mmc1:0001:2: Loaded BCF from morse/bcf_default.bin, size 1003, crc32 0xaf924dcf
[   34.181635] morse_sdio mmc1:0001:2: sdio_memcpy_toio failed: 18446744073709551506
[   34.189431] morse_sdio mmc1:0001:2: morse_sdio_dm_write failed -110
[   34.864377] morse_sdio mmc1:0001:2: sdio writel failed 4294967280
[   34.874173] morse_sdio mmc1:0001:2: morse_sdio_reg32_write failed 18446744073709551600
[   35.961203] morse_sdio mmc1:0001:2: morse_sdio_set_func_address_base -16
[   35.968538] morse_sdio mmc1:0001:2: morse_sdio_get_func failed
[   35.979971] morse_sdio mmc1:0001:2: morse_sdio_reg32_write failed 18446744073709551611
[   36.639928] morse_sdio mmc1:0001:2: morse_sdio_set_func_address_base -16
[   36.651741] morse_sdio mmc1:0001:2: morse_sdio_get_func failed
[   36.663142] morse_sdio mmc1:0001:2: morse_sdio_reg32_write failed 18446744073709551611
[   37.335604] morse_sdio mmc1:0001:2: morse_sdio_set_func_address_base -16
[   37.342426] morse_sdio mmc1:0001:2: morse_sdio_get_func failed
[   37.351942] morse_sdio mmc1:0001:2: morse_sdio_reg32_write failed 18446744073709551611
[   38.465743] morse_sdio mmc1:0001:2: morse_sdio_set_func_address_base -16
[   38.473721] morse_sdio mmc1:0001:2: morse_sdio_get_func failed
[   38.479750] morse_sdio mmc1:0001:2: morse_sdio_reg32_write failed 18446744073709551611
[   39.147934] morse_sdio mmc1:0001:2: morse_sdio_set_func_address_base -16
[   39.155790] morse_sdio mmc1:0001:2: morse_sdio_get_func failed
[   39.161760] morse_sdio mmc1:0001:2: morse_sdio_reg32_write failed 18446744073709551611
[   39.170094] morse_sdio mmc1:0001:2: morse_firmware_init failed: -5
[   39.857628] morse_sdio_probe failed. The driver has not been loaded!
[   39.864168] morse_sdio: probe of mmc1:0001:2 failed with error -5

@termus I’ve moved this thread to a new topic.

Assuming an ARM host, the errors shown here:

  • -110 → ETIMEDOUT
  • -16 → EBUSY
  • -5 → EIO

These usually indicate an issue communicating with the chip. This can be caused by signal integrity problems, poor supplies, the chip not coming out of reset, amongst many others.

How are you connecting your Alfa module to your board? Do you have any details on the hardware which you can share?

1 Like

Module is this: AHM26108D – ALFA Network Inc.

Host photo: https://linmob.net/purism-librem5-visual-impressions/librem5-back-modem-wifi.jpg

If you have a logic analyzer, can you capture the RESET and SDIO lines on the module?

Can you share the device tree file for the libre board?

I can see schematics for the Librem 5 boards are available. Which revision are you using?

1 Like

I dont have logic analizer.

Evergreen

Can you share the device tree file for the libre board?

I mean the .dts file Linux uses to configure hardware. You should be able to extract this from the device by installing dtc on the device and running dtc -I fs -O dts /sys/firmware/devicetree/base -o librem5.dts.

1 Like

Others SDIO Legacy WLAN(Redpine)(SpakLan) modules work just fine… i not sure what going on this time.

I’ll continue to check what I can on the hardware side, but this looks very similar to Mmc2: error -110 whilst initialising SDIO card - #19 by ajudge.

While the MM6108 can support a 1.8V I/O voltage for the SDIO lines, the RESET line needs to operate in the “VBAT” domain, 3.3V.

Unfortunately at this stage the solution may require a pull-up resistor to be inserted on the RESET line to 3.3V, as well as some device tree adjustment to configure the SD2_RESET pin as an open drain GPIO, and finally adding an mm6108 specific child node in the usdhc2 controller to provide a reset-gpios to the Morse driver so it can control that GPIO.

Are you in a position where you can add a hardware pullup to that RESET line? Does the bootloader allow you to load an alternative device tree binary?

1 Like

I may on module land, not on phone land as it may malfuntions on others working modules. Also on phone side it needed disassembling the case. So pull-up on Phone land it not viable.

Yes there is a option to load a different device tree.

At the moment i want to test same mm6108 module to Laptop Librem 14 as it support sdio via M2-E too.

Interested to see how you go with the laptop.

Regarding the Librem5, once you get a pull-up to 3V3 on the RESET line, you’ll need to add the following to a top level device tree file.

&iomuxc {
	pinctrl_usdhc2_morse: usdhc2-morsegrp {
		fsl,pins = <
			MX8MQ_IOMUXC_SD2_CD_B_GPIO2_IO12	0x80
			MX8MQ_IOMUXC_SD2_CLK_USDHC2_CLK		0x83
			MX8MQ_IOMUXC_SD2_CMD_USDHC2_CMD		0xc3
			MX8MQ_IOMUXC_SD2_DATA0_USDHC2_DATA0	0xc3
			MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1	0xc3
			MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2	0xc3
			MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3	0xc3
			MX8MQ_IOMUXC_SD2_RESET_B_GPIO2_IO19	0xa1
		>;
	}
}

&usdhc2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc2_morse>;
	mm6108_sdio: mm6108_sdio@0 {
		compatible = "morse,mm610x";
		reset-gpios = <&gpio2 19 0>;
		status = "okay";
		reg = <2>;
	}
}

This reconfigures the dedicated SD RESET line to be an open drain GPIO and gives the Morse Micro driver control of it.