How to disable Card Detection for an SDIO device?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to disable Card Detection for an SDIO device?

1,324 Views
gpenghe
Contributor I

Hello,

We have a design based on imx6ul eval board. We are using a Wi-Fi SDIO module that originally can be inserted to the imx6ul eval board's SD slot but now is soldered to the board in the new design. Since we don't need the card detection any more so we would like to disable it completely. In imx6ul-14x14-evk.dts, the part related to card detection is like this:

 

&usdhc1 {

               pinctrl-names = "default", "state_100mhz", "state_200mhz";

               pinctrl-0 = <&pinctrl_usdhc1>;

               pinctrl-1 = <&pinctrl_usdhc1_100mhz>;

               pinctrl-2 = <&pinctrl_usdhc1_200mhz>;

               cd-gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;

               keep-power-in-suspend;

               wakeup-source;

               vmmc-supply = <&reg_sd1_vmmc>;

               status = "okay";

};

 

&usdhc2 {

               pinctrl-names = "default";

               pinctrl-0 = <&pinctrl_usdhc2>;

               non-removable;

               status = "okay";

};

 

 

 My understanding is SD1 is set up to use GPIO1_IO19 as an interrupted pin input for Card Detection. But SD2 is set to be a non-removable so it doesn’t care the Card Detection input. So I tried to make SD1 behave similarly as SD2 by removing the “cd-gpios…” line from &usdhc1 and add “non-removable;” line to it. However, with this change I am seeing error of “mmc0:  Timeout waiting for hardware cmd interrupt.” 

 

Any suggestions on how to properly disabling the card detection on SD1? Thanks.

 

Labels (4)
0 Kudos
1 Reply

1,054 Views
igorpadykov
NXP Employee
NXP Employee

Hi Penghe

one can look at i.MX6UL dts wifi example on

linux/arch/arm/boot/dts/imx6ul-evk-btwifi.dtsi

imx6ul-evk-btwifi.dtsi\dts\boot\arm\arch - linux-imx - i.MX Linux kernel 

may be useful to check if wifi module was powered.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos