This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x 内核MMC卡的WP和CD引脚为什么要配置为MODE7才能热插拔?



3.2内核中,我发现板子运行的时候SD卡不能热插拔,内核启动之前插入SD卡才能出现/dev/mmcblk0

明显和卡检测有关,内核启动时原本强制认为SD卡存在,如果SD卡没有插入,就永远不会probe了。

检查了一下 mmc0_wp_only_pin_mux和mmc0_cd_only_pin_mux,改为OMAP_MUX_MODE7就能识别卡了,why?

原本OMAP_MUX_MODE5的,现在改为MOD7E(普通io),反而能检测到SD卡了,不科学啊,是cpu问题还是软件问题?

static struct pinmux_config mmc0_wp_only_pin_mux[] = {
    {"ecap0_in_pwm0_out.mmc0_sdwp",    OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP},
    {NULL, 0},
};
    
原本是OMAP_MUX_MODE5的

static struct pinmux_config mmc0_cd_only_pin_mux[] = {
    {"spi0_cs1.mmc0_sdcd",            OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP},
    {NULL, 0},
};