Am 26.03.2017 um 16:28 schrieb H. Nikolaus Schaller hns@goldelico.com:
Am 26.03.2017 um 12:59 schrieb H. Nikolaus Schaller hns@goldelico.com:
Am 26.03.2017 um 03:06 schrieb Matthijs van Duin matthijsvanduin@gmail.com:
It turns out that all linux images we've used so far had no support yet for UHS or HS200 or such in the MMC driver, hence the primary SD slot and eMMC were artificially speed-limited.
It turned out patches to fix that had been made but have not yet reached upstream. I've rebased them on top of mainline 4.10.1: https://github.com/mvduin/linux/commits/ti/omap-hsmmc
All you then need to do is declare supported functionality in DT: https://github.com/mvduin/linux/commit/925d93d4e22a
As a bonus they also enhanced DMA support.
Great! TNX.
Read speed on the eMMC of the uEVM about 60-65 MB/s.
Enjoy!
Have quickly merged on top of letux-4.10.5:
http://git.goldelico.com/?p=gta04-kernel.git;a=shortlog;h=refs/heads/letux-4...
It seems to have a problem on Pyra:
[ 3.812928] Waiting for root device PARTUUID=00000000-02... [ 4.121999] omap_hsmmc 480ad000.mmc: card claims to support voltages below defined range [ 4.155258] mmc2: new high speed SDIO card at address 0001 [ 4.192311] omap_hsmmc 4809c000.mmc: card busy [ 4.263854] mmc1: error -110 whilst initialising SD card
But I am not sure if my quick build (not clean) is ok. Need more time. Maybe remove high-speed mode from mmc1 to be able to completely boot.
I have removed settings for mmc1 and made a clean build (so that I don't know exactly which ones makes the difference). But this time I could, well, boot:
... [ 8.940642] bq2429x_charger 1-006b: failed to request chg_irq: -22 [ 8.955942] input: twl6040:vibrator as /devices/platform/44000000.ocp/48070000.i2c/i2c-0/0-004b/twl6040-vibra/input/input9 [ 8.978790] modem: done [ 8.982549] wwan-on-off successfully probed [ 9.028533] omap-abe-twl6040 sound: twl6040-legacy <-> 40132000.mcpdm mapping ok [ 9.068073] input: Letux Cortex 15 Headset Jack as /devices/platform/sound/sound/card0/input10 [ 9.117576] txs_probe() [ 9.120232] txs_probe() initial = 0 [ 9.123925] txs_probe() probed [ 9.206221] [drm] Initialized [ 9.677305] dmm 4e000000.dmm: initialized all PAT entries [ 9.767900] not all displays probed (1 of 2) [ 10.147483] mmc0: new HS200 MMC card at address 0001 [ 10.177057] mmcblk0: mmc0:0001 HBG4a2 29.1 GiB [ 10.181004] UBIFS error (pid: 1164): cannot open "ubi0:gta04-rootfs", error -19 [ 10.207075] mmcblk0boot0: mmc0:0001 HBG4a2 partition 1 4.00 MiB [ 10.232624] mmcblk0boot1: mmc0:0001 HBG4a2 partition 2 4.00 MiB [ 10.261875] mmcblk0: p1 p2 [ 10.300761] not all displays probed (1 of 2) [ 10.374266] mmcblk0: response CRC error sending r/w cmd command, card status 0x800b00 [ 10.498399] mmcblk0: response CRC error sending r/w cmd command, card status 0xb00 [ 10.596186] mmcblk0: response CRC error sending r/w cmd command, card status 0x800b00 [ 10.608403] mmcblk0: response CRC error sending r/w cmd command, card status 0x800b00 [ 10.619924] mmcblk0: response CRC error sending r/w cmd command, card status 0x800b00 [ 10.631620] mmcblk0: response CRC error sending r/w cmd command, card status 0x800b00 [ 10.799005] mmcblk0: response CRC error sending r/w cmd command, card status 0x800b00 [ 10.807479] blk_update_request: I/O error, dev mmcblk0, sector 61071344 [ 10.818507] mmcblk0: response CRC error sending r/w cmd command, card status 0x800b00 [ 10.849685] mmcblk0: response CRC error sending r/w cmd command, card status 0x800b00 [ 10.923261] mmcblk0: response CRC error sending r/w cmd command, card status 0x800b00 [ 10.936359] mmcblk0: response CRC error sending r/w cmd command, card status 0x800b00 [ 10.949808] mmcblk0: response CRC error sending r/w cmd command, card status 0x800b00 [ 10.991766] mmcblk0: response CRC error sending r/w cmd command, card status 0x800b00 [ 11.000127] blk_update_request: I/O error, dev mmcblk0, sector 61071344 [ 11.007386] Buffer I/O error on dev mmcblk0, logical block 7633918, async page read [ 11.050312] mmcblk0: response CRC error sending r/w cmd command, card status 0x800b00 [ 11.088880] mmcblk0: response CRC error sending r/w cmd command, card status 0x800b00 [ 11.128199] mmcblk0: response CRC error sending r/w cmd command, card status 0x800b00 [ 11.141164] mmcblk0: response CRC error sending r/w cmd command, card status 0x800b00 [ 11.182957] mmcblk0: response CRC error sending r/w cmd command, card status 0x800b00 [ 11.196182] mmcblk0: response CRC error sending r/w cmd command, card status 0x800b00 [ 11.204550] blk_update_request: I/O error, dev mmcblk0, sector 61071344... ... this continues and ends after a while.
Then I can get:
root@letux:~# cat /sys/kernel/debug/mmc0/ios clock: 192000000 Hz vdd: 18 (3.0 ~ 3.1 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 3 (8 bits) timing spec: 9 (mmc HS200) signal voltage: 1 (1.80 V) driver type: 0 (driver type B) root@letux:~#
This obviously means as conjectured that the eMMC has severe problems at HS200 speed and there is no mechanism to fall back to slower speeds.
After reducing DT speed to
max-frequency = <92000000>;
the CRC errors are gone.
root@letux:~# hdparm -tT /dev/mmcblk0
/dev/mmcblk0: Timing cached reads: 914 MB in 2.00 seconds = 457.52 MB/sec Timing buffered disk reads: 126 MB in 3.04 seconds = 41.50 MB/sec root@letux:~# hdparm -tT --direct /dev/mmcblk0
/dev/mmcblk0: Timing O_DIRECT cached reads: 76 MB in 2.03 seconds = 37.36 MB/sec Timing O_DIRECT disk reads: 110 MB in 3.00 seconds = 36.62 MB/sec root@letux:~# cat /sys/kernel/debug/mmc0/ios clock: 92000000 Hz vdd: 18 (3.0 ~ 3.1 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 3 (8 bits) timing spec: 9 (mmc HS200) signal voltage: 1 (1.80 V) driver type: 0 (driver type B) root@letux:~#
A little strange that speed is still not faster than 40MB/s.
Next I tried 142MHz and it also works w/o any CRC error and is faster:
root@letux:~# hdparm -tT /dev/mmcblk0
/dev/mmcblk0: Timing cached reads: 992 MB in 2.00 seconds = 495.98 MB/sec Timing buffered disk reads: 244 MB in 3.02 seconds = 80.85 MB/sec root@letux:~# hdparm -tT --direct /dev/mmcblk0
/dev/mmcblk0: Timing O_DIRECT cached reads: 146 MB in 2.01 seconds = 72.78 MB/sec Timing O_DIRECT disk reads: 212 MB in 3.02 seconds = 70.20 MB/sec root@letux:~# cat /sys/kernel/debug/mmc0/ios clock: 142000000 Hz vdd: 18 (3.0 ~ 3.1 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 3 (8 bits) timing spec: 9 (mmc HS200) signal voltage: 1 (1.80 V) driver type: 0 (driver type B) root@letux:~#
The strange thing is that increasing the max-frequency by 50% gives double speed...
Maybe someone else can extend experiments based on this to determine the clock limit.
BR, Nikolaus