This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-AM62: SDIO based Wi-Fi card initialization error : "mmc1 : error -110 whilst initializing SDIO card"

Part Number: SK-AM62


We are trying to integrate Murata's 2XS module (Based on NXP's 88W9098 Wi-Fi/BT combo IC) over SDIO interface with AM62X-SK. We are using MMC1 interface (SD card slot) for interfacing Wi-Fi card with help of M.2 to uSD convertor.  The SDIO card operates at 3.3V  VDD and 1.8V  VIO to support UHS1. I believe the default device tree of AM62X-SK also reflect this with vmmc-supply and vqmmc-supply properties under sdhci1 node as follows. 

&sdhci1 {
	/* SD/MMC */
	vmmc-supply = <&vdd_mmc1>;
	vqmmc-supply = <&vdd_sd_dv>;
	pinctrl-names = "default";
	pinctrl-0 = <&main_mmc1_pins_default>;
	ti,driver-strength-ohm = <50>;
max-frequency = <50000000>; disable-wp; };

I am getting error several times as follows when the Wi-Fi SDIO card is inserted on to the slot but SD card is working perfectly fine.

 "mmc1: error -110 whilst initializing SDIO card" 

 "mmc1: error -110 whilst initializing SDIO card"

 "mmc1: error -110 whilst initializing SDIO card"

 "mmc1: error -110 whilst initializing SDIO card"

 "mmc1: error -110 whilst initializing SDIO card"

Queries:

1. Do we need to do any special configuration for the MMC1 to support SDIO?  If yes how to do the same? 

2.  If not, I suspect the issue may be due to improper clock configuration. Could you please guide towards some pointers that could resolve this timeout error (-110) ?  

 

  • Hello Kousik,

    I will forward your query to an expert who can better help you. Thanks for your patience. 

  • Hi Kousik,

    We don't have a platform to confirm what changes are needed to support SDIO on the SK MMC1 slot. But the error message is printed in kernel function mmc_attach_sdio() in file drivers/mmc/core/sdio.c. You might want to debug this function to understand what causes the timeout (-110) error.

  • Thanks. Will check the file. I am trying to enable the debug logs for the mmc interface as below, but couldn't find the debug folder under kernel directory. 

    Could you guide me to enable detailed debug logs for the mmc interface?  Does the kernel has to be rebuilt with debugging capabilities?

    # echo 1 > /sys/kernel/debug/tracing/events/mmc/mmc_request_done/enable
  • but couldn't find the debug folder under kernel directory. 

    If "/sys/kernel/debug/" directory doesn't exist, you need to run the following command to mount the debugfs.

    # mount -t debugfs debugfs /sys/kernel/debug

    Then if "/sys/kernel/debug/tracing" directory doesn't exist, you need to run kernel menuconfig to enable ftrace, then rebuild the kernel.

    The location of ftrace in menuconfig is:

    Kernel hacking  --->
            [*] Tracers  --->
           

  • Hi Bin Liu, 

    After a bit of analysis, i presume the initialization error is because of the voltage mismatch on the SDIO lines. My SDIO card is configured to operate in 1.8v for SDIO lines to support UHS data rates. But from the schematics, I could see SDIO lines are pulled up to 3.3V by default and is controlled by VSEL_SD pin to support voltage switching between 3.3 & 1.8V. 

      

    I could see VSEL_SD is mapped to GPIO0_31 and mentioned in the device tree node as follows. I presume the driver make use of this pin to dynamically switch between 3.3 and 1.8V. 

     
    vdd_sd_dv: regulator-4 {
    		/* Output of TLV71033 */
    		compatible = "regulator-gpio";
    		regulator-name = "tlv71033";
    		pinctrl-names = "default";
    		pinctrl-0 = <&vdd_sd_dv_pins_default>;
    		regulator-min-microvolt = <1800000>;
    		regulator-max-microvolt = <3300000>;
    		regulator-boot-on;
    		vin-supply = <&vcc_5v0>;
    		gpios = <&main_gpio0 31 GPIO_ACTIVE_HIGH>;
    		states = <1800000 0x0>,
    			 <3300000 0x1>;
    	};
    	
    &sdhci1 {
    	/* SD/MMC */
    	vmmc-supply = <&vdd_mmc1>;
    	vqmmc-supply = <&vdd_sd_dv>;
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mmc1_pins_default>;
    	ti,driver-strength-ohm = <50>;
    	disable-wp;
    };


    Question:

    1. How to drive VSEL_SD to low always so that 1.8V is chosen default for the SDIO lines instead of 3.3V?
  • Hi Lousik,

    Let me look into it and get back to you next week.

  • Hello Bin, Have you had the chance to look into it ?.  Thanks.

  • Hi Kousik,

    Please let me know if the following kernel patch will set mmc1 to 1.8v.

    diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
    index f9b7fa2e8156..903a5d6a1790 100644                                                                                         
    --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts                                                                                    
    +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts                                                                                    
    @@ -80,7 +80,7 @@ vdd_sd_dv: regulator-4 {                                                                                      
                    pinctrl-names = "default";                                                                                      
                    pinctrl-0 = <&vdd_sd_dv_pins_default>;                                                                          
                    regulator-min-microvolt = <1800000>;                                                                            
    -               regulator-max-microvolt = <3300000>;                                                                            
    +               regulator-max-microvolt = <1800000>;                                           
                    regulator-boot-on;                                                                                              
                    vin-supply = <&vcc_5v0>;            
                    gpios = <&main_gpio0 31 GPIO_ACTIVE_HIGH>;

  • Hello Bin. Thanks for your reply. Yes, the above change in the device tree ties the SDIO lines to 1.8V but unfortunately my original error still persist "mmc1: error -110 whilst initializing SDIO card".

    But Wi-Fi module is successfully detected and initiated when i use 3.3V SDIO line voltage by forcing through device tree with no-1-8-v property.   Any reason for this behavior? 

  • Hi Kousik,

    I guess I am confused.

    Does the WI-FI module work in the similar way as SD card - it supports  3.3v IO for legacy/normal-speed mode and 1.8v IO for UHS modes? Somehow I got an impression it can only works in 1.8v IO.

  • Hello Bin,

    NXP's 88W9098 (Murata 2XS) module supports both 1.8 and 3.3V(non-standard) SDIO operation.  It cannot dynamically switch between 1.8 and 3.3 but appropriate resistor strapping has to be done in the hardware to switch between these modes. UHS modes are not supported in 3.3V but you can still operate at SD high speed with 3.3V SDIO operation.  

    I already brought up the module with 3.3V supporting SD high speed and now I am trying the bring up the module with UHS speed at 1.8V SDIO. 

  • Hi Kousik,

    How is the module UHS mode enumeration process expected to be? Is it same as SD cards which initially expect the IO to be 3.3v then switch to 1.8v for UHS mode? Or the WIFI module expects the IO should be started from 1.8v at the beginning and never use 3.3v at all?