Verdin Am62 MMC2 Configuration Not working

Hi all,

We are trying to connect an SD card to the MMC2 Port on our system, we have enabled the sdhci2 on your device tree, but it seems it is not working , i mean when card is connected we are not able to detect in the linux. we are able to see mmc2 driver is loaded in the kernal boot logs, but whenever we connect the SD card, it is not detected.

below are the Device tree added in our system:

by default 3.3v is provided to the SD card. we are able to see 1.8V on the SD_CD when the card is not connected and when connected it goes LOW.

	sdhci2: mmc@fa20000 {
		compatible = "ti,am62-sdhci";
		reg = <0x00 0x0fa20000 0x00 0x1000>, <0x00 0x0fa28000 0x00 0x400>;
		interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
		power-domains = <&k3_pds 184 TI_SCI_PD_EXCLUSIVE>;
		clocks = <&k3_clks 184 5>, <&k3_clks 184 6>;
		clock-names = "clk_ahb", "clk_xin";
		bus-width = <4>;
		ti,clkbuf-sel = <0x7>;
		ti,otap-del-sel-legacy = <0x8>;
		ti,otap-del-sel-sd-hs = <0x0>;
		ti,otap-del-sel-sdr12 = <0x0>;
		ti,otap-del-sel-sdr25 = <0x0>;
		ti,otap-del-sel-sdr50 = <0x8>;
		ti,otap-del-sel-sdr104 = <0x7>;
		ti,otap-del-sel-ddr50 = <0x8>;
		ti,itap-del-sel-legacy = <0xa>;
		ti,itap-del-sel-sd-hs = <0xa>;
		ti,itap-del-sel-sdr12 = <0xa>;
		ti,itap-del-sel-sdr25 = <0x1>;
		status = "disabled";
	};
	
	/* On-module Wi-Fi on WB SKUs, module-specific SDIO otherwise */
	pinctrl_sdhci2: main-mmc2-pins-default {
		pinctrl-single,pins = <
			AM62X_IOPAD(0x120, PIN_INPUT, 0) /* (C24) MMC2_CMD   */ /* WiFi_SDIO_CMD   */
			AM62X_IOPAD(0x118, PIN_INPUT, 0) /* (D25) MMC2_CLK   */ /* WiFi_SDIO_CLK   */
			AM62X_IOPAD(0x114, PIN_INPUT, 0) /* (B24) MMC2_DAT0  */ /* WiFi_SDIO_DATA0 */
			AM62X_IOPAD(0x110, PIN_INPUT, 0) /* (C25) MMC2_DAT1  */ /* WiFi_SDIO_DATA1 */
			AM62X_IOPAD(0x10c, PIN_INPUT, 0) /* (E23) MMC2_DAT2  */ /* WiFi_SDIO_DATA2 */
			AM62X_IOPAD(0x108, PIN_INPUT, 0) /* (D24) MMC2_DAT3  */ /* WiFi_SDIO_DATA3 */
			AM62X_IOPAD(0x11c, PIN_INPUT, 0) /* (#N/A) MMC2_CLKB */
			AM62X_IOPAD(0x0124, PIN_INPUT_PULLUP, 7) /* (A23) MMC2_SDCD.GPIO0_71 */
		>;
	};

/*  MMC2 */
&sdhci2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_sdhci2>;
	cd-gpios = <&main_gpio0 71 GPIO_ACTIVE_LOW>;
	disable-wp;
	ti,driver-strength-ohm = <50>;
	ti,fails-without-test-cd;
	status = "okay";
};

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


It looks like you’ve done a good job setting up the device tree for the MMC2 port on your Verdin AM62 module. However, there are a few things you might want to check and try to resolve the issue:

  1. Check the Pin Configuration:
    Ensure that the pin configuration in the device tree matches the actual hardware connections. Double-check the pin numbers and their configurations.

  2. Voltage Levels:
    You mentioned that 3.3V is provided to the SD card and you see 1.8V on the SD_CD pin when the card is not detected, which goes LOW when connected. This seems correct, but ensure that the voltage levels are stable and within the expected range.

  3. Driver and Kernel Logs:
    Since the MMC2 driver is loaded, check the kernel logs (dmesg) for any error messages related to the MMC2 interface or SD card detection. This might give you more insight into what is going wrong.

  4. Device Tree Status:
    Ensure that the status property for sdhci2 is set to "okay" and not "disabled". From your provided device tree snippet, it looks correct, but double-check for any typos or inconsistencies.

  5. GPIO Configuration:
    Verify that the GPIO used for card detection (cd-gpios = <&main_gpio0 71 GPIO_ACTIVE_LOW>;) is correctly configured and functioning. You can test this GPIO separately to ensure it is working as expected.

  6. Clock Configuration:
    Ensure that the clocks are correctly configured and enabled. The clock-names and clocks properties should match the hardware specifications.

  7. Additional Properties:
    Sometimes additional properties might be required for proper operation. Refer to the TI AM62 documentation and the Toradex device tree reference for any additional properties that might be needed.

  8. Testing with Another SD Card:
    Try using a different SD card to rule out any issues with the card itself.

  9. Kernel Configuration:
    Ensure that the kernel is configured to support the MMC/SDHCI interface. Check the kernel configuration (.config) for the relevant options.

If after these checks the issue persists, you might want to reach out to Toradex support with detailed logs and your device tree configuration for further assistance.

Please, also check if these links can help you solve your problem:

SD Card detect line on custom carrier boards.

Any update on this issue?

Hi @naveenkumar.muthusam ,
Is it a custom board that you are using along with Verdin Am62?

Hi @sahil.tx ,

yes it is a custom board developed which is using the Verdin am62 SOM

Below are the schematics of the SD card MMC2 connector

is there anything missing in Device tree configuration shared above?

please let me know.

we are still facing issue in mmc2, SDCARD is not detetced on this port, but we have verfied that the SD CARD is working on the EVM in MMC1.

Hi @sahil.tx ,

Any update on this issue?

Hi @sahil.tx,

Any update on this issue?

Hi @sahil.tx ,

any update on this issue

Hi @sahil.tx ,

Any update on this issue?

Hi @naveenkumar.muthusam ,
We are looking into it

Hi @sahil.tx ,

Any updates on this issue?