# microSD mounting: No such device/Invalid argument

**URL:** <https://mangoh.discourse.group/t/microsd-mounting-no-such-device-invalid-argument/5758>\
**Category:** mangOH Red\
**Created:** [December 1, 2020, 3:13pm UTC](https://mangoh.discourse.group/t/microsd-mounting-no-such-device-invalid-argument/5758 "2020-12-01T15:13:24Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastienmaviel](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@sebastienmaviel](https://mangoh.discourse.group/u/sebastienmaviel)\
**Post date:** [December 1, 2020, 3:13pm UTC](https://mangoh.discourse.group/t/microsd-mounting-no-such-device-invalid-argument/5758/1 "2020-12-01T15:13:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [December 1, 2020, 3:17pm UTC](https://mangoh.discourse.group/t/microsd-mounting-no-such-device-invalid-argument/5758/2 "2020-12-01T15:17:16Z")

</div>

I used the following commands to mount SD card:

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

---

<div class="post-metadata">

**Author:** ![sebastienmaviel](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@sebastienmaviel](https://mangoh.discourse.group/u/sebastienmaviel)\
**Post date:** [December 1, 2020, 3:31pm UTC](https://mangoh.discourse.group/t/microsd-mounting-no-such-device-invalid-argument/5758/3 "2020-12-01T15:31:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [December 1, 2020, 3:58pm UTC](https://mangoh.discourse.group/t/microsd-mounting-no-such-device-invalid-argument/5758/4 "2020-12-01T15:58:02Z")

</div>

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

> [@SD Card Issues - error -110 whilst initialising SD card](https://mangoh.discourse.group/t/sd-card-issues-error-110-whilst-initialising-sd-card/2396/16):
>
> Hello @asyal, Any news on those compatible cards ? I’m having the same issue with my SD card. Regards.

---

<div class="post-metadata">

**Author:** ![sebastienmaviel](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@sebastienmaviel](https://mangoh.discourse.group/u/sebastienmaviel)\
**Post date:** [December 1, 2020, 3:59pm UTC](https://mangoh.discourse.group/t/microsd-mounting-no-such-device-invalid-argument/5758/5 "2020-12-01T15:59:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [December 1, 2020, 4:29pm UTC](https://mangoh.discourse.group/t/microsd-mounting-no-such-device-invalid-argument/5758/6 "2020-12-01T16:29:28Z")

</div>

Yoi can insert usb thumb drive to mangoh board

---

<div class="post-metadata">

**Author:** ![pankajsant](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@pankajsant](https://mangoh.discourse.group/u/pankajsant)\
**Post date:** [December 18, 2020, 6:09am UTC](https://mangoh.discourse.group/t/microsd-mounting-no-such-device-invalid-argument/5758/7 "2020-12-18T06:09:45Z")

</div>

@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?

---

<div class="post-metadata">

**Author:** ![pankajsant](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@pankajsant](https://mangoh.discourse.group/u/pankajsant)\
**Post date:** [December 18, 2020, 6:15am UTC](https://mangoh.discourse.group/t/microsd-mounting-no-such-device-invalid-argument/5758/8 "2020-12-18T06:15:42Z")

</div>

@jyijyi,

referring the below link:

> **[Clement-sd-mmc-high-speed-support-in-linux-kernel\_0.pdf](https://elinux.org/images/9/91/Clement-sd-mmc-high-speed-support-in-linux-kernel_0.pdf)**
>
> 133.72 KB

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):  
▶ SDR12 (max bandwidth: 12MB/s)  
▶ SDR25 (max bandwidth: 25MB/s)  
▶ SDR50 (max bandwidth: 50MB/s)  
▶ SDR104 (max bandwidth: 104MB/s)  
▶ 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)

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [December 18, 2020, 6:33am UTC](https://mangoh.discourse.group/t/microsd-mounting-no-such-device-invalid-argument/5758/9 "2020-12-18T06:33:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pankajsant](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@pankajsant](https://mangoh.discourse.group/u/pankajsant)\
**Post date:** [December 18, 2020, 7:18am UTC](https://mangoh.discourse.group/t/microsd-mounting-no-such-device-invalid-argument/5758/10 "2020-12-18T07:18:42Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [December 18, 2020, 7:27am UTC](https://mangoh.discourse.group/t/microsd-mounting-no-such-device-invalid-argument/5758/11 "2020-12-18T07:27:30Z")

</div>

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