microSD mounting: No such device/Invalid argument

I want to put some python libraries on my micro SD card.

My SD card looks registred on my mango: (even with error -110)

dmesg
[ 1357.794577] mmc_sd_detect(mmc0): Unable to re-detect card (-110)
[ 1357.800492] mmc0: card 0001 removed
[ 1359.199899] mmc0: new ultra high speed SDR104 SDXC card at address 0001
[ 1359.201012] mmcblk0: mmc0:0001 EC2QT 59.6 GiB 
[ 1359.202720]  mmcblk0: p1

The uSD is visible:
root@swi-mdm9x28:~# ls /dev/mmc*
/dev/mmcblk0 /dev/mmcblk0p1

However, I can not mount it:

root@swi-mdm9x28:~# mkdir -p /tmp/sd
root@swi-mdm9x28:~# mount -t auto  /dev/mmcblk0p1 /tmp/sd
mount: mounting /dev/mmcblk0p1 on /tmp/sd failed: Invalid argument
root@swi-mdm9x28:~# mount -t ext4 /dev/mmcblk0p1 /tmp/sd
mount: mounting /dev/mmcblk0p1 on /tmp/sd failed: No such device

More infos:

cat /etc/filesystems

ext4
ext3
ext2
vfat
fat
btrfs
minix
*

Any ideas ?
Thanks a lot.

I used the following commands to mount SD card:

mkdir -p /tmp/sdcard
/bin/mount -t auto -o sync /dev/mmcblk0p1 “/tmp/sdcard”

root@swi-mdm9x28:~# /bin/mount -t auto -o sync /dev/mmcblk0p1 /tmp/sdcard
mount: mounting /dev/mmcblk0p1 on /tmp/sdcard failed: Invalid argument

I am getting the invalid argument.
Which was removed when I specified the filesystem ext4

root@swi-mdm9x28:~# /bin/mount -t ext4 -o sync /dev/mmcblk0p1 /tmp/sdcard
mount: mounting /dev/mmcblk0p1 on /tmp/sdcard failed: No such device

i remember not all SD card is working on mangoh board.
You have to try other SD card:

Ok thx, will try other SD cards…

I thought the issue were only located at the detection of the uSD.
I’ll give update about that, thanks again @jyijyi !

Btw maybe I can go with an USB mass storage ? Do you see any possible issues with this ?
I want to put python libraries in there.

Yoi can insert usb thumb drive to mangoh board

@jyijyi

PNY 4GB SD card supplied with MangOH Green board also show the same error in a MangOH red Revision 6 board:

root@swi-mdm9x28-wp:~# dmesg | grep mmc
[ 0.830606] sdhci_msm 7864900.sdhci: No vmmc regulator found
[ 0.830622] sdhci_msm 7864900.sdhci: No vqmmc regulator found
[ 0.831034] mmc0: SDHCI controller on 7864900.sdhci [7864900.sdhci] using 32- bit ADMA in legacy mode
[ 0.924502] mmc0: new ultra high speed SDR50 SDHC card at address 0001
[ 0.925224] mmcblk0: mmc0:0001 0000 3.72 GiB
[ 0.926387] mmc0: data txfr (0x00200000) error: -84 after 0 ms
[ 0.926404] sdhci: =========== REGISTER DUMP (mmc0)===========
[ 0.926787] mmc0: clk: 100000000 clk-gated: 0 claimer: mmcqd/0 pwr: 12 host-> irq = 8192
[ 0.926797] mmc0: rpmstatuspltfm (0:1:0)
[ 0.926924] mmcblk0: response CRC error sending r/w cmd command, card status 0x900
[ 0.927385] mmc0: data txfr (0x00200000) error: -84 after 0 ms
[ 0.927400] sdhci: =========== REGISTER DUMP (mmc0)===========
[ 0.927779] mmc0: clk: 100000000 clk-gated: 0 claimer: mmcqd/0 pwr: 12 host-> irq = 8192
[ 0.927789] mmc0: rpmstatuspltfm (0:1:0)
[ 0.927915] mmcblk0: error -84 transferring data, sector 0, nr 8, cmd respons e 0x900, card status 0xb00
[ 1.005633] mmc0: mmc_resume_clk_scaling: no devfreq is assosiated with this device
[ 1.005648] mmc0: mmc_sd_power_restore: fail to resume clock scaling (-1)
[ 1.005659] mmc0: mmc_blk_reset: failed to reset -1
[ 1.005674] blk_update_request: I/O error, dev mmcblk0, sector 0
[ 1.005688] Buffer I/O error on dev mmcblk0, logical block 0, async page read
[ 1.006358] mmcblk0: response CRC error sending r/w cmd command, card status 0x900
[ 1.006881] mmcblk0: error -84 transferring data, sector 0, nr 8, cmd respons e 0x900, card status 0xb00
[ 1.006898] blk_update_request: I/O error, dev mmcblk0, sector 0
[ 1.006911] Buffer I/O error on dev mmcblk0, logical block 0, async page read
[ 1.006951] mmcblk0: unable to read partition table
[ 39.073717] mmc_sd_detect(mmc0): Unable to re-detect card (-110)
[ 39.074439] mmc0: card 0001 removed

Usually the cards are read well at High speed not sure why the mmc driver is selecting UHS SDR50 speed?

can you suggest how to set the speed to high speed in the driver?

@jyijyi,

referring the below link:

SDR50 mode requires 1.8V for SD card, on MangOH Red board the supply voltage to SD card is 2.95V therefore we may need to set the Default Speed mode 25MHz or high speed mode 50MHz for SD card to work.

New speed modes (name are base on the bandwidth):
:arrow_forward: SDR12 (max bandwidth: 12MB/s)
:arrow_forward: SDR25 (max bandwidth: 25MB/s)
:arrow_forward: SDR50 (max bandwidth: 50MB/s)
:arrow_forward: SDR104 (max bandwidth: 104MB/s)
:arrow_forward: DDR50 (max bandwidth: 50MB/s)

All these new modes under 1.8V compared to the 3.3V for DS (Default Speed
25MHz) and HS (High Speed at 50MHz)

not sure if your SD card can still work under 3V system…

I used to tune down the SDIO clock to 52MHz when running HS200 mode, by modifying the yocto source code, /kernel/driver/mmc/core/mmc.c, function mmc_select_card_type() , line around 286, like below:
#if 0

            if (caps2 & MMC_CAP2_HS200_1_8V_SDR &&
                card_type & EXT_CSD_CARD_TYPE_HS200_1_8V) {
                            hs200_max_dtr = MMC_HS200_MAX_DTR;
                            avail_type |= EXT_CSD_CARD_TYPE_HS200_1_8V;
            }

#else

            if (caps2 & MMC_CAP2_HS200_1_8V_SDR &&
                card_type & EXT_CSD_CARD_TYPE_HS200_1_8V) {
                            hs200_max_dtr = MMC_HIGH_52_MAX_DTR;
                            avail_type |= EXT_CSD_CARD_TYPE_HS200_1_8V;
            }

#endif

You can give a try on that file.

@jyijyi

Will give it a try, but as the card is getting detected as UHS type and SDR 50 it will clearly not work with 3V system.

May be it is time MangOH red hardware able to provide 1.8V and 3V system provision for SD card.

Also it it possible to change the mode to default speed in the driver? I believe all UHS card should be capable of default speed.

The mangoh board can only support the clock speed up to 60MHz due to the level shifter chipset (TI TXS02612)