Hi everyone!
For a project I am intefacing a halow module with an i.MX8M-Mini. The Halow Module is AsiaRF’s MM610x module, and I am using Compulab’s eval board for their SoM containing an i.MX8M-Mini.
We have compiled the driver and integrated it into the Yocto build provided by Compulab.
Regarding the HW I used an SD card breakout to connect the module to the eval board’s uSDHC2 interface. At first I suspected signal integrity issues, but I have reduced the frequency to 1 MHz and shortened the wires significantly, but the error remains. See photo of the setup below.
However, I am now stuck on the error below. When I run chipreset.sh it seems to recognize the the SDIO device just fine, but then there is a timeout waiting for a HW interrupt. This entire sequence occurs at 1 MHz, so if it were signal integrity issues I would expect it to fail sooner.
root@ucm-imx8m-mini:~# [43665.118793] mmc1: new high speed SDIO card at address 0001
[43665.129791] Morse Micro Dot11ah driver registration. Version 0-rel_1_12_4_2024_Jun_11
[43665.162614] morse micro driver registration. Version 0-rel_1_12_4_2024_Jun_11
[43665.170211] morse_sdio mmc1:0001:1: sdio new func 1 vendor 0x325b device 0x306 block 0x8/0x8
[43665.179453] morse_sdio mmc1:0001:2: sdio new func 2 vendor 0x325b device 0x306 block 0x200/0x200
[43665.189669] morse_sdio mmc1:0001:2: Reading gpio pins configuration from device tree
[43665.200730] morse_sdio mmc1:0001:2: Loaded firmware from morse/mm6108.bin, size 433044, crc32 0x436ba524
[43665.210320] morse_sdio mmc1:0001:2: Loaded BCF from morse/bcf_default.bin, size 1077, crc32 0x1cbf23cb
[43675.740084] mmc1: Timeout waiting for hardware interrupt.
[43675.745496] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
[43675.751937] mmc1: sdhci: Sys addr: 0x48f23000 | Version: 0x00000002
[43675.758376] mmc1: sdhci: Blk size: 0x00000200 | Blk cnt: 0x0000001f
[43675.764816] mmc1: sdhci: Argument: 0xac000080 | Trn mode: 0x00000023
[43675.771254] mmc1: sdhci: Present: 0x01f8818e | Host ctl: 0x00000013
[43675.777691] mmc1: sdhci: Power: 0x00000002 | Blk gap: 0x00000080
[43675.784128] mmc1: sdhci: Wake-up: 0x00000008 | Clock: 0x0000000f
[43675.790566] mmc1: sdhci: Timeout: 0x0000008f | Int stat: 0x00000000
[43675.797004] mmc1: sdhci: Int enab: 0x117f100b | Sig enab: 0x117f100b
[43675.803441] mmc1: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000502
[43675.809878] mmc1: sdhci: Caps: 0x07eb0000 | Caps_1: 0x0000b400
[43675.816315] mmc1: sdhci: Cmd: 0x0000353a | Max curr: 0x00ffffff
[43675.822752] mmc1: sdhci: Resp[0]: 0x00000000 | Resp[1]: 0x00000000
[43675.829189] mmc1: sdhci: Resp[2]: 0x00000000 | Resp[3]: 0x00000000
[43675.835625] mmc1: sdhci: Host ctl2: 0x00000000
[43675.840065] mmc1: sdhci: ADMA Err: 0x00000007 | ADMA Ptr: 0x48f2320c
[43675.846502] mmc1: sdhci-esdhc-imx: ========= ESDHC IMX DEBUG STATUS DUMP =========
[43675.854068] mmc1: sdhci-esdhc-imx: cmd debug status: 0x2100
[43675.859723] mmc1: sdhci-esdhc-imx: data debug status: 0x2220
[43675.865465] mmc1: sdhci-esdhc-imx: trans debug status: 0x2328
[43675.871295] mmc1: sdhci-esdhc-imx: dma debug status: 0x2400
[43675.876950] mmc1: sdhci-esdhc-imx: adma debug status: 0x25b4
[43675.882692] mmc1: sdhci-esdhc-imx: fifo debug status: 0x2680
[43675.888435] mmc1: sdhci-esdhc-imx: async fifo debug status: 0x2750
[43675.894697] mmc1: sdhci: ============================================
[43675.901791] morse_sdio mmc1:0001:2: sdio_memcpy_toio failed: 18446744073709551506
[43675.909298] morse_sdio mmc1:0001:2: morse_sdio_dm_write failed -110
[43676.544356] morse_sdio mmc1:0001:2: sdio writel failed 4294967280
[43676.550509] morse_sdio mmc1:0001:2: morse_sdio_reg32_write failed 18446744073709551600
[43677.616485] morse_sdio mmc1:0001:2: morse_sdio_set_func_address_base -16
[43677.623206] morse_sdio mmc1:0001:2: morse_sdio_get_func failed
[43677.629058] morse_sdio mmc1:0001:2: morse_sdio_reg32_write failed 18446744073709551611
[43678.265609] morse_sdio mmc1:0001:2: morse_sdio_set_func_address_base -16
[43678.272338] morse_sdio mmc1:0001:2: morse_sdio_get_func failed
[43678.278226] morse_sdio mmc1:0001:2: morse_sdio_reg32_write failed 18446744073709551611
[43678.914872] morse_sdio mmc1:0001:2: morse_sdio_set_func_address_base -16
[43678.921592] morse_sdio mmc1:0001:2: morse_sdio_get_func failed
[43678.927472] morse_sdio mmc1:0001:2: morse_sdio_reg32_write failed 18446744073709551611
[43679.984083] morse_sdio mmc1:0001:2: morse_sdio_set_func_address_base -16
[43679.990803] morse_sdio mmc1:0001:2: morse_sdio_get_func failed
[43679.996689] morse_sdio mmc1:0001:2: morse_sdio_reg32_write failed 18446744073709551611
[43680.633412] morse_sdio mmc1:0001:2: morse_sdio_set_func_address_base -16
[43680.640136] morse_sdio mmc1:0001:2: morse_sdio_get_func failed
[43680.646023] morse_sdio mmc1:0001:2: morse_sdio_reg32_write failed 18446744073709551611
[43680.654308] morse_sdio mmc1:0001:2: morse_firmware_init failed: -5
[43681.288974] morse_sdio_probe failed. The driver has not been loaded!
[43681.295372] morse_sdio: probe of mmc1:0001:2 failed with error -5
Please see below the relevant part of the device tree:
&usdhc2 {
#address-cells = <1>;
#size-cells = <0>;
assigned-clocks = <&clk IMX8MM_CLK_USDHC2>;
assigned-clock-rates = <1000000>;
//clock-frequency = <400000>;
pinctrl-names = "default";
//, "state_100mhz", "state_200mhz";
pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
//pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>;
//pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
bus-width = <4>;
vmmc-supply = <®_usdhc2_vmmc>;
status = "okay";
/delete-property/ cd-gpios;
keep-power-in-suspend;
non-removable;
wakeup-source;
cap-sd-highspeed;
cap-mmc-highspeed;
disable-wp;
cap-sdio-irq;
fsl,sdio-interrupt-enabled;
mm6108_sdio: mm6108_sdio@0 {
//#address-cells = <2>;
//#size-cells = <1>;
compatible = "morse,mm610x";
//assigned-clock-rates = <5000000>;
reset-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
power-gpios = <&gpio3 24 GPIO_ACTIVE_LOW>, <&gpio3 20 GPIO_ACTIVE_HIGH>;
status = "okay";
reg = <2>;
bus-width = <4>;
};
};
Any suggestions on what to try next are much appreciated! mmc1: Timeout waiting for hardware interrupt