Commit Graph
39 Commits
Author SHA1 Message Date
armando 8c89c9b9d5 fix(sd): fixed slot0 requires all pins to be set when using 1bit iomux mode on p4 2025-05-21 11:13:28 +08:00
Adam Múdry f369caa5d2 fix(sdmmc): SDMMC concurrency change active slot only after the slot is initialized
Fixes counting of initialized slots
2025-05-05 18:58:58 +08:00
Adam Múdry 1e04e7cdbb fix(sdmmc): Fix SDMMC slot switch timing related issue on ESP32-P4 2025-05-05 18:58:58 +08:00
Ivan Grokhotkov 6773164b6a fix(sdmmc): don't disable SDIO interrupts when switching slots 2025-05-05 18:58:58 +08:00
Adam Múdry d29f0f3e21 feat(sdmmc): Concurrent use of SDMMC peripheral
Host and device (card, etc.) initialization is not thread-safe.
After initialization transactions are serialized and guarded by mutex.
Changed `SDMMC_HOST_DEFAULT()` default deinit function to `sdmmc_host_deinit_slot`
which has a slot number as argument.
2025-05-05 18:58:58 +08:00
Adam Múdry c81c37fe1e refactor(sdmmc): Allow sdmmc_host_init to be called multiple times
Along with slight refactor for sdmmc_host.c
2025-05-05 18:58:58 +08:00
Ivan Grokhotkov 924ad0c3a9 test(sdmmc): add test for high-prio task busy while writing
Related to https://github.com/espressif/esp-idf/issues/13934
2025-03-12 13:06:57 +08:00
Ivan Grokhotkov f824a827dc fix(sdmmc): move DMA descriptor refilling into the ISR
Previously, as DMA descriptors were processed, the task performing
SDMMC transfer would get woken up and would refill the descriptors.
This design didn't work correctly when higher priority tasks occupied
the CPU for too long, resulting in SDMMC transfer timing out.

This change moves DMA descriptor refilling into SDMMC ISR. Now the
"DMA done" interrupt is delivered back to task context only when
the entire transfer is completed.

Closes https://github.com/espressif/esp-idf/issues/13934
2025-03-12 13:06:57 +08:00
Armando 938c77ebea change(sdmmc): allow speciying pins for IOMUX slots as well 2024-11-26 17:44:17 +08:00
Armando 6c210c4930 test(emmc): disabled emmc tests on p4 2024-11-26 17:44:17 +08:00
Armando 60720adb03 ci(sd): use uart0 as usj always serial noise on ci on p4 2024-11-26 17:43:27 +08:00
Armando 8cf7188e7c test(sd): no uhs1 runner 2024-11-26 15:13:22 +08:00
Armando 4922c67780 fix(sdspi): fixed sdspi on p4, s3 2024-08-30 11:50:45 +08:00
Ivan Grokhotkov 1dff957597 ci(sdmmc): enable tests for ESP32-P4 2024-07-31 18:39:40 +02:00
Ivan Grokhotkov b124b1d682 ci(sdmmc): switch to usb_serial_jtag in the test app for P4
New CI runners use usb_serial_jtag, update configuration to match this.
2024-07-31 17:21:25 +02:00
Ivan Grokhotkov c8474d48f8 fix(sdmmc): fix invalid data when reading/writing PSRAM buffers
Previous commit has enabled buffers in PSRAM for ESP32-P4. But this
also caused a regression for ESP32-S3, where PSRAM is not DMA capable.
This commit re-introduces the check for esp_ptr_external_ram in case
SOC_SDMMC_PSRAM_DMA_CAPABLE is not set.
2024-06-06 10:44:53 +02:00
Ivan Grokhotkov 3f663ec789 ci(sdmmc): add test config for p4 2024-04-17 12:49:23 +02:00
Ivan Grokhotkov ad6cce5e3a fix(sdmmc): correct unused pin number for P4 EV board 2024-04-17 12:49:23 +02:00
Ivan Grokhotkov 3546c81e32 ci(sdmmc): re-enable CD/WP tests 2024-04-17 12:49:22 +02:00
Ivan Grokhotkov b08ddfb25b fix(sdmmc): don't fail in clock update commands when no card detected
Clock update commands don't actually require the card to be present,
so it's not necessary to fail at this stage.
2024-04-17 12:49:22 +02:00
Ivan Grokhotkov 96074470ec fix(sdmmc): correct power init in CD/WP tests for P4 2024-04-17 12:49:22 +02:00
Ivan Grokhotkov ad51d0d1ca ci(sdmmc): clean up stdout to avoid false positive memory leaks 2024-04-17 12:49:22 +02:00
Ivan Grokhotkov 49b4bc175e feat(sdmmc): add support for PSRAM DMA on ESP32-P4 2024-04-12 12:56:18 +02:00
Ivan Grokhotkov 344439dfaa change(sdmmc): move SD power control logic into sdmmc_test_sd_begin
This simplifies the code a bit,
- removing SOC_SDMMC_IO_POWER_EXTERNAL ifdefs from error paths
- moving the LDO code next to where sdmmc_test_board_card_power_set
  is called for the same purpose
2024-04-04 15:02:11 +02:00
Ivan Grokhotkov 2bd1a8706d feat(sdmmc): add test config for ESP32-P4 EV board 2024-04-04 14:59:28 +02:00
gaoxu 40f38bea6f feat(dma): refactor dma calloc function 2024-04-02 14:30:14 +08:00
morris 4c2569e2fc change(sdmmc): update ldo acquire driver to new API 2024-03-25 21:19:12 +08:00
Armando ec44556a07 feat(sd): added power control driver and implementation layer with ldo 2024-03-25 11:32:56 +08:00
Xiao Xufeng 216284b767 feat(sdio): add sdio over sdmmc support for esp32p4 2024-01-14 01:05:00 +08:00
Armando (Dou Yiwen) dbe1df8cde Merge branch 'feature/esp32p4_sdmmc_on_real_chip' into 'master'
sdmmc: p4 sdmmc on real chip (relies ldo on real chip)

Closes IDF-6502

See merge request espressif/esp-idf!27762
2024-01-05 11:43:30 +08:00
Armando 847d525d78 feat(sdmmc): use ldo as power supply on esp32p4 2024-01-04 15:34:59 +08:00
Armando 3c5a4f9e8a ci(p4): added todo jira for disabled tests on p4 2024-01-04 09:36:38 +08:00
Armando 1ab742b3c3 ci(p4): enable esp32p4 target test 2024-01-04 09:34:55 +08:00
sonika.rathi a7a0245d8e fix(sdmmc): Migrate erase/trim test cases from unit-test-app to component-test-app 2023-12-06 11:07:33 +01:00
Armando 4aadacbcdc refactor(sdspi): added component pytest cases and enabled them on CI 2023-11-29 12:13:03 +08:00
Armando 9b0d75f2df refactor(sdmmc): added component pytest cases and enabled them on CI 2023-11-29 12:13:03 +08:00
Armando b8aba80172 feat(sd): added readme for dependency among SD host related components 2023-11-20 12:30:03 +08:00
Armando 5b8d904a9b refactor(sdmmc): dependency inversion to sdmmc component 2023-11-16 15:37:32 +08:00
Armando c7c38b7904 refactor(sdmmc): place sdmmc driver into a new component 2023-11-16 15:37:32 +08:00