Other Parts Discussed in Thread: DM8107
Hi all,
My code base is DVRRDK_04.01.00.02 and configure platform to DM8107.
I want to use SDWP(E29) and SDCD(G28) to do SD card detect.
After I define wp and cd pin, and add pin mux setting in "board-ti8107dvr.c", sd card have been detected, but the card is read-only.
(DVRRDK_04.01.00.02/ti_tools/linux_lsp/kernel/linux-dvr-rdk/arch/arm/mach-omap2/board-ti8107dvr.c)
mmc0: new high speed SDHC card at address b368
mmcblk0: mmc0:b368 SDC 7.51 GiB (ro) <--------------------------------- read-only
mmcblk0:
E29 and G28 pin are configured to SD1_SDWP and SD1_SDCD.
root@dm810x:~# devmem2 0x4814093c
/dev/mem opened.
Memory mapped at address 0x40173000.
Read at address 0x4814093C (0x4017393c): 0x00060002
root@dm810x:~# devmem2 0x48140928
/dev/mem opened.
Memory mapped at address 0x4016d000.
Read at address 0x48140928 (0x4016d928): 0x00060040
The code what I add and modify in "board-ti8107dvr.c" as below:
/* Convert GPIO signal to GPIO pin number */
#define GPIO_TO_PIN(bank, gpio) (32 * (bank) + (gpio))
......
static struct omap2_hsmmc_info mmc[] = {
{
.mmc = 1,
.caps = MMC_CAP_4_BIT_DATA,
.gpio_cd = GPIO_TO_PIN(1, 6), /* Dedicated pins for CD and WP */
.gpio_wp = GPIO_TO_PIN(1, 3),
.ocr_mask = MMC_VDD_33_34,
},
{} /* Terminator */
};
......
static void setup_mmc2_pin_mux(void)
{
omap_mux_init_signal("uart0_dsrn.mmc1_sdwp", TI814X_PIN_INPUT_PULL_UP);
omap_mux_init_signal("spi0_cs1.mmc1_sdcd", TI814X_PIN_INPUT_PULL_UP);
}
static void __init ti810x_dvr_init(void)
{
......
setup_mmc2_pin_mux();
omap2_hsmmc_init(mmc);
......
}
Could anyone please give me some hints?
Thanks.

