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.

SD card detect and write protect of AM3517 MMC2

Other Parts Discussed in Thread: AM3517

Hello,

I have a question from my customer.
Customer is trying to use MMC2 SD card on their AM3517 board.
MMC2 slot is connected using SN74AVCA406L level shifter because their MMC2 I/O voltage 1.8V.
They modified u-boot file as follows and using NAND boot.

board/ti/am3517evm.h
/* MMC */\
MUX_VAL(CP(MMC1_CLK),           (IEN  | PTU | EN  | M0)) \
MUX_VAL(CP(MMC1_CMD),           (IEN  | PTU | DIS | M0)) \
MUX_VAL(CP(MMC1_DAT0),          (IEN  | PTU | DIS | M0)) \
MUX_VAL(CP(MMC1_DAT1),          (IEN  | PTU | DIS | M0)) \
MUX_VAL(CP(MMC1_DAT2),          (IEN  | PTU | DIS | M0)) \
MUX_VAL(CP(MMC1_DAT3),          (IEN  | PTU | DIS | M0)) \
MUX_VAL(CP(MMC1_DAT4),          (IEN  | PTU | EN  | M4)) /* WriteProtect */\
MUX_VAL(CP(MMC1_DAT5),          (IEN  | PTU | EN  | M4)) /* CardDetect*/\
MUX_VAL(CP(MMC1_DAT6),          (IEN  | PTU | EN  | M4)) \
MUX_VAL(CP(MMC1_DAT7),          (IEN  | PTU | EN  | M4)) \
\

MUX_VAL(CP(MMC2_CLK),           (IEN  | PTD | EN  | M0)) \
MUX_VAL(CP(MMC2_CMD),           (IEN  | PTD | DIS | M0)) \
MUX_VAL(CP(MMC2_DAT0),          (IEN  | PTD | DIS | M0)) \
MUX_VAL(CP(MMC2_DAT1),          (IEN  | PTD | DIS | M0)) \
MUX_VAL(CP(MMC2_DAT2),          (IEN  | PTD | DIS | M0)) \
MUX_VAL(CP(MMC2_DAT3),          (IEN  | PTD | DIS | M0)) \
MUX_VAL(CP(MMC2_DAT4),          (IEN  | PTD | EN  | M1)) /* modified to use SN74AVCA406L*/ \
MUX_VAL(CP(MMC2_DAT5),          (IEN  | PTD | EN  | M1)) /* modified to use SN74AVCA406L*/ \
MUX_VAL(CP(MMC2_DAT6),          (IEN  | PTD | EN  | M1)) /* modified to use SN74AVCA406L */ \
MUX_VAL(CP(MMC2_DAT7),          (IEN  | PTD | EN  | M1)) /* modified to use SN74AVCA406L*/ \

/* McSPI */\
MUX_VAL(CP(MCSPI1_CLK),         (IEN  | PTD | DIS | M0)) \
MUX_VAL(CP(MCSPI1_SIMO),        (IEN  | PTD | DIS | M0)) \
MUX_VAL(CP(MCSPI1_SOMI),        (IEN  | PTD | DIS | M0)) \
MUX_VAL(CP(MCSPI1_CS0),         (IEN  | PTD | EN  | M0)) \
MUX_VAL(CP(MCSPI1_CS1),         (IEN  | PTU | EN  | M4)) /*GPIO_175*/\
MUX_VAL(CP(MCSPI1_CS2),         (IEN  | PTD | EN  | M4)) /*GPIO_176*/\
                                                         /* - LAN_INTR*/\
MUX_VAL(CP(MCSPI1_CS3),         (IEN  | PTD | EN  | M0)) \

They could read and write data to MMC2 SD card on Linux application, but Card Detect and Write Protect function don't work.

Card Detect and Write Protect signals of SD card slot are connect to MMC1_DATA4 and MMC1_DATA4 of AM3517

Please answer following question.

Q1:
Question about TR manual.
AM3517 TRM(SPRUGR0B) page 2190, MMCHS_SYSTEST register SDCD field and SDWP field are explained as follows.

 SDCD Card detect input signal (SDCD)
 0x0: The card detect pin is driven low.
 0x1: The card detect pin is driven high.

 SDWP Write protect input signal (SDWP)
 0x0: The write protect pin SDWP is driven low.
 0x1: The write protect pin SDWP is driven high.
 
I tried to find "The card detect pin" and "The write protect pin" in AM3517 data manual but can't find these terminal.
Are their these pins, and please advice the mechanism of how to decide the state of these field.

Q2:
Please advice how to modify DVSDK to be functional the Card Detect and Write Protect signals from SD card slot.

Regards.