Tool/software: Linux
Hi All,
I am facing issue with SD-Card detection with use of only CD pins. I have DM8148 based custom board and it supports two SD card and both are connected to CD pins as uart0_ctsn.mmc0_sdcd & spi0_cs1.mmc1_sdcd pins respectively. Also I am using DVRRDK_04.01.00.02 reference source code for kernel & all.
Now below is my mmc structure from board file,
static struct omap2_hsmmc_info mmc[] = {
{
.mmc = 2,
.caps = MMC_CAP_4_BIT_DATA,
.gpio_cd = -EINVAL, /* Dedicated pins for CD and WP */
.gpio_wp = -EINVAL,
.ocr_mask = MMC_VDD_33_34,
},
{
.mmc = 1,
.caps = MMC_CAP_4_BIT_DATA,
.gpio_cd = -EINVAL, /* Dedicated pins for CD and WP */
.gpio_wp = -EINVAL,
.ocr_mask = MMC_VDD_33_34,
},
{} /* Terminator */
};
With these setting i am unable to use both SD-Cards as hot-pluggable.
Now after some trials, i have modified my mmc structure of board file as below,
static struct omap2_hsmmc_info mmc[] = {
{
.mmc = 2,
.caps = MMC_CAP_4_BIT_DATA,
.gpio_cd = GPIO_TO_PIN(1, 6), /* Dedicated pins for CD and WP */
.gpio_wp = -EINVAL,
.ocr_mask = MMC_VDD_33_34,
},
{
.mmc = 1,
.caps = MMC_CAP_4_BIT_DATA,
.gpio_cd = GPIO_TO_PIN(1, 15), /* Dedicated pins for CD and WP */
.gpio_wp = -EINVAL,
.ocr_mask = MMC_VDD_33_34,
},
{} /* Terminator */
};
And with these i have changed my MUX settings to spi0_cs1.gpio1_6 & mmc2_clk.gpio1_15 respectively. With this change i am able to use both SD-Cards as hot-pluggable.
Now my question is, why CD pin feature is not working properly with DM8148? Is there any extra patch needed to fix this?
Let me know if you need any further details. Also find reference schematic snapshots in case of any need.
Regards,
Ravi Bhuva.