Xavier NX SDCARD issue

     Hello!

I have a few questions about SD card on Xavier NX board.
Initial data: custom carrier + Xavier NX module.
**tegra194-p3668-all-p3509-0000.dtb (192.2 KB) ** sources.

Before creating this topic, I’ve read a lot of topics with similar problems.
First, I’ve changed sdhci@3400000 to sdhci@3400000 and p3668_vdd_sdmmc1_sw to p3668_vdd_sdmmc3_sw

But eventually SD card is not visible in the kernel.

mobulusnet@mobulusnet-desktop:~$ dmesg | grep sd
[    0.710774] iommu: Adding device 3460000.sdhci to group 6
[    0.777526] vdd-sdmmc3-sw: 3300 mV 
[    0.777833] vdd-1v8-sd: 1800 mV 
[    0.888373] vddio-sdmmc1-3v3: at 3300 mV 
[    1.547271] sd: No Scsi addr parsed to reserve index
[    2.037870] sdhci: Secure Digital Host Controller Interface driver
[    2.037873] sdhci: Copyright(c) Pierre Ossman
[    2.037875] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.039001] sdhci-tegra 3460000.sdhci: Client registration for eMC Successful
[    2.089160] mmc0: SDHCI controller on 3460000.sdhci [3460000.sdhci] using ADMA 64-bit with 64 bit addr
[    2.135381] mmc0: mmc_decode_ext_csd: CMDQ supported: depth: 31, cmdq_support: 1
[    3.541553] vdd-sdmmc3-sw: disabling
[    3.541557] vdd-1v8-sd: disabling

So, questions:

  1. What do I do wrong for activating SD card?
  2. Card detect gpio is gpio08, but in device tree this pin is named TEGRA194_MAIN_GPIO(Q, 2). How to convert TEGRA194_MAIN_GPIO(Q, 2) to gpio08?
  3. Do I need to change pinmux cfg files?
  4. Despite of activating sdhci@3440000 in device tree (status = “okay”), in kernel this status is disabled:
    sudo cat /proc/device-tree/sdhci@3440000/status
    disabled
    Why?

dtb file is attached to this topic.

Thank you in advance!

Hi,

  1. Please check this post
    How to use NX emmc module with a SD card - #3 by WayneWWW

  2. As for your question (4), please check if you really put the enabled in the last dts file and it is not get overwritten by other dts.

Device tree structure will let the last dts file overwrite the previous setting. For example,
dtsiB writes sdmmc enabled.
dtsiA includes dtsB. And again write sdmmc disabled.
dtsC includes dtsiA. → Flash dtsC, and your sdmmc will still be disabled state.

Hi WayneWWW.

I’ve carried changes of sdmmc3 settings in device tree more carefully and SD card works.

But question 2 is still open.

Card detect gpio is gpio08, but in device tree this pin is named TEGRA194_MAIN_GPIO(Q, 2). How to convert TEGRA194_MAIN_GPIO(Q, 2) to gpio08?

Thank you.

You can check the pin name from the pinmux spreadsheet.

Thank you for help!