SDIO Troubleshooting
FAQs > SDIO
The SDIO protocol is a higher level protocol compared to SPI. It has a more well-defined specification that leads to less variance in implementation. As a result it requires less effort debugging of differences between the master and slave devices, and a faster turnaround to do the initial board bringup. It requires more signal connections which are mainly bi-directional. Below are some key considerations from a hardware and software perspective.
Hardware
- Ensure that the SDIO data and command lines are pulled up by an external pull-up resistor. The expected range of the pull-up resistance should be between 10k and 100k ohms as per the SDIO Physical Specification (section 6.6.4), with 10k providing the strongest pull-up.
- The voltage of the SDIO line should be 3.3V±0.3 ; if the voltage is too low, ensure that no internal pull-up resistors have been enabled on the host.
- It is advisable to stress test the bus (eg iperf test) and check the rise and fall time of the SDIO lines to ensure no oddities are observed.
Software (Linux)
- Check the toolchain/build environment to see if the MMC/SDIO/SDHCI interface is enabled.
- Check the MMC/SDIO/SDHCI interface that the MM6108 module is connected to is enabled in the device tree. For example:
&sdhci {
status = "okay"; - Check that MM6108 is added to the device tree; either as an overlay or added to the DTS of the device. Templates for our DTS are provided in the porting guide and need to be modified for the target host system.
- The DTS configuration can be included as a fragment if the host system supports it. For example, on the Raspberry Pi:
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835";
fragment@0 {
target = <&mmc>;
wifi_ovl: __overlay__ {
pinctrl-0 = <&sdio_ovl_pins &mm_sdio_pins>;
pinctrl-names = "default";
non-removable;
bus-width = <4>;
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
mm6108_sdio: mm6108_sdio@0 {
compatible = "morse,mm610x";
reset-gpios = <&gpio 5 0>; /
power-gpios = <&gpio 3 0>, // WAKE
<&gpio 7 0>; // BUSY or GPIO0
status = "okay";
reg = <2>;
bus-width = <4>;
};
};
};
fragment@1 {
target = <&gpio>;
__overlay__ {
sdio_ovl_pins: sdio_ovl_pins {
brcm,pins = <22 23 24 25 26 27>;
brcm,function = <7>; /* ALT3 = SD1 */
brcm,pull = <0 2 2 2 2 2>;
};
mm_sdio_pins: mm_sdio_pins {
brcm,pins = <1>; /* CHIP-IRQ */
brcm,function = <0>;
brcm,pull = <2>;
};
};
};
}; - The module can also be integrated into the device tree directly without the use of overlays. For example, the below integration with a Mediatek host:
&sdhci {
status = "okay";
mediatek,cd-poll;
mm6108_sdio: mm6108_sdio@0 {
compatible = "morse,mm610x";
reset-gpios = <&gpio 40 0>;
power-gpios = <&gpio 39 0>,
<&gpio 41 0>;
status = "okay";
reg = <2>;
bus-width = <4>;
};
};