Skip to main content
To identify the status or update the state, use the sysfs and debugfs nodes. Mount debugfs to ensure that the debugfs file system is accessible for the debug nodes.

UFS device state commands

SD card state commands

Before running the SD card state commands, identify the MMC host controller instance number and its physical address.

Determine the MMC instance number

The mmc<N> index used in debugfs paths such as /sys/kernel/debug/mmc1/err_stats is assigned by the Linux kernel MMC subsystem at boot time. The index is read directly from the aliases node in the board Device Tree (DTSI/DTS). The board DTSI assigns a fixed index to each SDHCI controller:
The kernel reads this alias at probe time using of_alias_get_id(dev->of_node, "mmc") in mmc_alloc_host() (drivers/mmc/core/host.c), and sets the host device name with dev_set_name(&host->class_dev, "mmc%d", index). This name becomes the debugfs directory under /sys/kernel/debug/. To verify the mmc<N> index on a running system:
  1. Enumerate MMC Host Controllers.
  2. Identify the MMC physical address.
  3. Confirm the index by checking the symlink target. For example, if the SD card SDHCI controller is at physical address 8804000, the output of step 2 will show a path containing 8804000.mmc under the mmc1 symlink, confirming the index is 1.
The mmc<N> index is platform-specific and is defined in the board DTSI aliases node. Always verify the index for your target platform before using the debugfs commands below.

NVMe state commands

eMMC node commands

The mmc0 index in /sys/kernel/debug/mmc0/ is assigned by the aliases node in the board DTSI, where mmc0 = &sdhc_1 maps the eMMC SDHCI controller to index 0. See Determine the MMC instance number for details.
Update the <sdhci_addr> values based on the SDHCI physical address of the chip products.Example:
  • Qualcomm Dragonwing™ IQ-615: 7c4000
  • Qualcomm Dragonwing™ IQ-8275: 87c4000
  • Qualcomm Dragonwing™ IQ-9075: 7c4000