Commit graph

17 commits

Author SHA1 Message Date
Michael (XIAO Xufeng) 55bb42dc63 sdmmc: fix the probe issue that forbid sdspi working in highspeed mode
SD cards don't support CMD7 (select_card) in SPI mode. Highspeed probe
of sdspi will fail in this step and stop working in highspeed mode.
Remove the CMD7 in enable_hs_mode_and_check to fix this issue.

Please note that, on ESP32, you have to use the IOMUX pins to use sdspi
in 40MHz, otherwise the initialization process will report reading issue
and fail.
2020-07-28 19:09:38 +08:00
Ivan Grokhotkov b7e5b28f49 sdmmc: update unit tests for ESP_eMMC_TestBoard_V1
1. New tests for SD card on slot 0. Currently frequency for 4-bit mode
has to be reduced in the test.

2. Change pin for CD/WP tests, re-enable CD tests.
2018-08-30 13:14:26 +08:00
Angus Gratton 156dd4841d Temporarily disable SD CD/WP mode tests
Tracked in TW22648
2018-05-21 12:27:10 +00:00
Ivan Grokhotkov 5a63faa516 sdmmc: enable more test cases
Some test cases did not run automatically in CI, this change enables
them.
2018-04-26 10:04:44 +08:00
Ivan Grokhotkov e0f1524c86 sdmmc: add tests for CD and WP pins for SD and SPI mode 2018-04-24 19:08:44 +08:00
michael 2551a7343d test(sdmmc_host): add new test to probe over SD (1-bit). 2018-02-07 12:05:05 +08:00
Ivan Grokhotkov b76a672aed ci: disable sd card tests 2017-08-31 23:50:56 +08:00
Ivan Grokhotkov 631f552489 sdmmc: don't use high speed mode with SD over SPI
Disabling due to limitation of SPI driver (max 26MHz for full-duplex
mode over GPIO matrix)
2017-08-25 14:33:19 +08:00
Ivan Grokhotkov b9cdbfea87 Merge branch 'test/UT_SDMMC' into 'master'
Enable SDMMC driver test cases

See merge request !1106
2017-08-24 14:41:39 +08:00
houchenyao cf64c7e9a6 unit test: add sd env and spi env for sdmmc 2017-08-22 21:01:34 +08:00
Ivan Grokhotkov e6258ac6cb sdmmc: don’t flip word order in MMC_RSP_BITS
MMC_RSP_BITS helper function had a hack that it flipped word order in
the response, assuming that response size is 4 words. This hack does not
work for responses which are not 4 words long (such as the SWITCH_FUNC
response, which is 64 words long).

This change removes the hack and the matching word order reversal code
in sdmmc driver.
2017-08-16 18:59:04 +08:00
Ivan Grokhotkov 5539bfb83b sdmmc: mark new unit test as ignored 2017-08-08 03:51:54 +08:00
Ivan Grokhotkov 512898edee sdmmc: fix reads/writes to/from unaligned buffers
SDMMC hardware treats all buffers as aligned, and ignores 2 LSBs of
addresses written into DMA descriptors. Previously SDMMC host driver
assumed that data buffers passed from SDDMC command layer would be
aligned. However alignment checks were never implemented in the command
layer, as were the checks that the buffer coming from the application
would be in DMA capable memory. Most of the time this was indeed true.
However in some cases FATFS library can pass buffers offset by 2 bytes
from word boundary. “DMA capable” restriction may be broken if pSRAM
support is used.

This change adds buffer checks to the SDMMC host driver (alignment and
DMA capability), so that the host layer will error out for incompatible
buffers. In SDMMC command layer, a check is added to read and write
functions. If an incompatible buffer is passed from the application, new
buffer (512 bytes size) is allocated, and the transfer is performed
using {READ,WRITE}_SINGLE_BLOCK commands.
2017-08-01 03:15:11 +08:00
Dmitry Yakovlev e5bb45f381 driver: SD protocol driver for SPI peripheral 2017-07-20 13:43:07 +08:00
antti f8b5c29346 esp32: add [ignore] tag to some unit test cases for CI
Add ignore tag on unit test cases that are not supported in CI yet
2017-01-18 17:08:20 +08:00
Ivan Grokhotkov 44ce833d76 fatfs: add vfs support 2017-01-09 05:54:04 +08:00
Ivan Grokhotkov edd924f273 sdmmc: add peripheral driver and protocol layer 2017-01-09 04:51:24 +08:00