i.MX6Q : How to use a card detection pin for USDHC

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

i.MX6Q : How to use a card detection pin for USDHC

1,028 次查看
norishinozaki
Contributor V

Hello Champs,

I'd like to use a CD pin not GPIO to detect SD card.

I.m using 3.14.28 BSP and in the device tree, I changed a following line

    cd-gpios = <&gpio2 2 0>;

to

    fsl,cd-controller;

Then I added a line MX6QDL_PAD_GPIO_1__SD1_CD_B as follows

    pinctrl_usdhc2: usdhc2grp {

        fsl,pins = <

            MX6QDL_PAD_GPIO_1__SD1_CD_B  0x80000000

Is the value 0x80000000(NO_PAD_CTL) Ok?

Or do I need to set a value like  other SD2 pins(0x17059)?

We have this code in drivers/mmc/host/sdhci-esdhc-imx.c

    case ESDHC_CD_CONTROLLER:

        /* we have a working card_detect back */

        host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;

        break;

Dose this code really work?

Best regards,

N.Shinozaki

标签 (1)
0 项奖励
回复
1 回复

799 次查看
jimmychan
NXP TechSupport
NXP TechSupport

I would suggest you to use the gpio for CD pin. It is tested and without issue.

cd-gpios = <&gpio2 2 0>;

0 项奖励
回复