DATA3/CD Card detection not working with iMx6D 4.1.15 kernel

cancel
Showing results for 
Search instead for 
Did you mean: 

DATA3/CD Card detection not working with iMx6D 4.1.15 kernel

1,464 Views
sijilcv
Contributor II

We are having a Custom board with iMX6D processor and 4.1.15 Linux kernel.
We have connected SDCard in the USDHC1 port and eMMC on USDHC3 port. But the SD card detection is not working in the board.

We have multiplexed CD with DATA3 line. We are using 4 data lines. Given below out device tree configuration for sd card.
&usdhc1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc1_1>;
bus-width = <4>;
no-1-8-v;
keep-power-in-suspend;
enable-sdio-wakeup;
status = "okay";
};

We have kept the SD3 line pulled low for card detection functionality in the pinctrl as given below.
usdhc1 {
pinctrl_usdhc1_1: usdhc1grp-1 {
fsl,pins = <
MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17059
MX6QDL_PAD_SD1_CLK__SD1_CLK 0x10059
MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17059
MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17059
MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17059
MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x13059
>;
};
};

We have kept the DATA3 line pulled low and when the SD-Card is inserted , the line becomes high.
Is there anything more need to do for card detection.?

4 Replies

375 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi sijil

please look at answer provided on

https://community.nxp.com/thread/312338 

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

0 Kudos

375 Views
davidpatton
Contributor III

What about card detection via uSDHCx_CD_B, does the linux kernel have support for this method of detection for the iMX6SX?

0 Kudos

375 Views
igorpadykov
NXP TechSupport
NXP TechSupport

please refer to attached Linux Manual sect.32.2.3 Devicetree Binding, "fsl,cd-internal".

375 Views
davidpatton
Contributor III

I believe this document is incorrect, "fsl,cd-internal" cannot be found in any version of drivers/mmc/host/sdhci-esdhc-imx.c. The kernel documentation mentions "fsl,wp-controller" so it would make sense that "fsl,cd-controller" would be valid.  In an older version of the driver, imx_kernel_3.14, "fsl,cd-controller" could be found in sdhci_esdhc_imx_probe_dt():

if (of_get_property(np, "fsl,cd-controller", NULL))
      boarddata->cd_type = ESDHC_CD_CONTROLLER;

But it appears that none of the functionality was ever implemented, so this was removed in newer version of the kernel.

None the less, I tried both "fsl,cd-internal" and "fsl,cd-controller" in my devicetree and nothing happens when I insert or remove the SDIO card. The pin is set to MX6SX_PAD_KEY_COL0__USDHC3_CD_B.

Was card detect, via the controller, ever implemented, and if so, how can I get it? Thanks...

0 Kudos