During kernel boot, kernel doesn't detect mmc1 & mmc2.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

During kernel boot, kernel doesn't detect mmc1 & mmc2.

708 Views
yocto_newbee
Contributor I

I always thank you for answering my post

I am trying to port, imx6 with Linux kernel 5.10

from the log, I see mmc0 has been register under dev as mmcblk0 but I don't see mmc1 and mmc2 as mmcblk1 and mmcblk2.

Could you please help me debug following issue?

 

sdhci hci-esdhc-imx 2198000.mmc: Got CD GPIO

sdhci-esdhc-imx 219c000.mmc: Got CD GPIO

caam 2100000.crypto: job rings = 2, qi = 0

caam algorithms registered in /proc/crypto

mmc0: SDHCI controller on 2194000.mmc [2194000.mmc] using ADMA

mmc2: SDHCI controller on 219c000.mmc [219c000.mmc] using ADMA

mmc1: SDHCI controller on 2198000.mmc [2198000.mmc] using ADMA

caam 2100000.crypto: registering rng-caam

Device caam-keygen registered

 

cpu cpu0: Empty OPP table

cpu cpu0: OPP table empty

cpu cpu0: _allocate_opp_table: Error finding interconnect paths: -22

mmc0: new DDR MMC card at address 0001

Registering SWP/SWPB emulation handler

mmcblk0: mmc0:0001 M65704 512 MiB

Loading compiled-in X.509 certificates

mmcblk0boot0: mmc0:0001 M65704 partition 1 2.00 MiB

mmcblk0boot1: mmc0:0001 M65704 partition 2 2.00 MiB

Key type encrypted registered

mmcblk0gp0: mmc0:0001 M65704 partition 4 512 MiB

AppArmor: AppArmor sha1 policy hashing enabled

mmcblk0gp1: mmc0:0001 M65704 partition 5 1.53 GiB

 setup_reset_gpios:-2, flags 0

imx_usb 2184000.usb: No over current polarity defined

imx_thermal 20c8000.anatop:tempmon: Industrial CPU temperature grade - max:105C critical:100C passive:95C

ALSA device list:

  No soundcards found.

 

 

 lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mmcblk0 179:0 0 512M 0 disk
|-mmcblk0p1 179:1 0 22.2M 0 part
`-mmcblk0p2 179:2 0 233.2M 0 part /
mmcblk0boot0 179:8 0 2M 1 disk
mmcblk0boot1 179:16 0 2M 1 disk
mmcblk0gp0 179:24 0 512M 0 disk
mmcblk0gp1 179:32 0 1.5G 0 disk

 

ls | grep mmc
mmcblk0
mmcblk0boot0
mmcblk0boot1
mmcblk0gp0
mmcblk0gp1
mmcblk0p1
mmcblk0p2
mmcblk0rpmb

0 Kudos
5 Replies

669 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @yocto_newbee,

I hope you are doing well.

It appears that the issue is related to the detection of the additional MMC/SD card devices (mmc1 and mmc2) on the i.MX6 platform.

Please ensure that the MMC/SD card slots corresponding to mmc1 and mmc2 are properly connected and functional.
Please make sure that the hardware is not damaged.
Please make sure that the device tree nodes for mmc1 and mmc2 are correctly defined, including their status, pin configurations, and any related properties.
Please ensure that your Linux kernel configuration (menuconfig, make xconfig, or make config) includes support for the MMC/SD controllers on mmc1 and mmc2. The relevant configurations might be under "Device Drivers" > "MMC/SD/SDIO card support" or a similar section.

I hope this helps.

Thanks & Regards,
Sanket Parekh

0 Kudos

611 Views
yocto_newbee
Contributor I

I enabled more log to check voltage regulator and clock check.

I am using genetic regulator and looks like it was able to set the voltage.

And as you can see clock is running and I was able to detect the clock.

But it still doesn't detect as dev. Could you please let me know whatelse can I check?

Line 320: sdhci-esdhc-imx 219c000.mmc: No vmmc regulator found
Line 334: sdhci-esdhc-imx 219c000.mmc: No vqmmc regulator found
Line 361: sdhci-esdhc-imx 219c000.mmc: change pinctrl state for uhs 0
Line 369: sdhci-esdhc-imx 219c000.mmc: Initial signal voltage of 3.3v
Line 375: sdhci-esdhc-imx 219c000.mmc: desired SD clock: 400000, actual: 386718
Line 383: sdhci-esdhc-imx 219c000.mmc: change pinctrl state for uhs 0
Line 391: sdhci-esdhc-imx 219c000.mmc: desired SD clock: 400000, actual: 386718
Line 405: mmc1: SDHCI controller on 219c000.mmc [219c000.mmc] using ADMA
Line 415: sdhci-esdhc-imx 219c000.mmc: sdhci_esdhc_imx_probe #170
Line 417: sdhci-esdhc-imx 219c000.mmc: sdhci_esdhc_imx_probe done
Line 432: sdhci-esdhc-imx 219c000.mmc: change pinctrl state for uhs 0

0 Kudos

603 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @yocto_newbee,

I hope you are doing well.

It appears that the logs are related to the initialization of the SDHCI controller on an i.MX6 platform with Linux kernel 5.10.

Please make sure to check device tree entries for regulators, SDHCI controllers, and clocks. Ensure that they match the hardware configuration of i.MX6 platform. Additionally, check for any error messages or warnings related to mmc1 and mmc2 initialization that might give more insight into why they are not being registered as expected.

I hope this helps!

Thanks & Regards,
Sanket Parekh

0 Kudos

593 Views
yocto_newbee
Contributor I

Yes. I think it failed to detect the mmc1 & mmc2 was due to following. Could you please tell me where does it initialized "host->ops->get_cd" for imx6 and which configuration is need it? 

from > Kernel2_Kernel-Source_5.10/drivers/mmc$ vi core/core.c

if (mmc_card_is_removable(host) && host->ops->get_cd &&
host->ops->get_cd(host) == 0) {
pr_info("mmc_rescan #30 removable %d\n", mmc_card_is_removable(host) );
pr_info("mmc_rescan #30 get_cd is null %d\n", host->ops->get_cd );
pr_info("mmc_rescan #30 get_cd %d\n", host->ops->get_cd(host));
mmc_power_off(host);
mmc_release_host(host);
goto out;
}

mmc_rescan #30 removable 1
mmc_rescan #30 get_cd is null -2139076960
mmc_rescan #30 get_cd 0

 

Always thank you for any update.

0 Kudos

553 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @yocto_newbee,

I hope you are doing well.

The get_cd function in the MMC/SD card subsystem is responsible for detecting the card's presence, It is checked to determine if the card is removable and if it is present. If get_cd is not null and returns 0, it indicates that the card is present.

The get_cd function is typically part of the MMC host controller operations structure (mmc_host_ops). The initialization of get_cd and other related functions would happen when the host controller driver is registered.

Please find the initialization of get_cd in the driver for the MMC host controller. The driver source code is usually located in the drivers/mmc/host/ directory.
The initialization of get_cd might be done in the mmc_host_ops structure when the host controller is registered with the MMC/SD core.

I hope this helps!

Thanks & Regards,
Sanket Parekh

0 Kudos