Update SDIO page

* rename page to SDIO
* fix some typo
* change microSD card pics
* add tested microsd table
This commit is contained in:
Gauthier Provost 2018-12-13 17:50:23 +08:00
parent 0231b2bd89
commit 5dd9a175e0
11 changed files with 91 additions and 76 deletions

BIN
docs/img/sdcard/kingston_16gb.jpg Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

After

Width:  |  Height:  |  Size: 17 KiB

BIN
docs/img/sdcard/sandisk_ultra_uhs-i_48mbps_16gb.jpg Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 KiB

After

Width:  |  Height:  |  Size: 14 KiB

BIN
docs/img/sdcard/sandisk_ultra_uhs-i_8gb.jpg Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 KiB

After

Width:  |  Height:  |  Size: 19 KiB

BIN
docs/img/sdcard/strontium_nitro_16gb.jpg Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

BIN
docs/img/sdcard/toshiba_exceria_pro_16gb.jpg Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

After

Width:  |  Height:  |  Size: 19 KiB

BIN
docs/img/sdcard/transcend_premium_8gb.jpg Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -1,17 +1,23 @@
Helios4 SoC (Armada 388) SD card controller support up to UHS-I speed mode Helios4 SoC (Armada 388) SDIO controller supports up to UHS-I speed mode.
![Supported SD Card Speed](/img/sdcard/supported_sdcard_speed.png) Following modes are supported:
However, it is not compatible with all card even though the cards are declared as UHS-I capable. To keep it compatible with most of card, * Default Speed (DS)up to 25 MHz, 1.8V/3.3V signaling
Helios4 device tree only define [Normal Speed mode](https://www.sdcard.org/consumers/choices/speed_class/index.html). * High Speed (HS)up to 50 MHz, 1.8V/3.3V signaling
* SDR12SDR up to 25 MHz, 1.8V/3.3V signaling
* SDR25SDR up to 50 MHz, 1.8V/3.3V signaling
* SDR50SDR up to 100 MHz, 1.8V signaling
* DDR50DDR up to 50 MHz, 1.8V/3.3V signaling
However, it is not compatible with all cards even though the SD cards are declared as UHS-I capable. To keep it compatible with most of card, Helios4 device tree only define by default [Normal Speed mode](https://www.sdcard.org/consumers/choices/speed_class/index.html).
!!! Warning !!! Warning
Enabling High Speed and UHS-I support could lead the system unbootable on incompatible card. Enabling High Speed and UHS-I support could lead to unbootable system because of incompatible microSD card.
## Device Tree Modification ## Device Tree Modification
To enable High Speed mode and UHS-I support, Helios4 device tree need to be modified. To enable High Speed mode and UHS-I support, Helios4 device tree need to be modified.
The following instructions are executed under Helios4. The following instructions are executed under Helios4.
### Prerequisites ### Prerequisites
@ -22,11 +28,15 @@ The following instructions are executed under Helios4.
Install the dependencies and extract the source into ~/src/linux Install the dependencies and extract the source into ~/src/linux
``` ```
sudo apt-get -y install build-essential linux-source-next-mvebu sudo apt-get -y install build-essential linux-source-4.14.87-next-mvebu
mkdir -p ~/src/linux mkdir -p ~/src/linux
tar Jxf /usr/src/linux-source-*-mvebu.tar.xz -C ~/src/linux tar Jxf /usr/src/linux-source-4.14.87-mvebu.tar.xz -C ~/src/linux
``` ```
!!! note
You will need to choose the right *linux-source* package that matches the kernel version you are running. Check kernel version with command **uname -a**
### Patching and Compilation ### Patching and Compilation
Download and apply [this patch](/files/sdcard/helios4_dtb_sd_uhs_linux_stable.patch) to Linux kernel source code. Download and apply [this patch](/files/sdcard/helios4_dtb_sd_uhs_linux_stable.patch) to Linux kernel source code.
@ -87,11 +97,11 @@ sudo rm /boot/dtb/armada-388-helios4.dtb.uhs
``` ```
## Testing SD Card Performance ## Performance Testing
The test methodology adapted from The test methodology is adapted from
[SD card performance - Research guides & tutorials - Armbian forum](https://forum.armbian.com/topic/954-sd-card-performance/) [SD card performance - Research guides & tutorials - Armbian forum](https://forum.armbian.com/topic/954-sd-card-performance/)
with slightly modified parameter to run the test on SD card which mounted under /mnt/sdcard with slightly modified parameter to run the test on SD card mounted under /mnt/sdcard.
``` ```
iozone -e -I -a -s 100M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2 -f /mnt/sdcard/iozone-test.dat iozone -e -I -a -s 100M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2 -f /mnt/sdcard/iozone-test.dat
@ -121,7 +131,7 @@ chmod 755 run_sdcard_test.sh
sudo sed -i 's/^exit 0/dmesg -n 8\nexit 0/g' /etc/rc.local sudo sed -i 's/^exit 0/dmesg -n 8\nexit 0/g' /etc/rc.local
``` ```
**5.** Make sure armada-388-helios4.dtb point to armada-388-helios4.dtb.uhs **5.** Make sure armada-388-helios4.dtb points to armada-388-helios4.dtb.uhs
``` ```
cd /boot/dtb/ cd /boot/dtb/
@ -151,8 +161,7 @@ lsblk
sudo ./run_sdcard_test.sh sudo ./run_sdcard_test.sh
``` ```
It will display the test progress and also store into log file with filename format The test script will display the test progress and log result into log file : *SD_test_**<sdcard_address\>**\_[**<sdcard_name\>**]\_**<date_in_YYYYMMDD_HHMMSS\>**.log*
*SD_test_**<sdcard_address\>**\_[**<sdcard_name\>**]\_**<date_in_YYYYMMDD_HHMMSS\>**.log*
Example filename: SD_test_mmc0:aaaa-[SU08G]_20181212_034241.log Example filename: SD_test_mmc0:aaaa-[SU08G]_20181212_034241.log
@ -175,7 +184,20 @@ sudo ln -sf armada-388-helios4.dtb.ori armada-388-helios4.dtb
sudo sed -i '/^dmesg -n 8/d' /etc/rc.local sudo sed -i '/^dmesg -n 8/d' /etc/rc.local
``` ```
### Tested SD Card ### Tested MicroSD Card
Below a non-exhaustive list of microSD Card models that we tested to check compatibility with UHS-I speed mode. We will keep populating this list with new microSD Card models.
| **MicroSD Card Model** | **UHS-I Compatibility Result** |
|--------------------|----------------|
| [Kingston Mobile Card microSDHC (16GB)](#kingston-mobile-card-microsdhc-16gb)|not compatible|
| [Sandisk Ultra microSD UHS-I Card (32GB)](#sandisk-ultra-microsd-uhs-i-card-32gb)|**yes, but no performance improvement**|
| [Sandisk Ultra microSD UHS-I Card (16GB)](#sandisk-ultra-microsd-uhs-i-card-16gb)|not compatible|
| [Sandisk Ultra microSD UHS-I Card 48MBps (16GB)](#sandisk-ultra-microsd-uhs-i-card-48mbps-16gb)|not compatible|
| [Sandisk Ultra microSD UHS-I Card 30MBps (8GB)](#sandisk-ultra-microsd-uhs-i-card-30mbps-8gb)|**yes, but no performance improvement**|
| [Strontium Nitro MicroSD Card (16GB)](#strontium-nitro-microsd-card-16gb)|**yes, performance boosted**|
| [Toshiba MicroSD Exceria Pro (16GB)](#toshiba-microsd-exceria-pro-16gb)|not compatible|
| [Transcend microSDHC Premium (8GB)](#transcend-microsdhc-premium-8gb)|**yes, but no performance improvement**|
#### Kingston Mobile Card microSDHC (16GB) #### Kingston Mobile Card microSDHC (16GB)
@ -194,17 +216,15 @@ sudo sed -i '/^dmesg -n 8/d' /etc/rc.local
| Serial Number | 0x5b3003c7 | | Serial Number | 0x5b3003c7 |
| Manufacture Date | 07/2018 | | Manufacture Date | 07/2018 |
| Capacity Standard | SDHC | | Capacity Standard | SDHC |
| SD version^ | 1.0 | | SD version* | 1.0 |
| Mode^ | SD Legacy | | Mode* | SD Legacy |
| Bus Speed^ | 25000000 | | Bus Speed* | 25000000 |
| Bus Width^ | 4-bit | | Bus Width* | 4-bit |
!!! Notes !!! Notes
^ Value taken from U-Boot "mmc info". * Value taken from U-Boot "mmc info".
*Test Result* *Test Result* : Failed!
Failed!
``` ```
mmc0: new SDHC card at address 0001 mmc0: new SDHC card at address 0001
@ -243,7 +263,7 @@ And the still did not finished the test after 8 hours.
--- ---
#### Sandisk Ultra microSD UHS-I Card For Smartphone (32GB) #### Sandisk Ultra microSD UHS-I Card (32GB)
![Sandisk Ultra smartphone 32GB](/img/sdcard/sandisk_ultra_uhs-i_for_smartphone_32gb.jpg) ![Sandisk Ultra smartphone 32GB](/img/sdcard/sandisk_ultra_uhs-i_for_smartphone_32gb.jpg)
@ -260,13 +280,13 @@ And the still did not finished the test after 8 hours.
| Serial Number | 0x0c9daa71 | | Serial Number | 0x0c9daa71 |
| Manufacture Date | 04/2014 | | Manufacture Date | 04/2014 |
| Capacity Standard | SDHC | | Capacity Standard | SDHC |
| SD version^ | 3.0 | | SD version* | 3.0 |
| Mode^ | SD High Speed (50MHz) | | Mode* | SD High Speed (50MHz) |
| Bus Speed^ | 50000000 | | Bus Speed* | 50000000 |
| Bus Width^ | 4-bit | | Bus Width* | 4-bit |
!!! Notes !!! Notes
^ Value taken from U-Boot "mmc info". * Value taken from U-Boot "mmc info".
*Test Result* *Test Result*
@ -280,11 +300,11 @@ mmcblk0: error -84 transferring data, sector 62333824, nr 8, cmd response 0x900,
Even though there are some errors, the test finished without much improvement. Even though there are some errors, the test finished without much improvement.
![Sandisk Ultra smartphone 32GB Test Result](/img/sdcard/test_result_sandisk_ultra_uhs-i_for_smartphone_32gb.png) ![!Sandisk Ultra smartphone 32GB Test Result](/img/sdcard/test_result_sandisk_ultra_uhs-i_for_smartphone_32gb.png)
--- ---
#### Sandisk Ultra microSD UHS-I Card For Smartphone (16GB) #### Sandisk Ultra microSD UHS-I Card (16GB)
![Sandisk Ultra smartphone 16GB](/img/sdcard/sandisk_ultra_uhs-i_for_smartphone_16gb.jpg) ![Sandisk Ultra smartphone 16GB](/img/sdcard/sandisk_ultra_uhs-i_for_smartphone_16gb.jpg)
@ -301,17 +321,15 @@ Even though there are some errors, the test finished without much improvement.
| Serial Number | 0xa5253c77 | | Serial Number | 0xa5253c77 |
| Manufacture Date | 04/2017 | | Manufacture Date | 04/2017 |
| Capacity Standard | SDHC | | Capacity Standard | SDHC |
| SD version^ | 3.0 | | SD version* | 3.0 |
| Mode^ | SD High Speed (50MHz) | | Mode* | SD High Speed (50MHz) |
| Bus Speed^ | 50000000 | | Bus Speed* | 50000000 |
| Bus Width^ | 4-bit | | Bus Width* | 4-bit |
!!! Notes !!! Notes
^ Value taken from U-Boot "mmc info". * Value taken from U-Boot "mmc info".
*Test Result* *Test Result* : Failed!
Failed!
``` ```
mmc0: new ultra high speed DDR50 SDHC card at address aaaa mmc0: new ultra high speed DDR50 SDHC card at address aaaa
@ -354,17 +372,15 @@ The card was not detected by Linux.
| Serial Number | 0x349f2b91 | | Serial Number | 0x349f2b91 |
| Manufacture Date | 01/2016 | | Manufacture Date | 01/2016 |
| Capacity Standard | SDHC | | Capacity Standard | SDHC |
| SD version^ | 3.0 | | SD version* | 3.0 |
| Mode^ | SD High Speed (50MHz) | | Mode* | SD High Speed (50MHz) |
| Bus Speed^ | 50000000 | | Bus Speed* | 50000000 |
| Bus Width^ | 4-bit | | Bus Width* | 4-bit |
!!! Notes !!! Notes
^ Value taken from U-Boot "mmc info". * Value taken from U-Boot "mmc info".
*Test Result* *Test Result* : Failed!
Failed!
``` ```
mmc0: new ultra high speed DDR50 SDHC card at address aaaa mmc0: new ultra high speed DDR50 SDHC card at address aaaa
@ -401,13 +417,13 @@ The card was not detected by Linux.
| Serial Number | 0x2369e07f | | Serial Number | 0x2369e07f |
| Manufacture Date | 12/2013 | | Manufacture Date | 12/2013 |
| Capacity Standard | SDHC | | Capacity Standard | SDHC |
| SD version^ | 3.0 | | SD version* | 3.0 |
| Mode^ | SD High Speed (50MHz) | | Mode* | SD High Speed (50MHz) |
| Bus Speed^ | 50000000 | | Bus Speed* | 50000000 |
| Bus Width^ | 4-bit | | Bus Width* | 4-bit |
!!! Notes !!! Notes
^ Value taken from U-Boot "mmc info". * Value taken from U-Boot "mmc info".
*Test Result* *Test Result*
@ -421,7 +437,7 @@ mmcblk0: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card s
Even though there are some errors, the test finished. Many of test cases see performance reduction. Even though there are some errors, the test finished. Many of test cases see performance reduction.
![Sandisk Ultra 30 MBps Test Result](/img/sdcard/test_result_sandisk_ultra_uhs-i_8gb.png) ![!Sandisk Ultra 30 MBps Test Result](/img/sdcard/test_result_sandisk_ultra_uhs-i_8gb.png)
--- ---
@ -442,13 +458,13 @@ Even though there are some errors, the test finished. Many of test cases see per
| Serial Number | 0x954b266b | | Serial Number | 0x954b266b |
| Manufacture Date | 09/2016 | | Manufacture Date | 09/2016 |
| Capacity Standard | SDHC | | Capacity Standard | SDHC |
| SD version^ | 3.0 | | SD version* | 3.0 |
| Mode^ | SD High Speed (50MHz) | | Mode* | SD High Speed (50MHz) |
| Bus Speed^ | 50000000 | | Bus Speed* | 50000000 |
| Bus Width^ | 1-bit | | Bus Width* | 1-bit |
!!! Notes !!! Notes
^ Value taken from U-Boot "mmc info". * Value taken from U-Boot "mmc info".
*Test Result* *Test Result*
@ -463,7 +479,7 @@ mmc0: Tuning failed, falling back to fixed sampling clock
Even though there are some warnings, the test finished. Even though there are some warnings, the test finished.
![Strontium Nitro Test Result](/img/sdcard/test_result_strontium_nitro_16gb.png) ![!Strontium Nitro Test Result](/img/sdcard/test_result_strontium_nitro_16gb.png)
--- ---
@ -485,17 +501,15 @@ Even though there are some warnings, the test finished.
| Serial Number | 0xd2a0e6a3 | | Serial Number | 0xd2a0e6a3 |
| Manufacture Date | 11/2016 | | Manufacture Date | 11/2016 |
| Capacity Standard | SDHC | | Capacity Standard | SDHC |
| SD version^ | 3.0 | | SD version* | 3.0 |
| Mode^ | SD High Speed (50MHz) | | Mode* | SD High Speed (50MHz) |
| Bus Speed^ | 50000000 | | Bus Speed* | 50000000 |
| Bus Width^ | 4-bit | | Bus Width* | 4-bit |
!!! Notes !!! Notes
^ Value taken from U-Boot "mmc info". * Value taken from U-Boot "mmc info".
*Test Result* *Test Result* : Failed!
Failed!
``` ```
mmc0: error -84 whilst initialising SD card mmc0: error -84 whilst initialising SD card
@ -522,13 +536,10 @@ The card was not detected by Linux.
| Serial Number | 0x4568e585 | | Serial Number | 0x4568e585 |
| Manufacture Date | 06/2014 | | Manufacture Date | 06/2014 |
| Capacity Standard | SDHC | | Capacity Standard | SDHC |
| SD version^ | 3.0 | | SD version* | 3.0 |
| Mode^ | SD High Speed (50MHz) | | Mode* | SD High Speed (50MHz) |
| Bus Speed^ | 50000000 | | Bus Speed* | 50000000 |
| Bus Width^ | 1-bit | | Bus Width* | 1-bit |
!!! Notes
^ Value taken from U-Boot "mmc info".
*Test Result* *Test Result*
@ -538,4 +549,8 @@ mmcblk0: mmc0:b368 USD 7.45 GiB
mmcblk0: p1 mmcblk0: p1
``` ```
![Transcend Premium Test Result](/img/sdcard/test_result_transcend_premium_8gb.png) ![!Transcend Premium Test Result](/img/sdcard/test_result_transcend_premium_8gb.png)
---
**Value taken from U-Boot "mmc info"*

View File

@ -72,9 +72,9 @@ pages:
- GPIO : 'gpio.md' - GPIO : 'gpio.md'
- I2C (OLED) : 'i2c.md' - I2C (OLED) : 'i2c.md'
- LED : 'led.md' - LED : 'led.md'
- SDIO (SD Card) : 'sdcard.md'
- PWM (Fan) : 'pwm.md' - PWM (Fan) : 'pwm.md'
- SPI (NOR Flash) : 'spi.md' - SPI (NOR Flash) : 'spi.md'
- SD Card : 'sdcard.md'
- Development: - Development:
- Armbian : 'armbian.md' - Armbian : 'armbian.md'
- FreeBSD : 'freebsd.md' - FreeBSD : 'freebsd.md'