Skip to main content
Visitor II
July 6, 2021
Solved

Error initializing wifi module with SDIO and voltage translation

  • July 6, 2021
  • 1 reply
  • 2729 views

Hello all,

I'm getting following error on our custom board while initializing sdmmc3 as wifi module with SDIO:

~# dmesg | grep -i sdio -B 1
[ 3.410271] mmci-pl18x 48004000.sdmmc: no support for card's volts
[ 3.415001] mmc0: error -22 whilst initialising SDIO card
--
[ 5.298030] mmci-pl18x 48004000.sdmmc: no support for card's volts
[ 5.302938] mmc0: error -22 whilst initialising SDIO card
--
[ 7.140215] mmci-pl18x 48004000.sdmmc: no support for card's volts
[ 7.144982] mmc0: error -22 whilst initialising SDIO card
--
[ 8.930932] mmci-pl18x 48004000.sdmmc: no support for card's volts
[ 8.935676] mmc0: error -22 whilst initialising SDIO card

Wifi module is a ST60-2230C (https://www.lairdconnect.com/documentation/datasheet-st60-2230c) with I/O signalling voltage 1V8.

Between STM32MP and ST60 module there are three voltage translators which translate 3V3 (STM32MP) to 1V8 (ST-60). See attached schematics snippet.

This is device tree configuration:

&sdmmc3{
	arm,primecell-periphid = <0x10153180>;
	pinctrl-names = "default", "opendrain", "sleep";
	pinctrl-0 = <&sdmmc3_pins_mx>;
	pinctrl-1 = <&sdmmc3_opendrain_pins_mx>;
	pinctrl-2 = <&sdmmc3_sleep_pins_mx>;
	non-removable;
	st,neg-edge;
	st,use-ckin;
	bus-width = <4>;
	vmmc-supply = <&v3v3>;
	mmc-pwrseq = <&wifi_pwrseq>;
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";
 
	brcmf: bcrmf@1 {
		reg = <1>;
		compatible = "brcm,bcm4329-fmac";
	};
};
 
wifi_pwrseq: wifi-pwrseq {
	compatible = "mmc-pwrseq-simple";
	/* reset-gpios = <&gpioe 2 GPIO_ACTIVE_LOW>; */
	post-power-on-delay-ms = <100>;
	power-off-delay-us = <200000>;
};

and pin definition:

sdmmc3_pins_mx: sdmmc3_mx-0 {
	pins1 {
		pinmux = <STM32_PINMUX('D', 0, AF10)>; /* SDMMC3_CMD */
		bias-pull-down;
		drive-push-pull;
		slew-rate = <1>;
	};
	pins2 {
		pinmux = <STM32_PINMUX('D', 1, AF10)>, /* SDMMC3_D0 */
				 <STM32_PINMUX('D', 4, AF10)>, /* SDMMC3_D1 */
				 <STM32_PINMUX('D', 7, AF10)>, /* SDMMC3_D3 */
				 <STM32_PINMUX('F', 1, AF10)>, /* SDMMC3_CDIR */
				 <STM32_PINMUX('F', 2, AF10)>, /* SDMMC3_D0DIR */
				 <STM32_PINMUX('F', 4, AF10)>, /* SDMMC3_D123DIR */
				 <STM32_PINMUX('F', 5, AF9)>; /* SDMMC3_D2 */
		bias-disable;
		drive-push-pull;
		slew-rate = <1>;
	};
	pins3 {
		pinmux = <STM32_PINMUX('F', 0, AF10)>; /* SDMMC3_CKIN */
		bias-disable;
	};
	pins4 {
		pinmux = <STM32_PINMUX('G', 15, AF10)>; /* SDMMC3_CK */
		bias-disable;
		drive-push-pull;
		slew-rate = <3>;
	};
};

Can I configure STM32MP to use 1V8 I/O signalling? Or any other solutions?

Thanks for help!

Kind regards

Dmn

    This topic has been closed for replies.
    Best answer by PatrickF

    Hi,

    I'm not sure this setting will work, I'm not expert of this driver, but I hope driver is generic enough.

    Did you cross check the level translator you used are using correct _DIR defaut polarity, i.e. 0 = Card -> MPU input , 1 = MPU output -> Card.

    Check if this is missing

     st,sig-dir;

    not sure if also

    vqmmc-supply = <&xxxx>;

    is required in your case.

    see https://wiki.st.com/stm32mpu/wiki/SDMMC_device_tree_configuration

    Regards,

    1 reply

    PatrickFAnswer
    Technical Moderator
    July 6, 2021

    Hi,

    I'm not sure this setting will work, I'm not expert of this driver, but I hope driver is generic enough.

    Did you cross check the level translator you used are using correct _DIR defaut polarity, i.e. 0 = Card -> MPU input , 1 = MPU output -> Card.

    Check if this is missing

     st,sig-dir;

    not sure if also

    vqmmc-supply = <&xxxx>;

    is required in your case.

    see https://wiki.st.com/stm32mpu/wiki/SDMMC_device_tree_configuration

    Regards,

    DmnSdAuthor
    Visitor II
    July 7, 2021

    Thanks @PatrickF​ .

    st,sig-dir;

    did the trick.

    My wifi module works!

    Many thanks for fast & good answer!