Tests:SDIO-with-UHS

This document describes how to test SDIO at UHS speeds using a ZComax AC-180M card.


 * Note: This is a draft! The final version will be updated until 2016-11-15.

Setup
The following items are needed for this test:


 * the client - a Salvator-X board with a H3 SoC (firmware v2.12) and a ZComax AC-180M plugged into CN14
 * the server - a second computer running some Linux distribution with iperf3 installed
 * the network - capable of running 802.11ac

The client will be connected to the network via WIFI (802.11ac). The server is preferably connected to the network via Gigabit-LAN. Although connection with 802.11ac is also possible, the WIFI card of the server is unknown and might affect the measurement. Gigabit-LAN is more reliable in this regard.

The setup used for the below results is:


 * the client - a Salvator-X board with a H3 SoC (firmware v2.12) and a ZComax AC-180M plugged into CN14
 * the server - Fujitsu Lifebook E544 with RTL8111/8168 PCI Express Gigabit Ethernet controller running Debian Stretch
 * the network - a Fritzbox 7560 router with 802.11ac and Gigabit-LAN

Branch for testing
The test should be used with the following branch:



Ensure the driver is activated in the kernel config
These symbols need to be active to enable the MWIFIEX WLAN driver:

CONFIG_WLAN=y CONFIG_WLAN_VENDOR_MARVELL=y CONFIG_MWIFIEX=y CONFIG_MWIFIEX_SDIO=y

Prepare the root filesystem for your target
The root filesystem should have:


 * busybox with udhcpc (v1.24.2 used here)
 * wireless-tools (v3.0-pre9 used here)
 * wpa-supplicant (v2.5 used here)
 * iperf3 (v3.1.2 used here)
 * latest firmware for SD8887 from the linux-firmware tree.

All tools are standard linux tools and should be available through your buildsystem (buildroot, yocto...).

Boot the kernel
You should see this on successful probe: mmc2: new ultra high speed SDR50 SDIO card at address 0001 mwifiex: rx work enabled, cpus 4 mwifiex_sdio mmc2:0001:1: info: FW download over, size 391772 bytes mwifiex_sdio mmc2:0001:1: WLAN FW is active mwifiex_sdio mmc2:0001:1: info: MWIFIEX VERSION: mwifiex 1.0 (15.68.7.p5) mwifiex_sdio mmc2:0001:1: driver_version = mwifiex 1.0 (15.68.7.p5)

Please note the mmc device is mmc2 here. This is likely for connector CN14. For connector CN13, it is likely to be mmc1. However, keep in mind which one you have and replace the mmc device in the following commands, if necessary.

Verify SD card speed and bus width
We want a UHS mode. Check the timing spec line:

clock:		100000000 Hz vdd:		21 (3.3 ~ 3.4 V) bus mode:	2 (push-pull) chip select:	0 (don't care) power mode:	2 (on) bus width:	2 (4 bits) timing spec:	5 (sd uhs SDR50) signal voltage:	1 (1.80 V) driver type:	0 (driver type B)
 * 1) cat /sys/kernel/debug/mmc2/ios

Check if there is the network device
It should show some mlan  device:

eth0     Link encap:Ethernet  HWaddr  BROADCAST MULTICAST MTU:1500  Metric:1 RX packets:202904 errors:0 dropped:0 overruns:0 frame:0 TX packets:405823 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:13393299 (12.7 MiB) TX bytes:614261381 (585.8 MiB) Interrupt:133
 * 1) ifconfig -a

lo       Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536  Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

mlan0    Link encap:Ethernet  HWaddr  UP BROADCAST RUNNING MULTICAST MTU:1500  Metric:1 RX packets:2 errors:0 dropped:0 overruns:0 frame:0 TX packets:2 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:282 (282.0 B) TX bytes:248 (248.0 B) Similar to above, the wireless network device is likely to be mlan0. If it has a different name in your setup, please adapt the following command-lines accordingly.

Activate the interface
Activate the mlan interface and disable ethernet. If ethernet happens to be connected to the same network as well, you might accidently test the ethernet throughput otherwise :)


 * 1) ifconfig eth0 down
 * 2) ifconfig mlan0 up

Now scan for networks
mlan0    Scan completed : [listing of networks in your area]
 * 1) iwlist mlan0 scan

Create /etc/wpa_supplicant.conf for your network
Here is a template: ctrl_interface=/var/run/wpa_supplicant network={ ssid=" " scan_ssid=1 key_mgmt=WPA-PSK psk=" " }

Start wpa_supplicant to connect to the network

 * 1) wpa_supplicant -imlan0 -c /etc/wpa_supplicant.conf &

FIXME: add output

Start iperf3 (in server mode) on the server
[SERVER] $ iperf3 -s --- Server listening on 5201 ---

Get an address and say hello to the iperf3 server
udhcpc (v1.24.2) started Sending discover... Sending select for ... Lease of  obtained, lease time 1209600 deleting routers adding dns  PING  (): 56 data bytes 64 bytes from : seq=0 ttl=64 time=10.912 ms 64 bytes from : seq=1 ttl=64 time=5.023 ms 64 bytes from : seq=2 ttl=64 time=5.015 ms 64 bytes from : seq=3 ttl=64 time=7.734 ms ...
 * 1) udhcpc -i mlan0; ping 

Test the connection with iperf3
On the target board, run:


 * 1) iperf3 -c 

FIXME: Output